874 Commits

Author SHA1 Message Date
Jack May
068f12fd6f
Add Cross-program invocations (#9582) 2020-04-28 14:33:56 -07:00
Jack May
efad193180
Make default programs static (#9717) 2020-04-27 21:05:12 -07:00
anatoly yakovenko
193dbb1794
sanitize lowest slots (#9747) 2020-04-27 20:22:30 -07:00
Michael Vines
c11abf88b7
Clean up use to keep rust 1.43.0 from complaining (#9740) 2020-04-27 16:54:11 -07:00
Michael Vines
839ff51b9a Fix build 2020-04-27 12:26:23 -07:00
anatoly yakovenko
8ef097bf6f
Input values are not sanitized after they are deserialized, making it far too easy for Leo to earn SOL (#9706)
* sanitize gossip protocol messages
* sanitize transactions
* crds protocol sanitize
2020-04-27 11:06:00 -07:00
Greg Fitzgerald
76b1c2baf0
One less alloc per transaction (#9705)
* One less alloc per transaction

* Fix benches

* Fix compiler warnings in bench build

* Fix move build

* Fix bench
2020-04-24 13:03:46 -06:00
Jack May
241a05fc52
Add native loader entry points (#9486) 2020-04-15 09:41:29 -07:00
Jack May
ad0482be73
Revert "Add native loader entry points (#9275)" Breaks genesis_config abi (#9377)
This reverts commit ed86d8d1fcd29c3c5000cc1aa4fda0b681319a65.
2020-04-08 14:36:18 -07:00
Jack May
ed86d8d1fc
Add native loader entry points (#9275) 2020-04-03 17:40:59 -07:00
Jack May
c67e9fabc4
Nit: ProgramError cleanup (#9273)
automerge
2020-04-02 17:46:51 -07:00
Jack May
9aab0b9388
More custom error rename (#9227)
automerge
2020-04-01 11:13:31 -07:00
Jack May
268e04cb4a
Rename CustomError to Custom (#9207) 2020-04-01 09:01:11 -07:00
Jack May
74774dd44f
Add program_error conversions (#9203) 2020-03-31 19:56:09 -07:00
Jack May
93be7370d9
Nit: print program error as hex (#9171) 2020-03-31 10:08:07 -07:00
Jack May
130c0b484d
Enforce an executable's rent exemption in the runtime (#9134) 2020-03-31 10:07:38 -07:00
Jack May
e2491c6322
Prevent add/subtract from executable account (#9132) 2020-03-27 16:43:25 -07:00
Jack May
8d4cecdb77
Account data may not change once the executable bit is set (#9099)
automerge
2020-03-26 17:10:11 -07:00
Justin Starry
ef3af104ae
Return appropriate error for invalid program account (#9047)
automerge
2020-03-25 13:23:05 -07:00
Jack May
fee002382e
Program address generator (#8995) 2020-03-23 12:38:56 -07:00
Jack May
271e17547a
Nit thiserror for pubkey (#8994)
automerge
2020-03-20 18:07:37 -07:00
Jack May
e28368ff1b
Move address creation with seed into pubkey (#8991) 2020-03-20 15:20:48 -07:00
Trent Nelson
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
Trent Nelson
fbf2dd1672
CLI: Error message cleanup (#8804)
automerge
2020-03-12 23:20:49 -07:00
Jack May
deaf3cb416
Instruction member function (#8801) 2020-03-12 09:08:39 -07:00
Jack May
6eb4973780
Don't use move semantics if not needed (#8793) 2020-03-11 14:37:23 -07:00
carllin
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
Greg Fitzgerald
97b6c41d42
Fix typos in error messages (#8726)
automerge
2020-03-09 10:12:42 -07:00
Trent Nelson
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
Grimes
9d667db634
SDK: Allow RecentBlockhashes to hold the entire BlockhashQueue (#8632)
automerge
2020-03-05 11:03:21 -08:00
Jack May
5e3ce30d02
Pass the correct program_id to programs (#8630) 2020-03-05 10:57:35 -08:00
Jack May
97c5fb8141
Allow passing of program_ids to programs (#8639) 2020-03-05 10:57:12 -08:00
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