Commit Graph

2032 Commits

Author SHA1 Message Date
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