* Fix - Reloading of unload entries after finishing the recompilation phase (#1199)
* Differentiate entries by environment instead of adjusting the effective slot.
* Adds comments inside ProgramCache::assign_program().
* Adds reproducer to test_feature_activation_loaded_programs_epoch_transition.
* Fixes env order in test_feature_activation_loaded_programs_recompilation_phase().
* Syncs both tests with master.
---------
(cherry picked from commit 979f619077)
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
Fix - `FailedVerification` and `Closed` tombstones (#419)
* Only the verifier can cause FailedVerification, everything else is Closed
* Removes the environments parameter from load_program_accounts().
* cargo fmt
* Simplify invocation of deployed program
* Attempt to invoke a program before it is deployed
* Attempt to invoke a buffer before it is used in a deployment
* Escalates Option return value of load_program_accounts() to load_program_with_pubkey().
* Review feedback
(cherry picked from commit 55c05c5ea5)
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
Refactor - `LoadedPrograms::replenish()` (#35145)
* Replace LoadedPrograms::replenish() with LoadedPrograms::assign_program().
* Removes LoadedPrograms::replenish().
* Defines replacement by having the same loaded program type.
* Implements a proper insertion sort with a two key comparison operator.
(cherry picked from commit 716ad5441b)
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
Fix: decayed_counter can overflow if shifted more than 63 (#35054)
(cherry picked from commit bf95f65ce1)
Co-authored-by: Pankaj Garg <pankaj@solana.com>
* use PROGRAM_OWNER + program data for account executable
mock account data with executable_meta in precompiled program and update
test_bank_hash_consistency test
pr: return const slice and add comments
pr: use ReadableAccount
use const to get rid of magic number
add featuregate disable_bpf_loader_instructions to disable bpf loader management instructions, and deprecate_executable_meta_update_in_bpf_loader to deprecate executable flag update in bpf loader
deprecate usage of executable in Account
fix a test
fix sbp bench
fix sbf program tests
add feature gate to account and borrowed account apis
fix tests
more test fixes
* restore bpf_loader v2 tests
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
* Use 2's random selection to evict program cache
* implement decaying of usage counter
* replace RwLock with AtomicU64
* address review comments
* remove -> swap_remove
* Disables verification-less reloading.
* Refactors LoadedPrograms::extract() to use a mutable parameter instead of returning the list of missing entries.
* Refactors LoadedPrograms::extract() to use a mutable parameter instead of returning a LoadedProgramsForTxBatch.
* Adds explicit SecondLevel structure to LoadedPrograms.
* Adds cooperative_loading_task.
* Implements cooperative loading in the bank.
* Fixes fork graph in tests.
* Adds LoadingTaskWaiter.
* Environment mismatch needs to just skip the entry.
* Removes retain() from prune_by_deployment_slot() as that is covered in remove_programs_with_no_entries() already.
* Removes remove_programs_with_no_entries() from sort_and_unload().
* Fixes ix_usage_counter in LoadedProgram::to_unloaded().
* Fixes doc comment of LoadedProgram::ix_usage_counter.
* Removes unused num_total_programs from test_eviction().
* Replaces .as_ref() in lambda with std::option::Option::as_ref.
* Replaces .for_each() with a for-loop.
* Uses .retain() instead of iter().filter().cloned().collect().
* Split compute budget instruction processing from ComputeBudget struct itself, so CB instructions can be processed elsewhere without involving ComputeBudget
* updated tests
* avoid built ComputeBudget from dated ComputeBudgetLimits in this refactoring PR
* Clean-up program-runtime/src/compute_budget_processor.rs
* Add test for a corner case that deprecated instruction is used to request units greater than max limit;
* Update code to handle the corner case.
* Initialize fork graph in program cache during bank_forks creation
* rename BankForks::new to BankForks::new_rw_arc
* fix compilation
* no need to set fork_graph on insert()
* fix partition tests
Revert "Split compute budget instructions process from struct itself (#33513)"
This reverts commit c73bebe984. This
was found to be a consensus breaking change.
* Split compute budget instruction processing from ComputeBudget struct itself, allow compute_budget_instructions be processed elsewhere without having to instantiate ComputeBudget
* updated tests
* solana-program - altbn128: add g1 & g2 compression
still fixing tests for point of infinity
feat: proof compression syscall working
add rust test to ci
remove prints
added c test
added sycall pricing
* fixed ci checks
* refactored altbn128 and compression