Commit Graph

23020 Commits

Author SHA1 Message Date
Brooks 4547549a73
Uses fs_err instead of SnapshotError::IoWithSourceAndFile (#32267) 2023-06-26 17:10:21 -04:00
Brooks 1574063143
Don't look up snapshot archives twice in load_bank_forks() (#32279) 2023-06-26 16:31:56 -04:00
Yueh-Hsuan Chiang 1b2b825c1f
[TieredStorage] getter functions for TieredAccountMeta trait (#32276)
#### Summary of Changes
This PR adds getter functions to the TieredAccountMeta for accessing
optional fields and account data.

#### Test Plan
This PR only adds methods to a trait.  More tests will be included in the
follow-up PRs.
2023-06-27 03:01:06 +08:00
Jeff Biseda 5cf5edd5fe
unnecessary error conversions in core (#32257) 2023-06-26 10:31:55 -07:00
steviez 77b587aa4d
Add constant for disabled snapshot interval (#32236)
Slot::MAX was used to specify that a type of snapshots should not be
created; define a constant to be that value and reference the constant
to have a single point of edit.
2023-06-26 12:26:56 -05:00
Brooks 95fae285a4
Introduces fs_err to snapshot_utils (#32266) 2023-06-26 13:14:27 -04:00
Brooks 5f1b5b877a
Replace boot_from_local_state with use_snapshot_archives_at_startup (#32260) 2023-06-26 12:44:25 -04:00
Brooks 394fc9b8fc
Adds "archive" to log when loading snapshot archives (#32278) 2023-06-26 12:32:28 -04:00
Brooks 814ea7ae9f
Removes file permission twiddling in snapshot test (#32277) 2023-06-26 12:17:14 -04:00
Jeff Biseda 5ca1b40f11
refactor core to create cluster_slots_service module (#32119) 2023-06-26 08:54:49 -07:00
Brooks 644cdaaa48
Adds comments in BankSnapshotInfo::new_from_dir() when selecting Pre or Post (#32261) 2023-06-26 11:53:25 -04:00
Brooks 4fb6bbf92e
Refactors datapoints and logs in bank_from_xxx fns (#32255) 2023-06-26 11:33:58 -04:00
Pankaj Garg 089fb464a9
Move message_processor to program-runtime (#32268) 2023-06-24 15:55:39 -07:00
Tyera bde7c174b8
[zk-token-proof] Fix doc typo (#32270)
Fix doc typo
2023-06-24 15:24:22 -07:00
Tyera 02eaaae513
Clean up credits_auto_rewind feature (#32211)
* Remove credits_auto_rewind feature logic from stake program

* Obey clean-up orders

* Clippy prefers this match

* Remove credits_auto_rewind feature helpers from Bank

* Comment nit for language, and shrink to fit on one line
2023-06-24 10:26:27 -06:00
Pankaj Garg 0b8af56924
Remove message_processor dependency on solana_runtime (#32256) 2023-06-24 07:55:32 -07:00
mvines f202ccb033
Add rust-version field to solana-program to prevent the accidental use of unsupported platform-tools versions (#32232)
Require the rust-version of solana-program crate to match platform-tools
2023-06-23 21:48:56 -07:00
Dmitri Makarov f71cf07181
Add base rust version to the output of cargo-build-sbf --version (#32254) 2023-06-23 16:40:12 -07:00
Brooks 64ecfaf769
Renames --boot-from-local-state to --use-snapshot-archives-at-startup (#32217) 2023-06-23 18:34:18 -04:00
Jon Cinque 383063eeb2
stake: Remove `stake_allow_zero_undelegated_amount` usage (#32210) 2023-06-23 13:57:18 -07:00
Yueh-Hsuan Chiang 9a620b4862
[TieredStorage] HotAccountMeta (2/N) (#32227)
#### Summary of Changes
This PR introduces HotAccountMeta, the storage and in-memory struct of
the metadata struct for a hot account.

#### Test Plan
Unit tests are included in this PR.
Tested in mnb w/ the prototype implementation of the tiered account storage (#30626)
2023-06-24 01:25:54 +08:00
Lijun Wang 689ca503e2
Remove a unnecessary sleep in run server (#32216)
remove sleep; and handle initializing connection as soon as available
2023-06-22 15:18:05 -07:00
Yueh-Hsuan Chiang d95e976a71
[TieredStorage] AccountMetaOptionalFields::size_from_flags() (#32242)
#### Summary of Changes
This PR adds AccountMetaOptionalFields::size_from_flags that takes
`&AccountMegaFlags` and returns the size of the AccountMetaOptionalFields
based on the input AccountMegaFlags.

This function is needed because the reader of the TieredAccountMeta
directly extract all the Some fields of AccountMetaOptionalFields
from its account block without constructing the AccountMetaOptionalFields
instance.

#### Test plan
Improve existing unit tests that further verify the correctness of the function.
2023-06-23 01:42:02 +08:00
Yueh-Hsuan Chiang 1c618f2479
[TieredStorage] TieredAccountMeta (1/N) (#32220)
#### Summary of Changes
This PR introduces TieredAccountMeta, a trait that allows different implementations
of the account meta for different tiers of the accounts storage.

This PR includes the mutator and getter methods for the common TieredAccountMeta
fields.  Functions that also work with the account data block will be in separate PRs.
2023-06-23 01:40:43 +08:00
behzad nouri f6e039b0b3
moves turbine to a separate crate out of solana/core (#32226) 2023-06-22 16:22:11 +00:00
steviez 46c2780e1b
Remove duplicate code from local-cluster save_tower() (#32240)
The same logic is used in Tower::save(), so use Tower::save() directly.
2023-06-22 10:11:16 -05:00
Ryo Onodera f62d231886
Make `ci/_` to print to stderr instead of stdout (#32238)
* make _ print to stderr instead...

* Trigger normal build procedure
2023-06-22 15:46:22 +09:00
Ryo Onodera 830c0ad04a
Fix wasm-pack (#32239) 2023-06-22 14:37:34 +09:00
Ryo Onodera cc0fb5a584
Install cargo-hack for upcoming dev-utils (#32234) 2023-06-22 14:05:08 +09:00
samkim-crypto 1452ed7044
[zk-token-sdk] Make `ElGamalKeypair` fields private (#32190)
* make `ElGamalKeypair` fields private

* update the rest of `zk-token-sdk` for the visibility update

* update `zk-token-proof-tests` for the visibility update

* update `zk-keygen` for the visibility update

* update `zk-token-proof` benches for the updated visibility

* cargo fmt

* rename `ElGamalKeypair::new` to `ElGamalKeypair::new_for_tests`
2023-06-22 10:28:13 +09:00
Michael c595c388e0
Add skip rate to docs and adjust block-production to use the term ski… (#32230)
* Add skip rate to docs and adjust block-production to use the term skip rate in line with the output of solana validators

* Format and adjust padding
2023-06-21 16:38:46 -07:00
Ashwin Sekar c142ba1e61
vote_processor: Add tests for CompactVoteStateUpdate (#32229) 2023-06-21 20:25:40 +00:00
Brooks ba05cbf4cc
Sets default snapshot archive format to zstd (#32205) 2023-06-21 15:15:53 -04:00
Ashwin Sekar 8135cf35bf
Only dump duplicate descendants in dump & repair (#31559) 2023-06-21 11:28:42 -07:00
Brennan 42ccc5cf40
update turbine docs for redundant path disabled (#29985)
* update turbine docs for redundant path disabled

* Create data-plane-propagation.png

* PR feedback - scrub out neighborhoods
2023-06-21 09:46:17 -07:00
samkim-crypto 42aa5d243c
[zk-token-proof] Update docs for the ZK Token proof program in `zk-token-sdk` (#32186)
* add docs for the proof program instructions

* add docs for the zk token proof program

* add docs for the instruction data types

* add brief description of the proofs for each of the proof instructions

* Apply suggestions from code review

Co-authored-by: Tyera <teulberg@gmail.com>

* change `pubkey` or `public-key` in the docs to `public key`

---------

Co-authored-by: Tyera <teulberg@gmail.com>
2023-06-21 20:50:49 +09:00
steviez 20a7cdd43d
Restrict access to Bank's HardForks (#32180)
* Restrict access to Bank's HardForks

Callers could previously obtain a a lock to read/write HardForks from
any Bank. This would allow any caller to modify, and creates the
opportunity for inconsistent handling of what is considered a valid hard
fork (ie too old).

This PR adds a function to Bank so consistent sanity checks can be
applied; the caller will already have a Bank as that is where they would
have obtained the HardForks from in the first place. Additionally,
change the getter to return a copy of HardForks (simple Vec).

* Allow hard fork at bank slot if bank is not yet frozen
2023-06-20 23:44:43 -05:00
dependabot[bot] 6fdac22c66
Bump openssl from 0.10.54 to 0.10.55 (#32215)
* Bump openssl from 0.10.54 to 0.10.55

Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.54 to 0.10.55.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.54...openssl-v0.10.55)

---
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-06-21 03:36:07 +00:00
Brooks b8ed614bfc
Deprecates --accounts-hash-interval-slots (#31987)
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2023-06-20 19:55:52 -04:00
samkim-crypto 1bc101252c
[zk-token-sdk] Use `TryFrom<&[T]>` for `&[T]` instead of `arrayref` (#31959)
* remove `arrayref` from `auth_encryption`

* remove `arrayref` from `sigma_proofs`

* refactor `canonical_scalar_from_slice`

* remove `arrayref` from `Cargo.toml`

* cargo lock
2023-06-21 06:14:18 +09:00
samkim-crypto 91ec92cd76
[zk-token-sdk] Make `AeCiphertext` inner fields be private (#32188)
make `AeCiphertext` fields and types be private
2023-06-21 06:07:58 +09:00
samkim-crypto 1616123b84
[zk-token-sdk] Make inner scalar and ristretto point of `PedersenOpening` and `PedersenCommitment` private (#32187)
* make `PedersenOpening` inner scalar private

* make `PedersenCommitment` inner point private
2023-06-21 06:07:40 +09:00
behzad nouri 469661d217
removes outdated tvu_forward socket (#32101)
Shreds are no longer sent to tvu_forward socket.
2023-06-20 20:50:16 +00:00
HaoranYi 203544293b
Add epoch_rewards to sysvar cache (#32155)
add epoch_rewards to sysvar cache

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-20 15:01:34 -05:00
Brooks bfaf073ecf
Tests get snapshot archive format from snapshot config (#32209) 2023-06-20 15:44:03 -04:00
dependabot[bot] 5c679e458b
Bump serde from 1.0.163 to 1.0.164 (#32028)
* Bump serde from 1.0.163 to 1.0.164

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.163 to 1.0.164.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.163...v1.0.164)

---
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-06-20 19:43:23 +00:00
dependabot[bot] ad96860a7f
Bump sha2 from 0.10.6 to 0.10.7 (#32202)
* Bump sha2 from 0.10.6 to 0.10.7

Bumps [sha2](https://github.com/RustCrypto/hashes) from 0.10.6 to 0.10.7.
- [Commits](https://github.com/RustCrypto/hashes/compare/sha2-v0.10.6...sha2-v0.10.7)

---
updated-dependencies:
- dependency-name: sha2
  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-06-20 12:53:14 -06:00
dependabot[bot] fcac1c06e8
Bump serde_json from 1.0.96 to 1.0.97 (#32203)
* Bump serde_json from 1.0.96 to 1.0.97

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.96 to 1.0.97.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.96...v1.0.97)

---
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-06-20 12:50:27 -06:00
Ashwin Sekar 4ba78de8cb
Add metrics for invalid vote timestamps (#32206) 2023-06-20 17:29:13 +00:00
HaoranYi 2e9aeff8dd
Enable partitioned epoch reward by feature id (#32174)
enable partitioned epoch reward feature by feature id
update stake rewards tests with partitioned epoch rewards feature enable

Co-authored-by: HaoranYi <haoran.yi@solana.com>
2023-06-20 12:12:50 -05:00