Commit Graph

25172 Commits

Author SHA1 Message Date
Joe C 87fc227b51
Runtime: Core BPF Migration: Setup migration configurations (#525)
* runtime: builtins: add `core_bpf_migration_config` to prototypes

* runtime: builtins: set up test builtins

* macro-ize builtin testing
2024-04-04 18:20:20 -05:00
Joe C 526979d589
program-runtime: hoist `MessageProcessor` up to SVM (#586) 2024-04-04 18:20:01 -05:00
Jeff Washington (jwash) dcc195e060
when flushing write cache, ignore reclaims (#581) 2024-04-04 16:13:00 -05:00
Lijun Wang 2b0391049d
transaction performance tracking -- streamer stage (#257)
* transaction performance tracking -- streamer stage
2024-04-04 13:19:13 -07:00
Tao Zhu bc81153d60
Add function to reward with full priority fee and burnt transaction fee (#566)
* refactor shareble code into its own function; update and add tests

* add function to reward with full prio fee and burnt transaction fee
2024-04-04 14:06:08 -05:00
Ashwin Sekar f975e92eba
ff cleanup: reduce_stake_warmup_cooldown (#470)
* ff cleanup: reduce_stake_warmup_cooldown

* update instruction comments to indicate stake config is unused
2024-04-04 18:03:35 +00:00
Jeff Washington (jwash) ccdfd9a4d2
rework remove_dead_accounts.reclaimed_offsets (#571) 2024-04-04 12:28:07 -05:00
dependabot[bot] 2c11b7a0f9
build(deps): bump thiserror from 1.0.57 to 1.0.58 (#573)
* build(deps): bump thiserror from 1.0.57 to 1.0.58

Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.57 to 1.0.58.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.57...1.0.58)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2024-04-04 23:42:37 +08:00
steviez a088364eb0
Use std::num::Saturating over saturating_add_assign!() (#523)
std::num::Saturating allows us to create integers that will override
the standard arithmetic operators to use saturating math. This removes
the need for a custom macro as well as reduces mental load as someone
only needs to remember that they want saturating math once.

This PR introduces std::num::Saturating integers to replace all
use of saturating_add_assign!() in the accounts-db crate
2024-04-04 10:14:53 -05:00
Jeff Washington (jwash) 527cad2b22
don't try to ancient pack already large storages (#548) 2024-04-04 10:05:13 -05:00
Tyera f4307ad2d3
Move remaining bits; partitioned epoch-rewards reorg, 5 of 5 (#553)
* Move epoch_rewards_hasher into submodule

* Move unit test into epoch_rewards_hasher sub-submodule

* Move integration-like tests into submodule

* Move compare functionality into sub-submodule
2024-04-03 23:20:49 +00:00
Tyera f6e02e669d
Bump h2 (#570) 2024-04-03 15:49:32 -06:00
Tyera 72c526b2bb
Move calculation methods; partitioned epoch-rewards reorg, 4 of 5 (#529)
* Add calculation sub-submodule

* Move calculation methods into sub-submodule

* Move unit tests into calculation sub-submodule
2024-04-03 14:01:00 -06:00
Jeff Washington (jwash) 854a5b4929
stop once we need 10 storages (#549) 2024-04-03 14:56:02 -05:00
Jeff Washington (jwash) f610e7a06a
rework handle_reclaims ReclaimResult (#563) 2024-04-03 13:47:58 -05:00
Tyera 65a24d5140
RPC sendTransaction: be more liberal in determining and setting last_valid_block_height for skip_preflight case (#483)
* RPC sendTransaction: if skip_preflight, use processed-commitment Bank for last_valid_block_height and sanitization

* Use nonce retry logic for skip_preflight transactions if blockhash was not found
2024-04-03 11:48:04 -06:00
Jeff Washington (jwash) 51c51ddf6d
cleanup `handle_reclaims` (#552)
get rid of `Option` on clean path
2024-04-03 11:46:33 -05:00
Brooks afa65c6690
Removes write version from StorableAccountsWithHashesAndWriteVersions (#561) 2024-04-03 12:41:20 -04:00
Andrew Fitzgerald 7b204e7d01
ConsumeWorker: collect and report bank waiting times (#477) 2024-04-03 11:01:31 -05:00
Brooks ce1f41e547
Removes write version from StorableAccounts (#542) 2024-04-03 10:21:11 -04:00
Jeff Washington (jwash) 57572d59c8
add scan_index for improving index generation (#524)
* add scan_index for improving index generation

* pr feedback

* rework some stuff from pr feedback

* get rid of redundant if

* deal with rent correctly
2024-04-03 09:19:01 -05:00
abcalphabet 0168e0ab69
add serialization to AeKey (#208)
* add serialization to AeKey

* make ElGamalKeypair/AeKey byte lengths public

* switch from/to_bytes to from

* tests for change logic

* variable names

* fix clippy on tests

* fix nit

Co-authored-by: samkim-crypto <skim13@cs.stanford.edu>

---------

Co-authored-by: samkim-crypto <skim13@cs.stanford.edu>
2024-04-03 10:50:37 +09:00
Tyera 5d53389fe4
Move distribution methods; partitioned epoch-rewards reorg, 3 of 5 (#528)
* Add distribution sub-submodule

* Move distribution methods to sub-submodule

* Move unit tests into distribution sub-submodule
2024-04-02 19:13:39 -06:00
Emanuele Cesena 64260fc831
Simd 129: alt_bn128 syscalls - simplified error code (#294)
* alt_bn128: simplify errors in sycalls (alt_bn128, compress, poseidon)

* add TODO for feature gate. remove validate from compress

* add feature gate

* fix one more error case

* all changes under feature gate

* revert removing from()

* return unexpected errors in lib

* add comment to remove error types, once the feature gate is activated

* remove unnecessary/impossible error

* fix mispelled comments
2024-04-03 09:09:54 +09:00
samkim-crypto 85c14b4e4f
[clap-v3-utils] Fix deprecation message of `is_valid_pubkey` and `is_valid_signer` to `allow_all()` (#531)
fix deprecation message of `is_valid_pubkey` and `is_valid_signer` to `allow_all()`
2024-04-03 07:16:53 +09:00
Brooks 4247a8a546
Archives storages directly (#503) 2024-04-02 18:43:38 +00:00
Jeff Washington (jwash) ccb09866b5
stop requiring data allocation to check for rent (#543) 2024-04-02 13:25:43 -05:00
HaoranYi 9ea627c16d
Recompute hash on load if default hash is stored for the account (#519)
recompute hash on load if default hash is stored for the account

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-04-02 13:10:18 -05:00
Lucas Steuernagel 9f8a478c51
Use `&str` instead of `String` in `add_builtin` (#539) 2024-04-02 14:36:13 -03:00
Ashwin Sekar a468ff2999
vote: add TowerSync ix (#365)
* vote: add TowerSync ix

* fork_id -> block_id
2024-04-02 10:02:10 -07:00
steviez 64765bf817
Introduce NodeConfig for parameters to Node type (#533)
The parameter list is already kind of long, so squash the parameters
into a config struct
2024-04-02 11:59:03 -05:00
Jeff Washington (jwash) c59143b980
add get_stored_account to append vec (#508)
* add get_stored_account to append vec

* Update accounts-db/src/append_vec.rs

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

* renames

* accountshash -> accounthash

---------

Co-authored-by: Brooks <brooks@prumo.org>
2024-04-02 11:39:11 -05:00
Jeff Washington (jwash) 90999017a4
no need to call handle_reclaims if reclaims was not populated (#527) 2024-04-02 11:22:49 -05:00
Brooks 01855eda43
Sets write version to 0 when storing accounts (#476) 2024-04-02 11:27:23 -04:00
Andrew Fitzgerald 65f54bec88
Add ProgramCacheUs to execute timings (#473) 2024-04-02 10:03:55 -05:00
Yueh-Hsuan Chiang e8159251e9
Enable accountsdb_scan_account_storage_no_bank tests for hot storage (#344)
Enable accountsdb_scan_account_storage_no_bank tests for hot storage.
2024-04-02 08:58:13 -05:00
Brooks a37b85c210
Reverts incorrectly renamed comment (#537) 2024-04-02 09:45:34 -04:00
Illia Bobyr 8cb7000973
loaded-programs: Use `Measure::end_as_us()` (#81)
It is a bit nicer API, compared to the `stop()/as_us()` pair.  Does not require the value to be `mut`.
2024-04-02 06:31:24 -07:00
Jon C 2643ae85c3
cli: Customize max sign attempts for deploy and write-buffer (#526)
* cli: Customize max sign attempts for deploy and write-buffer

* Update changelog

* Improve help message

* Fixup line break
2024-04-02 15:29:38 +02:00
Ryo Onodera 798cb561e1
Support running miri in ci (#534)
* Support running miri in ci

* fail fast...

* wait miri is still not stable?

* clean up

* fmt

* Move to Dockerfile
2024-04-02 19:25:51 +09:00
Joe C 005c1375f8
Program Runtime: Refactor `InvokeContext` out of `MessageProcessor::process_message` (#509) 2024-04-02 05:06:13 -05:00
samkim-crypto 025ed451c5
[keygen] Remove deprecated functions from the `grind` command (#490)
* disable deprecated functions

* replace `is_present` with `try_contains_id`

* use `try_get_word_count` and `try_get_language`

* replace `multiple_occurrences` with arg actions

* add `grind_parser`

* remove `values_of_t_or_exit`

* remove `deprecated` feature

* Update keygen/src/keygen.rs

Co-authored-by: Tyera <teulberg@gmail.com>

* change `GrindType::StartsEnds` to `GrindType::StartsAndEnds`

* comment on why `args.pop()` is safe

---------

Co-authored-by: Tyera <teulberg@gmail.com>
2024-04-02 11:11:05 +09:00
Tyera 16c684ef9f
Move sysvar submodule; reorg partitioned epoch rewards runtime code, 2 of 5 (#520)
* Add sysvar sub-submodule

* Move sysvar methods to sub-submodule

* Move unit test to sysvar sub-submodule

* Add new partitioned_epoch_rewards::sysvar method

* Remove superfluous method
2024-04-02 01:41:48 +00:00
Tyera c29a2392fc
Reorganize partitioned epoch rewards runtime code, 1 of 5 (#511)
* Add bank::partitioned_epoch_rewards submodule

* Move helper structs and types to submodule

* Move partitioned-rewards-specific Bank methods to submodule

* Move unit tests into submodule

* Update BankAbiTestWrapperNewer frozen_abi hash
2024-04-01 18:05:57 -06:00
Joe C 3f17532b11
Runtime: Core BPF Migration: Path to migrate a builtin to Core BPF (#408)
* runtime: core_bpf_migration: add migration path

* runtime: core_bpf_migration: add tests for migration path

* comments

* function name

* rent lamports

* bank operations ordering

* make migration method a bank method

* update deployment slot to current slot

* invoke loader deploy directly
2024-04-01 16:30:23 -05:00
Yueh-Hsuan Chiang b47a4ec74d
[TieredStorage] Make TieredStorage's Offset compatible with AccountsDB's offset (#74)
* [TieredStorage] Handles reduced-offset and offset conversion

* fix comment

---------

Co-authored-by: jeff washington <jeff.washington@solana.com>
2024-04-01 16:26:41 -05:00
Yueh-Hsuan Chiang 8153c52938
[TieredStorage] enum-based AccountsFileProvider (#457)
* [TieredStorage] enum-based AccountsFileProvider

* derive traits

* remove refs

---------

Co-authored-by: jeff washington <jeff.washington@solana.com>
2024-04-01 20:54:45 +00:00
Yueh-Hsuan Chiang a5aee48722
Rename append vec to accounts file for CurrentAncientAppendVec (#447) 2024-04-01 15:54:14 -05:00
Jeff Washington (jwash) d9dfe0f8ca
rework account load with check_and_get_loaded_account_shared_data (#506) 2024-04-01 19:48:17 +00:00
Brooks bc7b27472f
Refactors storage flushing when taking a snapshot (#485) 2024-04-01 13:27:29 -04:00