Commit Graph

954 Commits

Author SHA1 Message Date
271e17547a Nit thiserror for pubkey (#8994)
automerge
2020-03-20 18:07:37 -07:00
e28368ff1b Move address creation with seed into pubkey (#8991) 2020-03-20 15:20:48 -07:00
98228c392e CLI: Add multi-session signing support (#8927)
* SDK: Add `NullSigner` implementation

* SDK: Split `Transaction::verify()` to gain access to results

* CLI: Minor refactor of --sign_only result parsing

* CLI: Enable paritial signing

Signers specified by pubkey, but without a matching --signer arg
supplied fall back to a `NullSigner` when --sign-only is in effect.
This allows their pubkey to be used for TX construction as usual,
but leaves their `sign_message()` a NOP. As such, with --sign-only
in effect, signing and verification must be done separately, with
the latter's per-signature results considered

* CLI: Surface/report missing/bad signers to user

* CLI: Suppress --sign-only JSON output

* nits

* Docs for multi-session offline signing
2020-03-18 20:49:38 -07:00
fbf2dd1672 CLI: Error message cleanup (#8804)
automerge
2020-03-12 23:20:49 -07:00
deaf3cb416 Instruction member function (#8801) 2020-03-12 09:08:39 -07:00
6eb4973780 Don't use move semantics if not needed (#8793) 2020-03-11 14:37:23 -07:00
9872430bd2 Add VoteTracker for tracking cluster's votes in gossip (#8327)
Track votes by slot in cluster_vote_listener
2020-03-09 22:03:09 -07:00
97b6c41d42 Fix typos in error messages (#8726)
automerge
2020-03-09 10:12:42 -07:00
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
9d667db634 SDK: Allow RecentBlockhashes to hold the entire BlockhashQueue (#8632)
automerge
2020-03-05 11:03:21 -08:00
5e3ce30d02 Pass the correct program_id to programs (#8630) 2020-03-05 10:57:35 -08:00
97c5fb8141 Allow passing of program_ids to programs (#8639) 2020-03-05 10:57:12 -08:00
fd00e5cb35 Store FeeCalculator with blockhash in nonce accounts (#8650)
* Copy current state version to v0

* Add `FeeCalculator` to nonce state

* fixup compile

* Dump v0 handling...

Since we new account data is all zeros, new `Current` versioned accounts
look like v0. We could hack around this with some data size checks, but
the `account_utils::*State` traits are applied to `Account`, not the
state data, so we're kind SOL...

* Create more representative test `RecentBlockhashes`

* Improve CLI nonce account display

Co-Authored-By: Michael Vines <mvines@gmail.com>

* Fix that last bank test...

* clippy/fmt

Co-authored-by: Michael Vines <mvines@gmail.com>
2020-03-05 07:40:26 -07:00
561808cf90 SDK: Store FeeCalculator in recent_blockhashes sysvar (#8609)
* SDK: Store FeeCalculators in recent_blockhashes sysvar

* nits
2020-03-04 12:01:32 -07:00
25df95be6f Expose executable and rent_epoch in AccountInfo (#8619) 2020-03-04 10:52:09 -08:00
1cc7131bb7 Consolidate Nonce state under one struct (#8624)
automerge
2020-03-04 08:51:48 -08:00
d3b458dd9b Keep GenesisConfig binary compatible with v0.23 (#8617)
automerge
2020-03-04 00:04:44 -08:00
b83a0434a4 Prepare for multiple nonce account state versions (#8612)
automerge
2020-03-03 21:19:09 -08:00
1cb6101c6a SDK: Add versioning to nonce state (#8607) 2020-03-03 19:39:09 -07:00
be0cc0273f SDK: Re-org nonce state module to facilitate versioning (#8603)
automerge
2020-03-03 17:00:39 -08:00
abf33b3b3b Add commitment flag to vote-account and validators commands (#8597) 2020-03-03 17:53:30 -07:00
1265afebbb SDK: Return a full RecentBlockhashes for tests (#8580)
automerge
2020-03-02 18:44:29 -08:00
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
7d27be2a73 Upgrade to Rust 1.41.1 2020-02-28 10:10:42 -07:00
7dac8e2dde Reorder InstructionError to remain compatible with v0.23 2020-02-27 18:05:12 -07:00
0b66ae5c53 Ledger messaging cleanup (#8506) 2020-02-27 12:23:13 -07:00
39282be486 Determine vote_state ahead of time (#8303)
automerge
2020-02-24 19:27:04 -08:00
12a9b5f35e CLI: collect and deduplicate signers (#8398)
* Rename (keypair util is not a thing)

* Add method to generate_unique_signers

* Cli: refactor signer handling and remote-wallet init

* Fixup unit tests

* Fixup intergation tests

* Update keypair path print statement

* Remove &None

* Use deterministic key in test

* Retain storage-account as index

* Make signer index-handling less brittle

* Cache pubkey on RemoteKeypair::new

* Make signer_of consistent + return pubkey

* Remove &matches double references

* Nonce authorities need special handling
2020-02-24 17:03:30 -07:00
73063544bd Move shred_version module to sdk/ 2020-02-24 14:46:12 -07:00
947a339714 Add snapshot hash of full accounts state (#8295)
* Add snapshot hash of full accounts state

* Use normal hashing for the accounts delta state

* Add merkle
2020-02-22 13:46:40 -08:00
4ddbf8d509 CLI: dynamic signing reboot (#8384)
* Add keypair_util_from_path helper

* Cli: impl config.keypair as a trait object

* SDK: Add Debug and PartialEq for dyn Signer

* ClapUtils: Arg parsing from pubkey+signers to Presigner

* Impl Signers for &dyn Signer collections

* CLI: Add helper for getting signers from args

* CLI: Replace SigningAuthority with Signer trait-objs

* CLI: Drop disused signers command field

* CLI: Drop redundant tests

* Add clap validator that handles all current signer types

* clap_utils: Factor Presigner resolution to helper

* SDK: `From` for boxing Signer implementors to trait objects

* SDK: Derive `Clone` for `Presigner`

* Remove panic

* Cli: dedup signers in transfer for remote-wallet ergonomics

* Update docs vis-a-vis ASK changes

* Cli: update transaction types to use new dynamic-signer methods

* CLI: Fix tests No. 1

what to do about write_keypair outstanding

* Work around `CliConfig`'s signer not necessarily being a `Keypair`

* CLI: Fix tests No. 2

* Remove unused arg

* Remove unused methods

* Move offline arg constants upstream

* Make cli signing fallible

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2020-02-21 14:55:53 -07:00
0b7e8d0162 Add handling for fallible signers (#8367)
automerge
2020-02-20 19:04:53 -08:00
2d665da3e1 Flip Stable and Preview enum values 2020-02-20 18:27:33 -07:00
ab361a8073 Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -08:00
e8124324ff Support transaction signing by heterogenous lists of keypairs (#8342)
automerge
2020-02-20 12:13:23 -08:00
8c19b6268c Add Preview operating mode, rename SoftLaunch operating mode to Stable (#8331)
automerge
2020-02-19 16:48:58 -08:00
ef718c651e Remove needless uses (#8312)
automerge
2020-02-17 02:43:14 -08:00
8a2d4e2f72 Add storage rewards pools in development mode only 2020-02-14 21:12:38 -07:00
a0bcbf70d5 Cleanup new_result_with_negative_lamports (#8286) 2020-02-14 13:58:33 -08:00
5b4ecb01ca Presigner KeypairUtil implementer (#8269)
automerge
2020-02-13 16:53:09 -08:00
2374cf09e2 Enable remote-wallet signing in solana-keygen (#8267)
* Add fallible methods to KeypairUtil

* Add RemoteKeypair struct and impl KeypairUtil

* Implement RemoteKeypair in keygen; also add parse_keypair_path for cleanup
2020-02-13 14:08:34 -07:00
741d148a0d Simplify remote wallet (#8249)
automerge
2020-02-12 14:38:51 -08:00
127553ce4b Wrap ed25519_dalek::Keypair (#8247) 2020-02-12 14:15:12 -07:00
4f2c76150f Clippy 2020-02-11 12:56:02 -07:00
517fe73734 Non-conflicting account duplicate marker value (#8206) 2020-02-11 10:03:28 -08:00
df782b93ae Add is_writable to AccountInfo (#8196) 2020-02-10 21:33:29 -08:00
0e084358b4 Fix slot_hashes documentation 2020-02-06 10:06:16 -07:00
8436457e75 Rename program_utils.rs (#8127) 2020-02-05 12:48:30 -08:00
e21f5c784e Add next_account_info() (#8120) 2020-02-04 17:04:26 -08:00
15ab966ed1 Move native program entrypoint out of instruction_processor_utils (#8122) 2020-02-04 14:54:49 -08:00