Commit Graph

1959 Commits

Author SHA1 Message Date
6c5b8f324a Rpc: Add until parameter for getConfirmedSignaturesForAddress2 (#11644)
* Refactor bigtable apis to accept start and end keys

* Make helper fn to deserialize cell data

* Refactor get_confirmed_signatures_for_address to use get_row_data range

* Add until param to get_confirmed_signatures_for_address

* Add until param to blockstore api

* Plumb until through client/cli

* Simplify client params
2020-08-15 10:42:17 -06:00
7c736f71fe Make BPF Loader static (#11516) 2020-08-14 12:32:45 -07:00
4da1e9833c Ensure highest_confirmed_root only grows (#11596)
* Split out commitment-cache update for unit testing

* Add failing test

* Ensure highest_confirmed_root only grows
2020-08-13 00:59:44 -06:00
f519fdecc2 generate_pull_response optimization (#11597) 2020-08-12 22:45:19 -07:00
574c356863 Add CommitmentSlots::new_from_slot() (#11600) 2020-08-13 03:51:15 +00:00
b1e452f876 Return blockstore signatures-for-address despite bigtable error (#11594) 2020-08-12 17:57:05 -06:00
54137e3446 Add incoming pull response counter (#11591) 2020-08-12 14:07:05 -07:00
473b5249e3 Fix assertion failure (#11572)
Co-authored-by: Carl <carl@solana.com>
2020-08-12 12:10:24 -07:00
9290e561e1 Align host addresses (#11384)
* Align host addresses

* support new program abi

* update epoch rollout

* Enforce aligned pointers in cross-program invocations
2020-08-11 16:11:52 -07:00
1b238dd63e Gossip log (#11555)
Co-authored-by: Carl <carl@solana.com>
2020-08-11 21:03:54 +00:00
7ef50a9352 Move cluster slots update to separate thread (#11523)
* Add cluster_slots_service

Co-authored-by: Carl <carl@solana.com>
2020-08-11 12:48:13 -07:00
2910fd467f Fix rust fmt (#11537) 2020-08-11 22:53:55 +09:00
713851b68d filter out old gossip pull requests (#11448)
* init

* builds

* stats

* revert

* tests

* clippy

* add some jitter

* shorter jitter timer

* update

* fixup! update

* use saturating_sub

* fix filters
2020-08-11 06:26:42 -07:00
88ca04dbdb Add config param to specify offset/length for single and program account info (#11515)
* Add config param to specify dataSlice for account info and program accounts

* Use match instead of if
2020-08-10 22:35:29 +00:00
da210ddd51 Fix parsing of spl-token Mint (#11512)
* Add failing test

* Fix jsonParsed mint
2020-08-10 20:35:36 +00:00
a9f76862fb Decode native-program and sysvar accounts (#11463)
* Pass pubkey in to account-decoder for sysvars

* Decode sysvar accounts

* Decode config accounts; move validator-info lower

* Decode stake accounts

* Review comments

* Stringify any account lamports and epochs that can be set to u64::MAX
2020-08-09 07:50:45 +00:00
068d23f298 Add Binary64 option for account data (#11474)
* Add Binary64 option for account data

* Decode into binary64

* Reword docs
2020-08-08 22:40:13 -07:00
edadd5d6d5 Remove Budget from CLI (#11451)
* Remove support for Budget

Also:
* Make "pay" command a deprecated alias for the "transfer" command

* chore: remove budget from web3.js

* Drop Budget depedency from core

Validators no longer ship with builtin Budget
2020-08-07 16:01:51 -06:00
7e25130529 Send votes from banking stage to vote listener (#11434)
*  Send votes from banking stage to vote listener

Co-authored-by: Carl <carl@solana.com>
2020-08-07 11:21:35 -07:00
b7c2681903 Token Accounts: return ui_amount, decimals with decoded account (#11407)
* Return ui_amount, decimals from token client methods

* Return ui_amount, decimals in RPC jsonParsed token accounts

* Fixup docs

* Return ui_amount, decimals in pubsub jsonParsed token accounts

* Remove unnecessary duplicate struct

* StringAmount rename
2020-08-07 11:37:39 -06:00
bad486823c Add a client for BankForks (#10728)
Also:
* Use BanksClient in solana-tokens
2020-08-07 08:45:17 -06:00
3fdd8ffdf0 Remove circular dep between InstructionError and SystemError (#11427) 2020-08-06 22:04:43 +00:00
4222932e08 Plug getConfirmedSignaturesForAddress2 into bigtable storage 2020-08-05 23:04:16 -07:00
02c0981ecf Rename startAfter to before 2020-08-05 14:33:14 -07:00
087fd32ce3 Reimplement transaction-history command with getConfirmedSignaturesForAddress2 2020-08-05 14:33:14 -07:00
1b2276520b Add getConfirmedSignaturesForAddress2 RPC method 2020-08-05 14:33:14 -07:00
dfae9a9864 Plumb Bigtable ledger storage into the RPC subsystem 2020-08-05 14:27:12 -07:00
0e02740565 Setup a tokio 0.2 runtime for RPC usage 2020-08-05 14:27:12 -07:00
b876fb84ba Make room for tokio 0.2 2020-08-05 14:27:12 -07:00
86e3f96f16 Return token amounts as floats (#11370)
* Return token amounts as floats

* Floating-point equality

* Return float and raw token amounts

* Fix decimals and token rpcs for native-mint tokens

* Fixup docs and review comments
2020-08-05 06:48:09 +00:00
14339dec0a Harden RPC preflight test inputs 2020-08-05 06:06:57 +00:00
e25846e1ad Add failing test for unsane tx in RPC preflight 2020-08-05 06:06:57 +00:00
d0144ce382 Fix token rpc-client methods (#11361)
* Convert None to error in parse_keyed_accounts

* Allow encoding configuration in getTokenAccounts methods
2020-08-04 11:11:30 -06:00
5b4cb083f1 Add integration test for optimistic confirmation failure detection (#11353)
* Add optimistic conf failure test

* Add check for optimistic failure log

Co-authored-by: Carl <carl@solana.com>
2020-08-03 20:01:52 -07:00
eefcf484cb clippy 2020-08-03 18:35:15 +00:00
0bc9bcc8b9 Fix bad rebase 2020-08-02 12:09:06 -06:00
d1b2e6cdf2 Add getTokenLargestAccounts endpoint (#11322) 2020-08-02 10:23:44 -06:00
ffbd859c42 Update spl-token and spl-memo 2020-08-02 07:53:42 -07:00
9bcfc51df1 Add token rpc endpoints to rpc-client (#11315) 2020-07-31 20:53:49 +00:00
d7e961dac4 Enable new fork choice on mainnet, 400_000 slots into epoch 61 (#11312)
Co-authored-by: Carl <carl@solana.com>
2020-07-31 20:37:58 +00:00
61d9d219f9 Withdraw authority no longer implies a custodian (#11302)
* Withdraw authority no longer implies a custodian

Before this change, if the withdraw authority and custodian had
the same public key, then a withdraw authority signature would
imply a custodian signature and lockup would be not be enforced.

After this change, the client's withdraw instruction must
explictly reference a custodian account in its optional sixth
account argument.

Likewise, the fee-payer no longer implies either a withdraw
authority or custodian.

* Fix test

The test was configuring the stake account with the fee-payer as
the withdraw authority, but then passing in a different key to
the withdraw instruction's withdraw authority parameter. It only
worked because the second transaction was signed by the fee-payer.
2020-07-31 13:37:53 -06:00
c78e12a262 Avoid spl-sdk dependency, which inhibits crate publishing 2020-07-30 23:47:26 +00:00
1d2426ddbc Move simulate_transaction from rpc to bank (#11294) 2020-07-30 19:15:45 +00:00
a23e1129a9 Switch to optimistic conf for notifying gossip subscribers (#11289)
Co-authored-by: Carl <carl@solana.com>
2020-07-30 02:52:27 -07:00
bf18524368 Add hook for getting vote transactions on replay (#11264)
* Add hook for getting vote transactions on replay

Co-authored-by: Carl <carl@solana.com>
2020-07-29 23:17:40 -07:00
a888f2f516 Reject TXs sent via RPC with no signatures 2020-07-30 00:07:33 -06:00
9778fedd7a Add new RPC error for TXs with no signatures 2020-07-30 00:07:33 -06:00
a7079e4dde Dereplicode send_transaction and request_airdrop RPC handlers 2020-07-30 00:07:33 -06:00
b962b2ce2d Add failing test for TX sent via RPC with no signatures 2020-07-30 00:07:33 -06:00
ebe367f722 Add utility function (#11262)
Co-authored-by: Carl <carl@solana.com>
2020-07-28 23:44:10 -07:00