Commit Graph

24118 Commits

Author SHA1 Message Date
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
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