Commit Graph

1663 Commits

Author SHA1 Message Date
Tao Zhu 8b8a21a52f
cleanup feature: enable request heap frame instruction #30076 (#33243)
* cleanup feature: enable request heap frame instruction #30076

* update sbf tests

* removed out dated comments and test
2023-09-18 16:06:24 -05:00
steviez 9e11ae6275
Make program owners a const array instead of Vec<_> (#33275)
The program owners pubkeys are constant, no need to reconstruct the
Vec<Pubkey> and Vec<&Pubkey> each time this function runs (every time we
execute transactions).
2023-09-18 10:59:03 -05:00
behzad nouri c1090d3959
moves new_warmup_cooldown_rate_epoch outside iterators and for loops (#33259)
Recalculating new_warmup_cooldown_rate_epoch for each item is redundant
and wasteful and instead can be done only once outside the iterators and
for loops.
Also NewWarmupCooldownRateEpoch is unnecessary and verbose and is
removed in this commit.
2023-09-15 00:06:34 +00:00
Christian Kamm 525e59f01a
sdk, programs/bpf_loader: add sol_remaining_compute_units syscall (#31640)
bpf_loader: add sol_remaining_compute_units syscall

Co-authored-by: jonch <9093549+jon-chuang@users.noreply.github.com>
2023-09-13 08:57:08 -06:00
Pankaj Garg 5562f79cc5
Do not unnecessarily re-verify unloaded program (#32722)
* Do not unnecessarily re-verify unloaded program

* clippy fixes

* new unit test for extract

* fixes after rebase

* fixes after rebase

* address review comments

* fix clippy
2023-09-13 06:25:56 -07:00
Pankaj Garg 377b6003a8
Check loader-v4::id() as a valid program owner (#33167) 2023-09-06 11:54:18 -07:00
Alexander Meißner e9542200e8
Fix - Superfluous `if` condition for overwriting `environments` in feature activation code (#33138)
Removes the `if` block around the overwriting of the `environments`.
2023-09-05 15:01:20 +02:00
Trent Nelson b8dc5daedb
preliminaries for bumping nightly to 2023-08-25 (#33047)
* remove unnecessary hashes around raw string literals

* remove unncessary literal `unwrap()`s

* remove panicking `unwrap()`

* remove unnecessary `unwrap()`

* use `[]` instead of `vec![]` where applicable

* remove (more) unnecessary explicit `into_iter()` calls

* remove redundant pattern matching

* don't cast to same type and constness

* do not `cfg(any(...` a single item

* remove needless pass by `&mut`

* prefer `or_default()` to `or_insert_with(T::default())`

* `filter_map()` better written as `filter()`

* incorrect `PartialOrd` impl on `Ord` type

* replace "slow zero-filled `Vec` initializations"

* remove redundant local bindings

* add required lifetime to associated constant
2023-08-29 23:05:35 +00:00
Alexander Meißner 1238e53c9f
Refactor - Loader v4 deployment status (#33024)
Refactors "is_deployed: bool" and "authority_address: Option<Pubkey>".
Replaces them with "status: LoaderV4Status" and "authority_address: Pubkey".
2023-08-28 20:14:01 +02:00
Ryo Onodera d3fb54e0b2
Remove From<LogCollector> for Vec<String> (#33012) 2023-08-27 13:10:02 +09:00
Alexander Meißner 025b952598
Fix - missing delay visibility feature triggering cache flush (#32974)
Adds delay_visibility_of_program_deployment to FEATURES_AFFECTING_RBPF.
2023-08-24 16:41:23 +02:00
steviez cd96d5b6c3
Only update last restart slot sysvar if value has changed (#32925)
Read account first to check for change in value
2023-08-22 22:33:03 +02:00
HaoranYi 910b0f5d12
fix sbf sysvar test (#32803)
* fix sbf sysvar test

* typo

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-08-21 09:49:48 -06:00
steviez a4c8cc3ce0
Remove improper uses of &Arc<Bank> (#32802)
In most cases, either a &Bank or an Arc<Bank> is more proper.
- &Bank is used if the function only needs a momentary reference
- Arc<Bank> is used if the function needs its' own copy

This PR leaves several instances of &Arc<Bank> around; these instances
are situations where a clone may only happen conditionally.
2023-08-18 16:46:34 -05:00
Brooks 3cda810358
Adds docs to get_all_accounts_modified_since_parent() (#32895) 2023-08-18 16:01:50 -04:00
Brooks 280bb53802
Adds docs to get_all_accounts() (#32887) 2023-08-18 16:09:50 +00:00
Brooks 004577d94a
Adds docs to scan_all_accounts() (#32888) 2023-08-18 16:04:07 +00:00
Brooks 1e8f7b5d1e
Adds docs to non_vote_transaction_count_since_restart() (#32886) 2023-08-18 15:37:44 +00:00
Alexander Meißner c5a251e8c3
Refactor - `Bank::compute_active_feature_set()` (#32872)
Returns the feature set instead of overwriting it inside Bank::compute_active_feature_set().
2023-08-17 19:14:10 +02:00
Pankaj Garg c17b938204
Integrate program loader-v4 with bank (#32832)
* Integrate program loader-v4 with bank

* fix tests

* new struct for ProgramRuntimeEnvironments

* remove environment from program_runtime_environment_v

* move find_program_in_cache() to invoke_context

* cleanup
2023-08-16 10:50:23 -07:00
steviez 6bbf514e78
Add ability to output components that go into Bank hash (#32632)
When a consensus divergance occurs, the current workflow involves a
handful of manual steps to hone in on the offending slot and
transaction. This process isn't overly difficult to execute; however, it
is tedious and currently involves creating and parsing logs.

This change introduces functionality to output a debug file that
contains the components go into the bank hash. The file can be generated
in two ways:
- Via solana-validator when the node realizes it has diverged
- Via solana-ledger-tool verify by passing a flag

When a divergance occurs now, the steps to debug would be:
- Grab the file from the node that diverged
- Generate a file for the same slot with ledger-tool with a known good
  version
- Diff the files, they are pretty-printed json
2023-08-15 00:12:05 -05:00
Brooks ce57cac370
Use update_accounts_hash() in AccountsHashVerifier (#32830) 2023-08-14 13:11:23 -04:00
Pankaj Garg a1a0829a8b
Initialize and store PRv2 environment in cache (#32812)
* Initialize and store PRv2 environment in cache

* address review comments
2023-08-11 18:58:22 +00:00
Jon Cinque c73a56faf8
stake: Rename `StakeStateWithFlags` -> `StakeStateV2` (#32795) 2023-08-11 01:07:21 +02:00
Pankaj Garg f4287d70bb
Move accounts-db code to its own crate (#32766) 2023-08-09 13:03:36 -07:00
Jon Cinque 8e4a9a94ed
sdk: Add new version of `StakeState` to avoid breaking downstream users (#32736)
* sdk: Rename `StakeState` -> `StakeStateWithFlags`

* Add back `StakeFlags` with a deprecation warning
2023-08-09 00:05:40 +02:00
Ashwin Sekar fa3506631a
stake: deprecate on chain warmup/cooldown rate and config (#32723)
* stake: deprecate on chain warmup/cooldown rate and config

* Pr feedback: Deprecate since 1.16.7

Co-authored-by: Jon Cinque <me@jonc.dev>

---------

Co-authored-by: Jon Cinque <me@jonc.dev>
2023-08-07 13:23:24 -07:00
Brooks 04e25ff3ce
Adds doc comments for Bank fns that get accounts/snapshot hashes (#32716) 2023-08-04 13:56:15 -04:00
Jeff Washington (jwash) ca7a7ad2f3
add some doc comments identified in audit (#32709)
* add some doc comments identified in audit

* Update runtime/src/bank.rs

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

* Update runtime/src/accounts_db.rs

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

* Update runtime/src/accounts_db.rs

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

---------

Co-authored-by: Brooks <brooks@prumo.org>
2023-08-04 10:52:01 -07:00
Jeff Washington (jwash) f5c8bb789a
remove unused bank creation/freezing progress (#32699) 2023-08-03 10:12:44 -07:00
Alexander Meißner 33c33f5f79
Fix - Adds missing feature pubkeys to the `FEATURES_AFFECTING_RBPF` list (#32703)
Adds missing feature pubkeys to the FEATURES_AFFECTING_RBPF list.
2023-08-03 17:45:30 +02:00
behzad nouri ad4ddd3cb0
stores stake-accounts in parallel after epoch rewards calculations (#32633) 2023-07-29 20:47:28 +00:00
Pankaj Garg ef8d3206d7
Move bank specific code out of epoch_accounts_hash/utils.rs (#32623)
* Move bank specific code out of epoch_accounts_hash/utils.rs

* cleanup
2023-07-25 14:12:20 -07:00
Tao Zhu 62b9fcfa76
cleanup feature: Use default units per instruction in fee calculation (#32570)
* cleanup feature: Use default units per instruction in fee calculation
2023-07-21 18:37:58 -05:00
Pankaj Garg fc35b13365
Cleanup load_program() in bank.rs (#32146) 2023-07-21 13:43:46 -07:00
behzad nouri 952d8861c6
removes feature-gate code for updating rewards from cached accounts (#32514) 2023-07-21 19:52:44 +00:00
HaoranYi 9e8639f7ae
Add distributed rewards for the block in partitioned reward metrics (#32580)
report distributed rewards for the block in metrics

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-21 14:42:52 -05:00
Pankaj Garg faff34403c
Move bank dependent tests out of serde_snapshot/tests.rs (#32571) 2023-07-21 12:08:32 -07:00
behzad nouri a8b0c92873
simplifies update_stakes_cache implementation (#32534) 2023-07-19 18:13:30 +00:00
Pankaj Garg 2a86420777
Move calculate_fee() out of bank.rs (#32409)
* Move calculate_fee() to fee.rs

* fixup code for compilation
2023-07-14 20:17:38 -07:00
Pankaj Garg 7177dd9809
Remove calculate_fee()'s dependency on ComputeBudget (#32487) 2023-07-14 12:25:04 -07:00
Pankaj Garg eb74562124
Move methods to get num signatures and locks to SanitizedMessage (#32489) 2023-07-14 10:59:55 -07:00
HaoranYi ae6abda786
Remove unnecessary dead_code attributes (#32416)
* remove unnecessary dead_code attr

* move test fn to test files

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-12 18:41:17 -05:00
Justin Starry d344ae5297
feature flag cleanup: fix_recent_blockhashes (#32443)
* feature flag cleanup: fix_recent_blockhashes

* flip test logic
2023-07-11 20:43:50 -05:00
HaoranYi 466564686b
update epoch rewards sysvar (#32415)
* update epoch rewards sysvar

* add back the one reward distribution reward test

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-11 11:24:20 -05:00
HaoranYi 943fba5afd
update max reward block factor (#32445)
* update max reward block factor

* review comments

* more tests

* reduce the number of stakes per block to speed up tests

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-07-11 09:36:11 -05:00
behzad nouri d54b6204be
removes instances of clippy::manual_let_else (#32417) 2023-07-09 21:41:36 +00:00
Illia Bobyr 282e043177
`cargo fmt` using 1.6.0-nightly (#32390)
Seems like rustfmt 1.6.0 can now format `let/else` statements.
1.5.2 we use in our `solana-nightly` does not mind the reformatting.

```
$ cargo +nightly fmt --version
rustfmt 1.6.0-nightly (f20afcc 2023-07-04)

$ cargo +nightly fmt
$ git add -u
$ git commit

$ ./cargo nightly fmt --version
+ exec cargo +nightly-2023-04-19 fmt --version
rustfmt 1.5.2-nightly (c609da5 2023-04-18)

$ ./cargo nightly fmt
$ git diff
[empty output]
```
2023-07-06 20:45:29 -07:00
Pankaj Garg 4674b0099f
Move CostModel and CostTracker to its own crate (#32354)
* Move CostModel and CostTracker to its own crate

* compile new crate and update imports

* update sbf Cargo.lock

* fix AbiExample

* fix cargo sort

* Fix AbiExample
2023-07-06 10:08:18 -07:00
Pankaj Garg b060f62004
Move transaction results data structures out of bank.rs (#32386)
* Move transaction results data structures out of bank.rs

* Fix CI check failures
2023-07-06 09:45:01 -07:00
Pankaj Garg 356a827087
Move NonceInfo, NonceFull and NoncePartial out of bank.rs (#32375)
* Move NonceInfo, NonceFull and NoncePartial out of bank.rs

* fix imports

* move test_nonce_info to nonce_info.rs
2023-07-05 10:44:54 -07:00
Ryo Onodera 5b6c3ba81b
Make prepare_simulation_batch() more usable (#32304)
* Make prepare_simulation_batch() more usable

* Rename

* Use `use`
2023-06-29 11:20:42 +09:00
Wen 6f72258e3e
Vote refresh fix when outside slothash (#29948)
* When there are too many pubkeys in one slot, kick the one with lowest
stake out.

* Cache last_root to reduce read locks we need.

* Use slots_in_epoch to limit number of slots in the map.

* Fix lint errors.

* Only cache stake and slots per epoch once per epoch.

* Revert "Only cache stake and slots per epoch once per epoch."

This reverts commit 8658aad0083456794b4c4403adaf9c74d1a71d09.

* Vote at the tip of current fork if last vote is outside SlotHash
of the tip and last vote expired.

* Add unittest when last vote is outside slothash, we should vote at the tip
of the current fork.

* Revert "Use slots_in_epoch to limit number of slots in the map."

This reverts commit 93574f57a48d2a70fbbc0f62fa8810d3b6bee0af.

* Revert "Cache last_root to reduce read locks we need."

This reverts commit bb114ec2b62cb9c0207328b19c415f6116be0f1c.

* Revert "When there are too many pubkeys in one slot, kick the one with lowest"

This reverts commit 711e29a6a025fd4f11fbc97dcbbe90e4832be04c.

* Move new vote generation when last vote is outside slothash into the
main path, this actually makes more sense since we don't select where
to vote in two different places, and all the vote generation logic
is seamlessly inherited.

* - Move vote refresh to be behind select vote and do not refresh vote if a new
  vote is selected.
- Check whether last vote is inside slothash inside select_vote_and_reset_forks
- rename slot_within_slothash to is_in_slothashes_history
- remove one unittest for now, more tests will be added in a separate CL

* Remove new test, it will be in another file.

* Add is_in_slot_hashes_history test in the new file.

* Add unittest for the case when last vote is outside slot hashes.

* Small improvements and more unittests.

* Fix bad merge.

* Update docs/src/terminology.md

Co-authored-by: mvines <mvines@gmail.com>

* Put SwitchForkDecision::FailedSwitchThreshold logic into separate function.

* Make linter happy.

---------

Co-authored-by: mvines <mvines@gmail.com>
2023-06-26 18:21:24 -07:00
Pankaj Garg 089fb464a9
Move message_processor to program-runtime (#32268) 2023-06-24 15:55:39 -07:00
Tyera 02eaaae513
Clean up credits_auto_rewind feature (#32211)
* Remove credits_auto_rewind feature logic from stake program

* Obey clean-up orders

* Clippy prefers this match

* Remove credits_auto_rewind feature helpers from Bank

* Comment nit for language, and shrink to fit on one line
2023-06-24 10:26:27 -06:00
Ryo Onodera f62d231886
Make `ci/_` to print to stderr instead of stdout (#32238)
* make _ print to stderr instead...

* Trigger normal build procedure
2023-06-22 15:46:22 +09:00
steviez 20a7cdd43d
Restrict access to Bank's HardForks (#32180)
* Restrict access to Bank's HardForks

Callers could previously obtain a a lock to read/write HardForks from
any Bank. This would allow any caller to modify, and creates the
opportunity for inconsistent handling of what is considered a valid hard
fork (ie too old).

This PR adds a function to Bank so consistent sanity checks can be
applied; the caller will already have a Bank as that is where they would
have obtained the HardForks from in the first place. Additionally,
change the getter to return a copy of HardForks (simple Vec).

* Allow hard fork at bank slot if bank is not yet frozen
2023-06-20 23:44:43 -05:00
HaoranYi 2e9aeff8dd
Enable partitioned epoch reward by feature id (#32174)
enable partitioned epoch reward feature by feature id
update stake rewards tests with partitioned epoch rewards feature enable

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-20 12:12:50 -05:00
galactus 2ceabd9368
Simd 47 syscall sysvar last restart slot (#31957)
* add sysvar and logic for last restart slot

* cleanup

* add test for getting last restart slot from account

* format code

* add some basic rustdoc

* copy+paste error

* feature flag for last_restart_slot

* add to sysvars.md

* updated wording in sysvars.md

* rename sol_get_last_restart_slot_sysvar > sol_get_last_restart_slot

* create sbf C header for sol_get_last_restart_slot

* cleanup imports

* reverted hardened_unpack workaround

* cleanup imports

* cleanup logs + blank lines

* Implementing ui changes for last restart slot, nit

* Some more nit change and implementing the UI for sysvar

* fixing the CI

* Minor clippy fix

* format changes

* changes suggested by mvines and lichtso

* increase timeout in local_cluster test

* fix code format

* use keypair for feature flag from mvines

* delete test.json file

* Revert "increase timeout in local_cluster test"

This reverts commit a67465ae22.

* last restart slot should be always less than or equal to current slot

* fixing bug

* changes after  steviez comments

* format issue fixed

* fixing the comment on premature application of future hardfork

* nit change in test

Co-authored-by: steviez <steven@solana.com>

* reverting sysvar_cache.rs because change was not necessary

---------

Co-authored-by: steve-gg <grooviegermanikus@gmail.com>
Co-authored-by: steviez <steven@solana.com>
2023-06-16 20:14:02 +00:00
Jeff Washington (jwash) 174ceba82b
rename to stake_rewards_by_partition for clarity (#32165) 2023-06-16 19:28:53 +00:00
HaoranYi 39d9f8974d
Revert "add test for is_partitioned_rewards_feature_enabled (#32158)" (#32176)
This reverts commit d06b099ecb.

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-16 11:56:05 -05:00
HaoranYi d06b099ecb
add test for is_partitioned_rewards_feature_enabled (#32158)
* add set_partitioned_rewards_enabled_for_test fn

* reveiws

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-16 11:07:07 -05:00
HaoranYi af7b7f1436
Refactor reward block calculation fn (#32167)
refactor reward block calculation fn

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-16 08:40:23 -05:00
Jeff Washington (jwash) b1b7ae5e09
cleanup math in distribute_partitioned_epoch_rewards (#32164) 2023-06-15 16:17:38 -07:00
Jeff Washington (jwash) b4265217e6
update begin_partitioned_rewards to include sysvar (#32151)
* update begin_partitioned_rewards to include sysvar

* cleanup
2023-06-15 14:00:24 -07:00
Jeff Washington (jwash) d79b565c72
connect `begin_partitioned_rewards` to bank (#32152) 2023-06-15 11:51:10 -07:00
Jeff Washington (jwash) e7a676dc01
add distribute_partitioned_epoch_rewards (#32124)
* add distribute_partitioned_epoch_rewards

* reviews

* reanme

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-15 11:32:44 -05:00
Jeff Washington (jwash) 988bff93c8
deactivate_epoch_rewards_status burns sysvar (#32143)
* deactivate_epoch_reward_status burns sysvar

* warn to info

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-15 10:36:50 -05:00
Jeff Washington (jwash) 00b5c40122
add partitioned rewards sysvar fns (#32128) 2023-06-14 16:08:15 -07:00
Jeff Washington (jwash) 60e36afd42
add begin_partitioned_rewards (#32116)
* add begin_partitioned_rewards

* pr feedback

* Apply suggestions from code review

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

---------

Co-authored-by: HaoranYi <haoran.yi@gmail.com>
Co-authored-by: Brooks <brooks@prumo.org>
2023-06-14 14:24:49 -07:00
Jeff Washington (jwash) 088ac5ec01
add is_partitioned_rewards_code_enabled (#32123)
* add partitioned_rewards_code_enabled

* renames
2023-06-14 14:36:53 -05:00
Jeff Washington (jwash) f487dfbc77
add distribute_epoch_rewards_in_partition (#32125) 2023-06-14 11:03:17 -07:00
Jeff Washington (jwash) a1ce3cbaa3
partitioned rewards fn for tests: force_reward_interval_end_for_tests (#32127)
partitioned rewards fn for tests
2023-06-14 10:59:48 -07:00
Jeff Washington (jwash) 4eb7db8737
in testing, hash_internal_state ignores epoch_rewards_sysvar (#32122) 2023-06-14 10:57:29 -07:00
Jeff Washington (jwash) 9cf10b7aae
optionally compare with partitioned rewards (#32126) 2023-06-14 10:55:09 -07:00
Jeff Washington (jwash) c01250fc58
add calculate_rewards_and_distribute_vote_rewards (#32109)
* add calculate_rewards_and_distribute_vote_rewards

* warn -> info
2023-06-14 08:38:25 -07:00
Jeff Washington (jwash) a44b080b7f
add partitioned_rewards_feature_enabled (#32115) 2023-06-14 07:47:12 -07:00
Jeff Washington (jwash) 1fa73e778f
add deactivate_epoch_reward_status (#32114) 2023-06-14 07:46:34 -07:00
Jeff Washington (jwash) 2968587d42
add compare_with_partitioned_rewards (#32108) 2023-06-14 07:43:09 -07:00
Jeff Washington (jwash) 67a434fc5b
add calculate_rewards_for_partitioning (#32110) 2023-06-13 15:45:59 -07:00
Jeff Washington (jwash) 65268af497
pass get_reward_interval to load_accounts (#32084) 2023-06-13 14:49:07 -07:00
Jeff Washington (jwash) 9774826b08
add calculate_validator_rewards (#32107) 2023-06-13 14:45:19 -07:00
Jeff Washington (jwash) dcd66534dd
add partitioned rewards helpers (#32085)
* add partitioned rewards helpers

* remove pub(crate)

* credit -> distribution
2023-06-13 13:57:52 -07:00
Jeff Washington (jwash) 0762e69863
remove build error from merge (#32104) 2023-06-13 12:33:40 -07:00
Jeff Washington (jwash) 3fc183ca74
add calculate_stake_vote_rewards for partitioned rewards (#32066)
* add calculate_stake_vote_rewards for partitioned rewards

* check stake reward in test

* pr feedback

* add comment

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-13 11:53:30 -07:00
Jeff Washington (jwash) 446b82afba
update comment (#32099) 2023-06-13 10:54:38 -07:00
Jeff Washington (jwash) 7c5c70a522
add compare_with_partitioned_rewards_results for testing partitioned rewards (#32086) 2023-06-13 07:39:46 -07:00
Jeff Washington (jwash) b89ce94d33
add store_vote_accounts_partitioned (#32061)
* add store_vote_accounts_partitioned

* pr feedback
2023-06-12 14:38:30 -07:00
Alexander Meißner d0ae8c38bd
Fix - `enable_alt_bn128_syscall` (#32083)
* Fixes test_runtime_feature_enable_with_program_cache.

* Adds enable_alt_bn128_syscall to FEATURES_AFFECTING_RBPF.
2023-06-12 22:37:02 +02:00
Jeff Washington (jwash) 6280c63e1a
epoch rewards are stored partitioned as Vec<Vec< (#32076)
* epoch rewards are stored partitioned as Vec<Vec<

* update comment
2023-06-12 13:06:22 -07:00
Jeff Washington (jwash) 7e7c286d50
factor out get_epoch_reward_calculate_param_info to share results (#32065)
* factor out get_epoch_reward_calculate_param_info to share results

* remove extra comment
2023-06-12 09:56:08 -07:00
Jeff Washington (jwash) 0645e96bc6
add calc_vote_accounts_to_store (#32063)
* add calc_vote_accounts_to_store

* update comment
2023-06-12 08:38:18 -07:00
Jeff Washington (jwash) 26f4c405b2
add update_reward_history_in_partition (#32062)
* add update_reward_history_in_partition

* remove explicit type

* remove spurrious comment
2023-06-12 08:37:46 -07:00
Jeff Washington (jwash) b81a060898
add store_stake_accounts_in_partition (#32060)
* add store_stake_accounts_in_partition

* pr feedback on assert
2023-06-12 08:37:22 -07:00
Jeff Washington (jwash) a001c5eb49
add calculate_reward_points_partitioned (#32050)
* add calculate_reward_points_partitioned

* remove unnecessary clone

* add comment

* clean up test from pr feedback
2023-06-12 08:36:42 -07:00
Tao Zhu 37a759045a
include cost of transaction's requested loaded accounts size in cost model (#31905)
* include transaction requested loaded accounts size cost in cost model

* move function to avoid circular dependency
2023-06-08 12:49:42 -05:00
Alexander Meißner 3f13cd353e
Fix - LoadedProgramType::Closed (#31922)
* Makes Bank::load_program() return correct tombstones.

* Removes early TX failure caused by closed and invalid programs.

* Adjusts the feature gate of simplify_writable_program_account_check.
2023-06-08 15:40:18 +02:00
Jeff Washington (jwash) 36ccc71220
move StakeReward to stake_rewards.rs (#32014) 2023-06-07 12:35:28 -07:00
Alexander Meißner c87ff8780a
Cleanup - `Bank::reconfigure_token2_native_mint()` (#31817)
Removes Bank::reconfigure_token2_native_mint().
2023-06-07 21:14:43 +02:00
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