Commit Graph

24215 Commits

Author SHA1 Message Date
Brooks e9135e2211
clippy: Remove unused import (#34050) 2023-11-13 17:25:11 -05:00
Brooks 725ab37bf4
clippy: Replaces .get(0) with .first() (#34048) 2023-11-13 17:22:17 -05:00
Jeff Washington (jwash) a25eae41fc
stop page aligning shrunk append vecs (#34016)
* stop page aligning shrunk append vecs

* fix build

* fix test by removing aligned alive page bytes asserts

* rm dup assert

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-11-13 14:22:26 -06:00
Yueh-Hsuan Chiang 2b9054a60e
[TieredStorage] HotStorageReader::get_account_offset (#34031)
#### Problem
HotStorageReader currently not yet has an API to obtain account_offset

#### Summary of Changes
This PR adds HotStorageReader::get_account_offset() which takes
IndexOffset and returns AccountOffset.

#### Test Plan
A new unit-test is included in this PR.
2023-11-13 12:07:09 -08:00
Yueh-Hsuan Chiang 3db7eaf1fc
[TieredStorage] Improve param naming of IndexBlockFormat (#34033)
#### Problem
In IndexBlockFormat, both `IndexOffset` and `AccountOffset` parameters
are named `offset` in some functions which could be confusing.

#### Summary of Changes
Renamed `offset` to `index_offset` and `account_offset` to improve
readability.
2023-11-13 12:05:25 -08:00
dependabot[bot] 47a98ebf0b
build(deps): bump toml from 0.8.2 to 0.8.8 (#33966)
Bumps [toml](https://github.com/toml-rs/toml) from 0.8.2 to 0.8.8.
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.2...toml-v0.8.8)

---
updated-dependencies:
- dependency-name: toml
  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>
2023-11-13 17:16:25 +00:00
dependabot[bot] da09042de5
build(deps): bump fs-err from 2.9.0 to 2.10.0 (#34035)
* build(deps): bump fs-err from 2.9.0 to 2.10.0

Bumps [fs-err](https://github.com/andrewhickman/fs-err) from 2.9.0 to 2.10.0.
- [Changelog](https://github.com/andrewhickman/fs-err/blob/main/CHANGELOG.md)
- [Commits](https://github.com/andrewhickman/fs-err/compare/2.9.0...2.10.0)

---
updated-dependencies:
- dependency-name: fs-err
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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>
2023-11-13 14:25:14 +00:00
dependabot[bot] 443989f329
build(deps): bump rpassword from 7.2.0 to 7.3.1 (#34036)
* build(deps): bump rpassword from 7.2.0 to 7.3.1

Bumps [rpassword](https://github.com/conradkleinespel/rpassword) from 7.2.0 to 7.3.1.
- [Release notes](https://github.com/conradkleinespel/rpassword/releases)
- [Commits](https://github.com/conradkleinespel/rpassword/compare/v7.2.0...v7.3.1)

---
updated-dependencies:
- dependency-name: rpassword
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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>
2023-11-13 14:24:46 +00:00
dependabot[bot] 4e35e2dce5
build(deps): bump serde_yaml from 0.9.25 to 0.9.27 (#34037)
* build(deps): bump serde_yaml from 0.9.25 to 0.9.27

Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.25 to 0.9.27.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.25...0.9.27)

---
updated-dependencies:
- dependency-name: serde_yaml
  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>
2023-11-13 14:24:14 +00:00
dependabot[bot] f2719e58e4
build(deps): bump libc from 0.2.149 to 0.2.150 (#34038)
* build(deps): bump libc from 0.2.149 to 0.2.150

Bumps [libc](https://github.com/rust-lang/libc) from 0.2.149 to 0.2.150.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.149...0.2.150)

---
updated-dependencies:
- dependency-name: libc
  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>
2023-11-13 14:23:54 +00:00
Andrew Fitzgerald 81a007b3c8
TransactionScheduler: CLI and hookup for central-scheduler (#33890) 2023-11-13 22:18:54 +08:00
Brooks ae30572585
Use AtomicAppendVecId type alias in verify_and_unarchive_snapshot() (#34019) 2023-11-12 05:01:17 +00:00
Ashwin Sekar e457c02879
add merkle root meta column to blockstore (#33979)
* add merkle root meta column to blockstore

* pr feedback: remove write/reads to column

* pr feedback: u64 -> u32 + revert

* pr feedback: fec_set_index u32, use Self::Index

* pr feedback: key size 16 -> 12
2023-11-11 21:14:18 -05:00
Brooks 04e4efd8ae
Puts create_tmp_accounts_dir_for_tests() behind DCOU (#34022) 2023-11-11 00:44:23 +00:00
steviez b91da2242d
Change Blockstore max_root from RwLock<Slot> to AtomicU64 (#33998)
The Blockstore currently maintains a RwLock<Slot> of the maximum root
it has seen inserted. The value is initialized during
Blockstore::open() and updated during calls to Blockstore::set_roots().
The max root is queried fairly often for several use cases, and caching
the value is cheaper than constructing an iterator to look it up every
time.

However, the access patterns of these RwLock match that of an atomic.
That is, there is no critical section of code that is run while the
lock is head. Rather, read/write locks are acquired in order to read/
update, respectively. So, change the RwLock<u64> to an AtomicU64.
2023-11-10 17:27:43 -06:00
Brooks 60d267a548
Adds documentation to verify_and_unarchive_snapshots() (#34020) 2023-11-10 21:10:51 +00:00
Ashwin Sekar b5256997f8
refactor: GossipDuplicateConfirmed/cluster_confirmed -> DuplicateConf… (#34012)
refactor: GossipDuplicateConfirmed/cluster_confirmed -> DuplicateConfirmed
2023-11-10 14:47:42 -05:00
Brooks 3c71f859e1
Uses fold+reduce for handling duplicate pubkeys during index generation (#34011) 2023-11-10 14:32:24 -05:00
Brooks 69ab8a8234
Uses IntSet for uncleaned slots from visit_duplicate_pubkeys_during_startup() (#34009) 2023-11-10 11:29:13 -05:00
dependabot[bot] ab0cf45a1b
build(deps): bump wasm-bindgen from 0.2.87 to 0.2.88 (#33999)
* build(deps): bump wasm-bindgen from 0.2.87 to 0.2.88

Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.87 to 0.2.88.
- [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/compare/0.2.87...0.2.88)

---
updated-dependencies:
- dependency-name: wasm-bindgen
  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>
2023-11-10 13:29:57 +00:00
dependabot[bot] 661aa303d2
build(deps): bump js-sys from 0.3.64 to 0.3.65 (#34000)
* build(deps): bump js-sys from 0.3.64 to 0.3.65

Bumps [js-sys](https://github.com/rustwasm/wasm-bindgen) from 0.3.64 to 0.3.65.
- [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>
2023-11-10 13:29:42 +00:00
dependabot[bot] 6d9ed2c5c7
build(deps): bump serde_json from 1.0.107 to 1.0.108 (#34001)
* build(deps): bump serde_json from 1.0.107 to 1.0.108

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.107 to 1.0.108.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.107...v1.0.108)

---
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>
2023-11-10 13:29:23 +00:00
dependabot[bot] 985ff402fb
build(deps): bump quinn-proto from 0.10.5 to 0.10.6 (#34002)
* build(deps): bump quinn-proto from 0.10.5 to 0.10.6

Bumps [quinn-proto](https://github.com/quinn-rs/quinn) from 0.10.5 to 0.10.6.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/commits)

---
updated-dependencies:
- dependency-name: quinn-proto
  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>
2023-11-10 13:28:59 +00:00
vadorovsky 67f8daf6e9
chore: Update light-poseidon to 0.2.0 (#33923)
That new release contains an important change which prevents a
potential DDoS.

* Lightprotocol/light-poseidon#32

Invoking `from_bytes_be` function light-poseidon 0.1.1 inverts all
the inputs before performing a check whether their length exceeds
the modulus of the prime field. Therefore, it was prone to an
attack, where a mailicious user could submit long byte slices just
to DDoS the validator, being stuck on inverting large byte sequences.

The update and mentioned change fixes the same issue as #33363 aims
to address.

The new release contains also few other less important changes like:

* Lightprotocol/light-poseidon#37
* Lightprotocol/light-poseidon#38
* Lightprotocol/light-poseidon#39
2023-11-10 16:00:10 +09:00
steviez 1057ba8406
Use is_trusted bool in insert_shreds() instead manually adjusting root (#34010)
The test_duplicate_with_pruned_ancestor test needs to get around a
limitation where the shreds with a parent older than the latest root are
discarded. The previous approach manually adjusted the root value in the
blockstore; this is not ideal in that it is fiddling with the inner
working of Blockstore.

So, use the is_trusted argument in Blockstore::insert_shreds(); setting
is_trusted=true bypasses the sanity checks (including the parent >=
latest root check).
2023-11-09 22:56:48 -06:00
Pankaj Garg 59eb55990c
Move filter_executable_program_accounts to bank.rs (#34004) 2023-11-09 14:40:04 -08:00
Brooks 9f25f67e60
Simplifies adding uncleaned pubkeys during index generation (#34007) 2023-11-09 16:06:15 -05:00
Brooks a96be5d2f0
Uses IntSet for uncleaned roots during index generation (#34008) 2023-11-09 15:04:19 -05:00
Tyera 28e08ac141
Add Blockstore::get_rooted_block_with_entries method (#33995)
* Add helper structs to hold block and entry summaries

* Add Blockstore::get_rooted_block_with_entries and dedupe innards

* Review comments
2023-11-09 10:03:56 -07:00
Alexander Meißner a9509f56b7
Feature - Epoch boundary recompilation phase (#33477)
* Adds LoadedPrograms::upcoming_environments.

* Moves LoadedPrograms::prune_feature_set_transition() into LoadedPrograms::prune().

* Adds parameter recompile to Bank::load_program().

* Sets latest_root_slot/epoch and environments in Bank::finish_init().

* Removes FEATURES_AFFECTING_RBPF list.

* Adjusts test_feature_activation_loaded_programs_recompilation_phase().
2023-11-09 13:10:59 +01:00
Yueh-Hsuan Chiang 874fae507f
[TieredStorage] Make HotStorageReader use AccountOffset type (#33964)
#### Problem
#33927 introduced a new type AccountOffset, but HotStorageReader
still uses `usize` to access accounts.

#### Summary of Changes
This PR makes HotStorageReader use the new AccountOffset type.
2023-11-08 21:58:44 -08:00
steviez 230779d459
Revert " Remove redundant bounds check from getBlock and getBlockTime… (#33996)
Revert " Remove redundant bounds check from getBlock and getBlockTime (#33901)"

This reverts commit 03a456e7bb.
2023-11-08 18:16:51 -06:00
Brooks bba6ea2d69
Returns IntMap from select_candidates_by_total_usage() (#33976) 2023-11-08 16:15:51 -05:00
behzad nouri 783f136214
expands transport configs in turbine QUIC endpoint (#33864) 2023-11-08 20:28:19 +00:00
behzad nouri 3ac2507d36
adds keep-alive-interval to repair QUIC transport config (#33866)
QUIC connections may timeout due to infrequent repair requests. The commit
configures keep_alive_interval and max_idle_timeout to avoid timeouts.
2023-11-08 20:09:23 +00:00
Brooks 7cb83bc491
Adds `S` to HashMap/HashSet impls of Contains (#33973) 2023-11-08 15:08:33 -05:00
dependabot[bot] 06884a044d
build(deps): bump light-poseidon from 0.1.1 to 0.1.2 (#33988)
* build(deps): bump light-poseidon from 0.1.1 to 0.1.2

Bumps [light-poseidon](https://github.com/Lightprotocol/light-poseidon) from 0.1.1 to 0.1.2.
- [Release notes](https://github.com/Lightprotocol/light-poseidon/releases)
- [Commits](https://github.com/Lightprotocol/light-poseidon/compare/v0.1.1...v0.1.2)

---
updated-dependencies:
- dependency-name: light-poseidon
  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>
2023-11-08 18:47:12 +00:00
dependabot[bot] 32792d8259
build(deps): bump syn from 2.0.38 to 2.0.39 (#33987)
* build(deps): bump syn from 2.0.38 to 2.0.39

Bumps [syn](https://github.com/dtolnay/syn) from 2.0.38 to 2.0.39.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.38...2.0.39)

---
updated-dependencies:
- dependency-name: syn
  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>
2023-11-08 18:46:52 +00:00
dependabot[bot] e5d3dbe2fa
build(deps): bump serde from 1.0.190 to 1.0.192 (#33986)
* build(deps): bump serde from 1.0.190 to 1.0.192

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.190 to 1.0.192.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.190...v1.0.192)

---
updated-dependencies:
- dependency-name: serde
  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>
2023-11-08 18:46:28 +00:00
dependabot[bot] 4f1d9e00fd
build(deps): bump index_list from 0.2.7 to 0.2.11 (#33985)
* build(deps): bump index_list from 0.2.7 to 0.2.11

Bumps [index_list](https://github.com/Fairglow/index-list) from 0.2.7 to 0.2.11.
- [Release notes](https://github.com/Fairglow/index-list/releases)
- [Commits](https://github.com/Fairglow/index-list/compare/v0.2.7...v0.2.11)

---
updated-dependencies:
- dependency-name: index_list
  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>
2023-11-08 18:46:09 +00:00
Lijun Wang 69cec7e7b7
Remove RwLock on BlockNotifier (#33981) 2023-11-08 10:27:50 -08:00
galactus 7cdfba9259
Display error message while laoding geyser plugins (#33990) 2023-11-08 18:16:42 +00:00
steviez 03a456e7bb
Remove redundant bounds check from getBlock and getBlockTime (#33901)
JsonRpcRequestProcessor::check_blockstore_root() contained some logic
that performed duplicate sanity checking on a Blockstore fetch result.
The checking involved creating rocksdb iterators, which has non-trivial
overhead.

This PR removes the duplicate checking, and also adds comments to help
reason about how JsonRpcRequestProcessor interprets the Blockstore
result.
2023-11-08 12:09:10 -06:00
steviez 73815aee51
Move and rename ledger services from core to ledger (#33947)
These services currently live in core/; however, they operate on the
ledger. Mores so, these two services operate on the blockstore only,
and not necessarily the entire ledger. So, it makes sense to move these
services out of core and into ledger. We've recently been doing similar
changes with breaking things out into individual crates in order to
reduce the scope of core.

So, this change moves the services from core/ to ledger/, and replaces
ledger with blockstore.
2023-11-08 11:58:31 -06:00
Illia Bobyr 8c5b5f18be
scripts/cargo-clippy.sh: Extract our non-trivial `cargo clippy` command (#33982)
CI uses a number of parameters when running `cargo clippy`.  Repeating
the same command manually requires some copy/pasting.  It is easier when
there is a common script that can be run by everyone.
2023-11-08 02:50:38 -08:00
Yihau Chen 5efba1fb3a
ci: add the ability to use GCS backend for sccache (#33967) 2023-11-08 11:03:35 +08:00
Brooks 29b21253ec
changelog: Uses fastboot by default (#33900) 2023-11-07 16:00:09 -05:00
Brooks 6f213c38aa
Removes Default from RollingBitField (#33969) 2023-11-07 15:58:52 -05:00
dependabot[bot] fdab44f768
build(deps): bump openssl from 0.10.57 to 0.10.59 (#33952)
* build(deps): bump openssl from 0.10.57 to 0.10.59

Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.57 to 0.10.59.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.57...openssl-v0.10.59)

---
updated-dependencies:
- dependency-name: openssl
  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>
2023-11-07 13:52:49 -07:00
dependabot[bot] 29b4ba0dc1
build(deps): bump indexmap from 2.0.2 to 2.1.0 (#33954)
* build(deps): bump indexmap from 2.0.2 to 2.1.0

Bumps [indexmap](https://github.com/bluss/indexmap) from 2.0.2 to 2.1.0.
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/bluss/indexmap/compare/2.0.2...2.1.0)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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>
2023-11-07 13:51:24 -07:00