Commit Graph

24215 Commits

Author SHA1 Message Date
Andrew Fitzgerald 6d703edd2e
check vote costs against block limits in would_fit (#34207) 2023-11-22 13:19:13 -08:00
dependabot[bot] 53c723ae3f
build(deps): bump serde from 1.0.192 to 1.0.193 (#34190)
* build(deps): bump serde from 1.0.192 to 1.0.193

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

---
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-22 18:19:46 +08:00
dependabot[bot] 21644fea72
build(deps): bump fs-err from 2.10.0 to 2.11.0 (#34189)
* build(deps): bump fs-err from 2.10.0 to 2.11.0

Bumps [fs-err](https://github.com/andrewhickman/fs-err) from 2.10.0 to 2.11.0.
- [Changelog](https://github.com/andrewhickman/fs-err/blob/main/CHANGELOG.md)
- [Commits](https://github.com/andrewhickman/fs-err/compare/2.10.0...2.11.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-22 18:19:16 +08:00
samkim-crypto ded278fb57
[zk-token-sdk] Add range proof generation error types (#34065)
* replace assert statements with `VectorLengthMismatch` error variant

* add a condition to check that the bit lengths are in the correct range

* replace assert statements with `GeneratorLengthMismatch`

* remove unchecked arithmetic

* add `InnerProductLengthMismatch` error

* fix typo

* add a clarifying comment on unwrap safety

* fix typo
2023-11-22 06:50:24 +09:00
Yueh-Hsuan Chiang ecc067f7ad
[TieredStorage] Make AccountOffset use u32 (#34151)
#### Problem
AccountOffset currently uses `usize`, which size is platform dependent.
We want a fixed size type that is consist to what we persist in the tiered-storage file.

#### Summary of Changes
This PR makes AccountOffset use u32.
2023-11-21 10:40:10 -08:00
Yueh-Hsuan Chiang db2444bd11
Move MatchAccountOwnerError from append_vec to accounts_file (#34187)
#### Problem
MatchAccountOwnerError currently belongs to append_vec.

However, it is a public error type that is also required by other AccountsFile
implementations such as TieredStorageFile.

#### Summary of Changes
Move MatchAccountOwnerError from append_vec to accounts_file.
2023-11-21 10:39:56 -08:00
HaoranYi f2878c0c51
fix merge error (#34195)
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-11-21 17:29:54 +00:00
HaoranYi 57dc7adda1
move PROGRAM_OWNERS to sdk (#34193)
* move PROGRAM_OWNERS to sdk

* Update sdk/src/account.rs

Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
2023-11-21 09:49:33 -06:00
Jeff Washington (jwash) 481c357543
remaining_bytes aligns len since all writes will align first (#34171)
* remaining_bytes aligns len since all writes will align first

* use remaining_bytes() to check for whether the new account can fit into the av storage

* Add test coverage for av remaining bytes alignment

* use great equal to check space available

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-11-21 09:34:52 -06:00
HaoranYi 90b11a608b
refactor AccountsToStore (#34185)
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-11-21 09:27:31 -06:00
Ashwin Sekar 504f2ee892
Add deepest slot metric (#34186)
* reset to deepest slot when last vote is for an invalid fork.

* pr feedback: comments, height starts at 1
2023-11-21 04:07:00 -05:00
samkim-crypto 0e6dd54f81
[zk-token-sdk] Restrict range proof generator length and prevent 0-bit range proof (#34166)
* limit range proof generator length

* forbid 0-bit range proof verification
2023-11-21 08:48:41 +09:00
samkim-crypto e251b8607c
[zk-token-sdk] Add a length check on range proof commitment length (#34165)
add a length check on range proof commitment length
2023-11-21 08:48:15 +09:00
Yueh-Hsuan Chiang c73f226958
[TieredStorage] Make IndexOffset use u32 (#34152)
#### Problem
IndexOffset currently uses `usize`, which size is platform dependent.
We want a fixed size type that is consist to what we persist in the tiered-storage file.

#### Summary of Changes
This PR makes IndexOffset use u32.
2023-11-20 14:57:15 -08:00
Andrew Fitzgerald 8a298f1628
TransactionScheduler: detailed consume worker metrics (#33895) 2023-11-20 10:46:04 -08:00
Alexander Meißner c0a4fc870c
Fix - Removes redundant `TotalBatchesLen` from `ThreadExecuteTimings::accumulate()` (#34179)
Removes redundant TotalBatchesLen from ThreadExecuteTimings::accumulate().
2023-11-20 19:21:01 +01:00
dependabot[bot] 7010ebf845
build(deps): bump test-case from 3.3.0 to 3.3.1 (#34175)
* build(deps): bump test-case from 3.3.0 to 3.3.1

Bumps [test-case](https://github.com/frondeus/test-case) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/frondeus/test-case/releases)
- [Changelog](https://github.com/frondeus/test-case/blob/master/CHANGELOG.md)
- [Commits](https://github.com/frondeus/test-case/compare/v3.3.0...v3.3.1)

---
updated-dependencies:
- dependency-name: test-case
  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-20 13:26:37 +00:00
Lucas Steuernagel a3670054be
Move `RewardInterval` to runtime (#34146)
Move RewardInterval to runtime
2023-11-20 10:17:21 -03:00
Alessandro Decina d9147d7a77
cpi: direct_mapping: always zero spare capacity if account alloc changes (#34141)
If the vector holding an account is reallocated during execution of a callee,
we must zero the spare capacity regardless of whether the account size changed,
because the underlying vector might contain uninitialized memory in the spare
capacity.
2023-11-20 23:07:35 +11:00
steviez 9a7b681f0c
Remove key_size() method from Column trait (#34021)
This helper simply called std::mem::size_of<Self::Index>(). However, all
of the underlying functions that create keys manually copy fields into a
byte array. The fields are copied in end-to-end whereas size_of() might
include alignment bytes.

For example, a (u64, u32) only has 12 bytes of "data", but it would
have size 16 due to the 4 alignment padding bytes that would be
added to get the u32 (size 4) aligned with the u64 (size 8).
2023-11-19 23:05:32 -06:00
Brooks f9b96fa112
Upgrades Rust to 1.74.0 (#34118) 2023-11-19 22:24:59 -05:00
Brooks e02f25d5a2
Removes filler accounts (#34115) 2023-11-19 20:36:57 -05:00
Jeff Washington (jwash) 202463849a
log when appending exceeds available space (#34170) 2023-11-19 18:50:37 -06:00
Pankaj Garg 3368579eff
Do not prune cache entry if the runtime environment is different (#34100) 2023-11-18 22:00:51 +01:00
Brooks 574b8b5bfc
Refactor assert in scan_snapshot_stores() (#34162) 2023-11-18 12:05:39 -05:00
Ryo Onodera 07f17096eb
Correctly store ALTs themselves into minimized snapshot (#34134) 2023-11-18 13:20:37 +09:00
Jeff Washington (jwash) 7dd8d4bb64
reverse logic on linux_report_network_limits (#34159) 2023-11-17 18:12:24 -06:00
Brooks c585e54988
clippy: Replaces .get(0) with .first() (#34150) 2023-11-17 18:29:36 -05:00
Brooks 8c8cd66095
Uses Display in TieredStorageFile::new_readonly() panic message (#34148) 2023-11-17 15:24:05 -05:00
Trent Nelson 2d3333cb46
system monitory: don't suggest query-only limits (#34149) 2023-11-17 13:18:37 -07:00
Yueh-Hsuan Chiang 625e898c63
[TieredStorage] Make IndexBlock persist u32 offsets (#34133)
#### Problem
In TieredStorage, we want to make AccountOffset and IndexOffset u32 instead
of usize just like OwnerOffset.  However, we need to first change what we persist
in the storage.  Currently, IndexBlock persists offsets as u64 instead of u32. 

#### Summary of Changes
This PR makes IndexBlock persist u32 offsets.

#### Test Plan
Existing test cases.
2023-11-17 11:35:32 -08:00
Brooks e23bfb5167
Refactors TieredStorageFile read/write methods (#34147) 2023-11-17 14:17:49 -05:00
Andrew Fitzgerald 9bb82a3901
TransactionScheduler: Scheduler Count and Timing metrics (#33893) 2023-11-17 10:18:58 -08:00
Wen ae4b62c6f5
Move Gossip values added for wen_retart into restart_crds_values. (#34128)
* HvA9J

* Rename file and change orders of definitions.

* Use .from() on u16 to usize which shouldn't fail.

* Update ABI congest.
2023-11-17 10:13:25 -08:00
Justin Starry 45290c4689
CI: automatically add a warning comment to PRs with backport labels (#34132)
* CI: automatically add a warning comment to PRs with backport labels

* Update .mergify.yml

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

* Update .mergify.yml

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>

---------

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2023-11-18 01:38:15 +08:00
Yueh-Hsuan Chiang 1e9f6d9d83
[TieredStorage] Use OwnerOffset type in TieredAccountMeta (#34106)
#### Problem
TieredAccountMeta currently uses `u32` for owner_offset, while
we already have a dedicate type for that --- OwnerOffset.

#### Summary of Changes
This PR makes TieredAccountMeta use OwnerOffset for its
owner_offset field.

#### Test Plan
Existing unit-tests.
2023-11-17 09:26:52 -08:00
Ashwin Sekar ca6ab08555
gossip: process duplicate proofs for merkle root conflicts (#34066)
* gossip: process duplicate proofs for merkle root conflicts

* pr comments + abi
2023-11-17 11:59:53 -05:00
Justin Starry 85db4da73e
clean feature: vote_stake_checked_instructions (#34079) 2023-11-18 00:34:11 +08:00
steviez 29947ba867
Consolidate repeated code in Rocks::open() (#34131)
The function matches the access type and calls a different RocksDB
function depending on whether we have primary or secondary access. But,
lots of the code is the same for these two paths so de-duplicate the
repeated sections.
2023-11-17 10:18:08 -06:00
Jon Cinque 6280b1e53e
stake: Remove feature `stake_merge_with_unmatched_credits_observed` (#34114) 2023-11-17 16:16:05 +01:00
HaoranYi 573ec15068
Fix tests for disabling rent collection (#34122)
fix tests

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-11-17 09:03:33 -06:00
Brooks 851be08729
clippy: Replaces .get(0) with .first() (#34143) 2023-11-17 10:03:08 -05:00
dependabot[bot] 4cbd57e8f4
build(deps): bump rustls from 0.21.8 to 0.21.9 (#34140)
* build(deps): bump rustls from 0.21.8 to 0.21.9

Bumps [rustls](https://github.com/rustls/rustls) from 0.21.8 to 0.21.9.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Commits](https://github.com/rustls/rustls/compare/v/0.21.8...v/0.21.9)

---
updated-dependencies:
- dependency-name: rustls
  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-17 13:12:45 +00:00
dependabot[bot] 7049a363d7
build(deps): bump test-case from 3.2.1 to 3.3.0 (#34139)
* build(deps): bump test-case from 3.2.1 to 3.3.0

Bumps [test-case](https://github.com/frondeus/test-case) from 3.2.1 to 3.3.0.
- [Release notes](https://github.com/frondeus/test-case/releases)
- [Changelog](https://github.com/frondeus/test-case/blob/master/CHANGELOG.md)
- [Commits](https://github.com/frondeus/test-case/compare/v3.2.1...v3.3.0)

---
updated-dependencies:
- dependency-name: test-case
  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-17 13:12:29 +00:00
Alexander Meißner 6b8545061f
Fix - `Bank::compute_active_feature_set()` and `Bank::apply_feature_activations()` (#34124)
* Moves modification of feature accounts from Bank::compute_active_feature_set() into Bank::apply_feature_activations().

* Renames allow_new_activations and newly_activated to include_pending and pending.

* Fix test_compute_active_feature_set.
2023-11-17 09:54:21 +01:00
Yihau Chen 5658d6ee5b
ci: run test-stable-sbf in docker (#33943) 2023-11-17 12:11:52 +08:00
Yihau Chen 51f3af25eb
ci: run doctest in docker (#33942) 2023-11-17 12:11:36 +08:00
Yihau Chen b55dcbbb39
ci: run bench test in docker (#33944)
* ci: run bench test in docker

* ci: fix bench test triggering rule
2023-11-17 12:11:25 +08:00
Andrew Fitzgerald eb35a5ac1e
Clean up: simplify asserts (#34111) 2023-11-16 17:46:14 -08:00
Justin Starry 3d3e7bb453
test cleanup: remove reference to verify_tx_signatures_len feature (#34078) 2023-11-17 09:36:10 +08:00