792 Commits

Author SHA1 Message Date
Greg Fitzgerald
300b33a20e
Add unique_signers() to SDK (#10105)
automerge
2020-05-18 18:31:45 -07:00
Michael Vines
bbc549f592
Rename program_id to owner in system instructions (#10069) 2020-05-18 12:55:41 -07:00
Tyera Eulberg
bac4aec16f
Trigger RPC notifications after block commitment cache update (#10077)
* Fixup commitment-aggregation metric

* Trigger notifications after commitment-cache update

* Fixup fn name

* Add single-confirmation commitment level

* Rename to highest_confirmed_slot

* Pass commitment-cache info directly to notifications

* Use match

* Update commitment docs

* Update out of date pubsub docs
2020-05-18 12:49:01 -06:00
Greg Fitzgerald
5e89bd8868
Panic if no fee-payer found via Message::new() (#10050)
automerge
2020-05-15 12:23:09 -07:00
Kristofer Peterson
58ef02f02b
9951 clippy errors in the test suite (#10030)
automerge
2020-05-15 09:35:43 -07:00
Tyera Eulberg
63813fe69f
Add Ledger error codes (#10056)
automerge
2020-05-14 21:52:11 -07:00
Jack May
eb1acaf927
Remove archiver and storage program (#9992)
automerge
2020-05-14 18:22:47 -07:00
Tyera Eulberg
ed53a70b5c
Cli: transfer ALL; check spend+fee in client (#10012)
* lamports->SOL in user-facing error msg

* Check for sufficient balance for spend and fee

* Add ALL option to solana transfer

* Rework TransferAmount to check for sign_only in parse

* Refactor TransferAmount & fee-check handling to be more general

* Add addl checks mechanism

* Move checks out of cli.rs

* Rename to SpendAmount to be more general & move

* Impl ALL/spend helpers for create-nonce-account

* Impl spend helpers for create-vote-account

* Impl ALL/spend helpers for create-stake-account

* Impl spend helpers for ping

* Impl ALL/spend helpers for pay

* Impl spend helpers for validator-info

* Remove unused fns

* Remove retry_get_balance

* Add a couple unit tests

* Rework send_util fn signatures
2020-05-14 12:24:14 -06:00
Ryo Onodera
1eb40c3fe0
Introduce eager rent collection (#9527)
* Switch AccountsIndex.account_maps from HashMap to BTreeMap

* Introduce eager rent collection

* Start to add tests

* Avoid too short eager rent collection cycles

* Add more tests

* Add more tests...

* Refacotr!!!!!!

* Refactoring follow up

* More tiny cleanups

* Don't rewrite 0-lamport accounts to be deterministic

* Refactor a bit

* Do hard fork, restore tests, and perf. mitigation

* Fix build...

* Refactor and add switch over for testnet (TdS)

* Use to_be_bytes

* cleanup

* More tiny cleanup

* Rebase cleanup

* Set Bank::genesis_hash when resuming from snapshot

* Reorder fns and clean ups

* Better naming and commenting

* Yet more naming clarifications

* Make prefix width strictly uniform for 2-base partition_count

* Fix typo...

* Revert cluster-dependent gate

* kick ci?

* kick ci?

* kick ci?
2020-05-13 16:22:14 +09:00
Justin Starry
5cc252d471
Remove hash field from account (#9915) 2020-05-12 23:39:46 +08:00
Jack May
97e17f9b32 Programs can only sign their accounts 2020-05-11 09:06:05 -07:00
Tyera Eulberg
3ee702a922
Rpc: Add getCirculatingSupply endpoint, redux (#9953)
* Add Bank.clock() helper

* Add non-circulating calculations

* Plumb getSupply rpc endpoint

* Add docs for getSupply, and remove getTotalSupply from docs

* Add pubkeys! procedural macro

* Use procedural macro in non_circulating_supply
2020-05-09 12:05:29 -06:00
sakridge
f37f83fd12
Fuzzer test and fixes (#9853) 2020-05-02 08:07:52 -07:00
sakridge
894549f002
Put empty accounts in the accounts list on load (#9840)
Indexing into accounts array does not match account_keys otherwise.
Also enforce program accounts not at index 0
Enforce at least 1 Read-write signing fee-payer account.
2020-05-01 17:23:33 -07:00
Michael Vines
8dfe0affd4
Add incinerator sysvar (#9815) 2020-04-30 22:04:08 -07:00
Tyera Eulberg
6deaf649ef
Add commitment Root variant, and add fleshed out --commitment arg to Cli (#9806)
automerge
2020-04-29 21:55:33 -07:00
anatoly yakovenko
a0514eb2ae
thiserror, docs, remove general Failure case (#9741)
automerge
2020-04-29 18:12:51 -07:00
Stephen Akridge
eb24f3df84 Update dalek version 2020-04-28 21:02:47 -06:00
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