Alexander Meißner
ee2c2ef6c7
Cleanup - require_static_program_ids_in_transaction ( #31767 )
...
require_static_program_ids_in_transaction
2023-06-07 17:12:41 +02:00
Pankaj Garg
c86e160438
Add runtime environment to FailedVerification tombstones ( #31991 )
...
* Add runtime environment to FailedVerification tombstones
* modify default variant
* prune update
* add DelayVisibility in prune_feature_set_transition
2023-06-06 22:24:39 +00:00
Jeff Washington (jwash)
85a0e31c60
add ProgramExecutionTemporarilyRestricted error ( #31796 )
...
* add StakeProgramUnavailable error
* rename to ProgramExecutionTemporarilyRestricted
* Update sdk/src/transaction/error.rs
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* fmt
* update frozen abi hash
* add account_index to ProgramExecutionTemporarilyRestricted error
* Update sdk/src/transaction/error.rs
Co-authored-by: mvines <mvines@gmail.com>
* populate transaction_details from transaction_error for ProgramExecutionTemporarilyRestricted error
* fix a test
* update abi digest
* Update sdk/src/transaction/error.rs
Co-authored-by: Brooks <brooks@prumo.org>
---------
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
Co-authored-by: HaoranYi <haoran.yi@solana.com>
Co-authored-by: HaoranYi <haoran.yi@gmail.com>
Co-authored-by: mvines <mvines@gmail.com>
Co-authored-by: Brooks <brooks@prumo.org>
2023-06-06 14:13:41 -07:00
Alexander Meißner
89207a3fe5
Feature - Prune on feature set transition ( #31945 )
...
* Call create_program_runtime_environment() in Bank::apply_builtin_program_feature_transitions().
* Adds LoadedPrograms::prune_feature_set_transition().
2023-06-06 17:49:02 +02:00
Pankaj Garg
37ebb709e6
Evict program cache using transaction usage counter ( #31927 )
...
* Evict program cache using tx usage counter
* address review feedback
* address review feedback
2023-06-02 11:26:56 -07:00
Pankaj Garg
29d7a57cce
Reset program cache stats after submit ( #31929 )
2023-06-02 01:16:49 -07:00
steviez
debe794987
Replace improper &Arc<...> with Arc<...> in Bank and Accounts ( #31892 )
...
The callstack updated in this PR passed an &Arc<...> down only to have
the bottom level clone the reference. Thus, we are giving shared
ownership so the reference is a bit redundant and arguably obscures the
intention to clone further down the callstack.
2023-05-31 12:36:44 -05:00
Jeff Washington (jwash)
6c520396cd
bank process_new_epoch takes parent_height ( #31820 )
2023-05-30 08:58:40 -05:00
Jeff Washington (jwash)
0c64e26d53
partitioned rewards helper functions ( #31818 )
2023-05-30 08:57:31 -05:00
Andrew Fitzgerald
75954dc061
Banking worker ( #30970 )
2023-05-25 10:16:04 -07:00
Alexander Meißner
a85548cf34
Cleanup - spl_token_v3_4_0 and spl_associated_token_account_v1_1_0 ( #31764 )
...
* spl_token_v3_4_0
* spl_associated_token_account_v1_1_0
* Marks replace_program_account() as dead code.
2023-05-24 18:45:37 +02:00
Jeff Washington (jwash)
e396a10312
change StartBlockHeightAndRewards from parent to current ( #31781 )
2023-05-23 20:10:51 -07:00
Jeff Washington (jwash)
ae12079139
add debug to VoteReward ( #31782 )
2023-05-23 20:10:20 -07:00
Jeff Washington (jwash)
8e8b2f1671
reformat comments ( #31780 )
2023-05-23 17:04:47 -07:00
Alexander Meißner
1e8e024ec5
Cleanup - disable_fee_calculator ( #31766 )
...
disable_fee_calculator
2023-05-23 18:20:38 +02:00
Alexander Meißner
83f692ce67
Refactor - Share RBPF config and syscall registry globally ( #31727 )
...
* Adds LoadedPrograms::program_runtime_environment_v1.
* No need to explicitly remove precompiles from program_accounts_map.
2023-05-20 20:28:00 +02:00
Pankaj Garg
e6d490708a
Do not overwrite builtin program in the same slot ( #31718 )
2023-05-19 05:26:31 -07:00
Alexander Meißner
520c647918
Refactor - Merges `BuiltinPrograms` into `LoadedPrograms` ( #31654 )
...
* Merges BuiltinPrograms into LoadedPrograms.
* Prevents built-ins from being pruned.
2023-05-18 22:18:28 +02:00
Jeff Washington (jwash)
0291454876
persist EpochRewardStatus::Active ( #31697 )
...
persist `EpochRewardStatus::Active`
2023-05-18 07:14:41 -07:00
Jeff Washington (jwash)
ce32cb43db
add bank.epoch_reward_status ( #31680 )
2023-05-17 10:01:14 -07:00
Pankaj Garg
b03422968b
Remove Rc and RefCell to carry program cache in invoke_context ( #31684 )
2023-05-17 06:10:50 -07:00
Jeff Washington (jwash)
7c6478da8f
remove unnecessary pub ( #31676 )
2023-05-16 13:53:57 -07:00
Jeff Washington (jwash)
5bc41a0eb8
prepare load_transaction_accounts to recognize reward interval ( #31673 )
2023-05-16 12:55:35 -07:00
Jeff Washington (jwash)
d841ff7fe1
support snapshot deserialization with EpochRewardStatus ( #31672 )
...
* support snapshot deserialization with EpochRewardStatus
* pub(crate)
2023-05-16 12:53:52 -07:00
Maximilian Schneider
31aafc8ae6
race condition when running solana-program-test ( #31637 )
...
* hold bank freeze lock in banks-server to prevent RC on slot change
* clean up comments and loop
---------
Co-authored-by: Maximilian Schneider <max@mango.markets>
2023-05-15 12:25:06 -07:00
Andrew Fitzgerald
2c869ef778
QoS refactor: Allow pre-filtering ( #31542 )
2023-05-12 08:53:22 -07:00
Jeff Washington (jwash)
122b05b9f5
pass include_slot_in_hash through hash calcs to allow rehashing if hash is not stored ( #31579 )
...
* pass include_slot_in_hash through hash calcs to allow rehashing
* tests use each include_slot_in_hash value
* move include_slot_in_hash
* typo
* reorder struct init
* spelling is hard
2023-05-11 13:23:29 -07:00
Jeff Washington (jwash)
e0b914e775
use highest alive root to determine ancient for packing ( #31573 )
2023-05-11 12:13:15 -07:00
Alexander Meißner
bbd8be6cbe
Refactor - Renames loader-v3 to loader-v4. ( #31570 )
...
Renames loader-v3 to loader-v4.
2023-05-11 08:29:06 +02:00
Pankaj Garg
04425b81ce
Add stats for LoadedPrograms ( #31577 )
2023-05-10 12:08:55 -07:00
Jeff Washington (jwash)
fed1bb7d54
use max alive root to determine ancient cutoff for clean stats ( #31545 )
...
* use max alive root to determine ancient cutoff for clean stats
* fix math and add tests
2023-05-10 08:05:31 -07:00
Alexander Meißner
9e72668a77
Refactor - Simplify built-in program feature transition ( #31565 )
...
* Removes builtins::get_builtins(), instead derive them from Bank::builtin_programs.
* Removes BuiltinAction.
Turns BuiltinFeatureTransition from an enum into a struct.
* Makes Bank::remove_builtin() place tombstones.
2023-05-10 16:53:36 +02:00
Pankaj Garg
ab89e2cb15
Remove executor cache from the codebase ( #31566 )
2023-05-10 07:11:04 -07:00
Alexander Meißner
8e9b064ab3
Cleanup - `add_compute_budget_program` and `versioned_tx_message_enabled` ( #31560 )
...
* Moves compute_budget_program and address_lookup_table_program into genesis_builtins().
* Removes feature gate of versioned_tx_message_enabled.
2023-05-10 01:14:08 +02:00
Pankaj Garg
2210af60ee
Replace executor cache usage with LoadedPrograms cache ( #31462 )
...
* Replace executor cache usage with LoadedPrograms cache
* clippy fixes
* update cache with updated programs
* fixes
* more cleanup
* update tx batch cache with the tx results
* address review comments
* handle program closing backward compatibility
* handle unloaded programs during extraction
2023-05-09 15:44:38 -07:00
Pankaj Garg
3845423e17
Generalize matching criteria for tombstone at boot up ( #31547 )
...
Generalize matching criteria for tombstone at bootup
2023-05-09 08:26:42 -07:00
behzad nouri
8e638b785a
removes feature gate code sending votes to tpu-vote-port ( #31529 )
2023-05-08 18:12:35 +00:00
steviez
e62e4fbabd
Replace inc_new_counter_* with datapoint_* in Bank ( #31495 )
...
Counters can only report a single field; this adds an extra step to
debugging efforts to figure out the context for where/why the counted
event occurred. Use datapoints instead to subtmit some extra context.
2023-05-05 16:33:35 -05:00
Andrew Fitzgerald
18cd4311af
remove counters in hotpath ( #31398 )
2023-05-04 09:36:28 -07:00
Pankaj Garg
96e170bd37
Do not evict unloaded programs ( #31465 )
...
* Do not evict unloaded programs
* cleanup
2023-05-04 07:49:54 -07:00
Jeff Washington (jwash)
ddd1f2fce0
remove unnecessary casts ( #31461 )
2023-05-03 08:54:25 -07:00
Pankaj Garg
ba6f7e80e8
Remove obsolete code for lazily loading programs ( #31395 )
2023-05-02 14:39:27 -07:00
Alexander Meißner
ae75c7cb3f
Refactoring - Remove redundant definition of `BuiltinProgram` ( #31429 )
...
* Replaces BuiltinProgram in the program-runtime with the one from solana_rbpf.
* Adjusts the runtimes built-ins to use Arc<LoadedProgram>.
* Adjusts the tests and benchmarks.
2023-05-02 23:01:28 +02:00
Jeff Washington (jwash)
58ce19446f
replace tuple with `VoteReward` struct ( #31408 )
2023-05-01 10:42:05 -07:00
Pankaj Garg
8eebf64464
Add a second level cache to contain tx batch specific programs ( #31413 )
...
* Add a second level cache to contain tx batch specific programs
* fix clippy
* address review comments
2023-05-01 09:09:43 -07:00
Dmitri Makarov
74bd5f87af
Add minor extensions to Bank API ( #31396 )
...
* Make load_program method of Bank public for use in ledger-tool
* Add an accessor method to get a reference to builtin_programs of Bank
* Add a parameter to Bank::load_program to control debugging_features
2023-04-28 19:02:49 -04:00
Pankaj Garg
94dc8fed55
Check program modification slots during cold start ( #31331 )
2023-04-28 06:22:14 -07:00
Brennan
685ebcb3b0
Rework bank to allow RentCollectionCycleParams private ( #31361 )
2023-04-26 14:48:51 -07:00
Brennan
a540690778
Move partition logic out of bank ( #31343 )
...
* Move partition logic out of bank
2023-04-26 12:37:02 -07:00
Alexander Meißner
7002c568fb
Cleanup - Removes the CLI option "no-bpf-jit" ( #31329 )
...
* Enables JIT everywhere by default.
* Removes the CLI argument "no-bpf-jit" and its plumbering through out the validator code base.
* Removes with_jit bpf_loader variants.
* Removes the to_builtin!() macro.
2023-04-25 19:04:11 +02:00