* Only encode data with <128 bytes in bs58
* Use same MAX_BS58_BYTES const in rpc
* Fix test
* Spell out base
Co-authored-by: Tyera Eulberg <tyera@solana.com>
(cherry picked from commit 967746abbf)
Co-authored-by: sakridge <sakridge@gmail.com>
* Add note about ASK keyword to paper wallet doc
Per https://github.com/solana-labs/solana/issues/17325#issuecomment-844434585, this change adds a note to the paper wallet docs mentioning the use of the `ASK` keyword.
Also specifes that the `solana-keygen pubkey prompt://` command returns a derived bip44 base address.
(I'm new to Solana development and this was a point of confusion for me, only resolved by finding this issue)
* Update docs/src/wallet-guide/paper-wallet.md
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 3be5715f45)
Co-authored-by: Brent Fitzgerald <burnto@gmail.com>
* stake: Remove v2 program references (#19308)
* stake: Remove v2 program references
* Remove stake v2 feature, along with stake rewrite
(cherry picked from commit 73aa004c59)
# Conflicts:
# runtime/src/bank.rs
* Fix merge conflict
* Fix uses of old `stake` function
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* docs: Mainnet Beta inflation has been enabled for quite some time
(cherry picked from commit 169ded9a70)
* validator: Trusted validators are now called known validators
(cherry picked from commit e0bc5fa690)
* docs: trust minimize
(cherry picked from commit 40613161a0)
* docs: correct known validator operator
(cherry picked from commit eced50d103)
* docs: Remove decommissioned testnet archetype validator
(cherry picked from commit a587eec20b)
* docs: update devnet start args with new validators
(cherry picked from commit 2a877ae06e)
Co-authored-by: Trent Nelson <trent@solana.com>
Cross cluster gossip contamination is causing cluster-slots hash map to
contain a lot of bogus values and consume too much memory:
https://github.com/solana-labs/solana/issues/17789
If a node is using the same identity key across clusters, then these
erroneous values might not be filtered out by shred-versions check,
because one of the variants of the contact-info will have matching
shred-version:
https://github.com/solana-labs/solana/issues/17789#issuecomment-896304969
The cluster-slots hash-map is bounded and trimmed at the lower end by
the current root. This commit also discards slots epochs ahead of the
root.
(cherry picked from commit 563aec0b4d)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* Add AsRef<AccountInfo> for AccountInfo
(cherry picked from commit 930465e67c)
* add test for AsRef
(cherry picked from commit d10e37a829)
Co-authored-by: Kirill Fomichev <fanatid@ya.ru>
* Fixing missing pubsub notification for programSubscribe and logsSubscribe (#19092)
#18587: programSubscribe is missing notifications randomly. The issue is because of two reasons
Not all rooted slots get OptimisticallyConfirmed notifications
The OptimisticallyConfirmed notifications can be out of order for slots: slot A and B with A < B can see notification for B first before A.
Summary of Changes
Changed OptimisticallyConfirmedBankTracker to send notifications for parent banks if they have not been notified yet. We use a new variable last_notified_slot to track that.
Tests:
With my validator running against testnet, before the fix, it was failing 75% of time, with the fix, it is passing consistently. Using the program mentioned in #18587.
(cherry picked from commit 1a372a792e)
* Use v1.7 api
Co-authored-by: Lijun Wang <83639177+lijunwangs@users.noreply.github.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Handle 0-lamport account in index generation
* rename duplicate to dirty keys
Co-authored-by: Carl Lin <carl@solana.com>
(cherry picked from commit 5a4979f25f)
Co-authored-by: sakridge <sakridge@gmail.com>
* Use last_valid_block_height in services and client apps (#19163)
* Add deprecated tag to Bank::get_blockhash_last_valid_slot
* Update SendTransactionService to use last_valid_block_height
* Update solana-tokens to use last_valid_block_height
* Remove dangling file
* Update solana program to use last_valid_block_height
* Update Banks crates to use last_valid_block_height
(cherry picked from commit 5970083b4d)
# Conflicts:
# cli/src/program.rs
* Fix conflict
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Add some docs for RpcClient and friends (#18748)
* Add some docs for RpcSender, HttpSender, MockSender
* Support SimulateTransaction in MockSender
* Add docs for RpcClient constructors
* Add some more RpcClient examples
* rustfmt
* Reflow docs in rpc_client and friends
(cherry picked from commit 5dcfd7ce74)
# Conflicts:
# client/src/mock_sender.rs
* Fix conflicts
Co-authored-by: Brian Anderson <andersrb@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Fix serialization of parameters in RpcClient::get_block_production_with_config (#18998)
Params must be an array or null.
(cherry picked from commit 58f395257b)
# Conflicts:
# client/src/mock_sender.rs
* Fix conflict
Co-authored-by: Brian Anderson <andersrb@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
* Auto-generate shell completions for solana-cli (issue #8879 and #14005)
Implement `completion` SubCommand for solana-cli, which outputs
completion script to stdout and exits the process. The script generation
handled completely by clap.
In order to implement the generation, one minor design change was
necessary regarding the creation of clap `App`.
Previously: One part of App initialization was in the `app` function,
and some other arguments and subcommands were added later directly in
the `main` function.
Now: The whole construction of App was moved to `get_clap_app` function.
P.S. I wasn't sure if constructing App separately had visual importance,
so both constructing parts are still separate in `base_clap_app` and
`final_clap_app` functions. But they sure could be in one single
function.
* Dereplicode match expr, fix clippy warning.
* Move clap App construction into separate module
Also join two parts of the construction into a single function
* Fix tests
* Apply rustfmt lints
(cherry picked from commit 9d0a937a05)
Co-authored-by: theonekeyg <34949189+theonekeyg@users.noreply.github.com>