Commit Graph

22253 Commits

Author SHA1 Message Date
samkim-crypto 7d87e8227f
[clap-utils] Remove `--blockhash` arg as a strict requirement when passing `--nonce` (#30864)
* require nonce authority argument on nonce clap argument

* remove nonce authority requirement on nonce clap argument
2023-03-24 09:48:16 +09:00
Tao Zhu 52e63e2ffa
Allow banking_stage to update prioritization_fee_cache (#30853)
* Allow banking_stage to update prioritization_fee_cache

* Update core/src/banking_stage/committer.rs

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>

* move use to top

---------

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2023-03-24 00:05:54 +00:00
behzad nouri a36e8f559c
removes hash-map lookups when sorting vote-account keys (#30878) 2023-03-23 22:29:35 +00:00
Tao Zhu 653083806f
only executed transactions are used to update prioritization_fee_cache (#30868)
* only executed transactions are used to update prioritization_fee_cache

* Update ledger/src/blockstore_processor.rs
Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2023-03-23 16:33:02 -05:00
steviez 8db35eb7e5
ledger-tool: Add flag to find non-vote optimistic slots (#30580)
In cluster restart scenarios, it is desirable to know the latest
optimistic slot(s), which the subcommand latest-optimistic-slots will
return. However, it is also useful to know whether slots contain only
votes or if they contain votes and user transactions.

This PR adds an extra column of output to show whether an optimistically
confirmed slot is vote only (contains zero non-vote transactions).
Additionally, a flag has been added to enable filtering output to
exclude vote only slots.
2023-03-23 14:13:41 -07:00
Andrew Fitzgerald b14fcf5a12
rename process_entries_with_callback to process_entries (#30870) 2023-03-23 13:37:57 -07:00
dependabot[bot] db1e721f48
Bump memmap2 from 0.5.8 to 0.5.10 (#30867)
* Bump memmap2 from 0.5.8 to 0.5.10

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.8 to 0.5.10.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.8...v0.5.10)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-23 11:16:43 -06:00
Alexander Meißner c10f337f85
Feature - Loader built-in program v3 (#30464)
* Adds loader-v3 in SDK.

* Adds loader-v3 built-in program.

* Adds tests.
2023-03-23 18:13:47 +01:00
Tyera 0291e8c702
cli: require one or more authority params in `stake-authorized-checked` (#30863)
* Require one or more authority params

* Add auth list len check
2023-03-23 04:13:56 +00:00
Ryo Onodera 6c444df9e0
Add --block-{verification,production}-method flags (noop atm) (#30746)
* Add --{replaying,banking}-backend flags (noop atm)

* Greatly simplify enums with strum

* Update programs/sbf/Cargo.lock...

* Rely on Display, removing Debug

* constify cli_names()

* Don't allow omitting bankend value

* Rename to --block-{verification,production}-method

* Use more specific name

* Actually support missing value....

* Remove strictly-unnecessary flags

* Use lazy_static! instead of abusing DefaultArgs...
2023-03-23 12:57:28 +09:00
Jeff Biseda 04f0311aa1
check data budget before accessing blockstore (#30809) 2023-03-22 15:56:06 -07:00
Jeff Biseda 94b27d8f96
add metric for repair request blockstore misses (#30810) 2023-03-22 15:47:11 -07:00
Jeff Washington (jwash) 9f3381c771
disk bucket allocated bit can be not in header (#30834) 2023-03-22 15:11:35 -07:00
Jeff Washington (jwash) 3ebfda5aef
add stat for disk buckets flushed (#30850) 2023-03-22 15:04:17 -07:00
Xiang Zhu d69f60229d
Construct bank from snapshot dir (#30171)
* Construct a bank from a snapshot directory

* Clean up.  Remove archiving releated data structures

* Fix auto checks

* remove ArchiveFormat::None

* fix merge error

* remove incremental snapshot dir

* Minor cleanup, remove unused functiond defs

* remove pub fn bank_from_latest_snapshot_dir

* rename bank_from_snapshot_dir to bank_from_snapshot

* Clean up invalid comments

* A few minor review changes

* Removed insert_slot_storage_file

* Add comment explain hardlink symlink

* Skip the whole verify_snapshot_bank call for the from_dir case

* Add bank.set_initial_accounts_hash_verification_completed()

* address review issues: appendvec to append_vec, replace unwrap with expect, etc

* AtomicAppendVecId, remove arc on bank etc

* slice, CI error on &snapshot_version_path

* measure_build_storage

* move snapshot_from

* remove measure_name from build_storage_from_snapshot_dir

* remove from_dir specific next_append_vec_id logic

* revert insert_slot_storage_file change

* init next_append_vec_id to fix the substraction underflow

* remove measure from build_storage_from_snapshot_dir

* make measure name more specific

* refactor status_cache deserialization into a function

* remove reference to pass the ci check

* track next appendvec id

* verify that the next_append_vec_id tracking is correct

* clean up usize

* in build_storage_from_snapshot_dir remove expect

* test max appendvecc id tracking with multiple banks in the test

* cleared expect and unwrap in streaming_snapshot_dir_files

* rebase cleanup

* change to measure!

* dereference arc in the right way
2023-03-22 13:49:23 -07:00
Illia Bobyr 809041b151
poh_verify => run_verification: Rename to be more accurate (#30811)
`poh_verify` actually disables transaction signature, tick count and
built in program argument verifications as well.  It is somewhat
confusing to call it `poh_verify`.
2023-03-22 11:03:30 -07:00
dependabot[bot] 9adb321bed
Bump prost from 0.11.6 to 0.11.8 (#30844)
* Bump prost from 0.11.6 to 0.11.8

Bumps [prost](https://github.com/tokio-rs/prost) from 0.11.6 to 0.11.8.
- [Release notes](https://github.com/tokio-rs/prost/releases)
- [Commits](https://github.com/tokio-rs/prost/compare/v0.11.6...v0.11.8)

---
updated-dependencies:
- dependency-name: prost
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-22 12:03:13 -06:00
dependabot[bot] 027bd5f8a5
Bump serde from 1.0.152 to 1.0.158 (#30845)
* Bump serde from 1.0.152 to 1.0.158

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.152 to 1.0.158.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.152...v1.0.158)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-22 11:53:39 -06:00
Dmitri Makarov db9623db06
Fix cargo-build-bpf removing a wrong command line option (#30848) 2023-03-22 09:37:33 -07:00
Jeff Washington (jwash) 9a1d5ea95d
at startup, keep duplicates in in-memory index since they will be cleaned shortly (#30736)
at startup, keep duplicates in in-memory index since they will be cleaned soon
2023-03-22 08:33:39 -07:00
Dmitri Makarov 81ef2a0d75
Update references to platform-tools (#30764) 2023-03-22 07:41:40 -07:00
Brooks 35437b8dad
Makes AccountsHashVerifier aware of Incremental Accounts Hash (#30820) 2023-03-22 10:20:16 -04:00
Jeff Washington (jwash) 4285cb2b84
remove uid concept from disk buckets (#30836)
* remove uid concept from disk buckets

* remove uid parameter from try_lock
2023-03-22 06:30:44 -07:00
behzad nouri 25b7811869
moves shreds deduper to shred-sigverify stage (#30786)
Shreds arriving at tvu/tvu_forward/repair sockets are each processed in
a separate thread, and since each thread has its own deduper, the
duplicates across these sockets are not filtered out.
Using a common deduper across these threads will require an RwLock
wrapper and may introduce lock contention.
The commit instead moves the shred-deduper to shred-sigverify-stage
where all these shreds arrive through the same channel.
2023-03-22 13:19:16 +00:00
Ryo Onodera 721719d776
Add solana_clap_utils::hidden_unless_forced() (#30843)
* Add solana_clap_utils::hidden_unless_forced()

* Use more descriptive env name

Co-authored-by: mvines <mvines@gmail.com>

---------

Co-authored-by: mvines <mvines@gmail.com>
2023-03-22 08:59:17 +00:00
Andrew Fitzgerald ac8c31b5d6
PohRecorder::recorder -> new_recorder (#30838) 2023-03-22 13:19:20 +09:00
Tao Zhu 21c287a64f
include loaded accounts data size limit in transaction fee calculation (#30659)
* include loaded accounts data size limit in transaction base fee calculation
* citing compute_budget for heap cost;
* update sbf tests

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2023-03-21 18:41:41 -05:00
Jeff Washington (jwash) d4a6e00ffc
rework find_entry_mut for missing case (#30833)
* rework find_entry_mut for missing case

* clippy
2023-03-21 14:09:17 -07:00
HaoranYi d646820a6e
Do not log detailed epoch stakes (#30825)
* do not log detailed epoch stakes

* allow dead code

* log stake details at trace level

* no need dead_code

* Update runtime/src/bank.rs

Co-authored-by: Brooks <brooks@prumo.org>

---------

Co-authored-by: Brooks <brooks@prumo.org>
2023-03-21 14:43:06 -05:00
Jeff Washington (jwash) 2216647f7e
better duplicate key stats during index generation (#30829) 2023-03-21 12:02:23 -07:00
Alexander Meißner 473534f308
Adds test for programs which read from a program account (#30803)
Adds test_program_reads_from_program_account().
2023-03-21 18:12:19 +01:00
Brooks b64d0de771
Makes snapshot_utils aware of Incremental Accounts Hash (#30804) 2023-03-21 16:34:30 +00:00
HaoranYi 6a6d5ee498
typo (#30824) 2023-03-21 11:19:16 -05:00
Brooks 836494fc5f
Cleans *up to* the last full snapshot slot in verify_snapshot_bank() (#30818)
Cleans up to the last full snapshot slot in verify_snapshot_bank()
2023-03-21 15:49:49 +00:00
dependabot[bot] 4aac7ead50
Bump arrayref from 0.3.6 to 0.3.7 (#30814)
* Bump arrayref from 0.3.6 to 0.3.7

Bumps [arrayref](https://github.com/droundy/arrayref) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/droundy/arrayref/releases)
- [Commits](https://github.com/droundy/arrayref/commits)

---
updated-dependencies:
- dependency-name: arrayref
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-21 09:42:27 -06:00
dependabot[bot] 6fcbd77bbb
Bump indexmap from 1.9.1 to 1.9.2 (#30815)
* Bump indexmap from 1.9.1 to 1.9.2

Bumps [indexmap](https://github.com/bluss/indexmap) from 1.9.1 to 1.9.2.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/bluss/indexmap/compare/1.9.1...1.9.2)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-03-21 09:42:07 -06:00
steviez 5344a789d7
Revert "Add new vote state version that replaces Lockout with LandedV… (#30817)
Revert "Add new vote state version that replaces Lockout with LandedVote to a… (#29524)"

This reverts commit d77f0a22c7.
2023-03-21 22:54:13 +08:00
Brooks e5edcb9c48
Sets IncrementalAccountsHash in serde_snapshot when reconstructing AccountsDb (#30801) 2023-03-21 10:51:04 -04:00
steviez bc933c63ce
Fix SlotMeta connected tracking (#28069)
Fix SlotMeta is_connected tracking

The tracking of connected status was previously based upon an assumption
that would be practically false for all validators. The connected status
of slots played into whether Blockstore would signal ReplayStage that it
had new shreds ready to be replayed. Prior to the change, we would never
signal and ReplayStage would always wait the entire duration of a 100ms
timeout before restarting its' main processing loop.

This commit introduces a change where we mark snapshot slots as
connected. A validator may not have a path all the way back to genesis
itself; however, snapshots are taken at known roots so we extend the
connected status to these slots. Once a node has been bootstrapped once
to have is connected, the logic persists in Blockstore such that all
children on the main fork also get their connected status updated
properly.
2023-03-21 20:17:58 +08:00
Alexander Meißner 66da71fa7a
Fix - Revert and feature gate incorrect error message in BPF loader (#30748)
* Revert to old behavior.

* Adds feature gate.
2023-03-21 11:08:41 +01:00
Illia Bobyr f4cde7a51c
doc: ledger: Document `ConfirmationTiming` (#30784)
There is some logic related to how timing values are collected that is not immediately obvious. It is better to document it, rather than requiring everyone interested to reverse engineer it from the code.
2023-03-20 13:50:58 -07:00
behzad nouri e66edeb180
moves turbine-disabled check to shred-fetch-stage (#30799)
If turbine_disabled is true, the commit discards turbine packets
earlier in the pipeline so that they won't interfere with the deduper
and the packets can get through once turbine is enabled again.

This is a prerequisite of:
https://github.com/solana-labs/solana/pull/30786
so that local-cluster tests pass.
2023-03-20 20:34:41 +00:00
behzad nouri c6e7aaf96c
removes lazy-static thread-pool from sigverify-shreds (#30787)
Instead the thread-pool is passed explicitly from higher in the call
stack so that
https://github.com/solana-labs/solana/pull/30786
can use the same thread-pool for shred deduplication.
2023-03-20 20:33:22 +00:00
behzad nouri 5d9aba5548
increases retransmit-stage deduper capacity and reset-cycle (#30758)
For duplicate block detection, for each (slot, shred-index, shred-type)
we need to allow 2 different shreds to be retransmitted.
The commit implements this using two bloom-filter dedupers:
* Shreds are deduplicated using the 1st deduper.
* If a shred is not a duplicate, then we check if:
      (slot, shred-index, shred-type, k)
  is not a duplicate for either k = 0  or k = 1 using the 2nd deduper,
  and if so then the shred is retransmitted.

This allows to achieve larger capactiy compared to current LRU-cache.
2023-03-20 20:32:23 +00:00
Jeff Washington (jwash) ce0e23fbab
accounts index does not randomly flush dirty entries (#30783) 2023-03-20 12:23:30 -07:00
Nick Frostbutter a131163904
fix: fixed and/or removed forum links (#30775)
* fix: fixed and/or removed forum links

Closes #29724

* fix: typo

---------

Co-authored-by: nickfrosty <nick.frostbutter@solana.org>
2023-03-20 13:58:41 -05:00
Yueh-Hsuan Chiang 72c6099ea0
Move alignment related consts from append_vec.rs to accounts_file.rs (#30782)
#### Problem
As we start supporting new storage formats, alignment-related constants and macros
defined in append_vec.rs aren't only specific to AppendVec.

#### Summary of Changes
Move alignment-related constants/macros from append_vec.rs to accounts_file.rs
2023-03-20 11:34:18 -07:00
behzad nouri 9ad77485ce
generalizes deduper to work with any hashable type (#30753)
generalizes Deduper to work with any hashable type

Current Deduper is hard-coded only for Packet type. In order to use
Deduper in retransmit-stage, we need to dedup types other than Packet.
The commit generalizes Deduper to any hashable type.
2023-03-20 18:04:46 +00:00
HaoranYi f42f61804f
typos (#30797) 2023-03-20 10:47:15 -05:00
Tyera cbbae8fcd4
Update accounts-cluster-bench to work against public clusters (#30781)
* Move client ctor outside start_sig_clear_thread

* Add TransactionExecutor::new_with_url method and dedupe

* Remove unnecessary pub

* Update airdrop to use RpcClient

* Construct client outside run_accounts_bench

* Add config and url parameters
2023-03-20 09:46:06 -06:00