The repair-peers cache is reset each time repair service loop runs,
and so computed repeatedly for the same slots:
https://github.com/solana-labs/solana/blob/d2b07dca9/core/src/repair_service.rs#L275
This commit uses an LRU cache to persists repair-peers for each slot.
In addition to LRU eviction rules, in order to avoid re-using outdated
data, each entry also has 10 seconds TTL.
(cherry picked from commit a0551b4054)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Broadcast stage and retransmit stage should arrange nodes on turbine
broadcast tree in exactly same order. Additionally any changes to this
ordering (e.g. updating how unstaked nodes are handled) requires feature
gating to keep the cluster in sync.
Current implementation is scattered out over several public methods and
exposes too much of implementation details (e.g. usize indices into
peers vector) which makes code changes and checking for feature
activations more difficult.
This commit encapsulates turbine peer computations into a new struct,
and only exposes two public methods, get_broadcast_peer and
get_retransmit_peers, for call-sites.
(cherry picked from commit 04787be8b1)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* Report 404 instead of 502 when a snapshot file is not found
This provides the client with more useful information about why their
request failed
(cherry picked from commit 40d696fcbc)
* As a last resort try to download an uncompressed snapshot
`solana-test-validator` creates uncompressed snapshots and it can be
useful to attach another validator to a `solana-test-validator` cluster
from time to time
(cherry picked from commit e36247d187)
Co-authored-by: Michael Vines <mvines@gmail.com>
I wanted to use this sysvar to get a recent block hash, but I didn't
know whether the first or the last entry contains the most recent block
hash.
By calling it for mainnet, printing the results, and comparing that to
the recent blocks on solanabeach.io/blocks, I discovered that the
entries are ordered from most recent to least recent. Document this to
save future readers the trouble.
(cherry picked from commit 94ab0eb49f)
Co-authored-by: Ruud van Asseldonk <ruud@chorus.one>
* Add proposal for supporting big transactions
* account index program
* fix formatting
* review feedback
* Add cost changes section
* Add cost section and more attack details
* fix lint
* document metadata changes
* nit
* rpc details
* add index meta struct
* add additional proposal and chagne title
* rename proposal file
* rename to address map and rewrite tx format
* no more appends, limit mapping size to 256
* update dos section
* add note about readonly
* restructure message to use enum
* cleanup
(cherry picked from commit 191519188d)
Co-authored-by: Justin Starry <justin@solana.com>
* Try all peers during pull-request in case of offline nodes
* fix clippy err
(cherry picked from commit f4fb5de545)
Co-authored-by: Ashwin Sekar <ashwin@solana.com>
* Generate epoch-completed time from block times
* Add annotation when block times not available
(cherry picked from commit f2b0d562b0)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Zelcore wallet support for SOL/SPLs info added
I have added a quick infodump about Zelcore wallet supporting various features of the Solana ecosystem. I looked at previous commits and it seemed adding to the top of the file was the norm, but please feel free to move around if needed.
* Zelcore wallet info moved to bottom of file.
(cherry picked from commit 8fc4c2f375)
Co-authored-by: trial123Zel <38964930+trial123Zel@users.noreply.github.com>