Commit Graph

225 Commits

Author SHA1 Message Date
carllin af08221aec
Switch account hashing to blake3 (#11969)
* Switch account hashing to blake3

Co-authored-by: Carl <carl@solana.com>
2020-09-02 00:37:36 -07:00
carllin 7e25130529
Send votes from banking stage to vote listener (#11434)
*  Send votes from banking stage to vote listener

Co-authored-by: Carl <carl@solana.com>
2020-08-07 11:21:35 -07:00
sakridge 8bf3a0aa05
accounts_clean: Convert stack dependency calculation with iterative (#11067)
* accounts_clean: Convert stack dependency calculation with iterative

* optimize clean with by creating a reverse-lookup hashset of the affected
keys

* Add dependency bench

reduce bench

* Huge clean
2020-07-15 06:49:22 -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
Kristofer Peterson e23340d89e
Clippy cleanup for all targets and nighly rust (also support 1.44.0) (#10445)
* address warnings from 'rustup run beta cargo clippy --workspace'

minor refactoring in:
- cli/src/cli.rs
- cli/src/offline/blockhash_query.rs
- logger/src/lib.rs
- runtime/src/accounts_db.rs

expect some performance improvement AccountsDB::clean_accounts()

* address warnings from 'rustup run beta cargo clippy --workspace --tests'

* address warnings from 'rustup run nightly cargo clippy --workspace --all-targets'

* rustfmt

* fix warning stragglers

* properly fix clippy warnings test_vote_subscribe()
replace ref-to-arc with ref parameters where arc not cloned

* Remove lock around JsonRpcRequestProcessor (#10417)

automerge

* make ancestors parameter optional to avoid forcing construction of empty hash maps

Co-authored-by: Greg Fitzgerald <greg@solana.com>
2020-06-09 09:38:14 +09:00
Jack May 36627fb8b3
move builtin programs out of bank (#10132)
automerge
2020-05-19 19:45:30 -07:00
jon-chuang 16af67d5e1
Focus bench on squash and fix log errors (#9759)
* Focus bench on squash

Squash performance does not depend on adding a small number accounts. It mainly depends on total number of accounts that need to be hashed during freeze operation. New bank means a clone of accounts db, so we don't get previous errors in log.

* Fix fmt and add slot counter
2020-05-05 08:33:41 -07: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
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 58887c591b
Add and update tests (#9566) 2020-04-18 17:04:13 -07: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 130c0b484d
Enforce an executable's rent exemption in the runtime (#9134) 2020-03-31 10:07:38 -07:00
Michael Vines 88ba8439fc
Add frozen account support (#8989)
automerge
2020-03-22 11:10:04 -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
Jack May 0e6aca5a7e
Reorganize message processor in prep for cross-program-invocation (#8338) 2020-02-21 11:30:00 -08:00
Tyera Eulberg ab361a8073
Rename KeypairUtil to Signer (#8360)
automerge
2020-02-20 13:28:55 -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
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
Justin Starry 87598c7612 Consolidate tx error counters and update metrics dashboard (#7724)
automerge
2020-01-16 23:26:50 -08:00
Ryo Onodera 3c361eb759
Check account hashes in snapshot (#7559)
* Check for incorrect hash value

* Finish up checking for incorrect hash value

* Fix comment a bit

Co-authored-by: sakridge <sakridge@gmail.com>
2019-12-20 09:39:30 +09:00
Justin Starry b7d4330dd4
Fail fast if account paths cannot be canonicalized (#7300)
* Canonicalize account paths to avoid symlink issues

* fixes
2019-12-05 21:41:29 -05:00
Greg Fitzgerald c09469fa3a
Rename verify_instruction() to verify_account_changes() (#7020) 2019-11-18 15:01:14 -07:00
Justin Starry 9807f47d4e
Rename genesis block to genesis config (#6816) 2019-11-08 23:56:57 -05:00
Jack May b9d8e3e55a
Only copy whats needed to verify an instruction after processing (#6669) 2019-11-05 10:57:32 -08:00
Trent Nelson 5416c114cf
SDK: Add sysvar to expose recent block hashes to programs (#6663)
* SDK: Add sysvar to expose recent block hashes to programs

* Blockhashes is one word

* Missed one

* Avoid allocs on update

* unwrap_or_else

* Use iterators

* Add microbench

* Revert "unwrap_or_else"

This reverts commit a8f8c3bfbe0d88e2229e67a29e9d2b489b93ff62.

* Revert "Avoid allocs on update"

This reverts commit 486f01790c271cf09ac3dbffba0e40e526e81324.
2019-11-04 10:51:15 -07:00
Rob Walker c9cea2152b
optimize verify_instruction (#6539) 2019-10-25 21:47:16 -07: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
Rob Walker f46a2cec3c
owner and executable checks (#6526)
* owner_checks

* only system program may assign owner, and only if pre.owner is system

* moar coverage!

* moar coverage, allow re-assignment IFF data is zeroed
2019-10-24 11:06:00 -07:00
sakridge 35ed432d1a
Make benchmark useful (#6440)
function is verify_hash_internal_state
2019-10-18 12:59:47 -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
sakridge 19ae556857
hash account state on store (#5573) 2019-09-20 13:21:12 -07:00
Rob Walker 6657312f44
dyn for runtime benches (#5983) 2019-09-19 14:21:09 -07:00
Parth 7dfb735db9
randomize tx ordering (#4978)
Summary of Changes:
This change adds functionality to randomize tx execution for every entry. It does this by implementing OrderedIterator that iterates tx slice as per the order specified. The order is generated randomly for every entry.
2019-08-28 21:08:32 +05:30
carllin 58d4e32c97
Remove serialization of future AppendVecs and serialize AccountStorage correctly (#5510) 2019-08-13 16:05:37 -07:00
Greg Fitzgerald a43922ccbf
Boot hashbrown (#5505)
As of Rust 1.36.0, hashbrown now implements the HashMap in std (which
implements HashSet).

https://blog.rust-lang.org/2019/07/04/Rust-1.36.0.html#a-new-hashmapk,-v%3E-implementation
2019-08-12 16:46:49 -06:00
Sagar Dhawan 9dcf3347f5 Refactor status cache and remove complex serialize/deserialize (#5335)
automerge
2019-08-06 18:47:30 -07:00
sakridge 8d243221f0
Ignore flaky local cluster tests (#5347)
* Add logging to local_cluster tests

* Ignore flaky test_leader_failure_4, test_repairman_catchup

And crashing banking benchmarks.
2019-07-30 13:48:46 -07:00
sakridge 264a3d7dde
Increase ticks_per_slot for banking benchmark (#5221) 2019-07-22 13:57:28 -07:00
Trent Nelson 111d0eb89b
runtime: Add bench for accounts::hash_internal_state (#5157)
* runtime: Add bench for accounts::hash_internal_state

* fixup! cargo fmt

* fixup! cargo clippy

* fixup! Use a more representitive number of accounts

* fixup! More descriptive name for accounts creation helper
2019-07-19 10:32:29 -06: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
sakridge 966b6999d1
Accounts index opt (#4621)
* Add accounts_index bench

* Don't take the accounts index lock unless needed

* Accounts_index remove insert return vec and add capacity stats

* Use hashbrown hashmap for accounts_index
2019-06-10 18:15:39 -07:00
Tyera Eulberg 64e8a21d73
Add tick height syscall (#4497)
* Remove tick_height from entrypoint signature

* Impl tick_height syscall and use in storage program

* Properly remove tick height from bpf handling
2019-05-31 16:29:21 -06:00
Sathish 182096dc1a
Create bank snapshots (#4244)
* Revert "Revert "Create bank snapshots (#3671)" (#4243)"

This reverts commit 81fa69d347.

* keep saved and unsaved copies of status cache

* fix format check

* bench for status cache serialize

* misc cleanup

* remove appendvec storage on purge

* fix accounts restore

* cleanup

* Pass snapshot path as args

* Fix clippy
2019-05-30 21:31:35 -07:00
Michael Vines a2e3a92b01
Extend GetBlockHash RPC API to include the fee scehdule for using the returned blockhash (#4222) 2019-05-13 12:49:37 -07:00
carllin 69eeb7cf08
Fix parent record locks usage in child banks (#4159)
* Introduce record locks on txs that will be recorded

* Add tests for LockedAccountsResults

* Fix broken bench

* Exit process_entries on detecting conflicting locks within same entry
2019-05-07 15:51:35 -07:00
Rob Walker 8e400fc4bd
rework genesis (passive staking groundwork) (#4187)
* rework genesis

* fixup
2019-05-07 11:16:22 -07:00
Jack May c545e812d0
Expand bank benches to include async/sync and native_loader (#4026) 2019-04-29 13:09:11 -07:00
Greg Fitzgerald 5fb8baed04
Process async BankClient transactions in batches (#3738)
* Process async transactions in batches

This aims to process transactions at least as fast as LocalCluster

* Add benchmark
2019-04-19 07:29:07 -06:00
anatoly yakovenko 0ff2bfdd0c
Fewer unsafe hacks for AppendVec (#3801)
* storage account changes

* cleanup

* checks

* comments

* clippy

* tests

* woot!

* comments

* benches
2019-04-16 08:50:05 -07:00
anatoly yakovenko 8b08fe265a
AppendVec PR with using "/tmp" as the default directory and a random file (#3743)
* AppendVec with raw pointers
* fixed test target directory
2019-04-12 04:30:17 -07:00
Greg Fitzgerald 485013b7ce Revert "AppendVecs that can return references and read/append without locks (#3713)"
This reverts commit f669ae5868.
2019-04-11 14:47:30 -07:00
anatoly yakovenko f669ae5868
AppendVecs that can return references and read/append without locks (#3713)
* AppendVec with raw pointers

* appendvecs

* imports

* review

* review comments

* clippy
2019-04-11 13:16:56 -07:00
Greg Fitzgerald 878a842611
Move append_vec bench to the crate with append_vec (#3650)
* Move append_vec bench to the crate with append_vec

* Use black_box to tell the compiler not to optimize away test data

```
pub fn black_box<T>(dummy: T) -> T {
    unsafe {
        let ret = std::ptr::read_volatile(&dummy);
        std::mem::forget(dummy);
        ret
    }
}
```

* Revert "Use black_box to tell the compiler not to optimize away test data"

This reverts commit 5610b8ee957f1d8bf6e270e392859e8b23b1e472.

* Use black_box to tell the compiler not to optimize away test data

* Create bench directories
2019-04-06 07:18:56 -06:00
Greg Fitzgerald 35298e01a8 Remove Instruction wrapper structs and name functions after enum fields 2019-04-03 13:34:27 -07:00
Greg Fitzgerald 867f6f107b Rename SystemInstruction::Move to SystemInstruction::Transfer 2019-04-03 08:35:57 -06:00
Greg Fitzgerald a0041cec97 Rename Runtime to MessageProcessor 2019-04-02 12:49:26 -06:00
Sathish Ambley 3152090a66 update with review comments 2019-04-01 15:54:53 -06:00
Sathish Ambley 9a0f9b910e add bench tests for squash operations 2019-04-01 15:54:53 -06:00
Greg Fitzgerald 573dec63da Fix runtime benches 2019-03-25 14:32:01 -06:00
Michael Vines 1997640094 Remove prints 2019-03-05 14:09:40 -08:00
Michael Vines a9a7fc56eb Purge MAX_RECENT_TICK_HASHES 2019-03-02 17:04:42 -08:00
Michael Vines a94880574b block_hash => blockhash 2019-03-02 12:13:30 -07:00
Michael Vines 0f1582c196 cargo fmt 2019-03-02 12:13:30 -07:00
Michael Vines 258cf21416 Purge remaining last_id (now called block_hash) 2019-03-02 12:13:30 -07:00
Michael Vines 2bfad87a5f Rename Bank.last_id() to Bank.last_block_hash() 2019-03-02 12:13:30 -07:00
Michael Vines 67b6be66c8 Rename MAX_ENTRY_IDS 2019-03-01 13:38:17 -08:00
Michael Vines a57fb00584 Rename last_id_queue.rs to hash_queue.rs 2019-03-01 09:50:51 -08:00
Greg Fitzgerald dde886f058 Move Bank to its own crate
Also:
* counters.rs to solana_metrics
* genesis_block.rs to solana_sdk
2019-02-19 07:17:04 -07:00
Greg Fitzgerald cdb2a7bef3 Move runtime benchmark 2019-02-07 09:46:06 -08:00