Commit Graph

1654 Commits

Author SHA1 Message Date
Jeff Washington (jwash) e368f10973
add _for_tests to new_no_wallclock_throttle (#19086) 2021-08-05 14:50:25 -05:00
Jeff Washington (jwash) a9014ceceb
Bank::default_for_tests() (#19084) 2021-08-05 11:53:29 -05:00
Jeff Washington (jwash) 24207a09ac
remove AccountsIndex::default (#19082)
* accounts_db calls AccountsDb::new(bins)

* remove AccountsIndex::default
2021-08-05 11:38:53 -05:00
Jeff Washington (jwash) 5cf28689e6
accounts_db calls AccountsDb::new(bins) (#19068) 2021-08-05 11:15:26 -05:00
Jeff Washington (jwash) 67788ad206
move AccountsIndex upsert into static WriteAccountMapEntry (#18899)
* rework accounts index to push upsert deeper

* clean up return value of upsert_existing_key

* upsert_existing_key -> update_key_if_exists

* upsert_new_key -> upsert

* upsert_item -> lock_and_update_slot_list

* update_static -> update_slot_list
2021-08-05 08:45:08 -05:00
Jeff Washington (jwash) bf16b0517c
add _for_tests to setup_bank_and_vote_pubkeys (#19060) 2021-08-05 08:43:35 -05:00
Jeff Washington (jwash) 087db70df6
add traits required by IsCached (#19066) 2021-08-05 08:43:00 -05:00
Jeff Washington (jwash) 14361906ca
for all tests, bank::new -> bank::new_for_tests (#19064) 2021-08-05 08:42:38 -05:00
Jeff Washington (jwash) dfe99efa7c
introduce AccountsIndex::default_for_tests() (#19067) 2021-08-04 21:58:53 -05:00
sakridge 5a4979f25f
Handle 0-lamport account in index generation (#19041)
* Handle 0-lamport account in index generation

* rename duplicate to dirty keys

Co-authored-by: Carl Lin <carl@solana.com>
2021-08-04 23:33:47 +00:00
Jeff Washington (jwash) bde9b4de94
Bank::new -> Bank::new_for_benches (#19063) 2021-08-04 17:30:43 -05:00
Jeff Washington (jwash) 3280ae3e9f
add validator option --accounts-db-skip-shrink (#19028)
* add validator option --accounts-db-skip-shrink

* typo
2021-08-04 17:28:33 -05:00
Brooks Prumo 68cc71409e
Do not shell out for tar (#19043)
When making a snapshot archive, we used to shell out and call `tar -S`
for sparse file support.  The tar crate supports sparse files, so no
need to do this anymore.

Fixes #10860
2021-08-04 17:07:55 -05:00
Brooks Prumo a1112254a5
Fix wrong old snapshot archives getting purged (#19061)
I introduced a bug where old snapshot archives were incorrectly purged.
Instead of purged to oldest, I was purged the newest...

The fix is to add a `reverse()` in the purge logic, and I've added a
test to catch this bug in the future.

Fixes #19057
2021-08-04 16:42:42 -05:00
Jeff Washington (jwash) 0b8d14b0fc
move towards account index being dynamically allocated (#19034) 2021-08-04 15:28:35 -05:00
Jeff Washington (jwash) 1ed12a07ab
introduce Bank::new_for_tests (#19062) 2021-08-04 15:06:57 -05:00
Brooks Prumo ca14475085
Add incremental_snapshot_archive_interval_slots to SnapshotConfig (#19026)
This commit also renames `snapshot_interval_slots` to
`full_snapshot_archive_interval_slots`, updates the comments on the
fields, and make appropriate updates where SnapshotConfig is used.
2021-08-04 14:40:20 -05:00
Jeff Washington (jwash) 6a995f5dfd
rename to AccountsDb::new_single_for_tests (#19039) 2021-08-04 11:47:11 -05:00
Jeff Washington (jwash) 31a620c42b
move towards accounts index being dynamic (#19032) 2021-08-04 09:18:05 -05:00
Oliver 06e08c4840
move package_snapshots to AccountsPackagePre ctors (#18997)
This PR solves #18815. Note that I had to make the snapshot prefix
constants inside `snapshot_utils.rs` public at the crate level in order
to make this work. I'm not sure whether or not introducing this
dependency is entirely good, either way the `snapshot_utils.rs` file
needs a lot of rework so things will move around, I believe this does
the work in the meantime. Any feedback will be greatly appreciated.
2021-08-04 09:03:03 -05:00
Trent Nelson 06a7a9e544 remove superfluous `collect()`s 2021-08-04 07:21:55 +00:00
Trent Nelson 79b4b83d3c runtime: remove unused `allow` attrs 2021-08-04 07:21:55 +00:00
Jack May 77861e2d40
Feature disable fees sysvar (#18981)
* Feature disable fees sysvar

* nudge
2021-08-02 00:31:11 +00:00
Trent Nelson 21bc43ed58
nonce: Unify `NonceError` with `SystemError` 2021-07-30 14:47:14 -06:00
Brooks Prumo b05fb87f22
Add test_bank_forks_incremental_snapshot() (#18565)
This commit builds on PR #18504 by adding a test to core/tests/snapshot.rs for Incremental Snapshots. The test adds banks to bank forks in a loop and takes both full snapshots and incremental snapshots at intervals, and validates they are rebuild-able.

For background info about Incremental Snapshots, see #17088.

Fixes #18829 and #18972
2021-07-29 16:46:54 -05:00
Jack May dfbb0c559b
deprecate fees sysvar (#18960) 2021-07-29 10:48:14 -07:00
Jack May 9529284194
Nonce gets blockhash from invoke_context (#18950) 2021-07-29 01:50:20 -07:00
sakridge 84e78316b1
Write helper for multithread update (#18808) 2021-07-29 03:16:36 +02:00
Jack May 0167daa116
cleanup feature consistent_recent_blockhashes_sysvar (#18932) 2021-07-28 10:25:33 -07:00
Jack May 72e374d0f3
Deprecate SysvarRecentBlockhashes (#18875) 2021-07-27 16:34:21 -07:00
Jeff Washington (jwash) 6dadc75a6f
during range, stop scanning earlier than currently scanning (#18896)
* during range, stop scanning earlier than currently scanning

* refactor for better testing

* clean up a different edge case
2021-07-27 13:40:45 -05:00
Jeff Washington (jwash) 53d8cad206
remove unused return value from account index upsert (#18895) 2021-07-27 08:46:27 -05:00
carllin 5cabb5bb11
Fix race in remove_unrooted_race and flush_slot_cache (#18785) 2021-07-22 13:49:08 -07:00
Brooks Prumo d1debcd971
Add incremental snapshot utils (#18504)
This commit adds high-level functions for creating and loading-from
incremental snapshots, plus all low-level functions required to perform
those tasks.  This commit **does not** add taking incremental snapshots
as part of a running validator, nor starting up a node with an
incremental snapshot; just laying ground work.

Additionally, `snapshot_utils` and `serde_snapshot` have been
refactored to use a common code paths for the different snapshots.

Also of note, some renaming has happened:
  1. Snapshots are now either `full_` or `incremental_` throughout the
     codebase.  If not specified, the code applies to both.
  2. Bank snapshots now are called "bank snapshots"
     (before they were called "slot snapshots", "bank snapshots", or
      just "snapshots").  The one exception is within `Bank`, where they
     are still just "snapshots", because they are already "bank
     snapshots".
  3. Snapshot archives now have `_archive` in the code.  This
     should clear up an ambiguity between bank snapshots and snapshot
     archives.
2021-07-22 14:40:37 -05:00
Jack May 7fc4cfebc8
Rename BpfComputeBudget (#18768) 2021-07-22 10:18:51 -07:00
Jon Cinque d6f5945653
token: Swap new token program id for consistency on all networks (#18823) 2021-07-22 10:31:55 +02:00
Jon Cinque 51f3b9aa7c
feature: add new token program feature (#18780)
* feature: add new token program feature

* Fixup test

* Update to spl-token v3.2.0

* Update Cargo.lock + fmt

* Update token program version in fetch-spl.sh

* Bump associated token program to 1.0.3

* Add aToken so
2021-07-21 14:34:25 +02:00
Trent Nelson a4c3db51fc Disambiguate `archive_snapshot_package` IO error sources 2021-07-21 08:35:28 +00:00
Justin Starry 207c90bd8b
Shorten long SerializeWith type paths in abi digest (#18734) 2021-07-20 08:59:50 -05:00
Jack May 7ed8792647
Use saturating math for timings (#18735) 2021-07-19 11:05:10 -07:00
Jeff Washington (jwash) 181f21529d
add Debug trait to T in AccountsIndex (#18702) 2021-07-16 17:05:23 -05:00
Jack May 74539020b4
Transaction simulation includes cost (#18715) 2021-07-16 14:58:15 -07:00
Jack May ca71ca3d6d
Accumulate consumed units (#18714) 2021-07-16 12:40:12 -07:00
Jeff Washington (jwash) 090fbeca24
lazy allocate buffers for bg reader in untar (#18640) 2021-07-16 13:17:03 -05:00
Jack May 6cf3c1ab8f
tx wide compute budget (#18631) 2021-07-16 00:31:22 -07:00
Justin Starry d166b9856a
Move transaction sanitization earlier in the pipeline (#18655)
* Move transaction sanitization earlier in the pipeline

* Renamed HashedTransaction to SanitizedTransaction

* Implement deref for sanitized transaction

* bring back process_transactions test method

* Use sanitized transactions for cost model calculation
2021-07-15 22:51:27 -05:00
Brian Anderson 37ee0b5599
Eliminate doc warnings and fix some markdown (#18566)
* Fix link target in doc comment

* Fix formatting of log examples in process_instruction

* Fix doc markdown in solana-gossip

* Fix doc markdown in solana-runtime

* Escape square braces in doc comments to avoid warnings

* Surround 'account references' doc items in code spans to avoid warnings

* Fix code block in loader_upgradeable_instruction

* Fix doctest for loader_upgradable_instruction
2021-07-16 00:40:07 +00:00
Trent Nelson 3a85b77bb5 hijack secp256k1 enablement feature plumbing for libsecp256k1 upgrade 2021-07-15 18:43:55 +00:00
Trent Nelson 568660b402 Revert "Remove feature switch for secp256k1 program (#18467)"
This reverts commit fd574dcb3b.
2021-07-15 18:43:55 +00:00
Jeff Washington (jwash) 958d27bb0e
accounts index scan starts looking in bin where bound would exist (#18613) 2021-07-15 10:26:50 -05:00
Jeff Washington (jwash) da9fdd785c
measure and speed up 2nd half of generate_index (#18503)
* add metrics and speedup storage calcs in generate_index

* add tests, refactor

* rename map variable

* rename another index variable
2021-07-15 10:26:00 -05:00
Jeff Washington (jwash) ad3f18f031
fix race condition in bg file reader file error (#18682) 2021-07-14 19:04:55 -05:00
sakridge 7f2254225e
Move entry/poh to own crate to speed up poh bench build (#18225) 2021-07-14 14:16:29 +02:00
Jeff Washington (jwash) bb41cf3461
remove unnecessary generic args to make refactoring easier (#18619) 2021-07-13 12:05:23 -05:00
Jeff Washington (jwash) 0bd8710d34
prevent excess allocation with AccountsIndexIterator (#18605) 2021-07-13 11:11:17 -05:00
Jeff Washington (jwash) d092fa1f03
add ledger-tool verify verify-accounts-index option (#18375)
* add ledger-tool verify verify-accounts-index option

* comment, merge, respond to feedback, cleanup
2021-07-13 11:06:18 -05:00
Jeff Washington (jwash) 3e11468a04
refactor SharedBuffer to separate Arc refcount shutdown issues (#18563) 2021-07-13 11:05:41 -05:00
Michael Vines 4098af3b5b Record vote account commission with voting/staking rewards and surface in RPC 2021-07-12 15:09:44 -07:00
Justin Starry bc47ed6c80
Remove outdated program verifification (#18592) 2021-07-12 14:40:49 -05:00
Jack May 35123b71c2
fix test (#18609) 2021-07-12 11:45:25 -07:00
Jack May 00f7e514b8
Update neon program id (#18607) 2021-07-12 10:07:22 -07:00
Jeff Washington (jwash) f5ff4b2058
serial insertion of bins into accounts index (#18469) 2021-07-12 12:00:45 -05:00
Justin Starry e806d31224
Optimize Message::is_non_loader_key method (#18579) 2021-07-12 10:42:22 -05:00
Jack May e9ace3a0d5
cost model nits (#18528) 2021-07-09 12:55:31 -07:00
Ryo Onodera f96de208e2 Implement MockInvokeContext::is_feature_active properly 2021-07-09 09:08:38 -07:00
Ryo Onodera b0734fabf7 Improve test 2021-07-09 09:08:38 -07:00
Ryo Onodera bd3c93f086 Add expected test removal remainder 2021-07-09 09:08:38 -07:00
Ryo Onodera 30a8fb86d0 Fix comment 2021-07-09 09:08:38 -07:00
Ryo Onodera b158353ca9 kill single letter variables 2021-07-09 09:08:38 -07:00
Ryo Onodera 0f1c0c2796 Improve comment 2021-07-09 09:08:38 -07:00
Ryo Onodera 4fa902c84f Fix typo 2021-07-09 09:08:38 -07:00
Ryo Onodera 3a7e5e65e4 Fix rebase... 2021-07-09 09:08:38 -07:00
Ryo Onodera f029af0fca Remove sysvar special cases for rent and assign 2021-07-09 09:08:38 -07:00
Justin Starry fd574dcb3b
Remove feature switch for secp256k1 program (#18467)
* Remove feature switch for secp256k1 program

* fix tests
2021-07-09 10:08:03 -05:00
Trent Nelson ca1d8f2adc runtime: ignore flakey `test_waitable_condvar` 2021-07-09 01:26:28 -06:00
carllin 4d3e301ee4
Introduce slot dumping to ReplayStage (#18160) 2021-07-08 19:07:32 -07:00
Jeff Washington (jwash) 334e1112a7
during untar, read ahead, causing decompression to occur in the bg (#18205)
* shared buffered decompressor for untar

* spell check in comment
2021-07-08 13:44:47 -05:00
Jack May 2867584985
Bump compute budget for neon evm (#17700) 2021-07-08 10:43:34 -07:00
Dan Albert b8be09c09c
Add addresses 2021-07-07 21:02:22 -06:00
Jeff Washington (jwash) f04340b125
move allocation out of critical section and estimate capacity better (#18450) 2021-07-07 15:36:40 -05:00
Jeff Washington (jwash) eca0ceb04c
eliminate unnecessary copies in accounts index generation (#18466) 2021-07-07 15:36:05 -05:00
Jeff Washington (jwash) 49c4e54b28
accounts index insert uses pubkey by value (#18460) 2021-07-07 15:35:35 -05:00
Jack May ccdf93e2b8
featurize_policy_update (#18492) 2021-07-07 13:19:17 -07:00
Jack May 44289e6728
Update verify policy (#18459) 2021-07-07 09:09:52 -07:00
Ryo Onodera d69f469b83
Record parent slot to reconstruct fork tree from influxdb (#18482) 2021-07-07 15:56:38 +00:00
Justin Starry 72da25e9d2
Refactor verify_and_update write privileges check (#18468) 2021-07-07 09:14:00 -05:00
Justin Starry 100fabf469
Remove feature switch for demoting sysvar write locks (#18373) 2021-07-06 21:22:22 +00:00
Justin Starry 5dd399dafa
Fix transaction logs and inner ixs for leader nodes (#18395)
* Fix transaction logs and inner ixs for leader nodes

* Fix cpi log storage flag
2021-07-06 19:35:24 +00:00
Justin Starry 6319e8811a
Improve account unlock performance (#18442)
* Improve account unlock performance

* fix clippy
2021-07-06 14:11:54 -05:00
Alexander Meißner 7462c27d07
Refactoring: Unify account_deps and accounts (#17898)
* Changes ThisInvokeContext::get_account() to use accounts instead of pre_accounts.

* Adds explicit keys to accounts to make them symmetric to account_deps.

* Appends account_deps to accounts in transaction loading and removes account_deps everywhere else.
2021-07-05 13:49:37 +02:00
Ruud van Asseldonk d951916d40 Make test_hash_stored_account pass in release mode
The hash differs between debug and release mode, which makes the test
fail when running under "cargo test --release". Use cfg! to include a
different expected hash in release mode.
2021-07-01 18:27:24 -07:00
dependabot[bot] 0426c2d28e
chore: bump bzip2 from 0.3.3 to 0.4.3 (#18361)
* chore: bump bzip2 from 0.3.3 to 0.4.3

Bumps [bzip2](https://github.com/alexcrichton/bzip2-rs) from 0.3.3 to 0.4.3.
- [Release notes](https://github.com/alexcrichton/bzip2-rs/releases)
- [Commits](https://github.com/alexcrichton/bzip2-rs/commits)

---
updated-dependencies:
- dependency-name: bzip2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Update to new api

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-07-01 13:10:52 -06:00
Justin Starry d5961e9d9f
Reject transactions with extra signatures (#18306)
* Reject transactions with extra signatures

* fix tests

* fix check

* fix check

* tx method

* fix checks
2021-07-01 18:06:59 +00:00
Brooks Prumo 45d54b1fc6
Add SnapshotArchiveInfo and refactor functions in snapshot_utils (#18232) 2021-07-01 12:20:56 -05:00
Justin Starry 5ca975383c
Remove feature switch for using message hash for already processed check (#18340) 2021-07-01 09:33:55 -05:00
Brooks Prumo 89a3e4f91e
Move SnapshotConfig into its own module (#18331)
Also move ArchiveFormat to snapshot_utils, and do not
reexport SnapshotVersion.
2021-07-01 08:55:26 -05:00
Trent Nelson d3a7e22112 sdk: refactor pda generation 2021-06-30 19:01:51 -06:00
Jeff Washington (jwash) 531f1bce78
report on min/max bin stats for accounts index (#18338) 2021-07-01 00:46:59 +00:00
Justin Starry b08f8bd1b0
Fail simulation if transaction contains duplicate accounts (#18304) 2021-06-30 13:50:55 -05:00
Jeff Washington (jwash) ce53b84cdc
refactor untar_snapshot_in to push parallelism deeper for further refactoring (#18310) 2021-06-29 18:26:15 -05:00
Brooks Prumo c1b9d40a64
Add snapshot_runtime_info module (#18199)
The `snapshot_runtime_info` module adds the `SnapshotRuntimeInfo` and
`SyncSnapshotRuntimeInfo` types to handle sharing runtime snapshot information
between threads; in particular: AccountsDb, Bank, SnapshotPackagerService, and
snapshot_utils.
2021-06-29 15:13:34 -05:00
carllin 47cafb70da
test (#18159) 2021-06-28 18:27:26 -07:00
Jeff Washington (jwash) afd64d27c9
bin accounts index (#18111) 2021-06-28 15:03:57 -05:00
Jeff Washington (jwash) 1f1e54b9d8
reduce pubkey copies on insert path (#18240) 2021-06-28 12:04:29 -05:00
Jack May 2fbedd834f Don't update if already an executable 2021-06-26 19:19:26 -06:00
Jeff Washington (jwash) e06376664b
replace account index bulk insert with iterator (#18198) 2021-06-25 14:31:55 -05:00
Jeff Washington (jwash) f2a2581259
metric for accounts index insertion time (#18202) 2021-06-25 08:36:55 -05:00
dependabot[bot] 9429d0463c
chore: bump ouroboros from 0.5.1 to 0.9.3 (#18189)
* chore: bump ouroboros from 0.5.1 to 0.9.3

Bumps [ouroboros](https://github.com/joshua-maros/ouroboros) from 0.5.1 to 0.9.3.
- [Release notes](https://github.com/joshua-maros/ouroboros/releases)
- [Commits](https://github.com/joshua-maros/ouroboros/commits)

---
updated-dependencies:
- dependency-name: ouroboros
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Api changes

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-06-25 00:53:54 -06:00
Jeff Washington (jwash) f9fccdee85
remove unnecessary copies from accounts index code paths (#18196) 2021-06-24 17:56:25 -05:00
Jeff Washington (jwash) 31ec986ea1
untar in parallel (#18184)
* untar in parallel

* make enum for 'ignore' return value
2021-06-24 17:29:49 -05:00
Jeff Washington (jwash) 4b314be5bd
rework dirty_pubkeys from insert_new_if_missing_into_primary_index (#18200) 2021-06-24 14:52:11 -05:00
Jeff Washington (jwash) 77c3ffe4cf
add min/max bin size metrics to hash calculation (#18155) 2021-06-23 12:57:05 -05:00
sakridge 3b1738c000
Keep track of dirty stores on remove accounts to clean (#17601)
* Keep track of dirty stores on remove accounts to clean

and not zero_lamport key set

* Only dirty when count==0?

* Add another clean
2021-06-23 10:28:35 +02:00
Lijun Wang ccf6b21bf8
Removed unused purged_slots in purge_older_root_entries (#18102)
Removed unused purged_slots in purge_older_root_entries
2021-06-22 15:27:37 -07:00
Jeff Washington (jwash) d3ee73e151
capture sort time in hash calculation (#18118) 2021-06-22 16:02:21 -05:00
Jeff Washington (jwash) fbc94d84c8
apply 'debug_do_not_add_builtins' to feature activations (#18110) 2021-06-22 14:21:49 -05:00
Jeff Washington (jwash) d5f9f3b7ce
correctly calculate hash_total for hash/lamport calculation (#18144) 2021-06-22 11:36:43 -05:00
sakridge e808f34b0b
Add batch stats (#18096) 2021-06-22 15:23:26 +02:00
Tyera Eulberg 0ab361b828
Use newly stabilized Duration methods/consts (#18101) 2021-06-22 00:11:16 +00:00
Tyera Eulberg 19fe1dd463
Move stake_weighted_timestamp module (#18114)
* Move timestamp module into runtime

* Less public

* Remove unused enum
2021-06-21 16:14:54 -06:00
Jeff Washington (jwash) 2087f5da94
refactor generate_index_for_slot (#17984) 2021-06-21 15:32:50 -05:00
Jeff Washington (jwash) bf97627021
eliminate flatten and sort in hash calculation (#17802)
* eliminate flatten and sort in hash calculation

* reduce critical section time

* remove now no-longer necessary test code

* conflict with reset bins to 0 pr
2021-06-21 15:32:03 -05:00
Tyera Eulberg 4d46cb686a Fix build: clippy lint 2021-06-21 10:18:21 -07:00
Jeff Washington (jwash) ae82e4e25b
refactor reconstruct_accountsdb_from_fields (#17987) 2021-06-21 10:47:58 -05:00
Alexander Meißner 789f33e8db chore: cargo fmt 2021-06-18 10:42:46 -07:00
Alexander Meißner 6514096a67 chore: cargo +nightly clippy --fix -Z unstable-options 2021-06-18 10:42:46 -07:00
Jeff Washington (jwash) 0a81c37fce
introduce LockMapType for accounts_index (#18021) 2021-06-17 14:41:52 -05:00
Jeff Washington (jwash) 1feaaf009d
generate_index timings (#17983) 2021-06-17 13:35:25 -05:00
Jeff Washington (jwash) 20e714b3d0
remove unused code (#17981) 2021-06-17 13:30:46 -05:00
Jeff Washington (jwash) 71796f4951
break out generate index reporting (#17980) 2021-06-16 12:09:17 -05:00
Jeff Washington (jwash) 7ca04d6a86
refactor generate_index process_storage_slot (#17982) 2021-06-16 11:02:34 -05:00
Jeff Washington (jwash) bb7413c9f9
refactor rebuild_bank_from_snapshots (#17988) 2021-06-16 11:01:52 -05:00
Jeff Washington (jwash) eee5414c64
avoid unnecessary empty arrays when binning (#17944) 2021-06-16 09:24:59 -05:00
Jeff Washington (jwash) adc683956f
do not use index for verify_bank_hash_and_lamports (#17812) 2021-06-16 09:10:38 -05:00
Jeff Washington (jwash) 55ee3b5f2f
set hash bins to 65k (#17912) 2021-06-16 09:09:55 -05:00
Jeff Washington (jwash) 7de79425ce
parallel storage -> accounts folder (#17955) 2021-06-16 08:48:24 -05:00
Jeff Washington (jwash) dbd4dc04b0
ledger tool limit_load_slot_count_from_snapshot avoids assert failures (#17974) 2021-06-15 15:39:22 -05:00
Jeff Washington (jwash) f558b9b6bf
verify bank hash on startup with ledger tool option (#17939) 2021-06-15 11:52:12 -05:00
Jon Cinque 1b1d34da59
Refactor stake program into solana_program (#17906)
* Move stake state / instructions into solana_program

* Update account-decoder

* Update cli and runtime

* Update all other parts

* Commit Cargo.lock changes in programs/bpf

* Update cli stake instruction import

* Allow integer arithmetic

* Update ABI digest

* Bump rust mem instruction count

* Remove useless structs

* Move stake::id() -> stake::program::id()

* Re-export from solana_sdk and mark deprecated

* Address feedback

* Run cargo fmt
2021-06-15 18:04:00 +02:00
Jeff Washington (jwash) 5ecb30ff58
nit: rename measure (#17946) 2021-06-15 09:01:11 -05:00
Jeff Washington (jwash) 4d8ffdcc11
remove unused parameters from CalculateHashIntermediate (#17949) 2021-06-15 09:00:43 -05:00
carllin ccc013e134
Handle removing slots during account scans (#17471) 2021-06-14 21:04:01 -07:00
Jeff Washington (jwash) 471b34132e
add metrics for startup (#17913)
* add metrics for startup

* roll timings up higher

* fix test

* fix duplicate
2021-06-14 17:46:49 -05:00
Jeff Washington (jwash) 7fde9b6ff0
name arguments to help with confusion (#17942) 2021-06-14 16:21:48 -05:00
Jeff Washington (jwash) 62e1b20e56
refactor so hash verify can be done by more callers (#17941) 2021-06-14 16:20:03 -05:00
Jeff Washington (jwash) e6bbd4b3f0
add metrics to handle_snapshot_requests (#17937) 2021-06-14 15:46:19 -05:00
sakridge c2191d885d
Fix accounts index panic in purge_exact (#17757) 2021-06-14 16:10:26 +02:00
Jeff Washington (jwash) d4cc975fe9
calculate_capitalization uses hash calculation (#17443)
* calculate_capitalization uses hash calculation

* feedback

* remove debugging code, clean up slot math
2021-06-14 08:53:07 -05:00
Jeff Washington (jwash) 2dc6969858
use trait to simplify and consolidate cumulative code (#17852) 2021-06-14 08:43:59 -05:00
Lijun Wang 269d995832
Make account shrink configurable #17544 (#17778)
1. Added both options for measuring space usage using total accounts usage and for individual store shrink ratio using an enum. Validator CLI options: --accounts-shrink-optimize-total-space and --accounts-shrink-ratio
2. Added code for selecting candidates based on total usage in a separate function select_candidates_by_total_usage
3. Added unit tests for the new functions added
4. The default implementations is kept at 0.8 shrink ratio with --accounts-shrink-optimize-total-space set to true

Fixes #17544
2021-06-09 21:21:32 -07:00