Commit Graph

25154 Commits

Author SHA1 Message Date
Jeff Washington (jwash) 4ed5b4c083
removed LoadedAccount::compute_hash (#683) 2024-04-09 13:29:03 -05:00
dependabot[bot] 4bbd535b08
build(deps): bump ctrlc from 3.4.2 to 3.4.4 (#672)
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.4.2 to 3.4.4.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.4.2...3.4.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 00:49:25 +08:00
Harry Whelchel eacdb2b9db
Fixes typo in validator requirements (#680) 2024-04-09 10:46:53 -05:00
Dmitri Makarov 9552b1ad3c
SVM: Add specification document (#643)
* SVM: Add specification document

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

* Update svm/doc/spec.md

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>

---------

Co-authored-by: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com>
2024-04-09 07:25:18 -07:00
Jeff Washington (jwash) c0be86d0e1
implement scan_pubkeys for hot storage (#666) 2024-04-09 07:47:26 -05:00
Jeff Washington (jwash) 8e0a55fe64
add file_provider to accounts_db (#665) 2024-04-08 17:58:01 -05:00
Brooks 6fedfe5a4d
Evicts from the accounts read cache in the background (#575) 2024-04-08 17:10:15 -04:00
Lucas Steuernagel e01670135f
Remove `must_replace` parameter from `add_builtin_account` (#662) 2024-04-08 17:57:15 -03:00
Jeff Washington (jwash) b9487f5263
add get_account_sizes (#661) 2024-04-08 15:41:38 -05:00
Jeff Washington (jwash) 294d9d7e50
intset for SlotOffsets (#656) 2024-04-08 15:10:46 -05:00
Joe C caa18a528f
cli tests: correct program data account test check (#660) 2024-04-08 14:52:52 -05:00
HaoranYi 287d0d2582
Remove reclaim param for store_accounts_frozen (#618)
remove reclaim param for store_accounts_frozen

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-04-08 14:28:13 -05:00
steviez 191a997c5f
Make thread id a tag instead of field in BankingStage metrics (#644)
Making the id a tag instead of a field will allow group-by operations on
id in chronograph
2024-04-08 13:15:52 -05:00
Jeff Washington (jwash) 0af9aaa573
handle reclaimed offsets as a batch (#652) 2024-04-08 12:10:38 -05:00
steviez 923e303acb
Move recv timer to start before crossbream receiver recv_timeout() (#642)
The timer starting after recv_timeout() means the measured time will NOT
include time spent waiting for the first PacketBatch from the receiver.
2024-04-08 11:28:00 -05:00
Jeff Washington (jwash) 0025ecd5af
append vec: remove_account->remove_accounts (#607) 2024-04-08 09:30:03 -05:00
Wen 312f725f1e
wen_restart: Find the bank hash of the heaviest fork, replay if necessary. (#420)
* Find the bank hash of the heaviest fork, replay if necessary.

* Make it more explicit how heaviest fork slot is selected.

* Use process_single_slot instead of process_blockstore_from_root, the latter
may re-insert banks already frozen.

* Put BlockstoreProcessError into the error message.

* Check that all existing blocks link to correct parent before replay.

* Use the default number of threads instead.

* Check whether block is full and other small fixes.

* Fix root_bank and move comments to function level.

* Remove the extra parent link check.
2024-04-07 16:17:52 -07:00
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