Repository navigation
solana-test-validator: activate alpenglow by default - #15665
Conversation
|
If this PR represents a change to the public RPC API:
Thank you for keeping the RPC clients in sync with the server API @AshwinSekar. |
67352fe to
7d6ae48
Compare
joncinque
left a comment
There was a problem hiding this comment.
Code changes look good overall, let's just leave the flag in though
7d6ae48 to
24b1763
Compare
joncinque
left a comment
There was a problem hiding this comment.
Looks great to me!
Actually, quick question -- what happens if someone has a test-validator ledger with tower, stops it, and then restarts it with this change? Will everything keep going as normal, or will it fail in some way?
If there's a failure, we might need to tell people to regenesis their test validator or keep using an old version.
24b1763 to
5db316b
Compare
| let payer_address = payer_signer.pubkey(); | ||
| let (create_lookup_table_ix, lookup_table_address) = | ||
| create_lookup_table(authority_address, payer_address, clock.slot); | ||
| create_lookup_table(authority_address, payer_address, recent_slot); |
There was a problem hiding this comment.
basically the issue here is that in low node count clusters clock.slot (the latest finalized slot) could be equal to the latest processed slot e.g. the tip of the chain.
create_lookup_table requires that the slot is at least 1 slot old so we use this hack
No issues, just tested it out as well. Basically the cluster has already been initialized with alpenglow disabled so as long as they don't pass This could however be an issue if they have this ledger for multiple releases as we'll eventually remove the TowerBFT code pathways |
joncinque
left a comment
There was a problem hiding this comment.
Looks good to me, looks like still some CI to fight through
| // The clock slot is finalized, but not added to SlotHashes until a child bank is created. | ||
| // As finalization under alpenglow is lower than slot times, this means we must use an older slot. | ||
| let recent_slot = slot_hashes | ||
| .iter() | ||
| .find(|slot_hash| slot_hash.slot <= clock.slot) | ||
| .ok_or_else(|| { | ||
| CliError::RpcRequestError( | ||
| "No recent finalized slot found in slot hashes sysvar".to_string(), | ||
| ) | ||
| })? | ||
| .slot; |
There was a problem hiding this comment.
Confirming this is correct since slot hashes are stored in reverse order
5db316b to
b6c0546
Compare
b6c0546 to
33945ea
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #15665 +/- ##
========================================
Coverage 82.3% 82.4%
========================================
Files 938 938
Lines 374305 374104 -201
========================================
+ Hits 308271 308470 +199
+ Misses 66034 65634 -400 🚀 New features to boost your workflow:
|
|
Should be good now, couple of tests were timing out (now that AG actually enforces a block timeout), so I bumped the opt level / serialized things |
joncinque
left a comment
There was a problem hiding this comment.
OK looks good!
On my dev box, the serial tests for solana-test-validator go from to 7s to 75s.
It's tolerable, since they'll likely run in CI for the most part. We could eventually batch some tests if the timing becomes a problem.
For my own information, what does Alpenglow do differently that makes resource contention worse?
Essentially Alpenglow enforces a block timeout - 200ms + some buffer for leader handoff. This is enforced even for single node clusters. For these tests when running in parallel I noticed heavy contention which caused flakiness - sometimes the leader thread would be paused for so long that it would timeout and cause the block to be skipped. |
Ah gotcha, thanks for the explanation! |
Problem
Currently users have to pass
--alpenglowtosolana-test-validatorin order to activate it at genesis.However AG is already active on devnet
Summary of Changes
Make it the default for
solana-test-validatorand remove--alpenglowTesting
CI &
solana-test-validator