Commit Graph

3301 Commits

Author SHA1 Message Date
Kevin Heavey 76502b40d0
program: remove unused serde_json dep (#800)
remove unused serde_json dep from solana-program
2024-04-14 16:08:22 -06:00
Justin Starry 09241ae9c3
Use reserved account keys list to restrict tx write locks (#541)
* Plumb through reserved account keys set

* Plumb through tests
2024-04-13 09:37:58 +08:00
Ashwin Sekar 499d36e354
vote: update benches and tests to TowerSync (#725) 2024-04-11 22:15:02 -07:00
dependabot[bot] f6cac1e20f
build(deps): bump anyhow from 1.0.81 to 1.0.82 (#749)
* build(deps): bump anyhow from 1.0.81 to 1.0.82

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.81 to 1.0.82.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82)

---
updated-dependencies:
- dependency-name: anyhow
  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-11 16:01:46 +00:00
Kevin Heavey e04dbaa305
move ThreadExecuteTimings to solana-ledger (#690)
* move ThreadExecuteTimings to solana-ledger
* run cargo-for-all-lock-files tree
* move ThreadExecuteTimings below BatchExecutionTiming
* remove ReplaySlotStats to solana-ledger
* remove  `#![recursion_limit = "2048"]` from program-runtime
2024-04-11 17:59:16 +02:00
Yihau Chen 0e6d42e613
bump nix to 0.28.0 (#628)
* bump nix to 0.28.0

* enable 'socket' for net-utils

* enable 'signal' for install

* enable 'user' for perf

* enable 'net' for streamer
2024-04-11 12:03:23 +08:00
Ashwin Sekar c4734ad127
vote: plumb TowerSync ix (#584) 2024-04-10 20:33:45 -07:00
ripatel-fd 16efe510cb
Don't panic vote program if epoch number overflows (#730)
Helps with fuzzing

Co-authored-by: Richard Patel <ripatel@jumptrading.com>
2024-04-11 02:56:19 +00:00
Alessandro Decina 55ab7fadbc
quic: use smallvec to aggregate chunks, save 1 alloc per packet (#735)
quic: use smallvec, save one allocation per packet

Use smallvec to hold chunks. Streams are packet-sized so we don't expect
them to have many chunks. This saves us an allocation for each packet.
2024-04-11 12:25:35 +10:00
dependabot[bot] 51f99727b9
build(deps): bump quote from 1.0.35 to 1.0.36 (#706)
* build(deps): bump quote from 1.0.35 to 1.0.36

Bumps [quote](https://github.com/dtolnay/quote) from 1.0.35 to 1.0.36.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.35...1.0.36)

---
updated-dependencies:
- dependency-name: quote
  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-10 23:49:56 +08:00
Kevin Heavey ff8a25b97f
svm: move bpf-loader-program to dev-dependencies (#711) 2024-04-10 10:22:51 -05:00
Kevin Heavey d06e3e95cb
program-test: move test-case to dev-dependencies (#710) 2024-04-10 10:22:28 -05:00
Justin Starry 72ee270943
Update cargo metadata to Anza (#635) 2024-04-10 14:29:48 +08:00
Tyera 2470b45468
Check EpochRewards::active within the Stake Program (#617)
* Add new StakeError variant

* Add closure to return error if EpochRewards::active

* Use error_during_epoch_rewards for Instructions that mutate stake accounts

* Use try instead of manually matching Ok/Err

* Consolidate error_during_epoch_rewards check

* Add new test helper

* Add test demonstrating which ix return StakeError::EpochRewardsActive

* Remove single-use fn
2024-04-09 17:29:50 -06:00
Lucas Steuernagel 4753a8aefa
Move `add_builtin` to SVM (#547) 2024-04-09 16:55:09 -03: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
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
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
Joe C 526979d589
program-runtime: hoist `MessageProcessor` up to SVM (#586) 2024-04-04 18:20:01 -05:00
Lijun Wang 2b0391049d
transaction performance tracking -- streamer stage (#257)
* transaction performance tracking -- streamer stage
2024-04-04 13:19:13 -07: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
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
Tyera f6e02e669d
Bump h2 (#570) 2024-04-03 15:49:32 -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
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
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
steviez 79e316eb56
Reduce the default number of IP echo server threads (#354)
The IP echo server currently spins up a worker thread for every thread
on the machine. Observing some data for nodes,
- MNB validators and RPC nodes look to get several hundred of these
  requests per day
- MNB entrypoint nodes look to get 2-3 requests per second on average

In both instances, the current threadpool is severely overprovisioned
which is a waste of resources. This PR plumnbs a flag to control the
number of worker threads for this pool as well as setting a default of
two threads for this server. Two threads allow for one thread to always
listen on the TCP port while the other thread processes requests
2024-04-01 10:24:59 -05:00
dependabot[bot] 92b09e6791
build(deps): bump anyhow from 1.0.80 to 1.0.81 (#516)
* build(deps): bump anyhow from 1.0.80 to 1.0.81

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.80 to 1.0.81.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.80...1.0.81)

---
updated-dependencies:
- dependency-name: anyhow
  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-01 21:03:07 +08:00
sakridge e0e659680a
Remove duplicated token ids and use a shared inline-spl crate (#456) 2024-04-01 14:31:04 +02:00
dependabot[bot] 3c8da0dbea
build(deps): bump serde_json from 1.0.114 to 1.0.115 (#517)
* build(deps): bump serde_json from 1.0.114 to 1.0.115

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.114 to 1.0.115.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.114...v1.0.115)

---
updated-dependencies:
- dependency-name: serde_json
  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-01 18:53:10 +08:00
dependabot[bot] 43e70dbe79
build(deps): bump js-sys from 0.3.68 to 0.3.69 (#263)
* build(deps): bump js-sys from 0.3.68 to 0.3.69

Bumps [js-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.68 to 0.3.69.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

---
updated-dependencies:
- dependency-name: js-sys
  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-01 01:54:49 +08:00
dependabot[bot] 725518ebad
build(deps): bump strum from 0.24.0 to 0.24.1 (#38)
* build(deps): bump strum from 0.24.0 to 0.24.1

Bumps [strum](https://github.com/Peternator7/strum) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum
  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-01 01:49:40 +08:00
Ryo Onodera ae327c0156
Bump blake3 from v1.5.0 to v1.5.1 (#488) 2024-03-29 15:30:42 +09:00
Joe C b9a998a69b
config: deprecate date instructions (#465) 2024-03-28 13:41:09 -05:00
Tyera ecb4f62887
Simd 118: extend EpochRewards sysvar (#428)
* Update EpochRewards sysvar

* Update Clone trait

* Update doctests

* Update bank to new sysvar fields

* Update runtime tests

* Update syscall test

* Update tests

* Clean up doctest EpochRewards construction
2024-03-27 19:24:06 -06:00
Kirill Fomichev ba9c25c41e
prioritization fee cache: remove lru crate (#30) 2024-03-27 11:09:17 -06:00
Brooks 8e37ad7665
Removes unused dependencies from accounts-db crate (#416) 2024-03-26 09:30:06 -04:00
Pankaj Garg 91b1ee3df6
Fix: deploy program on last slot of epoch during environment change (#101)
* Fix: deploy program on last slot of epoch during environment change

* solana-runtime: deploy at last epoch slot test

* disable deployment of sol_alloc_free

* Move tx-batch-constructor to its own function

* use new_from_cache

---------

Co-authored-by: Alessandro Decina <alessandro.d@gmail.com>
2024-03-22 07:43:28 -07:00
Alessandro Decina 981881544c
runtime: do fewer syscalls in remap_append_vec_file (#336)
* runtime: do fewer syscalls in remap_append_vec_file

Use renameat2(src, dest, NOREPLACE) as an atomic version of if
statx(dest).is_err() { rename(src, dest) }.

We have high inode contention during storage rebuild and this saves 1
fs syscall for each appendvec.

* Address review feedback
2024-03-21 14:28:23 +11:00
HaoranYi 0f8f8cd970
Revert deprecate executable feature (#309)
* revert deprecate executable feature

* add native loader account transfer test

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2024-03-20 10:54:15 -05:00
Jon C 261b3e9ee7
CI: Add windows clippy job and fix clippy errors (#330)
* CI: Run clippy on windows

* Update cargo-clippy-before-script.sh for Windows

* Pacify clippy
2024-03-20 13:21:00 +01:00
Ashwin Sekar 228413ca8a
vote: reuse ff to gate tvc constant update from 8 -> 16 (#322) 2024-03-19 22:26:13 +00:00
Ashwin Sekar b27c80a920
vote: deprecate unused legacy vote tx plumbing (#274) 2024-03-15 22:21:52 -07:00
Tyera 7f959509ed
Clean up require_rent_exempt_split_destination feature (#253)
* Clean up require_rent_exempt_split_destination feature

* Clean up comment
2024-03-15 13:36:31 -06:00
Jon C e93854cc33
deps: Update base64 to 0.22 (#225)
* deps: Update base64 to 0.22

* Add changelog entry
2024-03-13 20:39:45 +01:00
dependabot[bot] 91bff85ffc
build(deps): bump http from 0.2.11 to 0.2.12 (#85)
* build(deps): bump http from 0.2.11 to 0.2.12

Bumps [http](https://github.com/hyperium/http) from 0.2.11 to 0.2.12.
- [Release notes](https://github.com/hyperium/http/releases)
- [Changelog](https://github.com/hyperium/http/blob/v0.2.12/CHANGELOG.md)
- [Commits](https://github.com/hyperium/http/compare/v0.2.11...v0.2.12)

---
updated-dependencies:
- dependency-name: http
  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-03-13 17:37:40 +08:00
steviez f8bb98b5f4
Move default value for --rpc-pubsub-notification-threads to CLI (#158)
The default value was previously being determined down where the thread
pool is being created. Providing a default value at the CLI level is
consistent with other args, and gives an operator better visibility into
what the default will actually be
2024-03-12 16:11:44 -05:00
dependabot[bot] 5f66165186
build(deps): bump proc-macro2 from 1.0.78 to 1.0.79 (#203)
* build(deps): bump proc-macro2 from 1.0.78 to 1.0.79

Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.78 to 1.0.79.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.78...1.0.79)

---
updated-dependencies:
- dependency-name: proc-macro2
  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-03-12 23:08:28 +08:00
Brooks aaf3a91a95
Removes redundant imports (#193) 2024-03-12 14:25:59 +08:00