Commit Graph

25284 Commits

Author SHA1 Message Date
Brooks dd51e617f5
Simplifies SnapshotMinimizer::filter_storage() (#865) 2024-04-17 20:10:20 -04:00
HaoranYi 033bcfcab5
accounts db/refactor accounts db test - convert test_full_clean_refcount (#814)
* add full_clean_refcount tests for both account storage formats

* keep code comments

* fix test to match with code comments

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-04-17 16:42:44 -05:00
carllin 297a7aa40a
Fix vote refresh local cluster test (#830) 2024-04-17 17:14:38 -04:00
Brooks da0d78c504
Removes hash() and has_hash() from StorableAccounts (#867) 2024-04-17 16:41:41 -04:00
Brooks ee2c29ca2f
Removes unused hashes params from store functions (#863) 2024-04-17 16:37:45 -04:00
Alexander Meißner e7617a1b1f
Refactor - Remove `program_accounts_map` from account_loader (#768)
Removes program_accounts / program_accounts_map from account_shared_data_from_program(), load_transaction_accounts() and load_accounts().
2024-04-17 21:58:13 +02:00
behzad nouri 1a69c3486b
removes #[derive(Ord, PartialOrd)] from LegacyContactInfo (#868)
Ord and PartialOrd traits are not necessary for LegacyContactInfo and
removing them will simplify new ContactInfo migration.
2024-04-17 19:33:04 +00:00
Andrew Fitzgerald ab2df8a735
bugfix: fill early exit with transaction errors (#325) 2024-04-17 14:25:13 -05:00
Brooks 613256e18f
Removes StorableAccountsWithHashes (#862) 2024-04-17 18:52:45 +00:00
HaoranYi 283f433a3b
accounts db/refactor accounts db test - add macro for accounts-db panic test (#786)
* add macro for accounts-db panic test
convert double remove test for both account file provider

* refactor to share accounts_db_test and accounts_db_panic_test macro

* rebase

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-04-17 12:52:00 -05:00
Kevin Heavey 8edc6ccb5c
Move Stats::submit to solana-runtime (#686)
* Move Stats::submit to solana-runtime

* fmt

* rename Stats to LoadedProgramStats

* move submit_loaded_programs_stats to bank::metricss and rename it to report_loaded_programs_stats

* add new log method to LoadedProgramStats and move some code there

* fix unused import

* reload stats in LoadedProgramStats::log

* remove old import
2024-04-17 17:43:43 +00:00
sakridge 37fbd3349c
Remove duplicated code with a CliCommandInfo constructor (#806)
Setting no signers is the most common case to construct a
CliCommandInfo struct, make a constructor function to do that
and reduce code.
2024-04-17 19:34:17 +02:00
Brooks ad5b71dda8
Replaces StorableAccountsWithHashes in AccountsDb (#861) 2024-04-17 17:31:44 +00:00
behzad nouri aa0922d684
reworks shred::merkle::Shred{Code,Data}::get_chained_merkle_root_offset (#802)
Shred{Code,Data}::get_chained_merkle_root_offset is only applicable to
"chained" Merkle shreds however the code or API does not enforce this.

The commit explicitly checks for "chained" variant in
Shred{Code,Data}::get_chained_merkle_root_offset.
2024-04-17 16:32:41 +00:00
Brooks 349eb7f925
Replaces StorableAccountsWithHashes in AccountsFile (#860) 2024-04-17 16:02:48 +00:00
Alexander Meißner ac36dbbc87
Refactor - `LoadedProgramType::Loaded` and `LoadedProgramOwner` (#606)
* Adds LoadedProgram::account_owner() and LoadedProgramOwner.
Merges LoadedProgramTypes LegacyV0, LegacyV1, Typed and TestLoaded into Loaded.

* Review feedback.
2024-04-17 17:48:14 +02:00
Brooks 2aeac5b468
Replaces StorableAccountsWithHashes in TieredStorage (#859) 2024-04-17 14:49:24 +00:00
Andrei Silviu Dragnea 590612942a
ledger-tool: Add --log-messages-bytes-limit arg (#854) 2024-04-17 16:17:07 +02:00
Tao Zhu 62dfb0e64a
add feature gate to collect and reward priority fee fully (#583)
* add feature gate to collect and distribute priority fee fully

* add feature gate logic to SchedulerController::calculate_priority_and_cost()

* set feature gate status correctly for tests
2024-04-17 09:14:38 -05:00
Brooks 0588ecc612
Refactors duplicate code in accounts startup verification (#843) 2024-04-17 09:40:04 -04:00
Brooks 97013978fe
Uses same lifetime name for local AccountForStorage in callback (#848) 2024-04-17 09:39:44 -04:00
Brooks 4d2d95fe14
Replaces StorableAccountsWithHashes in AppendVec (#853) 2024-04-17 09:34:03 -04:00
Jeff Washington (jwash) 63d4278cae
get_stored_account_meta_callback returns Option (#847)
* get_stored_account_meta_callback returns Option

* Update accounts-db/src/accounts_file.rs

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

---------

Co-authored-by: Brooks <brooks@prumo.org>
2024-04-17 08:12:32 -05:00
Jon C 97c56ac0e2
cli: Introduce `WithComputeUnitConfig` for specifying more than compute unit price (#850)
cli: Introduce `ComputeUnitConfig` for specifying more than price
2024-04-17 12:40:07 +02:00
Jon C 3bb7ab7360
cli: Update `simulate_and_update_compute_unit_limit` to take `Message` (#839)
Update `simulate_and_update_compute_unit_limit` to take `Message`
2024-04-17 12:36:58 +02:00
Max Kaplan 6b52ca29c1
cli: adding prio fee support to validator-info (#582) 2024-04-17 12:36:25 +02:00
HaoranYi 03b596586c
Write default hash to account storage (#469)
* write default hash to apendvec

* fix get_pubkey_hash_for_slot

* fix tests

* fix rebase error

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-04-16 16:04:52 -05:00
Jeff Washington (jwash) a9548a6dc5
add `for<>` to callback on get fns (#838) 2024-04-16 14:55:50 -05:00
Jeff Washington (jwash) 0976e9b222
add get_stored_account_meta_callback to storage (#836) 2024-04-16 13:58:42 -05:00
behzad nouri f2612ef7b5
enables chained Merkle shreds for ClusterType::Development (#54)
The commit enables chained Merkle shreds for ClusterType::Development so that
we get ample coverage for further development.
2024-04-16 18:14:39 +00:00
Justin Starry 25be2be4fc
Deprecate static lists of reserved keys (#833) 2024-04-17 01:15:53 +08:00
HaoranYi c5a669ea34
accounts db/refactor accounts db test - fix account storage count and alive bytes tests for hot storage (#784)
fix account storage count and alive bytes tests for hot storage

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-04-16 12:11:44 -05:00
Jeff Washington (jwash) 877591ea7d
remove StorableAccounts.pubkey() (#829)
remove `StorableAccounts`.`pubkey()`
2024-04-16 11:39:19 -05:00
Tao Zhu f0375596dd
calculated fee details can be cleared out by lamports_per_signature (#704)
* fee_details supports backward compatibility of using lamports_per_signature to zero out transaction fee

* need to fully furnish nonce account for test

* Apply suggestions from code review

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

* Apply suggestions from code review

* revert hash_queue locking to original behavior

---------

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2024-04-16 11:36:40 -05:00
Jon C 3476775aaf
cli: Move all compute budget code into compute_budget.rs (#826)
* Refactor `simulate_and_update_compute_unit_limit`

* Move `WithComputeUnitPrice` to `compute_budget`

* Move `set_compute_budget_ixs_if_needed`
2024-04-16 18:25:58 +02:00
Jeff Washington (jwash) cb2fd2b632
AccountForStorage supports pubkey() (#825)
* account_default_if_zero_lamport always returns a value

* rename
2024-04-16 10:06:33 -05:00
Brooks 731d36ab26
Fixes pedantic clippy ptr cast lints in append_vec.rs (#650) 2024-04-16 13:41:00 +00:00
Jeff Washington (jwash) c75fe56354
account_default_if_zero_lamport always returns a value (#822) 2024-04-16 08:11:46 -05:00
Brooks 14135e110f
Fixes pedantic clippy ptr cast lints in bucket-map (#655) 2024-04-16 08:55:33 -04:00
Brooks ec6f525ea6
Fixes pedantic clippy ptr cast lints in tiered storage (#651) 2024-04-16 08:51:38 -04:00
Justin Starry 2e911559d0
Deprecate `is_builtin_key_or_sysvar` function (#788) 2024-04-16 10:03:13 +08:00
Jeff Washington (jwash) 7f16e84237
hot storage tests don't use Option (#821) 2024-04-15 19:17:02 -05:00
Jeff Washington (jwash) ee5fb5102d
use callback for account and account_default_if_zero_lamport (#819)
use callback for `account` and `account_default_if_zero_lamport`
2024-04-15 19:09:57 -05:00
Tyera 7a15ec99cd
Move Bank::calculate_stake_vote_rewards to sub-submodule (#827) 2024-04-15 23:41:32 +00:00
Lijun Wang f2aa4f0741
Parameterize max streams per ms (#707)
Make PPS a parameter instead of the hard coded
2024-04-15 15:58:10 -07:00
Brooks f16b5cf1e6
Marks append vec test utils as DCOU (#820) 2024-04-15 18:52:56 -04:00
HaoranYi d721f76084
accounts db/refactor accounts db test - Update accounts-db test to cover different account file providers. (#777)
* add define_accounts_db_test macro and refactor tests of accounts db for different AccountFileProvider

* use test macro for test_alive_bytes

* implement review feedbacks

* typo

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-04-15 17:40:20 -05:00
samkim-crypto 385f7eed15
[zk-token-sdk] Add ctxt extraction functions for grouped ElGamal ciphertexts (#588)
* add extraction functions for `GroupedElGamalCiphertext3Handles`

* use macro for extraction functions

* add extraction functions for `GroupedElGamalCiphertext2Handles`

* fix `ElGamalError` visibility

* add tests for ciphertext extraction
2024-04-16 07:37:47 +09:00
Justin Starry 056bfcede7
Deprecate `is_sysvar_id` function (#789)
Deprecate is_sysvar_id
2024-04-16 06:22:52 +08:00
Justin Starry f27f91bed7
Deprecate `solana_program::sdk_ids` module (#790)
Deprecate solana_program::sdk_ids module
2024-04-16 06:21:20 +08:00