Commit Graph

24188 Commits

Author SHA1 Message Date
Yueh-Hsuan Chiang d58db6e255
Improve formatting in test_hot_storage_get_account_offset_and_address() (#34071)
#### Problem
#34032 mentioned nice-to-have a formatting improvement that
can improve the readability. 

#### Summary of Changes
Improve the code formatting in test_hot_storage_get_account_offset_and_address().
2023-11-15 11:25:18 -08:00
behzad nouri ba0a49b436
propagates the new contact-info through gossip (#34092)
Working towards migrating from legacy contact-info to the new
contact-info:
https://github.com/solana-labs/solana/pull/29596
2023-11-15 19:02:21 +00:00
Brooks 67dab71e82
Uses `RENT_EXEMPT_RENT_EPOCH` to mark account as rent exempt (#34090) 2023-11-15 18:13:18 +00:00
Lijun Wang b5659af546
Fix geyser plugin unload crash (#34026)
Explicit ordering of the drop of Library and Boxed<dyn GeyserPlugin>: drop the latter explicitly first to avoid crash.
2023-11-15 10:11:01 -08:00
Ashwin Sekar 693d5768c8
blockstore: make merkle root Optional in MerkleRootMeta column (#34091) 2023-11-15 13:09:18 -05:00
Alexander Meißner ffa462dd3a
Cleanup - Feature gate of `delay_visibility_of_program_deployment` (#34087)
* Cleans up feature gate of delay_visibility_of_program_deployment.

* Removes programs_updated_only_for_global_cache.
2023-11-15 18:29:31 +01:00
Alexander Meißner d93280c287
Cleanup - Feature gate of `limit_max_instruction_trace_length` (#34085)
Cleans up feature gate of limit_max_instruction_trace_length.
2023-11-15 17:51:10 +01:00
Alexander Meißner 48ed70a8d8
Cleanup - Feature gate of `disable_builtin_loader_ownership_chains` (#34083)
* Cleans up feature gate of disable_builtin_loader_ownership_chains.
2023-11-15 17:17:31 +01:00
dependabot[bot] f005075369
build(deps): bump proptest from 1.3.1 to 1.4.0 (#34073)
Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/proptest-rs/proptest/releases)
- [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/proptest-rs/proptest/compare/v1.3.1...v1.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-15 13:42:22 +00:00
Alessandro Decina d009d7304a
cpi: fix capacity check in update_caller_account (#34064)
reserve(additional) reserves additional bytes on top of the current _length_
not capacity. Before this fix we could potentially reserve less capacity than
required.
2023-11-15 22:42:12 +11:00
Yueh-Hsuan Chiang 7fd13c0cd2
[TieredStorage] OwnersBlock (#34052)
#### Problem
A TieredStorage file has three types of block:  accounts block, index block,
and owner block, but implementation of the TieredStorage OwnersBlock
is missing in the current master.

#### Summary of Changes
This PR implements OwnersBlock which stores a set of owners' addresses
in a compact but efficient way.

#### Test Plan
A new unit-test is included in this PR.
2023-11-15 01:51:13 -08:00
Ashwin Sekar fb76b4cb6c
reduce locking in propagated check for VoteStateUpdate (#33997) 2023-11-15 01:24:30 -05:00
Yueh-Hsuan Chiang eb7e68f029
[TieredStorage] HotStorageReader::get_account_address (#34032)
#### Problem
HotStorageReader currently not yet has an API to obtain account_address

#### Summary of Changes
This PR adds HotStorageReader::get_account_address() which returns
the Pubkey of the account associated with the specified IndexOffset.

#### Test Plan
Augmented an existing unit-test to cover get_account_address() case.
2023-11-14 20:44:03 -08:00
Kirill Fomichev 5a0828330d
geyser: add `is_reload` argument to `on_load` (#33674)
geyser: add `is_reload` argument to `on_load`
2023-11-14 19:34:19 -08:00
Trent Nelson c55a6e55a1
validator: deprecates `--disable-accounts-disk-index` (#33850)
* validator: deprecates `--disable-accounts-disk-index`

* Fix checks failure

* Move disable_accounts_disk_index arg to alphabetical order

---------

Co-authored-by: Will Hickey <will.hickey@solana.com>
2023-11-14 15:56:47 -07:00
hugo-syn 71dcf77d73
Fix some typo in the documentation (#34058)
Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2023-11-14 10:58:42 -08:00
Lijun Wang aa991b6ab7
Adjust receive window to make them linear to the count of streams (#33913)
Adjust receive window to make them linear to the count of streams to reduce fragmentations
2023-11-14 10:55:16 -08:00
steviez d1d4c1c654
Condense Blockstore RPC API datapoints (#34045)
Currently, the RPC API that touch the Blockstore emit a datapoint for
each call. For an RPC node serving many requests, these datapoints
could get quite noisy, both in logs as well as traffic to the metrics
agent.

So, instead of submitting a datapoint for every call, accumulate the
number of calls in a struct and report that entire struct periodically.
2023-11-14 12:19:14 -06:00
Tyera 0e91e96967
Geyser: add starting entry to ReplicaEntryInfo(V2) (#33963)
* Add ReplicaEntryInfoV2

* Add starting_transaction_index field to EntryNotification

* Populate starting_transaction_index in replay stage

* Cache and populate starting_transaction_index in banking stage

* Build ReplicaEntryInfoV2
2023-11-14 09:49:26 -07:00
dependabot[bot] ad65c82d6d
build(deps): bump smallvec from 1.11.1 to 1.11.2 (#34055)
* build(deps): bump smallvec from 1.11.1 to 1.11.2

Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.11.1 to 1.11.2.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.11.1...v1.11.2)

---
updated-dependencies:
- dependency-name: smallvec
  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-14 13:14:55 +00:00
dependabot[bot] 0d54744125
build(deps): bump http from 0.2.9 to 0.2.11 (#34054)
* build(deps): bump http from 0.2.9 to 0.2.11

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

---
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>
2023-11-14 13:14:37 +00:00
Brooks ea98c0ea36
clippy: Uses .into() when .try_into() is infallible (#34049) 2023-11-13 23:49:35 -05:00
Yueh-Hsuan Chiang 2877b8182c
[TieredStorage] Rename owners_offset to owners_block_offset (#34047)
#### Problem
TieredStorageFooter::owners_offset refers to the offset to the
owners block, which looks very similar to OwnerOffset that
has a completely different concept -- the offset to access the
address of an owner in the owners-block.

#### Summary of Changes
Similar to the previous renaming index_offset to index_block_offset,
this PR renames owners_offset to owners_block_offset to
avoid confusion.
2023-11-13 18:42:51 -08:00
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