Commit Graph

24883 Commits

Author SHA1 Message Date
bji 940bd30ac9
Update maximum credits awarded per vote from 8 to 16 (#127)
This reduces the maximum penalty for voting after the grace period by
roughly 50%.  This new value was derived from looking at the effects
that TVC at max credits 8 would have for recent epochs (500+) and
noting that the effect was a bit extreme, up to and exceeding 10%
"bonus" for faster voters.  This change reduces that maximum bonus by
roughly half.

In addition, the TVC feature key has been changed.
2024-03-07 19:52:22 +00:00
Dmitri Makarov ba43f74dcf
[SVM] Move RuntimeConfig to program-runtime (#96)
RuntimeConfig doesn't use anything SVM specific and logically belongs
in program runtime rather than SVM.  This change moves the definition
of RuntimeConfig struct from the SVM crate to program-runtime and
adjusts `use` statements accordingly.
2024-03-07 10:16:16 -08:00
behzad nouri 42e8309c34
adds api to obtain the parent node in the turbine retransmit tree (#115)
Following commits will use this api to check retransmitter's signature
on incoming shreds.
2024-03-07 17:56:40 +00:00
Lucas Steuernagel 85cfe23b46
Add tests for `svm/transaction_processor.rs` (#112) 2024-03-07 12:26:31 -03:00
Tao Zhu 8f3f06cc7f
Combine builtin and BPF compute cost in cost model (#29)
* Combine builtin and BPF execution cost into programs_execution_cost since VM has started to consume CUs uniformly

* update tests

* apply suggestions from code review
2024-03-07 09:23:49 -06:00
Justin Starry adefcbbb43
Add support for partial tx batch unlocking (#110)
* Add support for partial tx batch unlocking

* add assert

* fix build

* Add comments
2024-03-07 04:06:52 +00:00
Yueh-Hsuan Chiang 0bf9ec861a
[TieredStorage] Deprecate the use of account-hash in HotStorage (#93)
#### Problem
TieredStorage stores account hash as an optional field inside its HotStorage.
However, the field isn't used and we have already decided to deprecate
the account hash.

#### Summary of Changes
Remove account-hash from the tiered-storage.

#### Test Plan
Existing tiered-storage tests.
Running validators w/ tiered-storage in mainnet-beta w/o storing account-hash.
2024-03-06 18:51:50 -08:00
Tyera f968532d7f
Prep Anchor downstream CI job for v2 bump (#123)
* Add new script to patch spl in anchor downstream

* Only specify major version for token-2022

* Add update for ahash

* Patch spl in anchor

* Remove dex and metadata features for now
2024-03-06 19:31:07 -07:00
Justin Starry 9cc55349f7
Refactor transaction account unlocking (#103)
refactor: unlock accounts
2024-03-07 09:52:23 +08:00
steviez 8887cd19a1
Name previously unnamed thread pool threads (#104)
Several rayon and tokio threadpools did not have names; give them names
to make tracking them in debug tools easier
2024-03-06 17:03:02 -06:00
Brennan 184b31c6b7
fix typo (#57) 2024-03-06 14:03:25 -08:00
steviez b38ea4145e
Use tokio directly instead of jsonrpc_server_utils's re-export (#116) 2024-03-06 14:49:32 -06:00
Tao Zhu c1613517bf
assert simple vote tx const cost (#100)
* assert simple vote tx const cost
2024-03-06 11:08:49 -06:00
Jon C b6f6fdbc9a
frozen-abi: Remove proc_macro_hygiene featurization (#109) 2024-03-06 15:32:05 +01:00
Tyera 3cf48347a9
Cli: improve vote-account vote-authority display (#95)
* Simplify vote-authority display

* Add handling for new vote authority

* Add proper None handling, because unit test (shouldn't happen IRL, though)

* Unwrap->expect
2024-03-06 07:23:32 +00:00
steviez 1110fc93d7
Give SigVerify and ShredFetch threads unique names (#98)
- solTvuFetchPmod ==> solTvuPktMod + solTvuRepPktMod
- solSigVerifier ==> solSigVerTpu + solSigVerTpuVot
2024-03-05 22:02:04 -06:00
steviez ce34f3f014
Rename and uniquify QUIC thread names (#28)
When viewing in various tools such as gdb and perf, it is not easy to
distinguish which threads are serving which function (TPU or TPU FWD)
2024-03-05 12:09:17 -06:00
Brooks 1e133bc067
Increases account hash's stack buffer to hold 200 bytes of data (#56) 2024-03-05 12:02:47 -05:00
Jon C b78c0703ff
windows: Use vcpkg for openssl dep (#73) 2024-03-05 12:28:12 +01:00
Tyera 661de5bb76
Rpc: deprecate `getStakeActivation` and make inactive_stake consistent (#69)
* Make inactive_stake consistent

* Add rpc_deprecated_v1_18 module

* Move get_stake_activation to deprecated list

* Fix typo
2024-03-04 19:21:30 -07:00
Ashwin Sekar 6263537bf0
blockstore_purge: fix inspect -> inspect_err (#66) 2024-03-05 01:16:31 +00:00
Brooks 93f5b514fa
Adds StartingSnapshotStorages to AccountsHashVerifier (#58) 2024-03-04 16:32:51 -05:00
Brennan f5912104d0
update mio to 0.8.11 (#60) 2024-03-04 13:17:34 -08:00
Brooks 570d1a9197
Adds a bench for hash_account() (#47) 2024-03-04 13:59:35 -05:00
Yihau Chen 3f9a7a52ea [anza migration] rename crates (#10)
* rename geyser-plugin-interface

* rename cargo registry

* rename watchtower

* rename ledger tool

* rename validator

* rename install

* rename geyser plugin interface when patch
2024-03-03 12:31:24 +08:00
Yihau Chen 91e3dd2250 [anza migration] ci: removed unused s3 upload in Windows build (#9)
ci: removed unused s3 upload in Windows build
2024-03-03 12:31:24 +08:00
Yihau Chen 58e9a19f11 [anza migration] ci: fix path (#8)
* ci: fix windows build

* ci: publish sdk docker image with the new name

* update automerge status
2024-03-03 12:31:24 +08:00
Yihau Chen b0022d73ea [anza migration] ci (#5)
* Update README.md

* ci: update CodeCov report link

* ci: update github pr link

* ci: rename secondary pipeline

* replace org name in .mergify

* update channel info link

* update dependabot pr link

* use anza docker image

* delete travis

---------

Co-authored-by: Will Hickey <will.hickey@solana.com>
2024-03-03 12:31:24 +08:00
Yihau Chen 9355518424 [anza migration] replace binaries backend (#6)
* ci: add upload-gcs-artifact

* ci: publish release binaries to GCS

* ci: redirect github repo to anza-xyz

* ci: publish windows binaries to GCS

* replace release.solana.com with release.anza.xyz

* use a explicit name for credential
2024-03-03 12:31:24 +08:00
Ashwin Sekar cc4072bce8
blockstore: atomize slot clearing, relax parent slot meta check (#35124)
* blockstore: atomize slot clearing, relax parent slot meta check

clear_unconfirmed_slot can leave blockstore in an irrecoverable state
if it panics in the middle. write batch this function, so that any
errors can be recovered after restart.

additionally relax the constraint that the parent slot meta must exist,
as it could have been cleaned up if outdated.

* pr feedback: use PurgeType, don't pass slot_meta

* pr feedback: add unit test

* pr feedback: refactor into separate function

* pr feedback: add special columns to helper, err msg, comments

* pr feedback: reword comments and write batch error message

* pr feedback: bubble write_batch error to caller

* pr feedback: reword comments

Co-authored-by: steviez <stevecz@umich.edu>

---------

Co-authored-by: steviez <stevecz@umich.edu>
2024-03-02 23:23:55 -05:00
Alexander Meißner ccc6a6bf6f
Fix - `test_feature_activation_loaded_programs_recompilation_phase()` (#35299)
* Fixes test_feature_activation_loaded_programs_recompilation_phase() to trigger the recompilation phase before the epoch boundary.

* Adds a direct check of the cached entries around recompilation.
2024-03-02 06:55:53 -08:00
Lucas Steuernagel bd93285025
Proposal: Use SanitizedMessage when possible in `svm/account_loader.rs` (#35390) 2024-03-02 06:12:24 -03:00
dependabot[bot] f31ec1f2d6
build(deps): bump indexmap from 2.2.3 to 2.2.5 (#35389)
* build(deps): bump indexmap from 2.2.3 to 2.2.5

Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.2.3 to 2.2.5.
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.2.3...2.2.5)

---
updated-dependencies:
- dependency-name: indexmap
  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>
2024-03-02 13:27:37 +08:00
dependabot[bot] 9f60168a56
build(deps): bump rayon from 1.8.1 to 1.9.0 (#35348)
* build(deps): bump rayon from 1.8.1 to 1.9.0

Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.8.1 to 1.9.0.
- [Changelog](https://github.com/rayon-rs/rayon/blob/main/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.1...rayon-core-v1.9.0)

---
updated-dependencies:
- dependency-name: rayon
  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>
2024-03-02 13:27:27 +08:00
Wen bfe44d95f4
Wen restart aggregate last voted fork slots (#33892)
* Push and aggregate RestartLastVotedForkSlots.

* Fix API and lint errors.

* Reduce clutter.

* Put my own LastVotedForkSlots into the aggregate.

* Write LastVotedForkSlots aggregate progress into local file.

* Fix typo and name constants.

* Fix flaky test.

* Clarify the comments.

* - Use constant for wait_for_supermajority
- Avoid waiting after first shred when repair is in wen_restart

* Fix delay_after_first_shred and remove loop in wen_restart.

* Read wen_restart slots inside the loop instead.

* Discard turbine shreds while in wen_restart in windows insert rather than
shred_fetch_stage.

* Use the new Gossip API.

* Rename slots_to_repair_for_wen_restart and a few others.

* Rename a few more and list all states.

* Pipe exit down to aggregate loop so we can exit early.

* Fix import of RestartLastVotedForkSlots.

* Use the new method to generate test bank.

* Make linter happy.

* Use new bank constructor for tests.

* Fix a bad merge.

* - add new const for wen_restart
- fix the test to cover more cases
- add generate_repairs_for_slot_not_throtted_by_tick and
  generate_repairs_for_slot_throtted_by_tick to make it readable

* Add initialize and put the main logic into a loop.

* Change aggregate interface and other fixes.

* Add failure tests and tests for state transition.

* Add more tests and add ability to recover from written records in
last_voted_fork_slots_aggregate.

* Various name changes.

* We don't really care what type of error is returned.

* Wait on expected progress message in proto file instead of sleep.

* Code reorganization and cleanup.

* Make linter happy.

* Add WenRestartError.

* Split WenRestartErrors into separate erros per state.

* Revert "Split WenRestartErrors into separate erros per state."

This reverts commit 4c920cb8f8d492707560441912351cca779129f6.

* Use individual functions when testing for failures.

* Move initialization errors into initialize().

* Use anyhow instead of thiserror to generate backtrace for error.

* Add missing Cargo.lock.

* Add error log when last_vote is missing in the tower storage.

* Change error log info.

* Change test to match exact error.
2024-03-01 18:52:47 -08:00
Yueh-Hsuan Chiang 608329b974
[TieredStorage] rent_epoch() returns 0 for zero-lamport accounts (#35344)
#### Problem
In TieredAccountMeta, RENT_EXEMPT_RENT_EPOCH will be used when
its optional field rent_epoch is None.  However, for legacy reasons, 0
should be used for zero-lamport accounts.

#### Summary of Changes
Return 0 for TieredAccountMeta::rent_epoch() for zero-lamport accounts.

#### Test Plan
accounts_db::tests::test_clean_zero_lamport_and_dead_slot
2024-03-01 15:18:12 -08:00
Pankaj Garg cb260f10d1
Remove unnecessary unwrap from `simulate_transaction_unchecked()` (#35375)
Remove unnecessary unwrap from simulate_transaction_unchecked()
2024-03-01 13:37:51 -08:00
Greg Cusack 5f6d66e87b
Deprecate `ThinClient` and remove `ThinClient` from `bench-tps` (#35365)
* deprecate ThinClient

* switch localcluster bench test to use tpuclient

add back in command line args for thinclient. add thin-client deprecation README

refactor TpuClient connection

* remove thin-client from net/

* change 2.0.0 to 1.19.0
2024-03-01 12:14:52 -08:00
steviez 7d6f1d5911
Give streamer::receiver() threads unique names (#35369)
The name was previously hard-coded to solReceiver. The use of the same
name makes it hard to figure out which thread is which when these
threads are handling many services (Gossip, Tvu, etc).
2024-03-01 13:36:08 -06:00
Brooks 564a9f78a0
Casts executable bool to integer when computing account hash (#35373) 2024-03-01 14:28:28 -05:00
Brooks 59ed049dc5
Gives back 8 bytes to stack buffer for account data when hashing (#35374) 2024-03-01 14:27:48 -05:00
Brooks 3ec020f742
Removes cap_accounts_data_size_per_block feature (#35381) 2024-03-01 14:22:25 -05:00
Brooks 672943224e
Removes cap_accounts_data_len feature (#35378) 2024-03-01 14:22:19 -05:00
Andrew Fitzgerald ede9163633
Comments clarifying non-emptiness of threadset (#35388) 2024-03-01 11:18:42 -08:00
Lucas Steuernagel 532b806bef
Add more unit tests to SVM (#35383) 2024-03-01 16:04:08 -03:00
steviez 7c878973e2
Cleanup ReplayStage loop timing struct (#35361)
- Track loop_count in the struct
- Rename ReplayTiming ==> ReplayLoopTiming
- Make all metrics consistent to end with "_elapsed_us"
2024-03-01 12:30:50 -06:00
Pankaj Garg 7399178c78
Set slot and env in tx batch specific cache (#35377) 2024-03-01 08:20:17 -08:00
Tyera a7f9fe103f
Split runtime utilities out of stake_state.rs (#35386)
* Add points module

* Add rewards module

* Hide rewards doc

* Fixup ledger-tool imports
2024-03-01 09:08:55 -07:00
Brooks 245530b28e
Uses purge_all_bank_snapshots() (#35380) 2024-03-01 07:11:38 -05:00
Han Yang e3b9d7fbb3
SDK: refactor `Signer` and `Signers` traits (#34984)
* read_keypair_file\((.+?)\)[\n\r\s]+.unwrap\(\)[\n\r\s]+.into\(\) -> Box::new(read_keypair_file().unwrap()), Presigner::new\((.*?)\).into\(\) -> Box::new(Presigner::new())

* compiles

* moar general

* doc

* Result impls FromIterator

* doc
2024-03-01 12:34:32 +01:00