Commit Graph

18369 Commits

Author SHA1 Message Date
550ca7bf92 compare contents of serialized banks instead of exact file format (#24141)
* compare contents of serialized banks instead of exact file format

* Update runtime/src/snapshot_utils.rs

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

* Update runtime/src/snapshot_utils.rs

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

* pr feedback

* get rid of clone

* pr feedback

Co-authored-by: Brooks Prumo <brooks@prumo.org>
2022-04-06 21:55:44 -05:00
fddd162645 reserialize bank in ahv by first writing to temp file in abs (#23947) 2022-04-06 21:39:26 -05:00
fb67ff14de Remove replica-node crates (#24152) 2022-04-06 16:52:19 -06:00
7ee1edddd1 add transaction update error to geyser plugin interface. (#24140) 2022-04-06 15:41:23 -07:00
afeb1d3cca Bump lru crate (#24150) 2022-04-06 16:18:42 -06:00
efb9cbd8e7 Refactor: Remove trait from stake keyed account (#24148)
Removes trait from StakeAccount.
2022-04-06 22:58:09 +02:00
25304ce485 Inlines verify_rent_exemption() in vote processor. (#24146) 2022-04-06 22:13:06 +02:00
2d1f27ed8e (LedgerStore) Perf Metric for RocksDB Writes (#23951)
#### Summary of Changes
This PR implements the reporting of RocksDB write perf metrics to blockstore_rocksdb_write_perf
based on RocksDB's PerfContext.  The default sample rate is 10 in 1000, and the env arg SOLANA_METRICS_ROCKSDB_PERF_SAMPLES_IN_1K can control the sample rate.
2022-04-06 12:12:38 -07:00
559ee5a843 Explorer: Add Anchor Decoding to Programs/Accounts/Transactions (#23972)
* Add program idl to the Program page
* Add instruction decoding to the Tx page
* Add account decoding to the Account page
2022-04-06 10:22:49 -07:00
cd09390367 reduces gossip crds stats (#24132) 2022-04-06 15:35:25 +00:00
22224127e0 Refactor thin_client::create_client (#24067)
Refactor the thin_client::create_client to take addresses separately instead of as a tuple

Co-authored-by: Bijie Zhu <bijiezhu@Bijies-MBP.cable.rcn.com>
2022-04-06 11:03:38 -04:00
a38bd4acc8 Use LRU in connection-cache (#24109)
Switch to using LRU for connection-cache
2022-04-06 10:58:32 -04:00
c322842257 Replace channel with Mutex<Option> for AccountsPackage (#24013) 2022-04-06 05:47:19 -05:00
07f4a9040a Removes KeyedAccount from tests in stake instruction. (Part 4) (#24124)
* Moves tests from stake state to stake instruction.

* Migrates test_merge.

* Migrates test_merge_self_fails.

* Migrates test_merge_incorrect_authorized_staker.

* Migrates test_merge_invalid_account_data.

* Migrates test_merge_fake_stake_source.

* Migrates test_merge_active_stake.
2022-04-06 12:04:35 +02:00
24cc6c33de (LedgerStore)(Refactor) Move metric reporting functions to a dedicate mod (#24060)
Previously, the metric reporting functions are implemented under LedgerColumnMetric.
However, there're operations like write batch which is issued by the function inside Rocks.

This PR moves reporting functions to its own dedicate mod so that both LedgerColumn and
Rocks can report column perf metrics.
2022-04-05 15:06:17 -07:00
302142bb25 fix typo (#24123) 2022-04-05 15:55:47 -05:00
db23295e1c removes legacy weighted_shuffle and weighted_best methods (#24125)
Older weighted_shuffle is based on a heuristic which results in biased
samples as shown in:
https://github.com/solana-labs/solana/pull/18343
and can be replaced with WeightedShuffle.

Also, as described in:
https://github.com/solana-labs/solana/pull/13919
weighted_best can be replaced with rand::distributions::WeightedIndex,
or WeightdShuffle::first.
2022-04-05 19:19:22 +00:00
4ea59d8cb4 Set drop callback on first root bank (#23999) 2022-04-05 13:02:33 -05:00
2282571493 removes outdated and flaky test_skip_repair from retransmit-stage (#24121)
test_skip_repair in retransmit-stage is no longer relevant because
following: https://github.com/solana-labs/solana/pull/19233
repair packets are filtered out earlier in window-service and so
retransmit stage does not know if a shred is repaired or not.
Also, following turbine peer shuffle changes:
https://github.com/solana-labs/solana/pull/24080
the test has become flaky since it does not take into account how peers
are shuffled for each shred.
2022-04-05 16:02:53 +00:00
eb65ffb779 Optimize replay waking up (#24051)
* timeout for validator exits

* clippy

* print backtrace when panic

* add backtrace package

* increase time out to 30s

* debug logging

* make rpc complete service non blocking

* reduce log level

* remove logging

* recv_timeout

* remove backtrace

* remove sleep

* wip

* remove unused variable

* add comments

* Update core/src/validator.rs

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

* Update core/src/validator.rs

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

* whitespace

* more whitespace

* fix build

* clean up import

* add mutex for signal senders in blockstore

* remove mut

* refactor: extract add signal functions

* make blockstore signal private

* increase replay wake up channel bounds

* reduce replay wakeup signal bound to 1

* reduce log level

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2022-04-05 08:57:12 -05:00
4a11fa072f hash_account_with_rent_epoch (#24104) 2022-04-05 08:10:31 -05:00
ba92ba0e06 Zk instructions check length (#24103)
* zk-token-sdk: add a length check before decoding proof instruction

* zk-token-sdk: fix minor spelling

* zk-token-sdk: one-liner for length check

* zk-token-sdk: one-liner fix
2022-04-05 08:40:45 -04:00
2b718d00b0 removes legacy compatibility turbine peers shuffle code 2022-04-05 12:04:12 +00:00
d0b850cdd9 removes turbine peers shuffle patch feature 2022-04-05 12:04:12 +00:00
855801cc95 removes deterministic-shred-seed feature 2022-04-05 12:04:12 +00:00
e051c7c162 Removes KeyedAccount from tests in stake instruction. (Part 3) (#24110)
* Moves test from stake state to stake instruction.

* Migrates test_split_source_uninitialized.

* Migrates test_split_split_not_uninitialized.

* Migrates test_split_more_than_staked.

* Migrates test_split_with_rent.

* Migrates test_split_to_account_with_rent_exempt_reserve.

* Migrates test_split_from_larger_sized_account.

* Migrates test_split_from_smaller_sized_account.

* Migrates test_split_100_percent_of_source.

* Migrates test_split_100_percent_of_source_to_account_with_lamports.

* Migrates test_split_rent_exemptness.
2022-04-05 12:36:01 +02:00
6fb99891f2 stopped "autolock_bot_PR.yml" action file. 2022-04-05 11:41:23 +05:30
41f2fd7fca Implement get_account_with_config (#23997). (#24095) 2022-04-04 22:58:58 +00:00
ee6bb0d5d3 track fec set turbine stats (#23989) 2022-04-04 14:44:21 -07:00
6a7f6585ce persist historical_roots (#24029) 2022-04-04 13:13:11 -05:00
132f08486a remove basically duplicate function (#24107) 2022-04-04 12:55:05 -05:00
997db7637c do simple math without floats 2022-04-04 12:32:00 -05:00
6ba4e870c4 Blockstore should drop signals before validator exit (#24025)
* timeout for validator exits

* clippy

* print backtrace when panic

* add backtrace package

* increase time out to 30s

* debug logging

* make rpc complete service non blocking

* reduce log level

* remove logging

* recv_timeout

* remove backtrace

* remove sleep

* wip

* remove unused variable

* add comments

* Update core/src/validator.rs

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

* Update core/src/validator.rs

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

* whitespace

* more whitespace

* fix build

* clean up import

* add mutex for signal senders in blockstore

* remove mut

* refactor: extract add signal functions

* make blockstore signal private

* let compiler infer mutex type

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
2022-04-04 11:38:05 -05:00
f8f3edac3c update comment (#24108) 2022-04-04 11:06:01 -05:00
2820b64eb3 roots_original -> historical_roots (#24063) 2022-04-04 09:12:12 -05:00
ef3e3dce7a hides implementation details of vote-accounts from public interface (#24087) 2022-04-04 13:20:26 +00:00
04158ee455 fix: stop logging to console when send tx fails (#23511)
There is no need to log the error to the console. Developers can simply catch the error and handle it themselves without it cluttering production logs.
2022-04-04 19:11:20 +08:00
4c058b48b6 Explorer: remove link from discord security contact (#24097) 2022-04-04 18:12:53 +08:00
2fff8bbcc8 stopped autolock_bot_closed_issues.yml 2022-04-04 10:04:49 +05:30
b14b8b1efa Un-deprecate MINIMUM_STAKE_DELEGATION (#24089) 2022-04-03 15:09:41 -05:00
7cb3b6cbe2 demotes WeightedShuffle failures to error metrics (#24079)
Since call-sites are calling unwrap anyways, panicking seems too punitive
for our use cases.
2022-04-03 16:20:06 +00:00
fa7eb7f30c improves Stakes::activate_epoch performance (#24068)
Tested with mainnet stakes obtained from the ledger at 5 recent epoch
boundaries, this code is ~30% faster than current master.

Current code:
  epoch: 289, elapsed: 82901us
  epoch: 290, elapsed: 80525us
  epoch: 291, elapsed: 79122us
  epoch: 292, elapsed: 79961us
  epoch: 293, elapsed: 78965us

This commit:
  epoch: 289, elapsed: 61710us
  epoch: 290, elapsed: 55721us
  epoch: 291, elapsed: 55886us
  epoch: 292, elapsed: 55399us
  epoch: 293, elapsed: 56803us
2022-04-02 22:48:51 +00:00
0ca5a0ec68 prior_roots -> historical_roots (#24064) 2022-04-02 12:01:43 -05:00
ec97d6d078 rename remove_old_roots (#24059) 2022-04-02 12:01:13 -05:00
3ca4fffa78 root -> alive_root (#24062) 2022-04-02 12:00:52 -05:00
ffa4cafe1c Revert sequential execution of validator_exit and validator_parallel_exit tests (#24048)
* handle channel disconnect

* revert sequential execution of validator_exit and parallel_validator_exit tests
2022-04-02 10:22:47 -05:00
4968e7d38c Fix typo in documentation (#24076) 2022-04-02 08:09:41 -05:00
2c6a3280e4 Include PR lables section and add "feature-gate" in CONTRIBUTING.md (#24056)
Added "PR / Issue Labels" section to CONTRIBUTING.md listing commonly used labels
and when to use them.
2022-04-01 22:30:37 -07:00
2af6753808 Add GetMinimumDelegation stake program instruction (#24020) 2022-04-02 05:11:10 +00:00
792bbf75ab Support sending versioned txs in AsyncClient (#23982) 2022-04-02 11:12:02 +08:00