mergify[bot]
a536f779ee
scans crds table in parallel for finding old labels ( #13073 ) ( #13107 )
...
From runtime profiles, the majority time of ClusterInfo::handle_purge
https://github.com/solana-labs/solana/blob/0776fa05c/core/src/cluster_info.rs#L1605-L1626
is spent scanning crds table finding old labels:
https://github.com/solana-labs/solana/blob/0776fa05c/core/src/crds.rs#L175-L197
This can be done in parallel given that gossip thread-pool:
https://github.com/solana-labs/solana/blob/0776fa05c/core/src/cluster_info.rs#L1637-L1641
is idle when handle_purge is invoked:
https://github.com/solana-labs/solana/blob/0776fa05c/core/src/cluster_info.rs#L1681
(cherry picked from commit 37c8842bcb
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2020-10-23 15:36:06 +00:00
mergify[bot]
84a5e5ec97
Remove spammy invalid rpc log ( #13100 ) ( #13102 )
...
(cherry picked from commit c95f6c4b83
)
Co-authored-by: Justin Starry <justin@solana.com >
2020-10-23 08:32:46 +00:00
Trent Nelson
53b074aa35
Bump version to 1.4.3
2020-10-23 04:20:28 +00:00
mergify[bot]
a4ad2925a2
Allow nodes to advertise a different rpc address over gossip ( #13053 ) ( #13078 )
...
* Allow nodes to advertise a different rpc address over gossip
* Feedback
(cherry picked from commit 8b0242a5d8
)
Co-authored-by: Justin Starry <justin@solana.com >
2020-10-22 07:06:27 +00:00
mergify[bot]
edfbd8d65a
Add replacements for Pubkey::new_rand()/Hash::new_rand() (bp #12987 ) ( #13076 )
...
* Add pubkey_new_rand(), mark Pubkey::new_rand() deprecated
(cherry picked from commit 0e68ed6a8d
)
* Add hash_new_rand(), mark Hash::new_rand() as deprecated
(cherry picked from commit 76f11c7dae
)
* Run `codemod --extensions rs Pubkey::new_rand solana_sdk::pubkey::new_rand`
(cherry picked from commit 7bc073defe
)
# Conflicts:
# programs/bpf/benches/bpf_loader.rs
# runtime/benches/accounts.rs
# runtime/src/accounts.rs
* Run `codemod --extensions rs Hash::new_rand solana_sdk:#️⃣ :new_rand`
(cherry picked from commit 17c391121a
)
* Remove unused pubkey::Pubkey imports
(cherry picked from commit 959880db60
)
# Conflicts:
# runtime/src/accounts_index.rs
* Resolve conflicts
Co-authored-by: Michael Vines <mvines@gmail.com >
2020-10-22 05:08:01 +00:00
mergify[bot]
5236acf4b0
Add ledger-tool dead-slots and improve purge a lot ( #13065 ) ( #13071 )
...
* Add ledger-tool dead-slots and improve purge a lot
* Reduce batch size...
* Add --dead-slots-only and fixed purge ordering
(cherry picked from commit 0776fa05c7
)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2020-10-21 18:57:22 +00:00
mergify[bot]
f76c128f4f
Various clean-ups before assert adjustment ( #13006 ) ( #13041 )
...
* Various clean-ups before assert adjustment
* oops
(cherry picked from commit efdb560e97
)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2020-10-21 02:41:20 +00:00
mergify[bot]
b143b9c3c2
Remove frozen ABI modules from solana-sdk (bp #13008 ) ( #13036 )
...
* Remove frozen ABI modules from solana-sdk
(cherry picked from commit 6858950f76
)
# Conflicts:
# Cargo.lock
# core/Cargo.toml
# frozen-abi/macro/Cargo.toml
# programs/bpf/Cargo.lock
# programs/stake/Cargo.toml
# programs/vote/Cargo.toml
# runtime/Cargo.toml
# sdk/Cargo.toml
# version/Cargo.toml
* rebase
* fix broken ci (#13039 )
Co-authored-by: Michael Vines <mvines@gmail.com >
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2020-10-21 02:00:45 +00:00
mergify[bot]
d05bfa08c7
improves threads' utilization in processing gossip packets ( #12962 ) ( #13023 )
...
ClusterInfo::process_packets handles incoming packets in a thread_pool:
https://github.com/solana-labs/solana/blob/87311cce7/core/src/cluster_info.rs#L2118-L2134
However, profiling runtime shows that threads are not well utilized and
a lot of the processing is done sequentially.
This commit redistributes the work done in parallel. Testing on a gce
cluster shows 20%+ improvement in processing gossip packets with much
smaller variations.
(cherry picked from commit 75d62ca095
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2020-10-20 19:59:35 +00:00
mergify[bot]
9da2ac7a44
passes through feature-set to gossip requests handling ( #12878 ) ( #12991 )
...
* passes through feature-set to down to gossip requests handling
* takes the feature-set from root_bank instead of working_bank
(cherry picked from commit 48283161c3
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2020-10-20 18:25:44 +00:00
mergify[bot]
94cad9873c
Support Debug Bank ( #13017 ) ( #13019 )
...
(cherry picked from commit c0675968b1
)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2020-10-20 17:20:40 +00:00
mergify[bot]
aa6406f263
implements DataBudget using atomics ( #12856 ) ( #12990 )
...
(cherry picked from commit 05cf15a382
)
Co-authored-by: behzad nouri <behzadnouri@gmail.com >
2020-10-20 12:51:42 +00:00
mergify[bot]
b51715d33c
validator: Activate RPC before halting on slot ( #13002 )
...
(cherry picked from commit 3b3f7341fa
)
Co-authored-by: Trent Nelson <trent@solana.com >
2020-10-20 03:31:04 +00:00
mergify[bot]
8a526f2f53
Follow up to persistent tower with tests and API cleaning ( #12350 ) ( #12972 )
...
* Follow up to persistent tower
* Ignore for now...
* Hard-code validator identities for easy reasoning
* Add a test for opt. conf violation without tower
* Fix compile with rust < 1.47
* Remove unused method
* More move of assert tweak to the asser pr
* Add comments
* Clean up
* Clean the test addressing various review comments
* Clean up a bit
(cherry picked from commit 54517ea454
)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2020-10-19 08:47:58 +00:00
mergify[bot]
677c184e47
Another some tower logging improvements ( #12940 ) ( #12943 )
...
(cherry picked from commit fd8ec27fe8
)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2020-10-16 07:00:27 +00:00
Trent Nelson
f3c986385f
Bump version to 1.4.2
2020-10-15 20:26:29 +00:00
Tyera Eulberg
489a7bb576
Bump spl-memo and spl-token versions ( #12914 )
2020-10-15 18:05:41 +00:00
mergify[bot]
f8413a28b5
Better tower logs for SwitchForkDecision and etc ( #12875 ) ( #12905 )
...
* Better tower logs for SwitchForkDecision and etc
* nits
* Update comment
(cherry picked from commit a44e4d386f
)
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
2020-10-15 10:41:03 +00:00
mergify[bot]
4b5ac44fc8
RPC: Add metrics for TX encoding ( #12880 )
...
(cherry picked from commit c26512255d
)
Co-authored-by: Trent Nelson <trent@solana.com >
2020-10-14 19:39:08 +00:00
Trent Nelson
6e91996606
Bump version to 1.4.1
2020-10-14 03:05:04 +00:00
mergify[bot]
99be00d61f
Add separate push queue to reduce push lock contention ( #12713 ) ( #12867 )
...
(cherry picked from commit 1f1eb9f26e
)
Co-authored-by: sakridge <sakridge@gmail.com >
2020-10-14 02:46:13 +00:00
mergify[bot]
275d096a46
solana vote-account
/solana stake-account
now works with RPC servers without --enable-rpc-transaction-history
(bp #12826 ) ( #12849 )
...
* Implementation-defined RPC server errors are now accessible to client/ users
(cherry picked from commit 247228ee61
)
* Cleanly handle RPC servers that don't have --enable-rpc-transaction-history enabled
(cherry picked from commit 14d793b22c
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2020-10-13 18:28:15 +00:00
mergify[bot]
f0d761630e
get_vote_accounts: access HashMap directly instead of turning it into an iterator ( #12829 )
...
(cherry picked from commit 649fe6d3b6
)
Co-authored-by: Michael Vines <mvines@gmail.com >
2020-10-13 05:25:31 +00:00
mergify[bot]
ed06e8b85d
Pacify cargo audit
(bp #12797 ) ( #12799 )
...
* Bump reqwest/rayon to get past `cargo audit`
(cherry picked from commit 8a119c1483
)
# Conflicts:
# dos/Cargo.toml
# download-utils/Cargo.toml
# metrics/Cargo.toml
* Switch to tempfile
(cherry picked from commit d3b0f87a49
)
* Rework cargo audit ignores
(cherry picked from commit 2301dcf973
)
* Cargo.lock
(cherry picked from commit 859eb606da
)
* rebase
Co-authored-by: Michael Vines <mvines@gmail.com >
2020-10-12 04:29:55 +00:00
mergify[bot]
6b9b107ead
Fix various ledger-tool error due to no builtins (bp #12759 ) ( #12766 )
...
* Fix various ledger-tool error due to no builtins (#12759 )
* Fix various ledger-tool error due to no builtins
* Add missing file...
(cherry picked from commit 1f4bcf70b0
)
# Conflicts:
# core/Cargo.toml
# ledger/Cargo.toml
* Rebase
Co-authored-by: Ryo Onodera <ryoqun@gmail.com >
Co-authored-by: Michael Vines <mvines@gmail.com >
2020-10-10 07:10:38 +00:00
mergify[bot]
3fef98fd1e
Expose all rewards (fees, rent, voting and staking) in RPC getConfirmedBlock and the cli (bp #12768 ) ( #12790 )
...
* Expose all rewards (fees, rent, voting and staking) in RPC getConfirmedBlock and the cli
(cherry picked from commit c5c8da1ac0
)
# Conflicts:
# Cargo.lock
# transaction-status/Cargo.toml
* fix: surface full block rewards type
(cherry picked from commit 1b16790325
)
* resolve conflicts
Co-authored-by: Michael Vines <mvines@gmail.com >
2020-10-10 06:11:42 +00:00
mergify[bot]
9188153b7d
Fix fee mismatch on snapshot deserialize ( #12697 ) ( #12754 )
...
Co-authored-by: Carl Lin <carl@solana.com >
(cherry picked from commit c879e7c1ad
)
Co-authored-by: carllin <wumu727@gmail.com >
2020-10-09 20:21:50 +00:00
mergify[bot]
e1a9cbaf3c
Add new internal accounts ( #12740 ) ( #12747 )
...
Co-authored-by: publish-docs.sh <maintainers@solana.com >
(cherry picked from commit 2c5f83c264
)
Co-authored-by: Dan Albert <dan@solana.com >
2020-10-09 02:19:55 +00:00
mergify[bot]
7a53ca18a6
Store program logs in blockstore / bigtable (TransactionWithStatusMeta) ( #12678 ) ( #12735 )
...
* introduce store program logs in blockstore / bigtable
* fix test, transaction logs created for successful transactions
* fix test for legacy bincode implementation around log_messages
* only api nodes should record logs
* truncate transaction logs to 100KB
* refactor log truncate for improved coverage
(cherry picked from commit 8f5431551e
)
Co-authored-by: Josh <josh.hundley@gmail.com >
2020-10-08 20:19:26 +00:00
behzad nouri
b5faa11f73
removes invalid/outdated pending push messages early ( #12555 )
...
In CrdsGossipPush::new_push_messages:
https://github.com/solana-labs/solana/blob/972619edb/core/src/crds_gossip_push.rs#L211-L228
we already have paid the cost of looking-up the label in crds table and
checking the hash value and wallclock only to find out that in some
cases the value is invalid or is outdated. So might as well remove the
value here rather than wait for the next call to
purge_old_pending_push_messages:
https://github.com/solana-labs/solana/blob/972619edb/core/src/crds_gossip_push.rs#L372
2020-10-07 18:29:20 +00:00
Jack May
41ad3dd8f0
Remove skip-no-mangle entirely ( #12696 )
2020-10-07 09:13:48 -07:00
Trent Nelson
e35889542b
RPC: Support base64 encoded transactions
...
Defaults to base58
2020-10-06 22:41:06 -06:00
Trent Nelson
7f67d36777
RPC: Check encoded transaction size before decoding
2020-10-06 22:41:06 -06:00
behzad nouri
a5c6a78f6d
filters out inactive nodes from push options ( #12674 )
...
* filters out inactive nodes from push options
https://github.com/solana-labs/solana/pull/12620
patched the DDOS issue with nodes which go offline:
https://github.com/solana-labs/solana/issues/12409
However, offline nodes still see (much lesser) traffic spike, likely
because no origins are pruned from their bloom filter in active set:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L276-L286
and so multiple nodes push redundant duplicate messages to them
simultaneously:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L254-L255
This commit will filter out inactive peers from potential push targets
entirely. To mitigate eclipse attacks, staked nodes are retried
periodically.
* uses current timestamp in test/crds_gossip
2020-10-06 13:48:32 +00:00
Ryo Onodera
026e7de819
Show commit in --version
and ledger-tool's log ( #12636 )
...
* Show commit in `--version` and ledger-tool's log
* Another handy hidden env var
* Fix test
* Rename to semver!
* Fix syntax error...
2020-10-04 00:30:26 +09:00
sakridge
71c469c72b
Weight push peers by how long we haven't pushed to them ( #12620 )
2020-10-02 13:57:26 -07:00
behzad nouri
2c669f65f1
limits number of threads in core/tests/crds_gossip.rs ( #12615 )
...
crds_gossip tests start large networks, which with large thread-pools
will exhaust system resources, causing failures in ci tests:
https://buildkite.com/solana-labs/solana/builds/31953
The commit limits size of thread-pools in the test.
2020-10-02 16:55:44 +00:00
Michael Vines
75b621160e
Add GetConfirmedBlocksWithLimit RPC method
2020-10-01 22:56:17 -07:00
Michael Vines
f41a73d76a
Expose validator cli arguments for pubsub buffer tuning
2020-10-01 20:30:40 -07:00
behzad nouri
1866521df6
retains hash value of outdated responses received from pull requests ( #12513 )
...
pull_response_fail_inserts has been increasing:
https://cdn.discordapp.com/attachments/478692221441409024/759096187587657778/pull_response_fail_insert.png
but for outdated values which fail to insert:
https://github.com/solana-labs/solana/blob/a5c3fc14b3/core/src/crds_gossip_pull.rs#L332-L344
https://github.com/solana-labs/solana/blob/a5c3fc14b3/core/src/crds.rs#L104-L108
are not recorded anywhere, and so the next pull request may obtain the
same redundant payload again, unnecessary taking bandwidth.
This commit holds on to the hashes of failed-inserts for a while, similar
to purged_values:
https://github.com/solana-labs/solana/blob/a5c3fc14b3/core/src/crds_gossip_pull.rs#L380
and filter them out for the next pull request:
https://github.com/solana-labs/solana/blob/a5c3fc14b3/core/src/crds_gossip_pull.rs#L204
2020-10-01 00:39:22 +00:00
Tyera Eulberg
c31a34fbcb
Include post balance information for rewards ( #12598 )
...
* Include post balance information for rewards
* Add post-balance to stored Reward struct
* Handle extended Reward in bigtable
Co-authored-by: Michael Vines <mvines@gmail.com >
2020-09-30 17:57:06 -06:00
Trent Nelson
3c7b9c2938
Move remaining nonce utils from runtime to SDK
2020-09-30 05:45:42 +00:00
behzad nouri
537bbde22e
builds crds filters in parallel ( #12360 )
...
Based on run-time profiles, the majority time of new_pull_requests is
spent building bloom filters, in hashing and bit-vec ops.
This commit builds crds filters in parallel using rayon constructs. The
added benchmark shows ~5x speedup (4-core machine, 8 threads).
2020-09-29 23:06:02 +00:00
Tyera Eulberg
96a7d4dbd8
Query BigTable for block time if does not exist in blockstore ( #12560 )
2020-09-29 21:39:36 +00:00
sakridge
ce98088457
Track inserted repair shreds ( #12455 )
2020-09-29 14:13:21 -07:00
Justin Starry
36d55c0667
Increase rpc pubsub max payload to unblock large account notifications ( #12548 )
2020-09-30 00:09:39 +08:00
behzad nouri
0d5258b6d3
separates out ClusterInfo::{gossip,listen} thread-pools ( #12535 )
...
https://github.com/solana-labs/solana/pull/12402
moved gossip-work threads:
https://github.com/solana-labs/solana/blob/afd9bfc45/core/src/cluster_info.rs#L2330-L2334
to ClusterInfo::new as a new field in the ClusterInfo struct:
https://github.com/solana-labs/solana/blob/35208c5ee/core/src/cluster_info.rs#L249
So that they can be shared between listen and gossip threads:
https://github.com/solana-labs/solana/blob/afd9bfc45/core/src/gossip_service.rs#L54-L67
However, in testing https://github.com/solana-labs/solana/pull/12360
it turned out this will cause breakage:
https://buildkite.com/solana-labs/solana/builds/31646
https://buildkite.com/solana-labs/solana/builds/31651
https://buildkite.com/solana-labs/solana/builds/31655
Whereas with separate thread pools all is good. It might be the case
that one thread is slowing down the other by exhausting the thread-pool
whereas with separate thread-pools we get fair scheduling guarantees
from the os.
This commit reverts https://github.com/solana-labs/solana/pull/12402
and instead adds separate thread-pools for listen and gossip threads:
https://github.com/solana-labs/solana/blob/afd9bfc45/core/src/gossip_service.rs#L54-L67
2020-09-29 09:05:31 +00:00
behzad nouri
57ed4e4657
patches bug in Crds::find_old_labels with pubkey specific timeout ( #12528 )
...
Current code only returns values which are expired based on the default
timeout. Example from the added unit test:
- value inserted at time 0
- pubkey specific timeout = 1
- default timeout = 3
Then at now = 2, the value is expired, but the function fails to return
the value because it compares with the default timeout.
2020-09-29 09:04:40 +00:00
Tyera Eulberg
89621adca7
Rpc -> proper optimistic confirmation ( #12514 )
...
* Add service to track the most recent optimistically confirmed bank
* Plumb service into ClusterInfoVoteListener and ReplayStage
* Clean up test
* Use OptimisticallyConfirmedBank in RPC
* Remove superfluous notifications from RpcSubscriptions
* Use crossbeam to avoid mpsc recv_timeout panic
* Review comments
* Remove superfluous last_checked_slots, but pass in OptimisticallyConfirmedBank for complete correctness
2020-09-28 20:43:05 -06:00
carllin
06f84c65f1
Fix rooted accounts cleanup, simplify locking ( #12194 )
...
Co-authored-by: Carl Lin <carl@solana.com >
2020-09-28 16:04:46 -07:00