Commit Graph

25137 Commits

Author SHA1 Message Date
Joe C 03ef611f0c
program-runtime: hoist `RuntimeConfig` up to SVM (#630)
program-runtime: hoist `RuntimeConfig` out into SVM
2024-04-07 10:45:57 -05:00
Yihau Chen 01460ef5cc
remove InetAddr from streamer/src/sendmmsg.rs (#557)
* remove InetAddr from streamer/src/sendmmsg.rs

* add ref links

* use SocketAddr conversion directly
2024-04-07 00:35:31 +08:00
Justin Starry be09b497cb
changelog: add entry for new simulate tx replacement blockhash (#623) 2024-04-06 22:21:44 +08:00
Sammy Harris c207274e11
feat: include replaced blockhash in RPC simulation response (#380)
* feat: include replaced blockhash in RPC simulation response

* rename blockhash field to `replacement_blockhash`

* add tests to ensure replacement_blockhash is returning correctly

* fixed tests

* fixed tests again for real this time?
2024-04-06 17:27:10 +08:00
carllin de8e9e6850
Add all validators as entrypoint to local cluster (#567) 2024-04-05 20:38:13 -04:00
Lijun Wang b443cfb0c7
Show staked vs nonstaked packets sent down/throttled (#600)
* Show staked vs nonstaked packets sent down

* add metrics on throttled staked vs non-staked
2024-04-05 13:49:23 -07:00
Brooks ca24f6a44d
Adds metrics for how long it takes to store into the accounts read cache (#610) 2024-04-05 16:25:31 -04:00
dependabot[bot] 948caebfa9
build(deps): bump chrono from 0.4.34 to 0.4.37 (#603)
* build(deps): bump chrono from 0.4.34 to 0.4.37

Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.34 to 0.4.37.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.34...v0.4.37)

---
updated-dependencies:
- dependency-name: chrono
  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

* update deprecated functions

* add test_unix_timestamp_to_string

---------

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>
Co-authored-by: yihau <yihau.chen@icloud.com>
2024-04-05 19:06:52 +00:00
Brooks e09541a762
Adds metrics for how long it takes to evict from the accounts read cache (#585) 2024-04-05 13:36:36 -04:00
Tyera 9253c465d1
Persist EpochRewards sysvar (#572)
* Persist EpochRewards sysvar between reward intervals

* Adjust initial EpochRewards balance to ensure it is not debited out of existence

* Set EpochRewards::active = false at end of distribution

* Fix tests

* Extend test to 2 epochs, assert sysvar still exists

* Stop adjusting EpochRewards balance based on rewards

* Fix tests

* Review suggestions
2024-04-05 10:13:50 -06:00
Jeff Washington (jwash) de9e999335
group remove_dead_accounts by slot (#578) 2024-04-05 10:38:11 -05:00
Alexander Meißner 55c05c5ea5
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
2024-04-05 13:03:18 +02:00
Yihau Chen 562254ef56
remove InetAddr from streamer/src/recvmmsg.rs (#558)
* remove InetAddr from streamer/src/recvmmsg.rs

* remove 'allow deprecated'

* add ref link
2024-04-05 16:51:30 +08:00
Ryo Onodera 0b9c6379b3
Introduce SchedulingStateMachine for unified scheduler (#129)
* Introduce SchedulingStateMachine

* Apply all typo fixes from code review

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

* Update word wrapping

* Clarify Token::assume_exclusive_mutating_thread()

* Use slice instead of &Vec<_>

* Improve non-const explanation

* Document consecutive readonly rescheduling opt.

* Make test_gradual_locking terminate for miri

* Avoid unnecessary Task::clone()

* Rename: lock_{status,result} and no attempt_...()

* Add safety comment for get_account_locks_unchecked

* Reduce and comment about Page::blocked_tasks cap.

* Document SchedulingStateMachine::schedule_task()

* Add justification of closure in create_task

* Use the From trait for PageUsage

* Replace unneeded if-let with .expect()

* Add helpful comments for peculiar crossbeam usage

* Fix typo

* Make bug-bounty-exempt statement more clear

* Add test_enfoced_get_account_locks_verification

* Fix typos...

* Big rename: Page => UsageQueue

* Document UsageQueueLoader

* Various minor cleanings for beautifier diff

* Ensure reinitialize() is maintained for new fields

* Remove uneeded impl Send for TokenCell & doc upd.

* Apply typo fixes from code review

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

* Merge similar tests into one

* Remove test_debug

* Remove assertions of task_index()

* Fix UB in TokenCell

* Make schedule_task doc comment simpler

* Document deschedule_task

* Simplify unlock_usage_queue() args

* Add comment for try_unblock() -> None

* Switch to Option<Usage> for fewer assert!s

* Add assert_matches!() to UsageQueue methods

* Add panicking test case for ::reinitialize()

* Use UsageFromTask

* Rename: LockAttempt => LockContext

* Move locking and unlocking methods to usage queue

* Remove outdated comment...

* Remove redundant fn: pop_unblocked_usage_from_task

* Document the index of task

* Clarifty comment a bit

* Update .current_usage inside try_lock()

* Use inspect_err to simplify code

* fix ci...

* Use ()...

* Rename: schedule{,_next}_unblocked_task()

* Rename: {try_lock,unlock}_{for_task,usage_queues}

* Test solana-unified-scheduler-logic under miri

* Test UB to illustrate limitation of TokenCell

* Test UB of using multiple tokens at the same time

---------

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2024-04-05 08:58:33 +09:00
abcalphabet 855a0c1a92
ElGamal: add From impls; deprecate from/to_bytes (#246)
* ElGamal: add From impls; deprecate from/to_bytes

* variable names
2024-04-05 08:47:07 +09:00
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