Commit Graph

4534 Commits

Author SHA1 Message Date
Pankaj Garg 2455dc1a69
SVM: Move `TransactionAccountStateInfo` to svm and decouple from `bank` (#34981) 2024-01-27 11:10:09 -08:00
Brooks 59c2f35609
Removes unused retain_max_n_elements() (#34978) 2024-01-26 18:34:47 -05:00
Pankaj Garg 0d117d420c
Remove BlockhashQueue dependency from SVM related code (#34974) 2024-01-26 13:46:44 -08:00
HaoranYi 8a0c91d842
Skip creating reward partition account for `--partitioned-epoch-rewards-force-enable-single-slot` (#34946)
* skip creating reward partition account when we are testing agains mainnet

* Update runtime/src/bank.rs

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

* Update runtime/src/bank.rs

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

* refactor bool logic for partition reward single slot enable

* Update runtime/src/bank.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* move force_partition_rewards check into data account create fn

* share code

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
Co-authored-by: Brooks <brooks@prumo.org>
Co-authored-by: Tyera <teulberg@gmail.com>
2024-01-26 21:24:54 +00:00
steviez 3add40fc07
ledger-tool: Refactor accounts subcommand output code (#34915)
The accounts command currently dumps every single account in the
AccountsDb. This is obviously a lot of output, so a previous change
streamed the accounts instead of collecting and dumping at the end.

The streaming approach is much more performant, but the implementation
is non-trivial. This change
- Moves the accounts output code to output.rs
- Refactor the logic to several objects that implment the functionality
- Adjust the json output to also include the summary

This change lays the groundwork for cleanly adding several more flags
that will allow for querying different subsets of accounts.
2024-01-26 00:55:05 -06:00
Pankaj Garg 1e68ba5f8a
Move counter and logging code back to load_and_execute_transactions() (#34951) 2024-01-25 13:56:43 -08:00
Pankaj Garg b161f6ce08
Create SVM folder as a placeholder for the relevant code (#34942) 2024-01-25 06:20:00 -08:00
Pankaj Garg b04765f8b5
Code cleanup in account_rent_state (#34941) 2024-01-24 17:35:56 -08:00
Dmitri Makarov 5b59930782
Refactoring internal bank method signature for consistency (#34936) 2024-01-24 20:28:25 -05:00
Tyera bbd1fd41ac
Move EpochRewardsHasher to solana-sdk (#34934)
* Move EpochRewardsHasher to solana-sdk

* Cargo.lock

* Apparently we're allowing arithmetic_side_effects in all of runtime

* Move allow stmt to block instead of module

* Also allow in test mod
2024-01-24 16:25:01 -07:00
Dmitri Makarov 662e77feaa
Refactor bank's load_and_execute_transaction (#34893)
* Refactor bank load_and_execute_transactions

* Remove redundant clippy annotation

* Report check time where it is done in load_and_execute_transactions
2024-01-24 14:37:18 -05:00
Dmitri Makarov ef233eaaa7
Refactor load_accounts to take a reference to a slice instead of vec (#34919)
This is in preparation for further refactoring of
Bank::load_and_execute_transactions in a separate commit.
2024-01-24 09:43:18 -05:00
Brooks 3303c2566c
Removes fs-err dependency (#34911) 2024-01-23 17:25:03 -05:00
Tyera 7ebe0bccd6
Fix epoch rewards partition-data program owner (#34913)
Fix account program owner
2024-01-23 15:19:21 -07:00
Brooks e74f04ad0d
Replaces fs-err in snapshot_utils.rs (#34908) 2024-01-23 14:48:30 -05:00
Brooks b150de6d10
Replaces fs-err in clean_orphaned_account_snapshot_dirs() (#34902)
* Replaces fs-err in clean_orphaned_account_snapshot_dirs()

* pr: revert info message format changes
2024-01-23 19:46:02 +00:00
Brooks c30db7ad92
Replaces fs-err in snapshot_version_from_file() (#34904) 2024-01-23 14:35:10 -05:00
Tao Zhu 73d3973c7c
Remove congestion multiplier from calculate fee (#34865)
* remove println from a test

* sync fee_structure with fee_rate_governor;
remove congestion_multiplier from calculacte_fee(), leave parameters unused for now.
2024-01-23 12:59:50 -06:00
Brooks 22fc49c444
Replaces fs-err in rebuild_storages_from_snapshot_dir() (#34907) 2024-01-23 13:26:23 -05:00
Brooks 94f35da8e2
Replaces fs-err in purge_bank_snapshot() (#34906) 2024-01-23 17:50:39 +00:00
Brooks a21cfbd13f
Replaces fs-err in untar_snapshot_create_shared_buffer() (#34905) 2024-01-23 12:46:31 -05:00
Brooks 4bd8eedc06
Replaces fs-err in move_and_async_delete_path() (#34903) 2024-01-23 12:42:44 -05:00
Brooks 8ff511e8fa
Moves create_and_canonicalize_directories() into accounts-db utils (#34882) 2024-01-23 06:46:27 -05:00
Tyera 8aa726bfdf
Define epoch-rewards partition data program id (#34862)
* Create new program id for epoch-rewards partition data PDAs

* Remove misleading repr attribute

* Remove storage of HasherKind

* Split up seeds
2024-01-22 19:14:29 -07:00
Brooks 098076f5ca
Uses accounts run and snapshot dir constants (#34879) 2024-01-22 19:47:58 -05:00
Brooks 2f744f1639
Moves create_all_accounts_run_and_snapshot_dirs() into accounts-db utils (#34877) 2024-01-22 18:18:43 -05:00
Brooks 8cfad7f165
Replaces fs-err in verify_snapshot_archive() (#34887) 2024-01-22 17:20:00 -05:00
Brooks 16698b19d8
Replaces fs-err in snapshot_utils fns (#34883) 2024-01-22 21:36:22 +00:00
Tao Zhu a5c470d2fb
harden bank tests (#34821)
* harden bank tests by specifying exact genesis config wrt the fee rate and rent

* rename to clarify test function, add comments
2024-01-22 13:38:56 -06:00
Brooks c264307f10
Removes get_io_error() (#34863) 2024-01-22 14:07:29 -05:00
Brooks b78d41792a
Replaces fs-err in snapshot_utils tests (#34870) 2024-01-22 06:55:32 -05:00
Brooks 90933fea75
Replaces fs-err in snapshot_bank_utils.rs (#34861) 2024-01-21 20:54:25 -05:00
Brooks 6835e10ba5
Replaces fs-err for some snapshot errors (#34837) 2024-01-19 12:53:10 -05:00
Brooks a915e2f2a0
Returns ArchiveSnapshotPackageError from archive_snapshot_package() (#34855) 2024-01-19 11:21:14 -05:00
Tao Zhu 32a3de0939
use intended lamports_per_signature for fee_structure (#34845)
use intented lamports_per_signature for fee_struture, instead of using default
2024-01-19 09:18:17 -06:00
Tao Zhu 2c0278b8b2
be explicit of test expects zero transaction fee (#34846)
be explcit of test expects 0 transaction fee
2024-01-18 18:49:39 -06:00
Pankaj Garg dfb44959fa
Cleanup after simplify_writable_program_account_check feature activation (#34840) 2024-01-18 15:36:13 -08:00
Brooks 3388507878
Replaces fs-err in remove_tmp_snapshot_archives() (#34839) 2024-01-18 17:40:45 -05:00
Brooks 10590a3bcb
Replaces fs-err for HardLinkStoragesToSnapshotErrors (#34838) 2024-01-18 16:49:49 -05:00
Brooks 8f9d9152e0
Snapshot archive uses version file from bank snapshot (#34832) 2024-01-18 14:02:24 -05:00
Brooks b53915f164
Cleans up snapshot errors (#34831) 2024-01-18 13:42:22 -05:00
Brooks d8788999a6
Removes unused snapshot errors (#34812) 2024-01-17 14:04:56 -05:00
HaoranYi 258c920cf9
fix buffer size for updateable program buffer rent exempt fee calculation (#34781)
fix buffer size for updateable program buffer rent exempt fee
calculation

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-01-16 09:04:56 -06:00
Tao Zhu 51eaa2b9cc
cleanup feature code after activation (#34695)
cleanup feature checking code
2024-01-12 14:28:50 -06:00
Andrew Fitzgerald be5337a839
earlier fee payer validation (#34666) 2024-01-12 08:22:39 -08:00
Tyera 4385ed11b1
Populate partitioned-rewards PDA during calculation (#34624)
* Add epoch_rewards_partition_data module

* Rename variable

* Pass hasher's parent_blockhash up to begin_partitioned_rewards

* Populate epoch rewards partition data account in begin_partitioned_rewards

* Fix method name
2024-01-11 23:15:55 -07:00
Tyera 8e2943604b
Use parent blockhash to seed EpochRewardsHasher (#34744)
* Use parent blockhash to seed rewards-partition hasher

* Make blockhash word more consistent
2024-01-11 11:21:11 -07:00
Brooks e9a6bb35e2
Removes remaining unused accounts data len bits (#34732) 2024-01-10 18:16:56 -05:00
HaoranYi 61e42cb390
Fix program buffer account rent-exempt lamport calculation (#34722)
fix program buffer size in minimul for rent exempt calculation

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-01-10 11:32:51 -06:00
Tao Zhu 88f8d11da2
program-test consumes some units as native (#34714)
program-test consumes some units as native;
harden a unit test wrt if builtin consumes units;
2024-01-10 09:05:30 -06:00