Commit Graph

3721 Commits

Author SHA1 Message Date
Jeff Washington (jwash) 1c4e84b8ca
impl default version of contains_multiple_slots (#30055) 2023-02-01 13:01:01 -08:00
Jeff Washington (jwash) 5769dbf36b
is_cached_store, bool -> Storage enum (#30057) 2023-02-01 12:33:27 -08:00
Tao Zhu 0cf93da4b4
remove obsoleted else-if clause (#30020) 2023-02-01 14:28:35 -06:00
Jeff Washington (jwash) 3b2c2ebf9e
add StorableAccountsBySlot to move accounts from multiple slots to 1 (#30023) 2023-02-01 12:10:12 -08:00
Jeff Washington (jwash) c8ed54acbd
simplify 2 StorableAccounts impls (#30054) 2023-02-01 12:08:28 -08:00
Brooks d048a1903f
Splits up AccountsDb::bank_hashes (#30024) 2023-02-01 14:32:35 -05:00
Jeff Washington (jwash) 27e8af9621
add pub(crate) to shrink functions (#30052) 2023-02-01 11:04:51 -08:00
Tao Zhu 7bcb3cef02
report less datapoints to block_min_prioritization_fee (#30017) 2023-02-01 11:32:36 -06:00
Jeff Washington (jwash) 5d85a34591
shrink ignores ancient slots (#30026) 2023-02-01 07:23:14 -08:00
Jeff Washington (jwash) 28510f4260
update comments on get_ancient_append_vec_capacity (#30030) 2023-02-01 07:22:34 -08:00
Jeff Washington (jwash) 3e0494051e
tests adding accounts can mark alive in index (#30029) 2023-02-01 07:22:10 -08:00
Jeff Washington (jwash) d5a7b5715c
add cli arg for choosing ancient append vec format (#30025) 2023-02-01 07:21:28 -08:00
Tao Zhu a5af54669a
Limit loaded data per transaction to a fixed cap (#29743) 2023-01-31 22:51:35 -06:00
Richard Patel 179b406acb
runtime: make {Stored,Account}Meta repr(C) (#30027)
Co-authored-by: Richard Patel <ripatel@jumptrading.com>
2023-01-31 20:13:56 -05:00
Will Hickey 04a6a631bc
Bump version to v1.16 (#30028) 2023-01-31 17:48:33 -06:00
K-anon 1e3d6349aa
Add an RPC API that can query the list of Top N secondary index keys and their sizes (#28887)
Co-authored-by: K-anon <IntokuSatori@users.noreply.github.com>
2023-01-31 13:47:03 -07:00
Richard Patel 1ca78845bb
runtime: add test_type_layout (#29987)
adds unit test asserting the type layout of structures in append_vec

---------

Co-authored-by: Richard Patel <ripatel@jumptrading.com>
Co-authored-by: brooks <brooks@solana.com>
2023-01-31 11:08:55 -05:00
Jeff Washington (jwash) 4dbde40e10
measure! -> measure_us! (#29991) 2023-01-31 07:40:50 -08:00
joeaba a12bf8c003
Update maintainers references (#29997)
* update maintainers references

* chore: update maintainers reference
2023-01-31 08:07:13 -05:00
Brooks aa72aa8779
Makes AccountsDb::bank_hashes private (#29990) 2023-01-30 23:25:19 -05:00
Brooks 005dc96bc5
serde-snapshot uses methods to access AccountsDb::bank_hashes (#29989) 2023-01-30 21:32:04 -05:00
Jeff Washington (jwash) ebf3ad5604
remove unnecessary lifetimes (#29988) 2023-01-30 14:11:10 -08:00
Jeff Washington (jwash) 8a56a856d8
refactor shrink_collect (#29982)
* refactor shrink_collect

* Update runtime/src/accounts_db.rs

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>

---------

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2023-01-30 13:10:39 -08:00
Jeff Washington (jwash) 3e5ab0437f
remove create_ancient_append_vec (#29984) 2023-01-30 13:07:15 -08:00
Jeff Washington (jwash) ea6dac0556
refactor update_shrink_stats (#29983) 2023-01-30 11:11:13 -08:00
Xiang Zhu 856598969c
Account path add run parent with old path cleanup (#29942)
* Add run parent directory for accounts files

* fix test test_concurrent_snapshot_packaging

* review comments.  renamed the path setup function

* Addressed most of the review comments

* remove explict type def for map result

* handle create_accounts_run_and_snapshot_dirs error with expect

* update with more review comments

* minor fixes from review comments

* simplify account_filename option assignment

* handle error from create_accounts_run_and_snapshot_dirs

* use then instead of then_some for lazy evaluation

* Clean up files in the old account_path before trasitioning to the new run path

* try_exist and accounts_dir removing extra

* sync rmdir, is_dir check

* handle the account_path not deletable case
2023-01-30 10:26:43 -08:00
Tao Zhu 7ef720b76d
refactor: remove obsoleted function (#29964)
refactor: remove obsolated function
2023-01-30 09:16:49 -06:00
Alexander Meißner ac7d0ff633
Feature - Disable builtin loader ownership chains (#29959)
* Adds feature disable_builtin_loader_ownership_chains.

* Removes test_load_accounts_max_call_depth().
2023-01-29 19:27:49 +01:00
Alexander Meißner aa2e3487ba
Refactor - Simplify program accounts in transaction loading (#29728)
* Refactors the "!validated_fee_payer" case from an "else" branch to an early "return".

* Moves the early return upward.

* Removes empty entries.

* Adds account_found_and_dep_index.

* cargo fmt.

* Replaces call site of load_executable_accounts().

* Adjusts number of total loaded accounts in test_load_accounts_multiple_loaders().

* Removes test_accounts_account_not_found().

* Removes load_executable_accounts().

* Refactor back to built-in loader ownership chain loop.
2023-01-27 21:24:21 +01:00
Jeff Washington (jwash) 5e35823b66
add test_stake_account_consistency_with_rent_epoch_max_feature (#29915)
* add test_stake_account_consistency_with_rent_epoch_max_feature

* create_stake_account takes id

* use test_case

* reformat panic message
2023-01-27 11:50:33 -08:00
Tao Zhu 6f4fe37bd2
add cost to additional built-in programs (#29795)
* add cost to additional built-in programs
* update a test with compute-budget cost
2023-01-27 13:47:41 -06:00
Illia Bobyr 8fafbb0a06
doc: Fix documentation warnings and add some links (#29887) 2023-01-25 23:15:58 -08:00
Brooks 867d2581a6
Moves impl of bank_hash_info_at() into hash_internal_state() (#29913) 2023-01-25 22:24:51 -05:00
Brooks dde4b5d1ef
Adds AccountsDb::get_bank_hash_info() (#29908) 2023-01-25 17:01:01 -05:00
Brooks d76c598691
Snapshot serde test uses calculate_accounts_delta_hash() (#29905) 2023-01-25 16:26:15 -05:00
Xiang Zhu 4ebcacb4a3
Revert "Add run parent directory for accounts files (#29794)" (#29899)
This PR is causing OOM on master.  Reverting it for now.

This reverts commit 74f89d1494.
2023-01-25 10:03:01 -08:00
Yihau Chen 9193b4221d
Revert "chore: workspace inheritance (#29509)" (#29892)
This reverts commit a67d239dde.
2023-01-25 15:50:41 +08:00
Yihau Chen a67d239dde
chore: workspace inheritance (#29509)
* introduce workspace.package

* introduce workspace.dependencies

* read version from root cargo.toml

* pass check when version = { workspace = true }

* don't bump version when version = { workspace = true }

* including workspace Cargo.toml when bump version

* programs/sbf use workspace inheritance

* fix increasing cargo version ignore program/sbf/Cargo.toml
2023-01-25 13:59:59 +08:00
Xiang Zhu 74f89d1494
Add run parent directory for accounts files (#29794)
* Add run parent directory for accounts files

* fix test test_concurrent_snapshot_packaging

* review comments.  renamed the path setup function

* Addressed most of the review comments

* remove explict type def for map result

* handle create_accounts_run_and_snapshot_dirs error with expect

* update with more review comments

* minor fixes from review comments

* simplify account_filename option assignment

* handle error from create_accounts_run_and_snapshot_dirs

* use then instead of then_some for lazy evaluation
2023-01-24 16:44:35 -08:00
Brooks bda0c606a1
Renames fn to calculate_accounts_delta_hash() (#29876) 2023-01-24 18:55:56 -05:00
Brooks 655345728b
Use saturating_add_signed() (#29867) 2023-01-24 17:07:50 -05:00
Brooks d67baefd70
Use Option::unzip() (#29866) 2023-01-24 17:07:29 -05:00
behzad nouri 8a146361d1
includes rent_epoch in vote-accounts sanity checks (#29861)
https://github.com/solana-labs/solana/pull/26479
preserves rent epoch for rent-exempt accounts. Since the feature got
activated, vote accounts in stakes-cache have identical rent_epoch field
as the accounts in accounts-db. The commit verifies this in stakes-cache
sanity checks.
2023-01-24 19:47:38 +00:00
Brooks a06f8e68a5
Tests wait for initial accounts hash verification to complete (#29840) 2023-01-24 14:44:39 -05:00
Jeff Washington (jwash) 07afa22671
test fn append_single_account_with_default_hash uses AccountStorageEntry (#29839) 2023-01-24 11:43:03 -08:00
Jeff Washington (jwash) cac52b0819
trait ShrinkCollectRefs (#29830) 2023-01-24 08:43:50 -08:00
Jeff Washington (jwash) 8d4603edfb
update tests storages -> storage (#29837) 2023-01-24 07:54:28 -08:00
Jeff Washington (jwash) 79843fcbe7
update tests for 1 append vec per slot (#29836) 2023-01-24 07:53:54 -08:00
Jeff Washington (jwash) 5d24745464
if 0 alive accounts, don't create ancient append vec (#29842) 2023-01-24 07:52:31 -08:00
Tyera b35d173c04
Remove bank_transaction_count_fix logic (#29695)
* Remove bank_transaction_count_fix logic

* Fix test and add comment
2023-01-22 15:59:35 +08:00