* fix(vote-account): rangeError [ERR_OUT_OF_RANGE] error
The web3 buffer layout is out-of-date with the current `VoteState` implementation. The buffer layout
is updated to match the structure in
https://github.com/solana-labs/solana/blob/master/account-decoder/src/parse_vote.rsfix#20786
* docs(vote account): update reference to match new payload
* fix(vote-account): update buffer layout for prior voters
Update buffer layout for prior voters to match serialized data
* fix(vote-account): response showing buffers instead of public keys
transform buffers into public keys
* refactor(vote account): extract parsing into function calls
* feat(vote account): address PR comments
* fix(web3.js vote account): start prior voters array from given index
* fix(web3.js vote account): incorrect data for prior voters array
* Update web3.js/src/vote-account.ts
Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
Added Vivaldi to the list of browsers with support for Phantom. I've been using this browser for Phantom and have installed it on a few dozen customer's Chromium based Vivaldi browsers, on both Windows and various Linux distros over the past few months with flawless, error free operation.
# Problem
The initial proposal ruled out implementing BigTable queries for
the `getBlockTime` RPC, but then it was implemented a couple months
later. Indicating that the functionality was never implemented in
the "implemented-proposals" document is a little confusing, so let's
bring the document in line with what actually happened. 🦾
# Summary of Changes
Remove the blurb about how `getBlockTime` was going to be deprecated
and add it to the list of calls that didn't yet support BigTable
queries at the time the proposal was written.
Allow u16::MAX to be specified for the instruction index. This makes it
possible to specify the current instruction, so it is not necessary to
know the instruction number.
Summary of Changes
Create a plugin mechanism in the accounts update path so that accounts data can be streamed out to external data stores (be it Kafka or Postgres). The plugin mechanism allows
Data stores of connection strings/credentials to be configured,
Accounts with patterns to be streamed
PostgreSQL implementation of the streaming for different destination stores to be plugged in.
The code comprises 4 major parts:
accountsdb-plugin-intf: defines the plugin interface which concrete plugin should implement.
accountsdb-plugin-manager: manages the load/unload of plugins and provide interfaces which the validator can notify of accounts update to plugins.
accountsdb-plugin-postgres: the concrete plugin implementation for PostgreSQL
The validator integrations: updated streamed right after snapshot restore and after account update from transaction processing or other real updates.
The plugin is optionally loaded on demand by new validator CLI argument -- there is no impact if the plugin is not loaded.
The program_id is not needed on "Program return data: " because it
always preceeded by the program invoke message, so no need to repeat
the program id. Also rename this to "Program return: " since "data"
is redundant.
Solang requires a method for verify ed25519 signatures. Add a new
builtin program at address Ed25519SigVerify111111111111111111111111111
which takes any number of ed25519 signature, public key, and message.
If any of the signatures fails to verify, an error is returned.
The changes for the web3.js package will go into another commit, since
the tests test against a released solana node. Adding web3.js ed25519
testing will break CI.
The parameter is now a required third argument. This is because authorized
withdrawer should never be the same as vote account keypair or validator
identity keypair for security reasons.
Added a --allow-unsafe-authorized-withdrawer to override this restriction if
necessary.
#### Problem
There's no way to get incremental snapshot information from RPC.
#### Summary of Changes
- Add new RPC method, `getHighestSnapshotSlot` that returns a `SnapshotSlotInfo`, which contains both the highest full snapshot slot, and the highest incremental snapshot slot _based on_ the full snapshot.
- Deprecate old RPC method, `getSnapshotSlot`
- Update API docs
Fixes#19579
This is the 2nd installment for the AccountsDb replication.
Summary of Changes
The basic google protocol buffer protocol for replicating updated slots and accounts. tonic/tokio is used for transporting the messages.
The basic framework of the client and server for replicating slots and accounts -- the persisting of accounts in the replica-side will be done at the next PR -- right now -- the accounts are streamed to the replica-node and dumped. Replication for information about Bank is also not done in this PR -- to be addressed in the next PR to limit the change size.
Functionality used by both the client and server side are encapsulated in the replica-lib crate.
There is no impact to the existing validator by default.
Tests:
Observe the confirmed slots replicated to the replica-node.
Observe the accounts for the confirmed slot are received at the replica-node side.
* 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>
Problem
Validators fall behind the network when bogged down by heavy RPC load. This
seems to be due to a combination of CPU load and lock contention caused by
serving RPC requests. The most expensive RPC requests involve account scans.
Summary of Changes
The AccountsDb replication design proposal is described.
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.
* 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.
* fix minor typos and punctuation
* fix minor typos and punctuation
* rewording for clarity and typo corrections
* rewording for clarity and typo corrections
* rewording for clarity and typo corrections
Co-authored-by: Gregg Dourgarian <greggd@aidacreative.com>
* 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
* Add BlockHeight CF to blockstore
* Rename CacheBlockTimeService to be more general
* Cache block-height using service
* Fixup previous proto mishandling
* Add block_height to block structs
* Add block-height to solana block
* Fallback to BankForks if block time or block height are not yet written to Blockstore
* Add docs
* Review comments
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.
* 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>
* 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
* add Exodus as wallet that supports staking
* remove extra verbiage
* add binance & ftx. add note for these additions that you cannot select a validator with them
* Formatting
Co-authored-by: Justin Starry <justin.m.starry@gmail.com>
* Deprecate getConfirmed methods in rpc
* Add new methods to docs
* Move deprecated rpc methods to separate docs section
* Add note to docs about removal timing
* feat: introduce get_inflation_reward rpc call
* fix: style suggestions
* fix: more style changes and match how other rpc functions are defined
* feat: get reward for a single epoch
* feat: default to the most recent epoch
* fix: don't factor out get_confirmed_block
* style: introduce from impl for RpcEncodingConfigWrapper
* style: bring commitment into variable
* feat: support multiple pubkeys for get_inflation_reward
* feat: add get_inflation_reward to rpc client
* feat: return rewards in order
* fix: rename pubkeys to addresses
* docs: introduce jsonrpc docs for get_inflation_reward
* style: early return in map (not sure which is more idiomatic)
* fix: call the rpc client function args addresses as well
* fix: style
* fix: filter out only addresses we care about
* style: make this more idiomatic
* fix: change rpc client epoch to optional and include some docs edits
* feat: filter out rent rewards in get_inflation_reward
* feat: add option epoch config param to get_inflation_reward
* feat: rpc client get_inflation_reward takes epoch instead of config and some filter staking and voting rewards
* issue #10831: added --with-memo option to all cli commands that submit
transactions. Also, improve the block command to show UTF-8 string instead
of integer values for memo program data.
* Fixed tests and changed some syntax according to feedback.
* Use spl_memo id (all versions where applicable) instead of hardcoding id.
* Update Cargo.toml in programs/bpf.
* Update formatting via cargo fmt.
* Update to use spl_memo version 3.0.1, which simplifies package imports
* Update blockstore method to allow return of unfinalized signature
* Support confirmed sigs in getConfirmedSignaturesForAddress2
* Add deprecated comments
* Update docs
* Enable confirmed transaction-history in cli
* Return real confirmation_status; fill in not-yet-finalized block time if possible
* Implement mnemonic support for solana-keygen grind (solana-labs#9325)
* Updated to include feedback from review.
* Renaming as per review feedback
* Fixed an incorrectly transcribed underscore
* Properly re-use string constants.
* Add rpc confirmed-block config wrapper to support struct of extended config
* Update docs
* Make config wrapper generic and use in getConfirmedTransaction as well
* Update/clean confirmed-tx docs
* Document AppendVec
* Remove the almost-duplicate state in AppendVec
AppendVec was maintaining two offsets, `current_len` and
`append_offset`. Despite the different looking names, the two
values have the same meaning, but were updated at slightly different
times. When appending a batch of accounts, `current_len` updates would
be immediately available to other threads after each append, whereas
`append_offset` would only be updated after its mutex was unlocked.
`append_offset` is redundant. By removing it, we eliminate potential
bugs and no longer need to suppress clippy warnings.
* Remove get_mut() from AppendVec design
Only the offset into the AppendVec memory is thread-safe. The memory
itself is only threadsafe because it is append-only and is otherwise
unprotected. Adding get_mut() would only be safe if the memory was
protected by a ReadWrite lock.
* docs: add token balances response info
* docs: add blockTime to getConfirmedSignatures and getConfirmedTransaction
* docs: update example responses
* fix: remove space
* reorg validator economics
* overview cleanup
* terminology
* terminology formatting
* katex for docusaurus
* adjusted staking yield writeup
* more reorg
* move section header
* rm unlinked mds
* add new mds
* Update docs/src/inflation/terminology.md
Co-authored-by: Dan Albert <dan@solana.com>
* Update docs/src/inflation/terminology.md
Co-authored-by: Dan Albert <dan@solana.com>
* Update docs/src/inflation/terminology.md
Co-authored-by: Dan Albert <dan@solana.com>
* Update docs/src/inflation/terminology.md
Co-authored-by: Dan Albert <dan@solana.com>
* Update docs/src/inflation/terminology.md
Co-authored-by: Dan Albert <dan@solana.com>
* Update docs/src/transaction_fees.md
Co-authored-by: Dan Albert <dan@solana.com>
* addressing Dans comments in #14868
* incorporating pr commits
* trailing whitespaces
* more trailing whitespaces
* remove services link and add plot
* add plots
Co-authored-by: Dan Albert <dan@solana.com>
* Deprecate commitment variants
* Add new CommitmentConfig builders
* Add helpers to avoid allowing deprecated variants
* Remove deprecated transaction-status code
* Include new commitment variants in runtime commitment; allow deprecated as long as old variants persist
* Remove deprecated banks code
* Remove deprecated variants in core; allow deprecated in rpc/rpc-subscriptions for now
* Heavier hand with rpc/rpc-subscription commitment
* Remove deprecated variants from local-cluster
* Remove deprecated variants from various tools
* Remove deprecated variants from validator
* Update docs
* Remove deprecated client code
* Add new variants to cli; remove deprecated variants as possible
* Don't send new commitment variants to old clusters
* Retain deprecated method in test_validator_saves_tower
* Fix clippy matches! suggestion for BPF solana-sdk legacy compile test
* Refactor node version check to handle commitment variants and transaction encoding
* Hide deprecated variants from cli help
* Add cli App comments
* Make exchange listening-for-deposits language stronger
* Update docs/src/integrations/exchange.md
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* Update from deprecated method
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* Add optimistically_confirmed field to TransactionStatus
* Update docs
* Convert new field to confirmation_status
* Update docs to confirmationStatus
* Update variants
* Update docs
* Just Confirmed
* Add stake programming documentation
We had some questions about stake programming documentation, and there
wasn't a place that contained information about the stake-o-matic and
other stake development in one place. This adds a page with that
information.
* Update docs/src/staking/stake-programming.md
Co-authored-by: Eric Williams <eric@solana.com>
* Update docs/src/staking/stake-programming.md
Co-authored-by: Eric Williams <eric@solana.com>
* Update docs/src/staking/stake-programming.md
Co-authored-by: Eric Williams <eric@solana.com>
* Update docs/src/staking/stake-programming.md
Co-authored-by: Eric Williams <eric@solana.com>
* Update docs/src/staking/stake-programming.md
Co-authored-by: Eric Williams <eric@solana.com>
* Apply suggestions from code review
* Remove trailing whitespace
Co-authored-by: Eric Williams <eric@solana.com>
* docs: Use "msg!" instead of "info!"
* Update docs/src/developing/deployed-programs/developing-rust.md
Co-authored-by: Michael Vines <mvines@gmail.com>
* Fix typo / format
Co-authored-by: Michael Vines <mvines@gmail.com>