On the receiving end, the outdated values are discarded, and they will
only waste bandwidth:
https://github.com/solana-labs/solana/blob/3f0480d06/core/src/crds_gossip_pull.rs#L385-L400
This is also exacerbating validator start, since the entrypoint is
returning old values in pull responses, and the validator immediately
discards those; resulting in huge delay until the validator obtains
contact-info of the entrypoint and is able to adopt shred-version and
fully start.
(cherry picked from commit 5e6b00fe98)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
When a validator starts, it has an (almost) empty crds table and it only
sends one pull-request to the entrypoint. The bloom filter in the
pull-request targets 10% false rate given the number of items. So, if
the `num_items` is very wrong, it makes a very small bloom filter with a
very high false rate:
https://github.com/solana-labs/solana/blob/2ae57c172/runtime/src/bloom.rs#L70-L80https://github.com/solana-labs/solana/blob/2ae57c172/core/src/crds_gossip_pull.rs#L48
As a result, it is very unlikely that the validator obtains entrypoint's
contact-info in response. This exacerbates how long the validator will
loop on:
> Waiting to adopt entrypoint shred version
https://github.com/solana-labs/solana/blob/ed51cde37/validator/src/main.rs#L390-L412
This commit increases the min number of bloom items when making gossip
pull requests. Effectively this will break the entrypoint crds table
into 64 shards, one pull-request for each, a larger bloom filter for
each shard, and increases the chances that the response will include
entrypoint's contact-info, which is needed for adopting shred version
and validator start.
(cherry picked from commit e8b35a4f7b)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* programs/stake: cancel deactivate (#17344)
fix: remove stray println
add error for inconsistent input.
fix: lamports don't need to match when redelegating to same vote account
Improve comments
bump
Apply suggestions from code review
Add assert in test
Use stake_program_v4
Co-Authored-By: Trent Nelson <trent.a.b.nelson@gmail.com>
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
(cherry picked from commit 662c2aaeec)
# Conflicts:
# programs/stake/src/stake_instruction.rs
# programs/stake/src/stake_state.rs
* Fix conflicts
Co-authored-by: jon-chuang <9093549+jon-chuang@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
The current implementations use only the id and disregard other fields,
in particular wallclock. This can lead to bugs where an outdated
contact-info shadows or overrides a current one because they compare
equal.
(cherry picked from commit 13b032b2d4)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* Update keypair configuration output
While going through the tutorial to start a validator I noticed that the output I received from running...
```
solana config set --keypair ~/validator-keypair.json
```
...different from the output I was seeing. Wondering whether the docs are out of date I thought I'd propose an update to the docs just in case.
(cherry picked from commit 02157f4753)
* Update docs/src/running-validator/validator-start.md
(cherry picked from commit de76adbdf3)
Co-authored-by: Chris Bellew <cjbellew@gmail.com>
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
When the input contains more accounts than the user has requested to be deserialized, and one of the excess ones is a dup, the input pointer is not adjusted correctly.
Compare the lines added by this commit to line 401: "input += 7; // padding". Since the input data layout does not depend on the number of accounts the user wants to deserialize, this adjustment by 7 bytes must happen in both branches.
(cherry picked from commit e02b4e1192)
Co-authored-by: Christian Machacek <39452430+machacekch@users.noreply.github.com>
* Zero pad data shreds on fetch from blockstore
This is a partial backport of #16602 to allow compatibility with that change.
* Remove size check and resize shreds to consistent length
* rpc: plumb shred_version through RpcContactInfo
(cherry picked from commit 67e6a3106f)
* test-validator: Display more cluster info in dash
(cherry picked from commit 754c708473)
Co-authored-by: Trent Nelson <trent@solana.com>
* Fix spelling
* Add validator for SignerSources
* Add helper to generate Keypair from supporting SignerSources
* Add bip32 support to solana-keygen recover
* Make SignerSourceKind const strs, use for Debug impl and URI schemes
(cherry picked from commit b437b0a49d)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* include/exclude keys on account secondary index (#17110)
* AccountSecondaryIndexes.include/exclude
* use normal scan if key is not indexed
* add a test to ask for a scan for an excluded secondary index
* fix up cli args
(cherry picked from commit 7d96f78821)
# Conflicts:
# runtime/src/accounts_db.rs
# runtime/src/accounts_index.rs
* resolve merge conflicts
Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
Co-authored-by: Jeff Washington (jwash) <wash678@gmail.com>
* sdk: Add get_instance_packed_len for variable-size types
* Add comment for get_packed_len
* Add more tests
(cherry picked from commit 4b60b2863e)
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* Update web-wallet.md to add phantom with fixed link
Update web-wallet.md to add phantom with fixed link
* Update web-wallets.md for phantom
removing trailing whitespaces
* Update docs/src/wallet-guide/web-wallets.md
Co-authored-by: Michael Vines <mvines@gmail.com>
(cherry picked from commit 4625231e30)
Co-authored-by: chaseeb <chaseeb@gmail.com>
* Rename ask to prompt
* Default to Solana bip44 base if no derivation-path
* Add SignerSource legacy field, support legacy ASK
* Update docs
* Fix docs: validator current doesn't support uri SignerSources
(cherry picked from commit a5ec3a0547)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* Require that blockstore block-time only be recognized slot, instead of root
* Move cache_block_time to after Bank freeze
* Single use statement
* Pass transaction_status_sender by reference
* Remove unnecessary slot-existence check before caching block time altogether
* Move block-time existence check into Blockstore::cache_block_time, Blockstore no longer needed in blockstore_processor helper
(cherry picked from commit 6e9deaf1bd)
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
* indexes crds values by their insert order
(cherry picked from commit dfa3e7a61c)
* reads gossip push messages off crds ordinal index
Having an ordinal index on crds values based on insert order allows to
efficiently filter values using a cursor. In particular
CrdsGossipPush::push_messages hash-map can be replaced with a cursor,
saving on the bookkeepings, purging, etc
(cherry picked from commit 22c02b917e)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>