Commit Graph

76 Commits

Author SHA1 Message Date
Tyera Eulberg
c90de8978d Add encoding and filters parameters to rpc Subscriptions (#11065)
* Plumb account configs and enable encoding

* Enable filters for pubsub program accounts

* Update docs
2020-07-23 13:38:28 -06:00
carllin
73f3d04798 Add replay votes to gossip vote tracking (#11119)
* Plumb replay vote channel for notifying vote listener of replay votes

* Keep gossip only notification for debugging gossip in the future

Co-authored-by: Carl <carl@solana.com>
2020-07-20 17:29:07 -07:00
Tyera Eulberg
a255b0fc86 Rename CacheSlotInfo to CommitmentSlots (#11111) 2020-07-17 17:54:49 +00:00
Tyera Eulberg
fdff681bcc Simplify BlockCommitmentCache slot info (#11106)
* Refactor BlockCommitmentCache, store a CacheSlotInfo

* Comma
2020-07-17 09:24:51 -06:00
Greg Fitzgerald
ebadbce920 Drop bank from BlockCommitmentCache (#10959)
* Remove bank reference from BlockCommitmentCache

* Don't use a Bank to create BlockCommitmentCache

* Rename recent_slot to slot
2020-07-09 00:50:13 +00:00
Greg Fitzgerald
2fdbb97244 Rename largest_confirmed_root to highest_confirmed_root (#10947) 2020-07-07 23:59:46 +00:00
Tyera Eulberg
d97850f1d9 Add account-decoder utilities (#10846)
* Fix comment and make less pub

* Add account-decoder crate and use to decode vote and system (nonce) accounts

* Update docs

* Rename RpcAccount struct

* s/Rpc/Display

* Call it jsonParsed and update docs

* Revert "s/Rpc/Display"

This reverts commit 6e7149f503.

* s/Rpc/Ui

* Add tests

* Ui more things

* Comments
2020-07-01 04:55:11 +00:00
Greg Fitzgerald
50b3fa83a0 Move BankCommitmentCache to solana_runtime (#10816)
* Remove Blockstore member variable from BlockCommitmentCache

* Hoist is_confirmed_rooted() to its only caller

BlockCommitmentCache no longer depends on Blockstore

* Move BlockCommitmentCache to solana_runtime
2020-06-25 22:06:58 -06:00
Justin Starry
39984cdcc3 Wait until bank is frozen before sending RPC notifications (#10654) 2020-06-18 00:44:51 +08:00
Greg Fitzgerald
6ee222363e Move BankForks to solana_runtime (#10637)
* Move BankForks to solana_runtime

* Update imports
2020-06-17 15:27:03 +00:00
Greg Fitzgerald
8dd5384d6d Split commitment module (#10541)
automerge
2020-06-12 17:16:10 -07:00
Greg Fitzgerald
2eb6f498a8 Remove redundant BankForks parameter (#10537) 2020-06-12 11:04:17 -06:00
Tyera Eulberg
2928c5d103 Add SingleGossip commitment level to use for subscriptions (#10147)
automerge
2020-05-22 12:55:17 -07:00
Justin Starry
10d60288e8 Update default subscription commitment level from recent to single (#10161)
* Update default subscription commitment level from recent to single

* Update jsonrpc docs

* Fix failing tests
2020-05-22 00:33:24 +08:00
Tyera Eulberg
bac4aec16f Trigger RPC notifications after block commitment cache update (#10077)
* Fixup commitment-aggregation metric

* Trigger notifications after commitment-cache update

* Fixup fn name

* Add single-confirmation commitment level

* Rename to highest_confirmed_slot

* Pass commitment-cache info directly to notifications

* Use match

* Update commitment docs

* Update out of date pubsub docs
2020-05-18 12:49:01 -06:00
Reisen
bfcfbab818 Add Vote PubSub endpoint for live gossip votes. (#10045)
* Add Vote PubSub endpoint for live gossip votes.

* Updated tests for Vote RPC and Vote Listener

* Add JSON RPC documentation for Vote RPC.

* Base58 encode hash in Vote RPC response.
2020-05-17 15:01:08 -06:00
Kristofer Peterson
58ef02f02b 9951 clippy errors in the test suite (#10030)
automerge
2020-05-15 09:35:43 -07:00
Tyera Eulberg
754c65c066 Refactor RPC subscriptions account handling (#9888)
* Switch subscriptions to use commitment instead of confirmations

* Add bank method to return account and last-modified slot

* Add last_modified_slot to subscription data and use to filter account subscriptions

* Update tests to non-zero last_notified_slot

* Add accounts subscriptions to test; fails at higher tx load

* Pass BankForks to RpcSubscriptions

* Use BankForks on add_account_subscription to properly initialize last_notified_slot

* Bundle subscriptions

* Check for non-equality

* Use commitment to initialize last_notified_slot; revert context.slot chage
2020-05-07 00:23:06 -06:00
Tyera Eulberg
9d91cca73c Remove commented code 2020-04-28 15:47:41 -06:00
Tyera Eulberg
d5abff82e0 Add largest_confirmed_root to BlockCommitmentCache (#9640)
* Add largest_confirmed_root to BlockCommitmentCache

* clippy

* Add blockstore to BlockCommitmentCache to check root

* Add rooted_stake helper fn and test

* Nodes that are behind should correctly id confirmed roots

* Simplify rooted_stake collector
2020-04-22 12:22:09 -06:00
Michael Vines
b58338b066 Make rpc_subscriptions.rs tests serial (#9556)
automerge
2020-04-17 10:48:39 -07:00
Michael Vines
ad0997e15f RPC: add err field to TransactionStatus, alongside the now deprecated status field (#9296)
automerge
2020-04-04 16:13:26 -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
Justin Starry
8bbf6e3f54 Fix race in RPC subscriptions test (#9142) 2020-03-29 01:58:51 +08:00
Justin Starry
c1a3b6ecc2 Add RPC subscription api for rooted slots (#9118)
automerge
2020-03-27 09:33:40 -07:00
Justin Starry
8f38bc7dc0 Refactor how pubsub subscriptions are added (#9042) 2020-03-25 00:53:32 +08:00
Justin Starry
eed8087d87 Respect confirmations param for signature subscription notifications (#9019)
automerge
2020-03-23 17:00:34 -07:00
Justin Starry
4b4819cd07 Add slot context to rpc pubsub notifications (#9001)
automerge
2020-03-23 05:34:42 -07:00
Michael Vines
18c1f0dfe9 Remove stub core/src/genesis_utils.rs (#8999) 2020-03-21 10:54:40 -07:00
Justin Starry
8ec8204a30 Run pubsub test poller in tokio runtime (#8494) 2020-03-03 09:44:39 +08:00
Justin Starry
8839dbfe5b Use runtime executor to send pubsub notifications (#8353)
automerge
2020-02-25 20:23:54 -08:00
Justin Starry
01697a9f5c Remove unnecessary arc and mutex for rpc notifications (#8351) 2020-02-21 08:03:46 +08:00
Tyera Eulberg
ab361a8073 Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -08:00
Justin Starry
1c97b31eaf Retain signature subscriptions that haven't been notified (#8261) 2020-02-14 01:00:50 +08:00
Justin Starry
268bb1b59b Fix RPC pub sub unsubscribe (#8208)
automerge
2020-02-11 17:09:40 -08:00
Sunny Gleason
5cf090c896 feat: implement RPC notification queue (#7863) 2020-01-20 16:08:29 -05: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
f0f185509f Remove tuple from programNotification (#7819)
automerge
2020-01-15 10:52:02 -08: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
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
Michael Vines
41cff1b49d Remove spammy log 2019-12-02 16:52:01 -07:00
Sunny Gleason
0a0f15baca RPC subscriptions for new slot notifications (#7114)
* feat: slot notifications via pubsub rpc w/ tests
2019-11-26 03:42:54 -05:00
Jack May
3415db9739 Merge api/program into single units (#7061) 2019-11-20 16:32:19 -08:00
Parth
9f6a2e51b2 add credit-debit rent handling (#6947)
* add credit-debit rent handling

* add tests

* charge rent for validator account for fee credit

* rent is stored per tx instead of account
2019-11-21 01:57:02 +05:30
Jack May
d184d3a732 Merge native programs parts into one unit (#7047) 2019-11-20 10:12:43 -08:00
Justin Starry
9807f47d4e Rename genesis block to genesis config (#6816) 2019-11-08 23:56:57 -05:00
Parth
5bd05fba09 require to account signature (#6658)
* require to signature

* fixing invocation to create_account

* fix create_account references

* address review comment

* whacking bugs in tests

* fixing stake program tests
2019-11-08 15:57:35 +05:30
Michael Vines
50a17fc00b Use Slot and Epoch type aliases instead of raw u64 (#6693)
automerge
2019-11-02 00:38:30 -07:00
Greg Fitzgerald
2636418659 Move blocktree_processor to solana_ledger (#6460)
* Drop core::result dependency in bank_forks

* Move blocktree_processor into solana_ledger
2019-10-20 09:54:38 -06:00
Rob Walker
0ffe7a9c8f plumb some rent (#5610)
* plumb some rent

* nits

* fixups

* fixups

* fixups
2019-08-23 14:04:53 -07:00