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
Jack May
a1fab0c5ca
Log more info on runtime account verification errors ( #17861 )
2021-06-09 16:27:00 -07:00
Justin Starry
050bb5446d
Add local cluster tests that broadcast duplicate slots ( #13995 )
...
* Add duplicate node local cluster test
* fix clippy
* remove dupe test
2021-06-09 15:01:48 -07:00
Jeff Washington (jwash)
576e3d95f7
refactor: create type ( #17818 )
2021-06-08 14:49:08 -06:00
Jeff Washington (jwash)
2a9b127029
Pass iterator for SortedStorages::new_with_slots ( #17811 )
...
Co-authored-by: Carl Lin <carl@solana.com>
2021-06-08 13:59:50 -06:00
Jeff Washington (jwash)
01ef2a5c4a
test: simple CalculateHashIntermediate refactoring ( #17813 )
2021-06-08 13:54:10 -06:00
Jeff Washington (jwash)
58fe1d0764
add min to roots_tracker ( #17806 )
2021-06-08 08:32:16 -06:00
Jeff Washington (jwash)
817d48be21
binary search in slices for hashing ( #17755 )
2021-06-07 12:09:17 -05:00
Jeff Washington (jwash)
b5bb91b50f
rework hash calculation to not keep slot and write version ( #17685 )
...
* rework hash calculation to not keep slot and write version
* refactor functions and add tests
* always use multiple slot code path
2021-06-07 09:01:16 -05:00
Jon Cinque
8f5e773caf
system-program: Remove zero lamport check on transfers ( #17726 )
...
* system-program: Move lamports == 0 check on transfers
* Address feedback
* Update stake split to explicitly allocate + assign
* Update stake tests referring to split instruction
* Revert whitespace
* Update split instruction index in test
* Remove unnecessary `assign_with_seed` from `split_with_seed`
* Fix stake instruction parser
* Update test to allow splitting into account with lamports
2021-06-06 01:45:45 +02:00
Jeff Washington (jwash)
00ee84af37
break out hash time in metric ( #17721 )
2021-06-04 14:54:06 -05:00
Jeff Washington (jwash)
f6fb8906c7
add data point for cap mismatch ( #17746 )
2021-06-04 13:54:39 -05:00
Jeff Washington (jwash)
5197454fea
increase bin count for hash scan ( #17562 )
2021-06-04 10:53:13 -05:00
sakridge
f97ce2cd7e
Per-program id timings ( #17554 )
2021-06-04 16:04:31 +02:00
Jeff Washington (jwash)
81bafd9daf
add info for vm.max_map_count incorrectly set. ( #17727 )
2021-06-04 03:22:12 +00:00
dependabot[bot]
3dcc8e0046
chore: bump libloading from 0.6.2 to 0.7.0 ( #17704 )
...
* chore: bump libloading from 0.6.2 to 0.7.0
Bumps [libloading](https://github.com/nagisa/rust_libloading ) from 0.6.2 to 0.7.0.
- [Release notes](https://github.com/nagisa/rust_libloading/releases )
- [Commits](https://github.com/nagisa/rust_libloading/compare/0.6.2...0.7.0 )
---
updated-dependencies:
- dependency-name: libloading
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
* New libloading methods are marked unsafe
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-03 18:08:31 -06:00
Jeff Washington (jwash)
9388aaca15
use slots returned from get_snapshot_storages to sort ( #17638 )
...
* use slots returned from get_snapshot_storages to sort
* add tests
2021-06-02 18:24:55 -05:00
Jeff Washington (jwash)
4bd32d891f
remove slot lookup ( #17691 )
2021-06-02 17:56:19 -05:00
Jeff Washington (jwash)
83ceedc091
simplify test construction ( #17686 )
2021-06-02 17:32:31 -05:00
Jeff Washington (jwash)
db8811eacd
support bin divisions up to 65536 ( #17563 )
...
* support bin divisions up to 65536
* add tests
2021-06-02 17:31:15 -05:00
Jeff Washington (jwash)
d802eb303c
reduce copy ( #17672 )
2021-06-02 14:03:02 -05:00
Jeff Washington (jwash)
07bac27ac7
remove antiquated assert ( #17643 )
2021-06-02 09:47:26 -05:00
Jeff Washington (jwash)
eec996ba41
implement ancestors as rolling bit field ( #17482 )
2021-06-02 09:32:32 -05:00
Jeff Washington (jwash)
107af52deb
minor test code cleanup ( #17645 )
2021-06-02 08:35:10 -05:00
carllin
bbcdf073ba
Support out of band dumping of unrooted slots in AccountsDb ( #17269 )
...
* Accounts dumping logic
* Add test for interaction between cache flush and remove_unrooted_slot()
* Update comments
* Rename
* renaming
* Add more comments
* Renaming
* Fixup test and bad check
2021-06-02 09:51:10 +00:00
Jack May
80e5b24b38
Fix CPI recursion depth ( #17659 )
...
* Fix CPI recursion depth
2021-06-02 11:15:19 +02:00
sakridge
14c52ab018
Skip shrink when it doesn't save anything ( #17405 )
2021-06-02 09:51:46 +02:00
Jeff Washington (jwash)
738cc9549f
parallel get_snapshot_storages ( #17589 )
2021-06-01 19:33:12 -05:00
Jeff Washington (jwash)
c8fdf0762c
add Ancestors to get_snapshot_storages to prepare for the future ( #17591 )
2021-06-01 15:14:35 -05:00
Jeff Washington (jwash)
ef5169ff24
sort storages by slot before scan ( #17411 )
...
* sort storages by slot before scan
* fix return value
2021-06-01 15:07:46 -05:00
Jeff Washington (jwash)
72bb271a94
add metric for collecting storages ( #17527 )
2021-06-01 13:17:49 -05:00
Jeff Washington (jwash)
886898eabf
rework test for flexibility ( #17592 )
...
* rework test for flexibility
* respond to pr feedback
2021-05-31 22:49:17 -05:00
Jeff Washington (jwash)
654918ab27
refactor SnapshotStorage helpers to prepare for later changes ( #17560 )
2021-05-28 13:54:53 -05:00
Jack May
a3240aebde
Always bail if program modifies a ro account ( #17569 )
2021-05-28 09:50:25 -07:00
Jeff Washington (jwash)
8924fbf6a0
RollingBitField: bug fixes and add tests ( #17525 )
...
* RollingBitField: bug fixes and add tests
* respond to feedback
2021-05-28 16:33:07 +00:00
Jeff Washington (jwash)
1d02dba06f
remove unnecessary clone ( #17559 )
2021-05-28 10:30:01 -05:00
Jeff Washington (jwash)
55c22d3b76
add check_hash to non-index hash calculation ( #17558 )
2021-05-28 10:24:40 -05:00
Brooks Prumo
1953543274
Refactor bank_forks_utils::load() and some snapshot logic ( #17492 )
...
Refactor a few functions that are on the load-from-snapshot path, to facilitate
adding in incremental snapshots more easily.
Additionally, add some tests and doc comments.
2021-05-27 12:00:27 -05:00
sakridge
49402b7d82
Only add keys with multiple index entries to the clean set ( #17473 )
2021-05-27 16:31:24 +02:00
Jeff Washington (jwash)
3973bf08f1
move local out of call ( #17519 )
2021-05-27 08:53:11 -05:00
Michael Vines
9541411c15
Plumb transaction-level rewards (aka "rent debits") into the `getTransaction` RPC method
2021-05-27 03:05:05 +00:00
Michael Vines
cbce440af4
simulateTransaction can now return accounts modified by the simulation
2021-05-26 14:20:23 -07:00
sakridge
3f9e3c7375
Remove copied shrink code ( #17385 )
2021-05-26 19:27:18 +02:00
Jeff Washington (jwash)
6b9d8d41a3
add --limit_load_slot_count_from_snapshot to ledger-tool ( #17417 )
2021-05-26 10:36:12 -05:00
Trent Nelson
2a6c5ed0ac
add tests from `RentDebits`
2021-05-26 08:19:10 +00:00
Trent Nelson
97eab7edf9
runtime: add rent debit charges to block metadata
2021-05-26 08:19:10 +00:00
Tyera Eulberg
e9bc1c6b07
Add last valid block height to rpc Fees ( #17506 )
...
* Add last_valid_block_height to fees rpc
* Add getBlockHeight rpc
* Update docs
2021-05-26 07:26:19 +00:00