Tao Zhu
17ba051e1f
Revert "add default_cost as mandatory field for Builtin ( #30639 )" ( #30749 )
...
This reverts commit 7b95c8e698
.
2023-03-16 11:21:06 -05:00
Brooks
8be99c1c7d
Verifies incremental accounts hash in verify_accounts_hash_and_lamports ( #30735 )
2023-03-16 09:48:06 -04:00
Brooks
17b48edd7b
Renames types to be consistent with verify_accounts_hash ( #30674 )
2023-03-10 20:02:14 -05:00
Brooks
63623e4df2
Renames fns to verify_accounts_hash ( #30672 )
2023-03-10 18:11:47 -05:00
Tao Zhu
7b95c8e698
add default_cost as mandatory field for Builtin ( #30639 )
...
* add default_cost as mandatory field for Builtin
* updated tests
* set zkp program default to VerifyTransfer CUs
---------
Co-authored-by: Jon Cinque <joncinque@pm.me>
2023-03-10 14:02:24 -06:00
Yueh-Hsuan Chiang
a78ef393bf
Generalize the return value of append_accounts() ( #30571 )
...
#### Problem
The existing append_accounts returns a vector of offsets, which accounts-db
later uses it to infer the storage size of each account. However, such inference
does not apply to the new hot/cold storage format.
#### Summary of Changes
This PR changes the return value of append_accounts() to `Vec<StoredAccountInfo>`,
which includes both offset and storage size information of an account.
2023-03-06 09:52:05 -08:00
Alexander Meißner
38e74325e3
Refactor - Remove `process_instruction` parameter `first_instruction_account` ( #30579 )
...
* Stops using first_instruction_account parameter in bpf_loader.
* Removes first_instruction_account parameter from process_instruction().
2023-03-06 17:37:37 +01:00
Yueh-Hsuan Chiang
33e179905f
getter functions for StoredAccountMeta ( #30447 )
...
This PR makes all the StoredAccountMeta fields pub(crate)
and provides getter functions to access its member fields.
This PR is a preparation step for abstracting out StoredAccountMeta.
2023-02-27 10:03:22 -08:00
Jeff Washington (jwash)
e39626ab14
add second type to accounts index for disk ( #30446 )
2023-02-23 13:05:06 -08:00
Yueh-Hsuan Chiang
ac7e7aa8f0
Move account-meta structs from append_vec.rs to account_meta.rs ( #30443 )
...
#### Problem
As we start supporting new storage formats, those account-meta
structs will be shared by different storage formats and thus need
a new home.
#### Summary of Changes
This PR creates meta.rs under account_storage and moves all the account-meta
structs out from append_vec.rs.
2023-02-22 16:10:34 -08:00
HaoranYi
615d1a8b69
Extract BankHashLamportsVerifyConfig ( #30320 )
...
* refactor BankHashLamportsVerifyConfig
* clippy
* comments
* fix bench
2023-02-15 16:03:50 -06:00
Brooks
bda0c606a1
Renames fn to calculate_accounts_delta_hash() ( #29876 )
2023-01-24 18:55:56 -05:00
behzad nouri
272e667cb2
deprecates Pubkey::new in favor of Pubkey::{,try_}from ( #29805 )
...
The commit deprecates Pubkey::new which lacks type-safety and instead
implements TryFrom<&[u8]> and TryFrom<Vec<u8>> for Pubkey.
2023-01-21 18:06:27 +00:00
Jeff Washington (jwash)
4a64f6d421
test_utils::create_test_accounts pre-allocates an append vec first ( #29336 )
...
* test_utils::create_test_accounts pre-allocates an append vec first
* remove comment
2022-12-21 09:02:42 -08:00
Jeff Washington (jwash)
b77bef4ee3
write_version -> write_version_obsolete ( #29176 )
2022-12-14 07:43:40 -08:00
Jeff Washington (jwash)
3e649d2aa0
remove add_root(caching_enabled) ( #29245 )
2022-12-13 11:26:28 -08:00
Jeff Washington (jwash)
7034f4cbbe
remove new_with_config_for_benches(caching_enabled) ( #29231 )
2022-12-13 07:19:24 -08:00
behzad nouri
9524c9dbff
patches errors from clippy::uninlined_format_args
...
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
2022-12-06 19:32:15 +00:00
Jeff Washington (jwash)
5d88a9b32b
improve perf of storing accounts for shrink/ancient ( #28880 )
...
* improve perf of storing accounts for shrink/ancient
* rename
* phantom data
* update comment
* make impl Borrow<Hash> consistent
* remove unused static
2022-11-22 15:36:57 -08:00
Jeff Washington (jwash)
813f1f993a
remove test only append_account ( #28850 )
2022-11-17 12:26:51 -08:00
Brooks Prumo
4d6653598b
Upgrades to Rust 1.65.0 ( #28741 )
2022-11-09 17:15:03 -05:00
Brooks Prumo
d1ba42180d
clippy for rust 1.65.0 ( #28765 )
2022-11-09 19:39:38 +00:00
Brooks Prumo
e79c1cba03
Renames fn to update_accounts_hash_for_tests() ( #28571 )
2022-10-25 14:03:19 -04:00
Jeff Washington (jwash)
28a89a1d99
remove expected rent collection and rehashing completely ( #28422 )
2022-10-17 07:24:42 -07:00
Jeff Washington (jwash)
435d4aded9
run initial hash calc in background, using background threads ( #28239 )
2022-10-05 19:42:06 -07:00
Jeff Washington (jwash)
cfc124c825
acct idx can no longer use write cache ( #28150 )
2022-09-30 10:55:27 -07:00
behzad nouri
9a57c64f21
patches clippy errors from new rust nightly release ( #27996 )
2022-09-22 22:23:03 +00:00
Jeff Washington (jwash)
1db7da5c32
pass enable_rehashing to verify_bank_hash_and_lamports ( #27827 )
2022-09-17 06:09:06 -07:00
Jeff Washington (jwash)
d242c0fc97
pass 'enable_rehashing' through all accounts hash functions ( #27701 )
2022-09-12 12:18:09 -07:00
Jeff Washington (jwash)
765c628546
use exit signal for acct idx bg threads ( #27483 )
2022-09-12 11:51:12 -07:00
Alexander Meißner
12d2147efa
Adds `IndexOfAccount` type ( #27599 )
...
Adds the type `IndexOfAccount`.
2022-09-06 11:31:40 +02:00
Tao Zhu
8bb039d08d
collect min prioritization fees when replaying sanitized transactions ( #26709 )
...
* Collect blocks' minimum prioritization fees when replaying sanitized transactions
* Limits block min-fee metrics reporting to top 10 writable accounts
* Add service thread to asynchronously update and finalize prioritization fee cache
* Add bench test for prioritization_fee_cache
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2022-08-31 08:00:55 -05:00
Brooks Prumo
2fd9a4f373
Add clean_accounts_for_tests() ( #27200 )
2022-08-17 18:45:59 -04:00
Brooks Prumo
bc0d01110c
Remove `fn slot_deltas()` from StatusCache ( #26931 )
2022-08-16 06:08:29 -04:00
Justin Starry
69598ed4c0
Refactor: Add `RuntimeConfig` field to Bank ( #26946 )
...
* Refactor: Simplify arguments for bank constructor methods
* Refactor: Add RuntimeConfig to Bank fields
* Arc wrap runtime_config
* Arc wrap all runtime config usages
* Remove Copy trait derivation from RuntimeConfig
* Remove some arc wrapping
2022-08-05 20:49:00 +01:00
Jeff Washington (jwash)
c7462b7a52
ledger tool verify can store debug info on hash calc ( #26837 )
2022-07-29 15:54:56 -05:00
Jeff Washington (jwash)
b582e4ce0f
introduce UpsertReclaim ( #26462 )
2022-07-07 15:40:17 -05:00
Michael Vines
fdb186ba3b
pacify nightly clippy
2022-06-30 21:31:49 -07:00
Brooks Prumo
23c50a2389
Add StatusCache::root_slot_deltas() and use it ( #26170 )
2022-06-23 15:19:06 -05:00
Brooks Prumo
97bd81a32b
Add bench for StatusCache::slot_deltas() ( #26123 )
2022-06-22 07:41:06 -05:00
Jeff Washington (jwash)
41f30a2383
stop logging misleading bank hash mismatch ( #25427 )
2022-05-23 08:43:25 -05:00
Jeff Washington (jwash)
e8bf812a8a
allow ledger-tool halt at slot to calc hash using write cache ( #24974 )
2022-05-04 16:27:49 -05:00
apfitzge
112a0b475a
Revert "Refactor to use EpochSchedule from within RentCollector struct" ( #24893 )
...
* Revert "Ran cargo fmt"
This reverts commit 9052e41b32
.
* Revert "Fix build error introduced by my editor setup, part 2"
This reverts commit 4dfeab3b38
.
* Revert "Fix build error introduced by my editor setup"
This reverts commit 87fb78dc56
.
* Revert "Remove redundant epoch_schedule from AccountsPackage"
This reverts commit c2f7f2fff8
.
* Revert "Fix a test"
This reverts commit 36c0bdaa78
.
* Revert "Fixes to initial code"
This reverts commit ed7813e698
.
* Revert "Removing redundant EpochSchedule param from fns"
This reverts commit 5472d2e605
.
2022-05-02 13:46:17 -05:00
Justin Starry
79923c3b58
Refactor: Rename BlockhashQueue fields and methods for clarity ( #24426 )
2022-04-21 11:57:17 +08:00
Jason Davis
9052e41b32
Ran cargo fmt
2022-04-18 11:57:40 -05:00
Jason Davis
4dfeab3b38
Fix build error introduced by my editor setup, part 2
2022-04-18 11:57:40 -05:00
Jason Davis
5472d2e605
Removing redundant EpochSchedule param from fns
2022-04-18 11:57:40 -05:00
HaoranYi
605036c117
move test fn into its own mod ( #24212 )
...
* move test fn into its own mod
* pub
2022-04-12 09:36:05 -05:00
HaoranYi
e14933c54d
move bank test fn to its test_utils mod ( #24171 )
2022-04-11 10:42:24 -05:00
Alexander Meißner
1b45c509c3
Refactor: Use `InstructionContext::get_instruction_data()` ( #24014 )
...
* Adds transaction_context and instruction_context where invoke_context.get_keyed_accounts() is used.
* Use instruction_context.get_instruction_data() instead of an explicit parameter.
* Removes instruction_data parameter from Executor::execute().
* Removes instruction_data parameter from ProcessInstructionWithContext.
2022-04-01 15:48:05 +02:00