480 Commits

Author SHA1 Message Date
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
Michael Vines
912aafcefd Reduce epoch duration from 2 weeks to 2 days 2020-01-27 10:34:55 -07:00
Jack May
1b391dd36b
Add account accessor functions (#7966) 2020-01-24 14:34:59 -08:00
Jack May
917067741a
Cleanup BPF SDK (#7965) 2020-01-24 13:41:14 -08:00
Jack May
34ed93d57c
Optimize account copies and use RefCell to handle duplicate accounts in BPF programs (#7958) 2020-01-24 10:54:26 -08:00
Jack May
c95e5346a4
Boot the mut (#7926) 2020-01-22 17:54:06 -08:00
Ryo Onodera
e54bf563b5
Avoid unsorted recent_blockhashes for determinism (#7918)
* Avoid unsorted recent_blockhashes for determinism

* Add a test: test_create_account_unsorted
2020-01-23 10:51:22 +09:00
Trent Nelson
964ff522be
Verb-noun-ify Nonce API (#7925)
* Verb-noun-ify Nonce API

* Unify instruction naming with API naming

The more verbose nonce_account/NonceAccount was chosen for clarity
that these instructions work on a unique species of system account
2020-01-22 16:31:39 -07:00
Rob Walker
ce70d6eedc
Add redeem_vote_credits to runtime (#7910)
* Move redeem_vote_credits into runtime

* fixup

* test

* move stake manipulation to stake program

* chugga for less indentation
2020-01-22 12:21:31 -08:00
Jack May
023074650f
Allow the same account to be passed multiple times to a single instruction (#7795) 2020-01-22 09:11:56 -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
Jack May
52bc4a3598
nudge (#7887) 2020-01-20 15:27:36 -08:00
Rob Walker
470d9cd752
Add system_instruction::{allocate, allocate_with_seed, assign_with_seed}, (#7847)
* cleanup test checks cargo audit

* Add system_instruction allocate

* fixup

* fixup
2020-01-17 09:29:15 -08:00