Commit Graph

148 Commits

Author SHA1 Message Date
Trent Nelson d6f22433d0 Bump version to v1.10.0 2021-12-04 20:17:54 +00:00
Michael Vines 1ae9cdcb43 RPC: Ensure innerInstructions/logMessages metadata is `null` when `--enable-cpi-and-log-storage` is disabled 2021-12-02 16:24:54 -08:00
Tyera Eulberg 6546c3cbae
Fixup processed docs (#21316) 2021-11-17 06:52:09 +00:00
yihau dec104c580 feat: update getClusterNodes 2021-10-26 10:00:28 -07:00
yihau aa13c90dd7 feat(docs): add transactionCount to getEpochInfo response 2021-10-24 17:45:04 -07:00
Slavomir 63f94a4db3 Fix response examples for `getTokenAccountsByOwner` and `getTokenAccountsByDelegate` 2021-10-23 09:24:48 -07:00
Yihau Chen 185c9f9e8f
fix(docs): getInflationRate epoch type from f64 => u64 (#20589) 2021-10-11 09:44:38 -06:00
Tyera Eulberg 5e431fbee2
Update deprecated snapshot/fees/blockhash api docs (#20522)
* Move and notate deprecated blockhash/fees docs

* Update getHighestSnapshotSlot note
2021-10-07 20:38:28 +00:00
Tyera Eulberg d56ad8ff4f
Update expected removal version to match backward-compatibility policy (#20515) 2021-10-07 18:51:16 +00:00
Trent Nelson 767f740305 Bump version to 1.9.0 2021-10-06 17:57:41 -07:00
Tyera Eulberg a70fd8e606
Update TransactionError link to docs.rs (#20145) 2021-09-23 14:55:28 -06:00
Brooks Prumo 8ac94b2cf4
Add Incremental Snapshot support to RPC (#19559)
#### 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
2021-09-02 15:25:42 -05:00
Jack May f81bfc8462
Limit message encoding to base-64 (#19468) 2021-08-29 19:53:37 -07:00
Jack May 355a23c8f6
Deprecate old and document new RPC APIs (#19456) 2021-08-27 05:22:53 -07:00
Tyera Eulberg 7482861f4b
Add parameter to allow setting max-retries for SendTransaction rpc (#19387)
* Add parameter to cap rpc send retries for a tx

* Add parameter to docs
2021-08-24 22:44:13 -06:00
Brian Anderson 9483866e0b
Correct JSON-RPC docs for getSlot (#19355)
* Correct JSON-RPC docs for getSlot

* Update docs/src/developing/clients/jsonrpc-api.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-08-21 00:15:50 +00:00
Trent Nelson e0bc5fa690 validator: Trusted validators are now called known validators 2021-08-19 22:43:49 -06:00
Justin Starry c053df143f
RPC: add option to exclude accounts from get_supply (#19270) 2021-08-17 23:32:58 +00:00
hugo 4d0cd9b283
Added missing method to index and updated token account methods docs. (#18906) 2021-07-28 16:13:06 -06:00
murlux d751d5b6e8 Fixed broken links and added more context to getTokenAccountBalance docs 2021-07-21 10:24:53 -07:00
Jack May b13caa14c9
Update simulateTransaction rpc docs (#18762) 2021-07-19 13:53:00 -07:00
Trent Nelson bf90ea282a rpc: more params for `GetVoteAccountsConfig` 2021-07-14 08:41:52 +00:00
Michael Vines 4098af3b5b Record vote account commission with voting/staking rewards and surface in RPC 2021-07-12 15:09:44 -07:00
Max Ogden ebc7df62f3
Fix example in docs for getInflationReward (#18494) 2021-07-07 18:15:56 +00:00
Tyera Eulberg cc80197349
Update notification format info to be consistent (#18354) 2021-07-01 05:49:30 +00:00
Tiago Carvalho 8e7d393b70
Added formats to notifications in WebSocket RPC client. (#18231) 2021-06-30 22:04:37 -06:00
Tyera Eulberg dfb6296499
Document slotsUpdates (#18335)
* Add slotsUpdates to jsonrpc docs

* Re-add unstable section
2021-06-30 21:24:08 +00:00
oncecsc 10c6e771b5
fix getBlock API reference (#17661) 2021-06-02 00:11:36 -07:00
Michael Vines 8eab0e8602
Bump version to v1.8.0 (#17541) 2021-05-27 08:51:53 -07:00
Tyera Eulberg ab581dafc2
Add block height to ConfirmedBlock structs (#17523)
* 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
2021-05-26 22:16:16 -06:00
Michael Vines 9541411c15 Plumb transaction-level rewards (aka "rent debits") into the `getTransaction` RPC method 2021-05-27 03:05:05 +00:00
Michael Vines cbce440af4 simulateTransaction can now return accounts modified by the simulation 2021-05-26 14:20:23 -07:00
Tyera Eulberg e9bc1c6b07
Add last valid block height to rpc Fees (#17506)
* Add last_valid_block_height to fees rpc

* Add getBlockHeight rpc

* Update docs
2021-05-26 07:26:19 +00:00
Michael Vines 3d40ec3c88 Add missing fields from getClusterNodes documentation 2021-05-26 02:00:30 +00:00
Justin Starry 660d37aadf sigVerify conflicts with replace, add tests 2021-05-25 17:32:00 -07:00
Justin Starry e14f3eb529 rename flag 2021-05-25 17:32:00 -07:00
Justin Starry 96cef5260c Add a flag to simulateTransaction to use most recent blockhash 2021-05-25 17:32:00 -07:00
Nikita d41266e4e9
rpc: add context toggle to getProgramAccounts (#17399)
* fix(rpc): return context in get_program_accounts

* doc(rpc): document withContext flag

* fix(rpc): fix comment

Co-authored-by: Michael Vines <mvines@gmail.com>

* fix(rpc): fix doc

Co-authored-by: Michael Vines <mvines@gmail.com>

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-05-22 07:12:21 +00:00
Marcin Zawiejski 611628a402
fixed getProgramAccounts fields list (#17278) 2021-05-17 14:23:30 +00:00
Michael Vines 515f8a21d5 Add NEW labels for RPC methods introduced in v1.7 2021-05-14 21:22:52 +00:00
Michael Vines d6c076f1b6 getBlockProduction now correctly reports block production 2021-05-07 19:04:51 -07:00
Trent Nelson 3d98321b38 docs: fix copy-pasta breaking typo in `getRecentBlockhash` example 2021-04-30 04:03:15 +00:00
Michael Vines 542d88929f Add getBlockProduction RPC method 2021-04-28 20:02:54 -07:00
Michael Vines 59fc33635a Add getVoteAccounts RPC method parameter to restrict results to a single vote account 2021-04-27 04:27:15 +00:00
Josh ec37a843a4
docs: getInflationReward rpc output fields should be in lower camel case (#16802) 2021-04-24 19:13:02 +00:00
Michael Vines b8b54567b1 Clean up "APR" language around inflation rewards 2021-04-21 19:02:03 -07:00
Michael Vines 6004c0abf5 getLeaderSchedule now supports filtered results based on validator identity 2021-04-21 17:59:26 -07:00
Justin Starry a7e65c0034
RPC: use finalized as default pubsub commitment level (#16659)
* RPC: use finalized as default pubsub commitment level

* update docs

* Fix tests
2021-04-20 08:19:54 +00:00
Tyera Eulberg 37afa00ffb
Rpc: deprecate getConfirmed endpoints (#16502)
* 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
2021-04-13 01:50:15 -06:00
Tyera Eulberg 70f3f7e679
Move obsolete rpc endpoints to separate api for removal (#16500)
* Move obsolete rpc methods to separate api for removal

* Remove obsolete method from docs

* Fix test using obs method
2021-04-12 20:33:40 -06:00
Josh e501fa5f0b
Rpc: introduce get_inflation_reward rpc call (#16278)
* 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
2021-04-06 18:10:53 -07:00
Michael Vines e4889220c4 Remove UNSTABLE warning from logsSubscribe 2021-04-02 12:53:42 -07:00
Tyera Eulberg da27acabcc
Rpc: enable getConfirmedSignaturesForAddress2 to return confirmed (not yet finalized) data (#16281)
* 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
2021-04-01 04:35:57 +00:00
Trent Nelson 2bcfbad653 docs: Reduce airdrop examples to 1 SOL 2021-03-30 21:28:42 +00:00
Tyera Eulberg 60ed8e2892
Rpc: enable getConfirmedBlocks and getConfirmedBlocksWithLimit to return confirmed (not yet finalized) data (#16161)
* Add commitment config capabilities

* Use rpc limit if no end_slot provided

* Limit to actually finalized blocks

* Support confirmed blocks in getConfirmedBlocks and getConfirmedBlocksWithLimit

* Update docs

* Add client plumbing

* Rename config enum
2021-03-29 12:41:31 -06:00
Tyera Eulberg 433f1ead1c
Rpc: enable getConfirmedBlock and getConfirmedTransaction to return confirmed (not yet finalized) data (#16142)
* Add Blockstore block and tx apis that allow unrooted responses

* Add TransactionStatusMessage, and send on bank freeze; also refactor TransactionStatusSender

* Track highest slot with tx-status writes complete

* Rename and unpub fn

* Add commitment to GetConfirmed input configs

* Support confirmed blocks in getConfirmedBlock

* Support confirmed txs in getConfirmedTransaction

* Update sigs-for-addr2 comment

* Enable confirmed block in cli

* Enable confirmed transaction in cli

* Review comments

* Rename blockstore method
2021-03-26 16:47:35 -06:00
Tyera Eulberg a8ef29df27
Support getBlockTime for unfinalized blocks (#16103) 2021-03-24 20:52:08 -06:00
Justin Starry e7fd7d46cf
rpc: add getSlotLeaders method (#16057) 2021-03-23 17:48:54 +00:00
Tyera Eulberg aa54c468ea
rpc: Add config options limiting getConfirmedBlock response data (#15970)
* Add new confirmed block struct

* Add RpcConfirmedBlockConfig options

* Configure block response based on new options

* Add client api, use in cli fetch_epoch_rewards

* Update docs

* Apply review suggestions
2021-03-18 17:58:20 +00:00
Michael Vines 0c9ca5522c Bump version to v1.7.0 2021-03-13 09:01:21 +00:00
Tyera Eulberg 5b2da19c93
Rpc: support extended config for getConfirmedBlock (#15827)
* 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
2021-03-12 22:19:45 +00:00
Trent Nelson c4ee1ab710 docs: deprecate lastvalidslot field of jsonrpc getfees 2021-03-11 08:38:18 +00:00
Trent Nelson 45190f6281 docs: stabilize spl token jsonrpc methods 2021-03-11 08:38:18 +00:00
Michael Vines 66b781eec3 Add 'unknown' health check state 2021-03-05 17:46:50 +00:00
Michael Vines 24ab84936e Break up RPC API into three categories: minimal, full and admin 2021-03-04 16:39:44 -08:00
Tyera Eulberg 19ac79b5cc
Deprecate UiTokenAmount::ui_amount (#15616)
* Add TokenAmount::ui_amount_string

* Fixup solana-tokens

* Update docs
2021-03-02 22:51:41 -07:00
sakridge 1b59b163dd
Add max retransmit and shred insert slot (#15475) 2021-02-23 13:06:33 -08:00
Michael Vines 4b0114b991 Limit the number of getProgramAccounts filters 2021-02-23 18:43:22 +00:00
Michael Vines 65f1afe5e1 Limit getProgramAccounts memcpy filter string to 128 bytes 2021-02-23 18:43:22 +00:00
Tyera Eulberg 123de5de54
Update uiAmount type in docs (#15471) 2021-02-22 16:54:07 -07:00
Josh 760e163190
docs: getLargestAccounts caching notice (#15293) 2021-02-12 08:20:32 -08:00
Tyera Eulberg da6753b8c0
Warp timestamp and extend max-allowable-drift for accommodate slow blocks (#15204)
* Remove timestamp_correction feature gating

* Remove timestamp_bounding feature gating

* Remove unused deprecated ledger code

* Remove unused deprecated unbounded-timestamp code

* Enable independent adjustment of fast/slow timestamp bounding

* Update timestamp bounds to 25% fast, 80% slow; warp timestamp

* Update bank hash test

* Add PR number to feature

Co-authored-by: Michael Vines <mvines@gmail.com>

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-02-09 15:49:00 -07:00
Ryo Onodera 85ffc8fa1c
Warn lastValidSlot with some terminology tweaks (#15081)
* Warn lastValidSlot with some terminology tweaks

* Apply suggestions from code review

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Restore previous arrangment of slot def. and tweak upon it

* Apply suggestions from code review

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-02-05 15:47:02 +09:00
Tyera Eulberg 2780214e71
Clean up some old commitment names (#14994) 2021-02-02 16:33:45 +00:00
Trent Nelson 52326d53be docs: Fix mangled `getConfirmedTransaction` parameter list 2021-01-28 22:13:03 -07:00
Josh 6b8e710988
RPC documentation updates for token deltas / blockTimes in getConfirmedSignatures2/getConfirmedTransaction (#14871)
* docs: add token balances response info

* docs: add blockTime to getConfirmedSignatures and getConfirmedTransaction

* docs: update example responses

* fix: remove space
2021-01-27 16:15:37 -08:00
Tyera Eulberg ffa5c7dcc8
Deprecate commitment variants (#14797)
* 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
2021-01-26 19:23:07 +00:00
Ryo Onodera 1d87091d51
Improve documentation of sendTransaction (#14770)
* Improve documentation of sendTransaction

* Apply suggestions from code review

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Word wrap and improve terminology

* Tweak

* Oops

* Apply suggestions from code review

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-01-23 09:51:25 +00:00
Michael Vines 5d9dc609b1 Rename RpcNodeUnhealthy error to NodeUnhealthy, generalize `getHealth` RPC error object for the future 2021-01-18 19:57:25 -08:00
Michael Vines 4003f86f04 Add `getSnapshotSlot` RPC method 2021-01-16 19:31:21 +00:00
Michael Vines dacb95083d Add `getHealth` RPC method 2021-01-16 10:10:48 -08:00
Tyera Eulberg 9a89689ad3
Use optimistic confirmation in getSignatureStatuses, and various downstream client methods (#14430)
* Add optimistically_confirmed field to TransactionStatus

* Update docs

* Convert new field to confirmation_status

* Update docs to confirmationStatus

* Update variants

* Update docs

* Just Confirmed
2021-01-15 16:05:05 +00:00
Ryo Onodera 974eb6e1ef
Fix pre-merge old name in the docs (#14425) 2021-01-05 02:41:24 +00:00
Michael Vines 1e977ac025 Bump version to v1.6.0 2020-12-15 18:28:04 +00:00
Tyera Eulberg 6ae4d2e5cb
Fix logsSubscribe (#13996) 2020-12-07 19:00:52 +00:00
Michael Vines d18b417346 Update examples to use Tokenkeg 2020-11-26 18:26:57 -08:00
Michael Vines 4ef2da0ff0 Add `solana logs` command 2020-11-25 11:44:41 -08:00
Michael Vines 215ddecaa5 Add base64+zstd encoding for RPC account data 2020-11-25 02:03:23 +00:00
Michael Vines bee9998e91 tiny doc fix 2020-11-24 12:27:40 -08:00
Michael Vines 61ab2072bd Clean up default commitment handling for subscriptions 2020-11-23 22:54:47 -08:00
Michael Vines 8761ce4691 Document feature-set field in getVersion 2020-11-15 18:01:47 -08:00
Michael Vines 5d72e52ad0 Disable the PubSub vote subscription by default
The --rpc-pubsub-enable-vote-subscription flag may be used to enable it.
The current vote subscription is problematic because it emits a
notification for *every* vote, so hundreds a second in a real cluster.
Critically it's also missing information about *who* is voting,
rendering all those notifications practically useless.

Until these two issues can be resolved, the vote subscription is not
much more than a potential DoS vector.
2020-11-14 12:36:37 -08:00
Jack May eb306da148
Report and bail on broken links (#13540) 2020-11-11 17:46:24 -08:00
Trent Nelson fb815294b3 docs: Consistent used of "jsonParsed" throughout RPC reference 2020-11-09 20:28:04 -07:00
Trent Nelson 87924c7111 docs: Consistently use "jsonParsed" param for RPC `getAccountInfo` 2020-11-09 20:28:04 -07:00
Trent Nelson 1d7c00c915 docs: Wrap RPC `getAccountInfo` at 80 char 2020-11-09 20:28:04 -07:00
Jon Cinque ede891a6c6
docs: Clarify the commitment levels based on questions (#13387)
* Clarify the commitment levels based on questions

Many people have asked about what commitment levels mean, and which to
choose.  This update includes some of the language at
`sdk/src/commitment_config.rs` and a recommendation for different use
cases.

Additionally, the preflight commitment documentation was out of date,
specifying that "max" was always used, and this is no longer the case.

* Update docs/src/developing/clients/jsonrpc-api.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update docs/src/developing/clients/jsonrpc-api.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Update docs/src/developing/clients/jsonrpc-api.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>

* Fix typo

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2020-11-05 20:34:55 +01:00
Jack May 3d5e778d5d
Flesh out development docs (#13318)
* flesh out development docs

* nits
2020-11-03 20:53:17 +00:00