Commit Graph

24188 Commits

Author SHA1 Message Date
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
samkim-crypto a8863bd9fe
[zk-token-proof] Feature gate transfer with fee related proofs (#34103)
feature gate zk-token-proof transfer with fee
2023-11-17 09:21:08 +09:00
Brooks 07b0b9f9e9
Uses `mmap` for names in tiered storage (#34127) 2023-11-16 23:59:08 +00:00
Brooks 7d7d72e498
clippy: Allow enum variant names in generated google.bigtable.v2 (#34126) 2023-11-16 18:21:11 -05:00
samkim-crypto 0fd4762399
[zk-token-sdk] Re-organize error types (#34034)
* add deserialization error type for encryption

* re-organize sigma proof error types

* re-organize range proof error types

* update pod conversion module

* update instruction error types

* clippy

* fix `thiserror` visibility

* Apply suggestions from code review

Co-authored-by: Jon Cinque <me@jonc.dev>

---------

Co-authored-by: Jon Cinque <me@jonc.dev>
2023-11-17 07:00:47 +09:00
Lucas Steuernagel 2c71d21fad
Move load_accounts to runtime (#34017)
* Move load_accounts to runtime

---------

Signed-off-by: Lucas Steuernagel <lucas.tnagel@gmail.com>
2023-11-16 18:45:58 -03:00
Andrew Fitzgerald e589c07fef
RuntimeTransaction: Minor Cleanup (#34112) 2023-11-16 12:54:27 -08:00
Brooks 7e3b09defe
Uses consistent error types in tiered storage (#34110) 2023-11-16 15:51:57 -05:00
Yueh-Hsuan Chiang f59887077a
[TieredStorage] Define OwnerOffset as u32 (#34105)
#### Problem
The current OwnerOffset is defined as usize, which actual size could be u32 or u64.
On the other hand, the OwnerOffset is used to access the ith owner in one
TieredStorageFile.  As a result, u32 is more than enough to represent the number of
owners inside one TieredStorageFile while u16 might not be always enough.

#### Summary of Changes
This PR defines OwnerOffset as u32.

#### Test Plan
Existing test cases.
2023-11-16 12:48:33 -08:00
Wen 3081b4378d
Add push and get methods for RestartLastVotedForkSlots (#33613)
* Add push and get methods for RestartLastVotedForkSlots

* Improve expression format.

* Remove fill() from RestartLastVotedForkSlots and move into constructor.

* Update ABI signature.

* Use flate2 compress directly instead of relying on CompressedSlots.

* Make constructor of RestartLastVotedForkSlots return error if necessary.

* Use minmax and remove unnecessary code.

* Replace flate2 with run-length encoding in RestartLastVotedForkSlots.

* Remove accidentally added file.

* The passed in last_voted_fork don't need to be mutable any more.

* Switch to different type of run-length encoding.

* Fix typo.

* Move constant into RestartLastVotedForkSlots.

* Use BitVec in RawOffsets.

* Remove the unnecessary clone.

* Use iter functions for RLE.

* Use take_while instead of loop.

* Change Run length encoding to iterator implementation.

* Allow one slot in RestartLastVotedForkSlots.

* Various simplifications.

* Fix various errors and use customized error type.

* Various simplifications.

* Return error from push_get_restart_last_voted_fork_slots and
remove unnecessary constraints in to_slots.

* Allow 81k slots on RestartLastVotedForkSlots.

* Limit MAX_SLOTS to 65535 so we can go back to u16.

* Use u16::MAX instead of 65535.
2023-11-16 12:35:34 -08:00
Brooks 9a78924c4b
clippy: Uses .into() when .try_into() is infallible (#34119) 2023-11-16 15:28:49 -05:00
Brooks b4c652ef6c
cli: Hides the filler accounts args (#34113) 2023-11-16 12:58:52 -05:00
HaoranYi b8b860fe88
grammar correction (#34109)
Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-11-16 16:31:46 +00:00
HaoranYi 60fdd85aed
Add a feature to disable rent collection (#33945)
* add a feature to disable rent collection

* fix a test

* fix a test

* rekey

* should collect rent

* Update runtime/src/bank/fee_distribution.rs

Co-authored-by: Brooks <brooks@prumo.org>

* expand tests to cover both rent collection disabled and enabled

* feedbacks

* reviews - move should collect rent check out of rent collector into bank

* enforce rent_epoch to u64:max when rent collection is disabled

* review feedbacks and fix a test
When rent fee collection is disabled, we won't collect rent for any account. If there are any rent paying accounts, their `rent_epoch` won't change too.

* revise comments

* update rent_epoch for rent exempted account

* rebase

* set rent_epoch in rent collection for rent exempted account

* revert test change

* don't assert

---------

Co-authored-by: HaoranYi <haoran.yi@solana.com>
Co-authored-by: Brooks <brooks@prumo.org>
2023-11-16 08:57:49 -06:00
Justin Starry 87d20aecbe
clean feature: require_custodian_for_locked_stake_authorize (#34075) 2023-11-16 20:36:24 +08:00
Alexander Meißner f349d71605
Cleanup - Feature gate of `disable_cpi_setting_executable_and_rent_epoch` (#34086)
Cleans up feature gate of disable_cpi_setting_executable_and_rent_epoch.
2023-11-16 10:02:56 +01:00
Tyera 6fc6a49c05
storage-bigtable: Return error if attempting to write to table NotFound (#34098)
* Add helper fn to stop retrying if table not found

* Use helper in put_cells_with_retry methods

* Review suggestions
2023-11-16 06:15:57 +00:00
Tao Zhu e790f098b8
Create runtime-transaction crate to build transaction types with state for runtime use (#33471)
* Create runtime-transaction crate to host transaction type for runtime that comes with metadata

* create separate structs for runtime in different state, add corresponding traits for transaction_meta

* share simple-vote checking code

* not to expose private fields to outside of sdk

---------

Co-authored-by: Andrew Fitzgerald <apfitzge@gmail.com>
2023-11-15 22:29:37 -06:00
Justin Starry f9fba7e08b
clean feature: system_transfer_zero_check (#34076) 2023-11-16 10:14:28 +08:00
Justin Starry 0817cb048a
clean feature: dedupe_config_program_signers (#34077) 2023-11-16 10:00:20 +08:00
Justin Starry 2573b7acc9
clean feature: libsecp256k1_0_5_upgrade_enabled (#34080) 2023-11-16 09:59:53 +08:00
Justin Starry 34f5c68416
cli: add solana program extend subcommand (#34043) 2023-11-16 09:52:41 +08:00
Yueh-Hsuan Chiang b7f839ea18
[TieredStorage] HotStorageReader::get_owner_address (#34053)
#### Problem
The HotStorageReader does not have an API to obtain owners_address.

#### Summary of Changes
This PR adds HotStorageReader::get_owner_address().

#### Test Plan
A new unit-test is added to this PR.
2023-11-15 15:54:53 -08:00
Pankaj Garg bc2c98bfde
Simplify code for bank::load_program() (#34093)
* Simplify code for bank::load_program()

* address review comments
2023-11-15 15:17:14 -08:00
Alexander Meißner 061883ebce
Cleanup - Feature gate of `enable_program_redeployment_cooldown` (#34088)
Cleans up feature gate of enable_program_redeployment_cooldown.
2023-11-15 23:15:14 +01:00
Ashwin Sekar 6a5b8e86f3
shred: expose merkle root for use in blockstore (#34063)
* shred: expose merkle root for use in blockstore

* pr feedback: sorted, keep Result return type

* convert Result<Hash> -> Option<Hash>
2023-11-15 20:13:50 +00:00
Alexander Meißner 7ea4b2dbf7
Cleanup - Feature gate of `move_serialized_len_ptr_in_cpi` (#34082)
Cleans up feature gate of move_serialized_len_ptr_in_cpi.
2023-11-15 20:58:30 +01:00
Alexander Meißner b168cadeea
Cleanup - Feature gate of `check_slice_translation_size` (#34084)
Cleans up feature gate of check_slice_translation_size.
2023-11-15 20:58:10 +01:00