792 Commits

Author SHA1 Message Date
Trent Nelson
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
Trent Nelson
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
Jack May
25df95be6f
Expose executable and rent_epoch in AccountInfo (#8619) 2020-03-04 10:52:09 -08:00
Trent Nelson
1cc7131bb7
Consolidate Nonce state under one struct (#8624)
automerge
2020-03-04 08:51:48 -08:00
Michael Vines
d3b458dd9b
Keep GenesisConfig binary compatible with v0.23 (#8617)
automerge
2020-03-04 00:04:44 -08:00
Trent Nelson
b83a0434a4
Prepare for multiple nonce account state versions (#8612)
automerge
2020-03-03 21:19:09 -08:00
Trent Nelson
1cb6101c6a
SDK: Add versioning to nonce state (#8607) 2020-03-03 19:39:09 -07:00
Trent Nelson
be0cc0273f
SDK: Re-org nonce state module to facilitate versioning (#8603)
automerge
2020-03-03 17:00:39 -08:00
Michael Vines
abf33b3b3b
Add commitment flag to vote-account and validators commands (#8597) 2020-03-03 17:53:30 -07:00
Trent Nelson
1265afebbb
SDK: Return a full RecentBlockhashes for tests (#8580)
automerge
2020-03-02 18:44:29 -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
Michael Vines
7d27be2a73 Upgrade to Rust 1.41.1 2020-02-28 10:10:42 -07:00
Michael Vines
7dac8e2dde Reorder InstructionError to remain compatible with v0.23 2020-02-27 18:05:12 -07:00
Tyera Eulberg
0b66ae5c53
Ledger messaging cleanup (#8506) 2020-02-27 12:23:13 -07:00
carllin
39282be486
Determine vote_state ahead of time (#8303)
automerge
2020-02-24 19:27:04 -08:00
Tyera Eulberg
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
Michael Vines
73063544bd Move shred_version module to sdk/ 2020-02-24 14:46:12 -07:00
sakridge
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
Tyera Eulberg
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
Tyera Eulberg
0b7e8d0162
Add handling for fallible signers (#8367)
automerge
2020-02-20 19:04:53 -08:00
Michael Vines
2d665da3e1 Flip Stable and Preview enum values 2020-02-20 18:27:33 -07:00
Tyera Eulberg
ab361a8073
Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -08:00
Greg Fitzgerald
e8124324ff
Support transaction signing by heterogenous lists of keypairs (#8342)
automerge
2020-02-20 12:13:23 -08:00
Michael Vines
8c19b6268c
Add Preview operating mode, rename SoftLaunch operating mode to Stable (#8331)
automerge
2020-02-19 16:48:58 -08:00
Ryo Onodera
ef718c651e
Remove needless uses (#8312)
automerge
2020-02-17 02:43:14 -08:00
Michael Vines
8a2d4e2f72 Add storage rewards pools in development mode only 2020-02-14 21:12:38 -07:00
Jack May
a0bcbf70d5
Cleanup new_result_with_negative_lamports (#8286) 2020-02-14 13:58:33 -08:00
Trent Nelson
5b4ecb01ca
Presigner KeypairUtil implementer (#8269)
automerge
2020-02-13 16:53:09 -08:00
Tyera Eulberg
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
Greg Fitzgerald
741d148a0d
Simplify remote wallet (#8249)
automerge
2020-02-12 14:38:51 -08:00
Greg Fitzgerald
127553ce4b
Wrap ed25519_dalek::Keypair (#8247) 2020-02-12 14:15:12 -07:00
Michael Vines
4f2c76150f Clippy 2020-02-11 12:56:02 -07:00
Jack May
517fe73734
Non-conflicting account duplicate marker value (#8206) 2020-02-11 10:03:28 -08:00
Jack May
df782b93ae
Add is_writable to AccountInfo (#8196) 2020-02-10 21:33:29 -08:00
Rob Walker
0e084358b4 Fix slot_hashes documentation 2020-02-06 10:06:16 -07:00
Jack May
8436457e75
Rename program_utils.rs (#8127) 2020-02-05 12:48:30 -08:00
Jack May
e21f5c784e
Add next_account_info() (#8120) 2020-02-04 17:04:26 -08:00
Jack May
15ab966ed1
Move native program entrypoint out of instruction_processor_utils (#8122) 2020-02-04 14:54:49 -08:00
Jack May
b5a735878a
Sysvar account_into return program error rather than option (#8121) 2020-02-04 14:54:41 -08:00
Jack May
b6d09f1901
Add BPF program entrypoint return type (#8111) 2020-02-04 12:25:42 -08:00
Jack May
4e595e8e3c
Facilitate printing program errors from BPF programs (#8109) 2020-02-04 09:03:45 -08:00
Jack May
336d5136bf
Print more program error info to user when using CLI (#8098) 2020-02-03 17:14:53 -08:00
Jack May
0fd795a676
Remove program error footgun and cleaner developer experience (#8042) 2020-01-31 10:58:07 -08:00
Jack May
2226c1b75c
Add Rust BPF RefCell borrow helpers (#8047) 2020-01-30 20:40:27 -08:00
Jack May
dd276138c2
Add support for idiomatic error handling to BPF instruction processors (#7968) 2020-01-30 09:47:22 -08:00
Jack May
b19f730527
Seperate RefCells lamports and data (#8021) 2020-01-29 21:15:04 -08:00
Rob Walker
e6803daf10
Remove support for stake redelegation (#7995)
* Remove support for stake redelegation

* fixup
2020-01-29 17:59:14 -08:00
Jack May
12eff5a2f9
Cleanup SDK use syntax (#8004) 2020-01-28 16:11:22 -08:00
Jack May
fed3817ed3
Update and fix transaction error documentation (#7998) 2020-01-28 15:59:50 -08:00
Jack May
1596c961d9
Rust BPF program cleanup (#7990) 2020-01-27 18:27:44 -08:00