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