Yueh-Hsuan Chiang
eca0eb9585
(LedgerStore) Move metric-related functions to blockstore_metric.rs ( #24854 )
...
#### Problem
blockstore_db.rs becomes bigger.
#### Summary of Changes
This PR creates blockstore_metric.rs and moves metric-related functions out from blockstore_db.rs.
2022-05-02 20:53:25 -07:00
Pankaj Garg
3dad27d84d
Optimize connection cache eviction logic ( #24911 )
...
* Optimize connection cache eviction logic
* add eviction count and timing to metrics
* use swap_remove
2022-05-03 02:27:40 +00:00
dependabot[bot]
d1f864619e
chore: bump tokio from 1.18.0 to 1.18.1 ( #24915 )
...
* chore: bump tokio from 1.18.0 to 1.18.1
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.18.0...tokio-1.18.1 )
---
updated-dependencies:
- dependency-name: tokio
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
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-05-02 20:06:18 -06:00
Steven Luscher
dd8295981b
test: you can now supply promises for values when mocking RPC subscriptions ( #24920 )
2022-05-02 17:02:35 -07:00
behzad nouri
eff59193db
enforces that LAST_SHRED_IN_SLOT is also DATA_COMPLETE_SHRED ( #24892 )
...
A data shred cannot be LAST_SHRED_IN_SLOT if not also DATA_COMPLETE_SHRED.
So LAST_SHRED_IN_SLOT should also imply DATA_COMPLETE_SHRED:
https://github.com/solana-labs/solana/blob/74b586ae7/ledger/src/shredder.rs#L116-L117
https://github.com/solana-labs/solana/blob/74b586ae7/core/src/broadcast_stage/standard_broadcast_run.rs#L80-L81
However current shred constructs allow specifying a shred which is
LAST_SHRED_IN_SLOT but not DATA_COMPLETE_SHRED:
https://github.com/solana-labs/solana/blob/74b586ae7/ledger/src/shred.rs#L117-L118
https://github.com/solana-labs/solana/blob/74b586ae7/ledger/src/shred.rs#L272-L273
The commit updates ShredFlags so that if a shred is not
DATA_COMPLETE_SHRED it cannot be LAST_SHRED_IN_SLOT either.
2022-05-02 23:33:53 +00:00
carllin
e83efe678c
Cleanup banking bench ( #24851 )
...
* Cleanup banking bench
* Fully remove assert
2022-05-02 22:41:47 +00:00
steviez
cb96edcaa7
Pass ProcessOptions struct around by reference ( #24900 )
2022-05-02 16:58:00 -05:00
dependabot[bot]
68c7fb941d
chore: bump serde_bytes from 0.11.5 to 0.11.6 ( #24882 )
...
* chore: bump serde_bytes from 0.11.5 to 0.11.6
Bumps [serde_bytes](https://github.com/serde-rs/bytes ) from 0.11.5 to 0.11.6.
- [Release notes](https://github.com/serde-rs/bytes/releases )
- [Commits](https://github.com/serde-rs/bytes/compare/0.11.5...0.11.6 )
---
updated-dependencies:
- dependency-name: serde_bytes
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
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-05-02 14:33:01 -06:00
dependabot[bot]
fa5f489426
chore: bump thiserror from 1.0.30 to 1.0.31 ( #24881 )
...
* chore: bump thiserror from 1.0.30 to 1.0.31
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.30 to 1.0.31.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.30...1.0.31 )
---
updated-dependencies:
- dependency-name: thiserror
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
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2022-05-02 14:29:44 -06:00
Pankaj Garg
de027a895b
Use RwLock instead of Mutex in QUIC connection cache ( #24857 )
...
* Use RwLock instead of Mutex in QUIC connection cache
* replace LruCache with HashMap
* fix tests
* fix tests
* refactor
* add cache eviction for a random connection on reaching upperbound
* cleanup
2022-05-02 13:02:49 -07:00
Çelik Köseoğlu
fd46c69a17
Update install-solana-cli docs with Homebrew instructions
2022-05-02 12:58:27 -07:00
steveluscher
7bb867404f
fix: correct the fragment URL of inner instruction cards in Explorer
2022-05-02 12:50:00 -07:00
Steven Luscher
2108803b0c
feat: you can now deep link to a particular instruction in Explorer ( #24861 )
...
* fix: when creating new cluster URLs, don't carry the fragment forward
* feat: added a utility that computes a transaction's URL fragment
* feat: introduced a React context you can use to scroll to elements
* feat: you can now deep link to a particular transaction in Explorer
2022-05-02 12:21:13 -07:00
Steven Luscher
8043e88233
fix: enable React 18 in Explorer via use of `createRoot` ( #24859 )
2022-05-02 12:19:08 -07:00
apfitzge
112a0b475a
Revert "Refactor to use EpochSchedule from within RentCollector struct" ( #24893 )
...
* Revert "Ran cargo fmt"
This reverts commit 9052e41b32
.
* Revert "Fix build error introduced by my editor setup, part 2"
This reverts commit 4dfeab3b38
.
* Revert "Fix build error introduced by my editor setup"
This reverts commit 87fb78dc56
.
* Revert "Remove redundant epoch_schedule from AccountsPackage"
This reverts commit c2f7f2fff8
.
* Revert "Fix a test"
This reverts commit 36c0bdaa78
.
* Revert "Fixes to initial code"
This reverts commit ed7813e698
.
* Revert "Removing redundant EpochSchedule param from fns"
This reverts commit 5472d2e605
.
2022-05-02 13:46:17 -05:00
DimAn
8846aa12ca
ledger-tool: save new snapshots to --snapshot-archive-path ( #24883 )
2022-05-02 11:00:15 -06:00
Jeff Washington (jwash)
546730cf42
retire deprecate_rewards_sysvar ( #24651 )
...
* retire deprecate_rewards_sysvar
* Update expected hash for bank after eliminating reqards sysvar
* Hack test_bank_update_vote_stake_rewards to pass after removing sysvar rewards account
* formatting change
* formatting cleanup
* Remove legacy validator Rewards code from unit test. Change expected inflation computation
* Update bank.rs
* Update bank.rs
* Clean up inflation abstraction function
* Formatting cleanup
* rename vars. Add struct for inflation rewards return
* format cleanup + comment
* Fix format warnings
Co-authored-by: Brennan Watt <brennan.watt@solana.com>
2022-05-02 10:10:51 -05:00
behzad nouri
4f947a0db3
(de-)serializes shred headers through a Cursor ( #24876 )
...
Current serialize/de-serialize code for shreds manually tracks offsets
into the payload; This can instead be done with std::io::Cursor.
https://github.com/solana-labs/solana/blob/e812430e2/ledger/src/shred.rs#L232-L258
2022-05-02 15:02:06 +00:00
Michael Vines
74b586ae71
Always retain the highest incremental snapshot for all full snapshots
2022-05-02 07:37:55 -07:00
dependabot[bot]
475e7d1964
chore: bump tonic-build from 0.7.0 to 0.7.1 ( #24826 )
...
* chore: bump tonic-build from 0.7.0 to 0.7.1
Bumps [tonic-build](https://github.com/hyperium/tonic ) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/hyperium/tonic/releases )
- [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md )
- [Commits](https://github.com/hyperium/tonic/compare/v0.7.0...v0.7.1 )
---
updated-dependencies:
- dependency-name: tonic-build
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
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <you@example.com>
2022-05-02 00:40:33 -06:00
steveluscher
fe72a1de22
fix: update to version of spl-token-registry that doesn't fatal when response is empty
2022-05-01 15:27:25 -07:00
behzad nouri
e812430e28
defines shred flags using bitflags crate ( #24874 )
...
Shred flags uses raw bit-masking ops which lacks type-safety:
https://github.com/solana-labs/solana/blob/a829ddc92/ledger/src/shred.rs#L112-L114
This commit instead uses bitflags crate to define shred flags.
2022-05-01 19:25:15 +00:00
behzad nouri
a829ddc922
adds hard-coded tests for backward compatibility of shreds serialization ( #24866 )
...
In preparation of the upcoming changes to shred struct, the added
hard-coded tests in this commit ensure that shreds are backward
compatible when serialized and de-serialized.
2022-05-01 13:11:45 +00:00
sakridge
0b0589eb11
Add custom rpc/tpu port options for ThinClient ( #24842 )
2022-05-01 00:14:47 -07:00
Pankaj Garg
88c16c0176
Check if quic is enabled before warming up quic connections ( #24821 )
...
* Check if quic is enabled before warming up quic connections
* fix after rebase
* don't start warmup service if quic not enabled
* fix test
2022-05-01 03:52:38 +00:00
Steven Luscher
06ffd9009e
fix: don't fatal Explorer when there's a 'failed' type message at the top level ( #24868 )
2022-04-30 18:27:42 -07:00
Alexander Meißner
7f987722bf
Bump solana_rbpf to v0.2.28 ( #24800 )
2022-04-30 10:58:12 +02:00
Justin Starry
f8354bdbcd
explorer: Synchronoize timescale for tps and ping stats ( #24865 )
2022-04-30 13:37:13 +08:00
Steven Luscher
0769ee4204
fix: repair React types in explorer ( #24858 )
...
* chore: upgrade Explorer React typedefs to match installed version of React
* fix: a stream player materializing no longer re-renders the VideoArtContent
* chore: upgrade Sentry React for compatibility with React 18 types
2022-04-29 21:58:34 -07:00
Justin Starry
d07604f770
explorer: Don't show successful count if meta missing ( #24864 )
2022-04-30 12:11:37 +08:00
Justin Starry
b8c13eb506
explorer: Fix empty state for filtered transactions ( #24863 )
2022-04-30 12:11:29 +08:00
HaoranYi
591bfc3e0c
optimize counter submission: avoid copy when converting counters to datapoints ( #24802 )
2022-04-29 21:21:57 -05:00
steviez
428cf54c91
Change BlockStore TryPrimaryThenSecondary to just Secondary ( #23391 )
2022-04-29 20:05:39 -05:00
Yueh-Hsuan Chiang
5245eb4229
(LedgerStore) Hidden validator argument for RocksDB perf samples ( #24684 )
...
#### Summary of Changes
This PR replaces the use of thread_rng in RocksDB perf metric samples by
AtomicU32 with Ordering::Relaxed to improve the performance of determining
whether to sample the current RocksDB's read/write perf metric.
2022-04-29 17:55:34 -07:00
behzad nouri
d7aec2a7e6
moves ErasureConfig to blockstore_meta next to ErasureMeta
2022-04-29 23:02:29 +00:00
behzad nouri
4b62c93f87
removes erasure::Session, using Reed-Solomon constructs directly
...
The extra wrapping and indirection by the Session struct is not used in
any form. The commit removes Session and instead uses Reed-Solomon
constructs directly.
2022-04-29 23:02:29 +00:00
Yueh-Hsuan Chiang
b56c091b37
(LedgerStore) Hidden validator argument for RocksDB perf samples ( #24682 )
...
#### Problem
Currently, the number of RocksDB perf samples is controlled by an env arg
which is later handled using a lazy_static variable. However, there is a known
performance overhead of using lazy_static as mentioned in
https://github.com/solana-labs/solana/pull/6472 .
#### Summary of Changes
Instead, this PR uses a hidden validator argument, --rocksdb-perf-sample-interval,
for controlling how often RocksDB read/write performance sample is collected.
2022-04-29 15:28:50 -07:00
Brooks Prumo
cb501807ca
cli stake tests: Increase stake amounts to handle raising minimum delegation ( #24835 )
2022-04-29 16:37:18 -05:00
Justin Starry
45314a89b0
explorer: Hide compute units if log parsing fails ( #24848 )
2022-04-30 04:11:59 +08:00
Justin Starry
2d7e29477a
cli: Feature status improvements ( #24745 )
...
* cli: Display feature activation epoch instead of slot
* cli: Always display feature statuses for specific queries
* cli: Add epoch column and show epoch for pending features
* cli: Remove epoch column and clarify statuses
* skip serializing bookkeeping fields
* Add activation slot to feature status table
2022-04-30 04:08:57 +08:00
Code Monkey
aee17f3b50
fix typo on validator help ( #24844 )
...
Co-authored-by: Austin <support@thetaproxies.com>
2022-04-29 13:47:04 -06:00
behzad nouri
08e1727926
minor edits in shred and shredder ( #24841 )
...
Removed Default implementation for ShredType. ShredType should always be
explicitly specified, and not rely on default values.
Simplified single-arg Shred Error variants to use shorter syntax.
Renamed erasure blocks to shards, to be consistent with reed_solomon
crate and not to confuse with FEC blocks.
2022-04-29 19:42:15 +00:00
Justin Starry
c0981a9f8c
docs: Update outdated compute budget docs ( #24737 )
...
* docs: Update outdated compute budget docs
* docs: Add section about reducing tx fees
2022-04-30 03:38:59 +08:00
Pankaj Garg
21ee012c18
Add some timing measure for get_connection() ( #24814 )
...
* Add some timing measure for get_connection()
* fix build issue
2022-04-29 09:58:01 -07:00
Brooks Prumo
a73f99823d
Do not hold lock unnecessarily when hashing ( #24815 )
2022-04-29 08:40:28 +00:00
Justin Starry
a61652104b
Avoid holding lock guards in match expressions ( #24805 )
...
* Avoid holding bank forks read lock for RPC requests
* Avoid using lock guards in temporaries
* revert fetch stage change
2022-04-29 16:32:46 +08:00
dependabot[bot]
9a136aa684
chore: bump cross-fetch from 3.1.4 to 3.1.5 in /docs ( #24812 )
...
Bumps [cross-fetch](https://github.com/lquixada/cross-fetch ) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/lquixada/cross-fetch/releases )
- [Commits](https://github.com/lquixada/cross-fetch/compare/v3.1.4...v3.1.5 )
---
updated-dependencies:
- dependency-name: cross-fetch
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-29 15:18:06 +08:00
axleiro
ebcdd3b18d
adding solana-private.sh
...
for a new pipeline
2022-04-29 11:36:21 +05:30
Yueh-Hsuan Chiang
27efcae16c
(LedgerStore) Convert Rocks from tuple to struct with named fields ( #24761 )
...
#### Problem
The RocksDB wrapper,`Rocks`, under blockstore_db is currently implemented
as a tuple with unnamed fields. Accessing its fields requires syntax like `self.0`
which limits readability.
#### Summary of Changes
This PR converts Rocks from tuple to struct so that it has more human-readable
fields.
2022-04-28 21:32:48 -07:00
steveluscher
0e0065a3f2
fix: restore export of PACKET_DATA_SIZE to web3.js
2022-04-28 20:03:57 -07:00