Commit Graph

59 Commits

Author SHA1 Message Date
carllin
d747614b27 Account for possibility of cache flush in load() (#15454)
* Account for possibility of cache flush in load()

* More cleaning

* More cleaning

* Remove unused method and some comment cleaning

* Fix typo

* Make the detected impossible purge race panic()!

* Finally revert to original .expect()

* Fix typos...

* Add assertion for max_root for easier reasoning

* Reframe races with LoadHint as possible opt.

* Fix test

* Make race bug tests run longer for less flaky

* Delay the clone-in-lock slow path even for RPC

* Make get_account panic-free & add its onchain ver.

* Fix rebase conflicts...

* Clean up

* Clean up comment

* Revert fn name change

* Fix flaky test...

* fmt...

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-04-17 00:23:32 +09:00
Brooks Prumo
17aa45fad1 Remove old way of account hashing
Account data hashing used to use different ways of hashing on different
clusters.  That is no longer the case, but the old code still existed.
This commit removes that old, now used code.

**NOTE** The golden hash values in bank.rs needed to be updated.  Since
the original code that selected the hash algorithm used `if >` instead
of `if >=`, this meant that the genesis block's hash _always_ used the
old hashing method, which is no longer valid.

Validated by running `cargo test` successfully.
2021-04-13 14:42:21 -05:00
Jeff Washington (jwash)
8a3135d17b Account->AccountSharedData (#15691) 2021-03-09 15:06:07 -06:00
Michael Vines
5df36aec7d Pacify clippy 2021-02-19 20:08:41 -08:00
Trent Nelson
7f7370c306 Re-allow clippy::integer_arithmetic at crate-level 2021-02-17 13:55:08 -07:00
carllin
6dfad0652f Cache account stores, flush from AccountsBackgroundService (#13140) 2021-01-11 17:00:23 -08:00
sakridge
1c61d005b5 Re-enable shrink test (#14331) 2020-12-30 08:25:45 -08:00
Ryo Onodera
89b474e192 Fix slow/stuck unstaking due to toggling in epoch (#13501)
* Fix slow/stuck unstaking due to toggling in epoch

* nits

* nits

* Add stake_program_v2 feature status check to cli

Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-11-11 14:11:57 -07:00
Tyera Eulberg
bc62313c66 Allow feature builtins to overwrite existing builtins (#13403)
* Allow feature builtins to overwrite existing builtins

* Add feature_builtin ActivationType

* Correctly retain idempotent for replacing case

* Fix test

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-11-05 15:37:07 +00:00
Jack May
c458d4b213 move Account to solana-sdk (#13198) 2020-10-28 22:01:07 -07:00
Michael Vines
959880db60 Remove unused pubkey::Pubkey imports 2020-10-21 19:08:13 -07:00
Michael Vines
7bc073defe Run codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand 2020-10-21 19:08:13 -07:00
Greg Fitzgerald
7ade330b23 Rename Client methods to match proposed BanksClient (#10793) 2020-06-25 03:35:38 +00:00
Greg Fitzgerald
1c498369b5 Remove fee-payer guesswork from Message and Transaction (#10776)
* Make Message::new_with_payer the default constructor

* Remove Transaction::new_[un]signed_instructions

These guess the fee-payer instead of stating it explicitly
2020-06-24 14:52:38 -06:00
Greg Fitzgerald
36a36d1c83 No longer allow create-account to add funds to an existing account (#10192)
automerge
2020-05-22 16:39:01 -07:00
Kristofer Peterson
58ef02f02b 9951 clippy errors in the test suite (#10030)
automerge
2020-05-15 09:35:43 -07:00
Jack May
eb1acaf927 Remove archiver and storage program (#9992)
automerge
2020-05-14 18:22:47 -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
Jack May
efad193180 Make default programs static (#9717) 2020-04-27 21:05:12 -07:00
Greg Fitzgerald
a6ad660e5e Merge stake::withdraw instructions (#9617) 2020-04-20 18:16:50 -06:00
Jack May
ad0482be73 Revert "Add native loader entry points (#9275)" Breaks genesis_config abi (#9377)
This reverts commit ed86d8d1fc.
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
e28368ff1b Move address creation with seed into pubkey (#8991) 2020-03-20 15:20:48 -07:00
Michael Vines
f78a90bce2 Vote InitializeAccount and UpdateNode instructions now need a signature from the validator identity (#8947)
automerge
2020-03-19 01:58:52 -07:00
Jack May
6eb4973780 Don't use move semantics if not needed (#8793) 2020-03-11 14:37:23 -07:00
carllin
d821fd29d6 Add versioning (#8348)
automerge
2020-02-25 17:12:01 -08: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
Jack May
83718a3b3e Cleanup runtime use syntax (#8002) 2020-01-28 17:03:20 -08:00
Jack May
c95e5346a4 Boot the mut (#7926) 2020-01-22 17:54:06 -08: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
Rob Walker
cc299053cc Add support for stake::split() via create_account_with_seed() (#7879)
* Add split with seed

* move to new system_program APIs

* de-replicode
2020-01-20 12:33:27 -08:00
Justin Starry
ff1ca1e0d3 Consolidate entry tick verification into one function (#7740)
* Consolidate entry tick verification into one function

* Mark bad slots as dead in blocktree processor

* more feedback

* Add bank.is_complete

* feedback
2020-01-15 09:15:26 +08:00
Rob Walker
e1ebaa902b Add base pubkey to create_account_with_seed (#7636) 2019-12-29 16:42:24 -08:00
Tyera Eulberg
f03ed9f5bf Add helper fn and runtime test (#7516) 2019-12-16 17:02:40 -07:00
Rob Walker
f05860672c Add create-address-with-seed to solana-cli (#7472)
* Add create account with seed to cli

* clippy

* fixup
2019-12-14 04:38:24 -08:00
Jack May
9485eba73d nudge (#7279) 2019-12-04 19:28:20 -08:00
Jack May
23c4a7dc49 nudge (#7280) 2019-12-04 19:28:00 -08:00
Justin Starry
9807f47d4e Rename genesis block to genesis config (#6816) 2019-11-08 23:56:57 -05:00
carllin
91be35731c Fix freeze and register_tick race (#6799)
* Fix freeze and register_tick race

* Add test
2019-11-08 17:21:17 -08:00
Jack May
d68e2c4d06 Revert "Make instruction data opaque to runtime (#6470)" (#6564)
This reverts commit 6eeca9c6f1.
2019-10-25 16:22:41 -07:00
Jack May
6eeca9c6f1 Make instruction data opaque to runtime (#6470) 2019-10-24 22:38:57 -07:00
Greg Fitzgerald
fb39bd45d7 Revert "Rename solana-runtime to sealevel (#6239)" (#6247)
This reverts commit 2e921437cd.
2019-10-04 19:33:29 -06:00
Greg Fitzgerald
2e921437cd Rename solana-runtime to sealevel (#6239)
automerge
2019-10-04 15:02:44 -07:00
Greg Fitzgerald
04649de6a6 Boot remote native loads, take 2 (#5106)
* Drop dependencies on remote native loads

* Remove remote native loads
2019-07-15 13:16:09 -06:00
Michael Vines
4537f54532 Break noop_program -> runtime dependency (#4481) 2019-05-30 11:20:49 -07:00
Greg Fitzgerald
0c0716abfb Move Bank-based tests into unit-tests 2019-03-18 08:22:54 -07:00
Greg Fitzgerald
ae4d14a2ad Introducing Scripts
A sequence of instructions. A client compiles the script and then uses
the compiled script to construction a transaction. Then it adds a
adds a blockhash, signs the transaction, and sends it off for
processing.
2019-03-18 08:22:54 -07:00
Greg Fitzgerald
24d9138067 Abandon Builder pattern 2019-03-15 14:46:44 -06:00
Greg Fitzgerald
aca739b800 Boot fees from TransactionBuilder 2019-03-15 14:46:44 -06:00