Solana Tech Roundup
This past week there was a clock drift issue where the Clock sysvar was drifting away from the real UTC timestamp. While consensus was unaffected, applications relying on this timestamp were affected. A good overview can be found by Anatoly here.
Proposal Highlight
Bank Timestamp Correction
Topical for this week, let's review the implemented proposal on updating the clock sysvar. The clock sysvar is updated by:
- Taking validator-provided timestamps and using a stake-weighted median to calculate the new timestamp
- Bounding the timestamp correction to avoid deviating too far from the expected theoretical estimate
The clock sysvar is currently allowed to deviate up to 25% from the expected time since the start of the epoch. For the clock to stay in sync with the real UTC timestamp, blocks need to land within 720ms on average because of this upper bound on the deviation.
There's a lot of discussion on this implemented proposal currently in #slow-blocks-debug on the Solana Tech Discord. Be sure to check it out!
Commit Highlights
Heap can now be requested using the Compute Budget Program instead of being done in-program. The in-program method is being deprecated.
Compute Budget Instructions have been updated to have compute limit requests to avoid paying too much for compute in the future.
List of Changes
May 20
- Web3.js: Update Compute Limit requests
- These new instructions enable limiting the max compute on a transaction
- Use preview epoch's number of slots to determine when rent needs to be collected
- Using iterator instead of vec to iterate over accounts
- At large account size, vec is very expensive to use
- Fix filler accounts getting non-zero rent epoch
- Filler accounts are used on validators to test more "real world" situations on mainnet-beta
- Create snapshot checks only if snapshot slot exists
- Enable option to skip verifying accounts hash of a snapshot on ledger-tool
- Rate limit RocksDB perf sampling to avoid hitting payload too large error
- Shared IP Address to stake map is generated by the staked nodes updater service
- Disallow _sol_alloc_free syscalls
- Add sendmmsg implementation for streamer
- This is for support of a non-blocking TPU client
- QUIC: Remove open_uni_measure metrics
- Preserve optimistic_slot in blockstore
- In the case of a restart optimistic_slot needs to be retrieved easily.
- Account for packet dedup to avoid dropping extra packets when packet limit is reached
- Ledger-tool: enable printing transaction details even if transaction status is missing
- Asynchronously forward transactions
May 21
- Explorer: Add support for new compute budget instructions
- QUIC: Fix prune oldest table size calculation
- Calculating the connection table's size wasn't accounting for any entries previously removed
May 22
May 23
- Explorer: Support token2022 instructions
- Discard packets before deduping in sigverify weighted by sender stake
May 24
May 25
- Fee-payer balance check separated
- Limit read access to packet data
- Bytes past
packet.meta.size
are not valid, so limit read to only the size required
- Bytes past
- Add shred-type to turbine seed function so that there are different shred propogation paths
- Add invoke logging to builtin programs
- Explorer: Add fees paid on blocks
May 26
- Remove parallelism to improve performance when finding packets by sender stake
- The work unit sizes were so small that using a thread pool actually slowed down the overall work
- Fan-out gossip pull-requests to avoid inbound gossip traffic spikes
- Check fee payer before loading accounts
- Only load accounts if the fee payer has a balance