Commit Graph

3662 Commits

Author SHA1 Message Date
Jeff Washington (jwash) f24e30e4fe
remove test method get_storages_for_slot (#29739) 2023-01-17 12:28:53 -08:00
Brooks 8c62927d59
Adds calculate_incremental_accounts_hash() (#29734)
**Node operators,** please delete your `<ledger>/calculate_accounts_hash_cache` directory (if you have one).  It has been moved/renamed to `<ledger>/accounts_hash_cache/full`.
2023-01-17 15:04:29 -05:00
Jeff Washington (jwash) e1d38c8315
remove test method slot_stores (#29736) 2023-01-17 10:15:25 -08:00
Jeff Washington (jwash) 71a746f10e
remove some write_version checking (#29733) 2023-01-17 10:14:31 -08:00
Jeff Washington (jwash) 4bfe4091b4
make storages not plural (#29732) 2023-01-17 09:50:35 -08:00
Jeff Washington (jwash) 5188da0492
remove get_slot_stores from AccountStorage (#29726) 2023-01-17 09:26:46 -08:00
Tao Zhu 1d88654116
Revert "Cap accounts data a transaction can load by its requested limit" (#29373)
Revert "Cap accounts data a transaction can load by its requested limit (#27840)"

This reverts commit 81dc2e56ac.
2023-01-17 11:34:18 +01:00
Alexander Meißner c5380d4699
Adds symmetric tests for all cases of un-/re-/deployment inside the same transaction (#29725)
Unifies test_program_sbf_upgrade_and_invoke_in_same_tx() and test_program_sbf_upgrade_self_via_cpi() into test_program_sbf_invoke_in_same_tx_as_redeployment().
Adds test_program_sbf_invoke_in_same_tx_as_deployment() and test_program_sbf_invoke_in_same_tx_as_undeployment().
2023-01-17 09:44:27 +01:00
Jeff Washington (jwash) 461dafb887
AccountStorage only holds a single append vec (#29723)
* AccountStorageReference

* tests build

* pr feedback
2023-01-16 16:22:30 -08:00
Brooks 0db14ad39c
Removes full_snapshot from CalcAccountsHashConfig (#29722) 2023-01-16 16:22:46 -05:00
Jeff Washington (jwash) ef30083319
iterate contents of AccountStorage without exposing internals (#29719)
* iterate contents of AccountStorage without exposing internals

* Update runtime/src/accounts_db.rs

Co-authored-by: Brooks <brooks@prumo.org>

* Update runtime/src/accounts_db.rs

Co-authored-by: Brooks <brooks@prumo.org>

* Update runtime/src/accounts_db.rs

Co-authored-by: Brooks <brooks@prumo.org>

* compile errors

Co-authored-by: Brooks <brooks@prumo.org>
2023-01-16 12:01:25 -08:00
Brooks 8a28877910
Use Hash::new_from_array() instead of TryFrom (#29720) 2023-01-16 10:53:38 -05:00
Jeff Washington (jwash) 977d3453a3
storage.remove does not leak SlotStores (#29664) 2023-01-15 11:06:24 -08:00
Alexander Meißner 9d1a0c52f8
Cleanup - `disable_deprecated_loader` (#29653)
* Removes the gating of disable_deprecated_loader.

* Adds create_program().
Renames create_deprecated_program() -> load_program().
Renames load_and_finalize_deprecated_program() -> load_and_finalize_program().

* Fixes test_sol_alloc_free_no_longer_deployable().
2023-01-14 13:02:10 +01:00
Jeff Washington (jwash) 064f163b70
get_account_storage_entry handles missing shrink in progress entry correctly (#29682) 2023-01-13 13:11:25 -08:00
Jeff Washington (jwash) a2933f7fa6
remove some uses of write_version (#29680) 2023-01-13 12:05:15 -08:00
Alexander Meißner ab97d37e3d
Refactor - Simplify loader utils (#29699)
* Moves all the common code of tests and benches into loader utils.

* Removes write_sbf_program().

* Removes ignored test: test_program_sbf_test_use_latest_executor2().
2023-01-13 20:38:36 +01:00
dependabot[bot] 10f8b5faa3
Bump memmap2 from 0.5.3 to 0.5.8 (#29674)
* Bump memmap2 from 0.5.3 to 0.5.8

Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs) from 0.5.3 to 0.5.8.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases)
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.3...v0.5.8)

---
updated-dependencies:
- dependency-name: memmap2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-01-12 19:38:38 -07:00
Jeff Washington (jwash) 6359d68f9f
get_slot_stores -> get_slot_storage_entry (#29677) 2023-01-12 09:44:53 -08:00
Brooks d0aa93de21
Refactors accounts hash cache (#29625) 2023-01-12 10:43:50 -05:00
Jeff Washington (jwash) 3412928cad
get_slot_stores -> get_slot_storage_entry (#29678) 2023-01-12 07:17:18 -08:00
Jeff Washington (jwash) b64f58614d
get_slot_stores -> get_slot_storage_entry (#29665) 2023-01-12 07:09:56 -08:00
Jeff Washington (jwash) 9d1c0c5a3c
get_slot_stores -> get_slot_storage_entry (#29663) 2023-01-12 04:08:08 -08:00
Jeff Washington (jwash) 56f8c16497
remove remaining uses of SnapshotStorages (#29660) 2023-01-11 17:58:14 -08:00
Jeff Washington (jwash) 14055fc3e2
remove type SnapshotStorage and uses (#29661) 2023-01-11 17:57:44 -08:00
Brennan Watt 69c4db27c5
Configurable hashes per tick (#29659) 2023-01-11 16:56:11 -08:00
Jeff Washington (jwash) 3e6ba72da1
remove scan_multiple_account_storages_one_slot (#29658) 2023-01-11 16:26:49 -08:00
Jeff Washington (jwash) 0e19b9c849
SortedStorages holds HashMap instead of Vec (#29632)
* SortedStorages holds HashMap instead of Vec

* add comment
2023-01-11 14:20:43 -08:00
Jeff Washington (jwash) 4b93fa85c2
renaming/refactoring for append vecs (#29655) 2023-01-11 14:20:14 -08:00
Jeff Washington (jwash) 544b9745c2
snapshot storage path uses 1 append vec per slot (#29627) 2023-01-11 12:05:15 -08:00
steviez 28071d5bf4
chore: Move new bank metric into metric submodule (#29628)
More cleanup in moving non-essential items out of bank.rs
2023-01-11 13:14:46 -06:00
Jeff Washington (jwash) 0ee9993632
decouple geyser's write_version from append vec on snapshot load (#29623) 2023-01-11 10:59:57 -08:00
Jeff Washington (jwash) 1d6999914a
factor out scan_single_account_storage (#29633) 2023-01-11 10:59:46 -08:00
HaoranYi d693167dfb
Feature: filter stake by min delegation for rewards (#29618)
filter stake by min delegation for rewards
2023-01-11 08:55:18 -06:00
dependabot[bot] 864a7d8d6f
Bump bzip2 from 0.4.3 to 0.4.4 (#29630)
* Bump bzip2 from 0.4.3 to 0.4.4

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

---
updated-dependencies:
- dependency-name: bzip2
  dependency-type: direct:production
...

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

* [auto-commit] Update all Cargo lock files

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2023-01-10 23:08:22 -07:00
Jeff Washington (jwash) 0f16120b03
remove FoundStoredAccount (#29591) 2023-01-10 13:57:34 -08:00
Jeff Washington (jwash) ad400419b5
assert write version is increasing per slot as we read from a slot (#29624) 2023-01-10 13:34:30 -08:00
Jeff Washington (jwash) c3353c27c2
verify acct size in index can easily be recalculated (#29601) 2023-01-10 13:33:36 -08:00
Jeff Washington (jwash) 9cd3bb0c4d
never try to shrink a slot that is in the write cache (#29615) 2023-01-10 12:01:37 -08:00
Jeff Washington (jwash) 1faf7d516b
while shrinking, old append vec is held outside of storage.map (#29323)
* while shrinking, old append vec is held outside of storage.map

* update comment

* rework ShrinkInProgress for clarity

* add tests and comment
2023-01-10 11:52:01 -08:00
steviez 1c1c8fb008
chore: Move bank new epoch metrics into separate file (#29599)
chore: Move bank new epoch metric into separate file

bank.rs is very large, so move the metrics reporting code into a
separate file. This reduces line count and also makes the actual logic
in bank.rs more readable by removing a big block of boilerplate code.

There are more metrics that we can do this for, but doing them one at a
time to avoid large diffs.
2023-01-10 13:15:50 -06:00
Jeff Washington (jwash) a5106e110a
just use slot to determine alive while shrinking (#29613) 2023-01-10 09:00:18 -08:00
Jeff Washington (jwash) 1c862f0b66
remove unused ret val from do_shrink_slot_store (#29616) 2023-01-10 08:12:24 -08:00
Jeff Washington (jwash) 6441ed121e
get_unique_accounts_from_storages drops plural (#29600) 2023-01-10 07:49:38 -08:00
HaoranYi d3daea65b9
use atomicu64 for bucket maxsize instead of lock (#29569) 2023-01-10 09:15:27 -06:00
Jeff Washington (jwash) 71467808d2
convert some get_slot_stores -> get_slot_storage_entry (#29549) 2023-01-10 05:34:08 -08:00
Jeff Washington (jwash) c9fe21e3c3
ancient append vecs enabled at -10k by default (#29565) 2023-01-10 05:33:43 -08:00
Jeff Washington (jwash) 1d675c6205
FoundStoredAccount removes store_id (#29590) 2023-01-10 05:28:41 -08:00
Alexander Meißner db277d320b
Adds TX signature to `TransactionContext` in debug mode (#29597)
Adds TX signature to TransactionContext in debug mode.
2023-01-10 00:54:26 +01:00
Jeff Washington (jwash) dda34b208c
get_unique_accounts_from_storages takes 1 append vec (#29588) 2023-01-09 14:53:50 -08:00