Commit Graph

154 Commits

Author SHA1 Message Date
Tyera Eulberg 25ee36bbba
Undo breaking rpc removal of getSignatureConfirmation (#9245) 2020-04-01 17:56:18 -06:00
Justin Starry c7ba1994ac
Undo getSignatureStatus breaking change, add getSignatureStatuses (#9228)
automerge
2020-04-01 11:30:58 -07:00
Jack May 268e04cb4a
Rename CustomError to Custom (#9207) 2020-04-01 09:01:11 -07:00
Tyera Eulberg 50fa577af8
Use cluster confirmations in rpc and pubsub (#9138)
* Add runtime methods to simply get status and slot

* Add helper function to get slot confirmation_count from BlockCommitmentCache

* Return cluster confirmations in getSignatureStatus

* Remove use of invalid get_signature_confirmation_status

* Remove unused methods

* Update pubsub to use cluster confirmations

* Fix test_check_signature_subscribe failure

* Refactor confirmations to read commitment cache only once

* Review comments

* Use bank, root from BlockCommitmentCache

* Update docs

* Add metric for block-commitment aggregations

Co-authored-by: Justin Starry <justin@solana.com>
2020-03-30 17:53:25 -06:00
Tyera Eulberg 62040cef56
Store BlockCommitmentCache slot and root metadata (#9154)
automerge
2020-03-30 10:29:30 -07:00
Tyera Eulberg 4b97e58cba
Consolidate signature-status rpcs (#9069)
* getSignatureStatus: return confirmations for non-rooted transactions

* Remove getNumConfirmations.. rpc

* Remove getSignatureConfirmation

* Review comments

* More review comments
2020-03-26 19:21:01 -06:00
sakridge b7b4aa5d4d
move rpc types from client to client-types crate (#9039)
* Separate client types into own crate, so ledger does not need it

Removes about 50 crates of dependency from ledger

* Drop Rpc name from transaction-status types
2020-03-26 13:29:30 -07:00
Tyera Eulberg 1b8f9e75dd
Update getSignatureStatus: support multiple signatures, include slot in each response item (#9022)
* Rename enable-rpc-get-confirmed-block

* Rename RpcTransactionStatus -> RpcTransactionStatusMeta

* Return simplified RpcTransactionStatus; Add support for multiple transactions

* Update docs

* typo
2020-03-23 11:25:39 -06:00
Justin Starry a0ffcc61ae
Add slot info to Bank::get_signature_confirmation_status (#9018) 2020-03-23 21:55:15 +08:00
Michael Vines 18c1f0dfe9
Remove stub core/src/genesis_utils.rs (#8999) 2020-03-21 10:54:40 -07:00
anatoly yakovenko 9cedeb0a8d
Pull streamer out into its own module. (#8917)
automerge
2020-03-17 23:30:23 -07:00
Michael Vines cea8067219
Disable setLogFilter RPC API by default (#8693)
automerge
2020-03-06 16:03:10 -08:00
Trent Nelson 4db074a5aa
RPC: Add `getFeeCalculatorForBlockhash` method call (#8687)
Returns the `FeeCalculator` associated with the given blockhash, or
`null` if said blockhash has expired
2020-03-06 17:01:31 -07:00
Grimes f89c22b5ee
`solana catchup` now detects when you try to catchup to yourself (#8635)
automerge
2020-03-04 14:44:21 -08:00
Trent Nelson 90bedd7e06
Split signature throughput tracking out of `FeeCalculator` (#8447)
* SDK: Split new `FeeRateGovernor` out of `FeeCalculator`

Leaving `FeeCalculator` to *only* calculate transaction fees

* Replace `FeeCalculator` with `FeeRateGovernor` as appropriate

* Expose recent `FeeRateGovernor` to clients

* Move `burn()` back into `FeeCalculator`

Appease BPF tests

* Revert "Move `burn()` back into `FeeCalculator`"

This reverts commit f3035624307196722b62ff8b74c12cfcc13b1941.

* Adjust BPF `Fee` sysvar test to reflect removal of `burn()` from `FeeCalculator`

* Make `FeeRateGovernor`'s `lamports_per_signature` private

* rebase artifacts

* fmt

* Drop 'Recent'

* Drop _with_commitment variant

* Use a more portable integer for `target_signatures_per_slot`

* Add docs for `getReeRateCalculator` JSON RPC method

* Don't return `lamports_per_signature` in `getFeeRateGovernor` JSONRPC reply
2020-02-28 13:27:01 -07:00
Tyera Eulberg ab361a8073
Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -08:00
Michael Vines 1bf2285fa2 ledger-tool: Add print-accounts command 2020-02-14 19:59:48 -07:00
Michael Vines c4fd81fc1c The getConfirmedBlock RPC API is now disabled by default
The --enable-rpc-get-confirmed-block flag allows validators to opt-in to
the higher disk usage and IOPS.
2020-02-11 22:24:08 -07:00
François Garillot f016c9a669
Maintenance : simplify a few patterns, remove unneeded dependencies (#8137)
* Simplify a few pattern matches

* Removing unneeded dependencies, upgrading internal version #s

 net-shaper: Removing log, semver, serde_derive
 bench-tps: Removing serde, serde_derive
 banking-bench: Removing solana
 ledger-tool: Removing bincode, serde, serde_derive
 librapay: Removing solana, language_e2e_tests
 log-analyzer: Removing log, semver, serde_derive
 exchange: Removing solana
 core: Removing crc, memmap, symlink, untrusted
 perf: Removing serde_derive
 genesis: Removing hex, serde_derive
 sdk-c: Removing sha2
 sys-tuner: Removing semver
 bench-exchange: Removing bincode, bs58, env_logger, serde, serde_derive, untrusted, ws
 btc_spv_bin: Removing serde_json
 btc_spv: Removing chrono
 bpf_loader: Removing serde
 ledger: Removing dlopen, dlopen_derive, serde_derive
 move_loader: Removing byteorder, libc, language_e2e_tests
 ownable: Removing serde, serde_derive
 client: Removing rand
 archiver-utils: Removing rand_chacha
 validator: Removing serde_json, tempfile
 param_passing_dep: Removing solana
 failure: Removing log
 vest: Removing log
 vote-signer: Removing bs58, serde
 local-cluster: Removing symlink
 keygen: Removing rpassword
 install: Removing bs58, log
 upload-perf: Removing log
 runtime: Removing serde_json
 stake: Removing rand

* Add modified Cargo.lock

* fixup! Simplify a few pattern matches

* fixup! Simplify a few pattern matches
2020-02-06 10:02:38 -07:00
Michael Vines a03d441e6f Add rpc port sanity checks, fix tests 2020-01-30 20:57:58 -07:00
Michael Vines 3900d09f6f Employ rpc_port defaults 2020-01-30 20:57:58 -07:00
Michael Vines 81ba18eea6 Add --private-rpc flag 2020-01-30 20:57:58 -07:00
Michael Vines c4faccc77f getClusterNodes now excludes validators with a different shred version 2020-01-29 20:08:42 -07:00
carllin 4ffd7693d6
Add lock to make sure slot-based locktree calls are safe (#7993) 2020-01-28 13:45:41 -08:00
Greg Fitzgerald 3aabeb2b81
Rename bootstrap leader (#7906)
* Rename bootstrap leader to bootstrap validator

It's a normal validator as soon as other validators enter the
leader schedule.

* cargo fmt

* Fix build

Thanks @CriesofCarrots!
2020-01-22 09:22:09 -07:00
Tyera Eulberg 65f5885bce
sendTransaction rpc: expect transaction as base58 string (#7913) 2020-01-21 22:16:07 -07:00
Tyera Eulberg 7a132eabb4
Update JSON-RPC documentation (#7915)
* Streamline getBlockCommitment response

* Update json-rpc docs
2020-01-21 20:17:33 -07:00
Rob Walker 7e1b380f01
Move vote_state current credits into epoch_credits (#7909)
* Move vote_state current credits into epoch_credits

* fixups

* fixup
2020-01-21 19:08:40 -08:00
Michael Vines 93036bec01 Add minimumLedgerSlot RPC API 2020-01-21 14:05:26 -07:00
Jack May 663e98969d Use a different error to test rpc response (#7900)
automerge
2020-01-21 12:42:23 -08:00
Tyera Eulberg da165d6943
Fix Rpc inconsistencies (#7826)
* Update rpc account format: remove byte arrays

* Base58-encode pubkeys in getStoragePubkeysForSlot

* Update docs
2020-01-15 15:33:53 -07:00
Tyera Eulberg 6d3b8b6d7d
Remove tuples from JSON RPC responses (#7806)
* Remove RpcConfirmedBlock tuple

* Remove getRecentBlockhash tuple

* Remove getProgramAccounts tuple

* Remove tuple from get_signature_confirmation_status

* Collect Rpc response types

* Camel-case epoch schedule for rpc response

* Remove getBlockCommitment tuple

* Remove getStorageTurn tuple

* Update json-rpc docs
2020-01-15 00:25:45 -07:00
Greg Fitzgerald b5dba77056 Rename blocktree to blockstore (#7757)
automerge
2020-01-13 13:13:52 -08:00
Tyera Eulberg a17d5795fb getConfirmedBlock: add encoding optional parameter (#7756)
automerge
2020-01-12 21:34:30 -08:00
Jack May 07855e3125
Allow override of RUST_LOG (#7705) 2020-01-08 09:19:12 -08:00
Rob Walker a7040896f0
Update to rust 1.40.0 (#7572)
* Update to rust 1.40.0

* fixups
2019-12-19 23:27:54 -08:00
Tyera Eulberg c5b076ec7e Add getConfirmedBlocks rpc method (#7550)
automerge
2019-12-18 15:51:47 -08:00
Michael Vines bd22b641b3 Speed up getLeaderSchedule RPC call by reducing pubkey duplication 2019-12-18 15:59:55 -07:00
Michael Vines 434cde179f GetLeaderSchedule can now return a schedule for arbitrary epochs 2019-12-17 23:41:42 -07:00
Tyera Eulberg 3513f4ee84
Rename drone to faucet (#7508) 2019-12-16 14:05:17 -07:00
Tyera Eulberg 6b88da2b82
Hook up getBlockTime rpc to real data (#7476)
* Add blocktree timestamp helper functions and tests

* Flesh out blocktree::get_block_time

* Move stakes up into rpc to make testing easier; expand tests

* Review comments
2019-12-14 12:23:02 -07:00
Michael Vines d01ea20273 getVoteAccounts now excludes listing inactive unstaked accounts as delinquent
This keeps abandoned vote accounts out of the `solana show-validators` output
2019-12-14 09:52:03 -07:00
Justin Starry dad5c62df5 Add uptime column to show-validators (#7441)
automerge
2019-12-11 22:04:54 -08:00
Michael Vines 77cd292828 getVoteAccounts RPC API no longer returns "idle" vote accounts, take II 2019-12-07 01:16:36 -07:00
Michael Vines 22d6951de5 Revert "getVoteAccounts RPC API no longer returns "idle" vote accounts"
This reverts commit 103e40b9689d74ece606385a67d166f55f453823.
2019-12-07 01:16:36 -07:00
Michael Vines 42247e0e1a getVoteAccounts RPC API no longer returns "idle" vote accounts (#7339) 2019-12-06 20:23:29 -05:00
Tyera Eulberg 58c144ee55
Add getBlockTime rpc api (#7130)
* Add getBlockTime rpc api

* Add getBlockTime to docs

* Fix duration rounding for common tick/slot durations; add slot duration calculation

* Expose slots_per_year

* Use genesis values instead of clock defaults to calculate block offset

* Add get-block-time cli subcommand

* Fix test_rent: decrease magic number usage
2019-11-26 00:40:36 -07:00
Tyera Eulberg 0f66e5e49b Add getConfirmedBlock test to rpc (#7120)
automerge
2019-11-25 11:08:03 -08:00
Jack May d184d3a732
Merge native programs parts into one unit (#7047) 2019-11-20 10:12:43 -08:00
Tyera Eulberg ea656b1a3f
Add parent slot to getConfirmedBlock (#7038)
* Add parent slot to getConfirmedBlock

* Fix bad text-replace

* Use camelCase in getConfirmedBlock
2019-11-19 09:39:55 -07:00