Justin Starry
c2bb2b8e60
Allow validators to reset to the slot which matches their last voted slot ( #28172 )
...
* Add failing test
* Allow resetting to duplicate was confirmed
* feedback
* feedback
* bump
* simplify change
* Revert "simplify change"
This reverts commit 72e5de3e5bdac595f71dc7fc01650ca3bc7da98e.
* update comment
* Update core/src/replay_stage.rs
2022-10-03 16:49:47 +08:00
behzad nouri
9ee53e594d
patches clippy errors from new rust nightly release ( #28028 )
2022-09-23 20:57:27 +00:00
behzad nouri
97c9af4c6b
plumbs through flag to generate merkle variant of shreds
2022-09-23 16:45:18 +00:00
behzad nouri
9a57c64f21
patches clippy errors from new rust nightly release ( #27996 )
2022-09-22 22:23:03 +00:00
behzad nouri
4f22ee8f9b
uses varint encoding for vote-state lockout offsets
...
The commit removes CompactVoteStateUpdate and instead reduces serialized
size of VoteStateUpdate using varint encoding for vote-state lockout
offsets.
2022-09-12 16:31:20 +00:00
Christian Kamm
90b8a3a44d
Remove KeypairInsecureClone trait and add insecure_clone() instead ( #27396 )
...
See discussion in #26248
2022-09-12 14:59:41 +00:00
apfitzge
1465ec947d
replay_stage: clippy nightly fixes ( #27520 )
...
clippy nightly fixes
2022-09-07 15:04:46 -05:00
Tao Zhu
8bb039d08d
collect min prioritization fees when replaying sanitized transactions ( #26709 )
...
* Collect blocks' minimum prioritization fees when replaying sanitized transactions
* Limits block min-fee metrics reporting to top 10 writable accounts
* Add service thread to asynchronously update and finalize prioritization fee cache
* Add bench test for prioritization_fee_cache
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2022-08-31 08:00:55 -05:00
Brennan Watt
46a48760db
Switch concurrent replay from feature to param ( #27401 )
...
* Switch concurrent replay from feature to param
2022-08-26 12:36:02 -07:00
Tyera Eulberg
b8b3d723da
Use new client crates ( #27360 )
...
* Update ancillary cli crates
* Update cli
* Update command-line tools
* Update rpc, etc
* Update client-test
* Update core, validator
* Update local-cluster
2022-08-24 10:47:02 -06:00
Ashwin Sekar
efa6201eda
Check overflow on vote tx compaction boundary ( #27185 )
...
* Check overflow on vote tx compaction boundary
Check for overflow during the conversion between VoteStateUpdate and
CompactVoteStateUpdate.
* Try removing clippy supress
2022-08-23 22:29:03 -07:00
Michael Vines
3f4731b37f
Standardize thread names
...
Tenets:
1. Limit thread names to 15 characters
2. Prefix all Solana-controlled threads with "sol"
3. Use Camel case. It's more character dense than Snake or Kebab case
2022-08-20 07:49:39 -07:00
Jeff Biseda
e50013acdf
Handle JsonRpcService startup failure ( #27075 )
2022-08-11 23:25:20 -07:00
Michael Vines
ccfbc54195
Move vote program state and instructions to solana-program
2022-08-09 20:52:47 -07:00
Christian Kamm
cf58640937
Keypair: implement clone() ( #26248 )
...
* Keypair: implement clone()
This was not implemented upstream in ed25519-dalek to force everyone to
think twice before creating another copy of a potentially sensitive
private key in memory.
See https://github.com/dalek-cryptography/ed25519-dalek/issues/76
However, there are now 9 instances of
Keypair::from_bytes(&keypair.to_bytes())
in the solana codebase and it would be preferable to have a function.
In particular since this also comes up when writing programs and can
cause users to either start messing with lifetimes or discover the
from_bytes() workaround themselves.
This patch opts to not implement the Clone trait. This avoids automatic
use in order to preserve some of the original "let developers think
twice about this" intention.
* Use Keypair::clone
2022-08-06 11:54:38 -06:00
Boqin Qin(秦 伯钦)
83a0f5da0f
core: fix double-readlock in replay_stage ( #26052 )
2022-08-04 10:45:31 -04:00
Brennan Watt
457f9ef739
Reduce severity level of log in replay ( #26893 )
...
* Reduce active banks log severity from warn to trace
2022-08-03 13:51:16 -07:00
Brennan Watt
467cb5def5
Concurrent slot replay ( #26465 )
...
* Concurrent replay slots
* Split out concurrent and single bank replay paths
* Sub function processing of replay results for readability
* Add feature switch for concurrent replay
2022-07-28 11:33:19 -07:00
Ashwin Sekar
8d69e8d447
Compact vote state updates to reduce block size ( #26616 )
...
* Compact vote state updates to reduce block size
* Add rpc transaction tests
2022-07-27 13:23:44 -06:00
Jeff Washington (jwash)
47716a5e01
async hash verify on load ( #26208 )
...
* verify accounts hash in bg on startup
* fix some tests and loading from genesis
* add extra state for when background thread has completed
2022-07-15 14:29:56 -05:00
Tao Zhu
f13b5c832d
Remove obsoleted metrics reporting to reduce lock contention on cost_model ( #26608 )
...
remove obsoleted metrics reporting to reduce lock contention on cost_model
2022-07-14 23:02:49 -05:00
Nicholas Clarke
ee0a40937e
Add validator argument log_messages_bytes_limit to change log truncation limit.
...
Add new cli argument log_messages_bytes_limit to solana-validator to control how long program logs can be before truncation
2022-07-11 10:53:18 -05:00
behzad nouri
ba785cf8ab
removes erroneous uses of std::mem::swap ( #26536 )
...
All instances should be replace by std::mem::{replace,take},
or just plain assignment.
2022-07-11 11:33:15 +00:00
behzad nouri
61f0a7d9c3
replaces Mutex<PohRecorder> with RwLock<PohRecorder> ( #26370 )
...
Mutex causes superfluous lock contention when a read-only reference suffices.
2022-07-05 14:29:44 +00:00
Jeff Washington (jwash)
557bf6e656
allow initial hash calc to occur in bg ( #26271 )
...
* allow initial hash calc to occur in bg
* validator_initialized -> startup_verification_complete
* add infos for leader and vote
* rework snapshot for startup verification
* change to assert
2022-06-29 16:48:33 -05:00
Ryo Onodera
cd2878acf9
Avoid to miss to root for local slots before the hard fork ( #19912 )
...
* Make sure to root local slots even with hard fork
* Address review comments
* Cleanup a bit
* Further clean up
* Further clean up a bit
* Add comment
* Tweak hard fork reconciliation code placement
2022-06-26 15:14:17 +09:00
Justin Starry
44d1e62007
Refactor: No need to return stake in Bank::get_vote_account ( #26220 )
2022-06-25 16:27:43 +00:00
Tyera Eulberg
a6ba5a9a05
Add transaction index in slot to geyser plugin TransactionInfo ( #25688 )
...
* Define shuffle to prep using same shuffle for multiple slices
* Determine transaction indexes and plumb to execute_batch
* Pair transaction_index with transaction in TransactionStatusService
* Add new ReplicaTransactionInfoVersion
* Plumb transaction_indexes through BankingStage
* Prepare BankingStage to receive transaction indexes from PohRecorder
* Determine transaction indexes in PohRecorder; add field to WorkingBank
* Add PohRecorder::record unit test
* Only pass starting_transaction_index around PohRecorder
* Add helper structs to simplify test DashMap
* Pass entry and starting-index into process_entries_with_callback together
* Add tx-index checks to test_rebatch_transactions
* Revert shuffle definition and use zip/unzip
* Only zip/unzip if randomize
* Add confirm_slot_entries test
* Review nits
* Add type alias to make sender docs more clear
2022-06-23 13:37:38 -06:00
Michael Vines
f3639b76ce
Remove some clippy lints
2022-06-22 09:23:22 -07:00
sakridge
447a3239e7
Add new replay metrics for replay blockstore_into_bank and complete ( #25717 )
2022-06-03 19:45:27 +02:00
behzad nouri
81231a89b9
adds support for different variants of ShredCode and ShredData
...
The commit implements two new types:
pub enum ShredCode {
Legacy(legacy::ShredCode),
}
pub enum ShredData {
Legacy(legacy::ShredData),
}
Following commits will extend these types by adding merkle variants:
pub enum ShredCode {
Legacy(legacy::ShredCode),
Merkle(merkle::ShredCode),
}
pub enum ShredData {
Legacy(legacy::ShredData),
Merkle(merkle::ShredData),
}
2022-06-02 18:55:50 +00:00
Michael Vines
b05c7d91ed
Fix derive_partial_eq_without_eq clippy lint
2022-05-22 22:22:21 -07:00
Michael Vines
97efbdc303
Defer tower saving until push_vote(), there's no need to do it sooner ( #25374 )
2022-05-19 18:27:58 -07:00
sakridge
3d96a1ab76
Block packets in vote-only mode ( #24906 )
2022-05-14 17:53:37 +02:00
HaoranYi
8e37e364b1
fix typo in measure name ( #25058 )
2022-05-07 10:04:42 -05:00
behzad nouri
eff59193db
enforces that LAST_SHRED_IN_SLOT is also DATA_COMPLETE_SHRED ( #24892 )
...
A data shred cannot be LAST_SHRED_IN_SLOT if not also DATA_COMPLETE_SHRED.
So LAST_SHRED_IN_SLOT should also imply DATA_COMPLETE_SHRED:
https://github.com/solana-labs/solana/blob/74b586ae7/ledger/src/shredder.rs#L116-L117
https://github.com/solana-labs/solana/blob/74b586ae7/core/src/broadcast_stage/standard_broadcast_run.rs#L80-L81
However current shred constructs allow specifying a shred which is
LAST_SHRED_IN_SLOT but not DATA_COMPLETE_SHRED:
https://github.com/solana-labs/solana/blob/74b586ae7/ledger/src/shred.rs#L117-L118
https://github.com/solana-labs/solana/blob/74b586ae7/ledger/src/shred.rs#L272-L273
The commit updates ShredFlags so that if a shred is not
DATA_COMPLETE_SHRED it cannot be LAST_SHRED_IN_SLOT either.
2022-05-02 23:33:53 +00:00
Justin Starry
4e58b3870c
Update all BankForks methods to return owned values ( #24801 )
2022-04-28 18:51:00 +00:00
behzad nouri
0f60665100
replaces Shred::new_empty_coding with Shred::new_from_parity_shard ( #24749 )
...
Removing implementation details of shreds and payload offsets from
shredder, so that shredder does not need to mutate payload:
https://github.com/solana-labs/solana/blob/71ad12128/ledger/src/shred.rs#L968-L977
Also, Shred::new_from_data can simply obtain a slice as opposed to
Option<&[u8]>:
https://github.com/solana-labs/solana/blob/71ad12128/ledger/src/shred.rs#L268-L278
2022-04-27 18:04:10 +00:00
behzad nouri
895f76a93c
hides implementation details of shred from its public interface ( #24563 )
...
Working towards embedding versioning into shreds binary, so that a new
variant of shred struct can include merkle tree hashes of the erasure
set.
2022-04-25 12:43:22 +00:00
Michael Vines
d0a8a16a57
ReplayStage no longer relies on Validator to reset the poh recorder at start
2022-04-22 21:17:49 -07:00
Michael Vines
84e3342612
Process blockstore after starting the TVU
2022-04-22 21:17:49 -07:00
Justin Starry
d5127abf46
Only add hashes for completed blocks to recent blockhashes ( #24389 )
...
* Only add hashes for completed blocks to recent blockhashes
* feedback
2022-04-21 21:05:29 +08:00
Justin Starry
79923c3b58
Refactor: Rename BlockhashQueue fields and methods for clarity ( #24426 )
2022-04-21 11:57:17 +08:00
Jeff Biseda
ee6bb0d5d3
track fec set turbine stats ( #23989 )
2022-04-04 14:44:21 -07:00
HaoranYi
7ff8ed869c
typos ( #23870 )
2022-03-23 13:36:55 -05:00
Justin Starry
92462ae031
Manually serialize and use `send_wire_transaction` for votes ( #23826 )
...
* Revert "core: partial versioned transaction support for voting service"
This reverts commit eb3df4c20e
.
* Manually serialize vote tx before sending to TPU
2022-03-23 09:47:55 +08:00
Trent Nelson
eb3df4c20e
core: partial versioned transaction support for voting service
2022-03-21 22:59:05 -06:00
Michael Vines
dbc62f2e28
Use consistent variable naming for DropBankService
2022-03-15 17:07:13 -07:00
Tyera Eulberg
102dd68a03
Rename AccountsDb plugins to Geyser plugins ( #23604 )
2022-03-14 19:18:46 -06:00
Michael Vines
b719d6a2ad
`solana-validator set-identity` no longer writes a tower file unnecessarily
2022-03-08 15:34:23 -08:00