2553 Commits

Author SHA1 Message Date
Will Hickey
b77ec9d46e Bump version to 1.8.17 2022-02-17 22:34:41 -08:00
Will Hickey
9238cef204 Bump version to v1.8.16 (#23222) 2022-02-17 19:34:03 -06:00
mergify[bot]
a352613c75 Fix snap server (backport #23140) (#23193)
* test-validator: use `JsonRpcConfig::default_for_test` for consistency

(cherry picked from commit f7118258d6)

# Conflicts:
#	core/src/test_validator.rs

* rpc: make `getGenesisHash` part of minimal api

(cherry picked from commit 4213ece7bd)

# Conflicts:
#	rpc/src/rpc.rs

* rpc: genericize client constructors

(cherry picked from commit aeda27433f)

# Conflicts:
#	client/src/http_sender.rs

* validator: invert vote account sanity check arg

(cherry picked from commit de30699fa5)

# Conflicts:
#	validator/src/bootstrap.rs
#	validator/src/main.rs

Co-authored-by: Trent Nelson <trent@solana.com>
2022-02-17 01:49:48 +00:00
Justin Starry
3424ace92c v1.8: Enforce tx metadata upload to bigtable (#23105)
* v1.8: Enforce tx metadata upload to bigtable

* fix bpf ci step
2022-02-16 18:02:03 +08:00
mergify[bot]
00abcbe1be Introduce slot-specific packet metrics (backport #22906) (#23076)
* Resolve conflicts

* add end_of_slot_filtered_invalid_count

* Increment end_of_slot_filtered_invalid_count

* Fixup comment

* Remove comment

* Move all process_tx metris into common function

* Switch to saturating_add_assign macro

* Refactor timings so each struct reports own timing

* Move into accumulate

* Remove unnecessary struct

Co-authored-by: Carl Lin <carl@solana.com>
2022-02-14 10:23:48 +00:00
carllin
fa264cf7ca Remove cost model from end of slot filtering (#23021) 2022-02-08 22:32:13 -05:00
mergify[bot]
43f791bffb patches bug in recv_mmsg when npkts != nrecv (backport #22276) (#22970)
* removes total-size from return value of recv_mmsg

(cherry picked from commit 4b24499916)

* patches bug in recv_mmsg when npkts != nrecv

If recv_mmsg receives 2 packets where the first one is filtered out,
then it returns npkts == 1:
https://github.com/solana-labs/solana/blob/01a096adc/streamer/src/recvmmsg.rs#L104-L115

But then streamer::packet::recv_from will erroneously keep the 1st
packet and drop the 2nd one:
https://github.com/solana-labs/solana/blob/01a096adc/streamer/src/packet.rs#L34-L49

To avoid this bug, this commit updates recv_mmsg to always return total
number of received packets. If socket address cannot be correctly
obtained, it is left as the default value which is UNSPECIFIED:
https://github.com/solana-labs/solana/blob/01a096adc/sdk/src/packet.rs#L145

(cherry picked from commit 379feecae5)

# Conflicts:
#	streamer/src/recvmmsg.rs

* removes mergify merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-02-06 17:14:07 +00:00
mergify[bot]
1570026c2c tracks erasure coding shreds indices explicitly (backport #21822) (#22969)
* tracks erasure coding shreds' indices explicitly (#21822)

The indices for erasure coding shreds are tied to data shreds:
https://github.com/solana-labs/solana/blob/90f41fd9b/ledger/src/shred.rs#L921

However with the upcoming changes to erasure schema, there will be more
erasure coding shreds than data shreds and we can no longer infer coding
shreds indices from data shreds.

The commit adds constructs to track coding shreds indices explicitly.

(cherry picked from commit 65d59f4ef0)

# Conflicts:
#	core/benches/retransmit_stage.rs
#	core/benches/shredder.rs
#	core/src/broadcast_stage/broadcast_duplicates_run.rs
#	core/src/broadcast_stage/broadcast_fake_shreds_run.rs
#	core/src/broadcast_stage/fail_entry_verification_broadcast_run.rs
#	core/src/window_service.rs
#	ledger/src/blockstore.rs
#	ledger/src/shred.rs
#	ledger/tests/shred.rs

* removes mergify merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-02-06 02:42:32 +00:00
mergify[bot]
89ec164787 removes next_shred_index from return value of entries to shreds api (backport #21961) (#22965)
* removes next_shred_index from return value of entries to shreds api (#21961)

next-shred-index is already readily available from returned data shreds.
The commit simplifies the api for upcoming changes to erasure coding
schema which will require explicit tracking of indices for coding shreds
as well as data shreds.

(cherry picked from commit 89d66c3210)

# Conflicts:
#	core/benches/shredder.rs
#	core/src/broadcast_stage/broadcast_duplicates_run.rs
#	core/src/broadcast_stage/broadcast_fake_shreds_run.rs
#	core/src/broadcast_stage/fail_entry_verification_broadcast_run.rs
#	core/src/broadcast_stage/standard_broadcast_run.rs
#	gossip/src/duplicate_shred.rs
#	ledger/src/blockstore.rs
#	ledger/src/shred.rs
#	ledger/tests/shred.rs

* removes mergify merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-02-05 23:05:40 +00:00
mergify[bot]
9361a50445 adds ShredId uniquely identifying each shred (backport #21820) (#22940)
* adds ShredId uniquely identifying each shred (#21820)

(cherry picked from commit 4ceb2689f5)

# Conflicts:
#	ledger/src/blockstore.rs

* removes mergify merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-02-04 20:45:39 +00:00
mergify[bot]
86e369ec8e uses Option<Slot> for SlotMeta.parent_slot (backport #21808) (#22936)
* uses Option<Slot> for SlotMeta.parent_slot (#21808)

SlotMeta.parent_slot for the head of a detached chain of slots is
unknown and that is indicated by u64::MAX which lacks type-safety:
https://github.com/solana-labs/solana/blob/6c108c8fc/ledger/src/blockstore_meta.rs#L203-L205

The commit changes the type to Option<Slot>. Backward compatibility is
maintained by customizing serde serialize/deserialize implementations.

(cherry picked from commit 8d980f07ba)

# Conflicts:
#	core/src/repair_generic_traversal.rs
#	ledger-tool/src/main.rs
#	ledger/src/blockstore.rs

* removes mergify merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-02-04 16:30:31 +00:00
mergify[bot]
70ec2cd244 Return actual committed transactions from process_transactions() (backport #22802) (#22904)
* Return actual committed transactions from process_transactions()

* resolve conflicts

* fixup comment

* Fixup banking_stage-dropped_tx_before_forwarding counter

* Count cost model throttled transactions

* fixup tx_count moved

* Fixup tests

* remove qos service

* Cleanup clippy

Co-authored-by: Carl Lin <carl@solana.com>
2022-02-04 03:52:11 +00:00
mergify[bot]
430cdf679e rpc: use minimal mode by default (backport #22734) (#22878)
* rpc: use minimal mode by default

(cherry picked from commit eac4a6df68)

# Conflicts:
#	core/src/validator.rs
#	local-cluster/tests/common.rs
#	local-cluster/tests/local_cluster.rs
#	replica-node/tests/local_replica.rs
#	rpc/src/rpc_service.rs
#	transaction-dos/src/main.rs

* test-validator-bin: reinstate full rpc method set

Co-authored-by: Trent Nelson <trent@solana.com>
2022-02-03 21:11:58 +00:00
mergify[bot]
6837d7691c adds more sanity checks to shreds (backport #21675) (#22869)
* adds more sanity checks to shreds (#21675)

(cherry picked from commit 8063273d09)

# Conflicts:
#	ledger/src/blockstore.rs

* removes mergify merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-02-01 18:13:19 +00:00
mergify[bot]
528980d037 changes Shred::parent return type to Option<Slot> (backport #21370) (#22844)
* changes Shred::parent return type to Option<Slot> (#21370)

Shred::parent can return garbage if the struct fields are invalid:
https://github.com/solana-labs/solana/blob/8a50b6302/ledger/src/shred.rs#L446-L453

The commit adds more sanity checks and changes the return type to Option<Slot>.

(cherry picked from commit dd338b6c9f)

# Conflicts:
#	ledger/src/shred.rs

* removes mergify merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-01-31 16:37:34 +00:00
mergify[bot]
fdc1b046bc Set the correct root in block commitment cache initialization (#22750) (#22756)
* Set the correct root in block commitment cache initialization

* clean up test

* bump

(cherry picked from commit d9c259a231)

# Conflicts:
#	replica-node/src/replica_node.rs

Co-authored-by: Justin Starry <justin@solana.com>
2022-01-27 02:49:28 +00:00
mergify[bot]
5d27a7f4c4 Refactor: Rename variables and helper method to PohRecorder (backport #22676) (#22687)
* Refactor: Rename variables and helper method to `PohRecorder` (#22676)

* Refactor: Rename leader_first_tick_height field

* Refactor: add `PohRecorder::slot_for_tick_height` helper

* Refactor: Add type for poh leader status

(cherry picked from commit 1240217a73)

# Conflicts:
#	core/src/replay_stage.rs
#	poh/src/poh_recorder.rs

* resolve conflicts

Co-authored-by: Justin Starry <justin@solana.com>
2022-01-23 04:16:53 +00:00
Anatoly Yakovenko
f3126f7e77 sigverify -- dedupe bloom filter too slow followups 2022-01-22 05:57:24 +00:00
Trent Nelson
9b90162564 Bump version to 1.8.15 (#22670) 2022-01-22 11:15:07 +08:00
mergify[bot]
9c01d90c70 Handle already discarded packets in discard_excess_packets (#22594) (#22634)
(cherry picked from commit 38b02bbcc0)

Co-authored-by: sakridge <sakridge@gmail.com>
2022-01-22 01:10:31 +00:00
anatoly yakovenko
edf1954817 Faster dedup v1.8 (#22619)
* Faster dedup
2022-01-21 08:19:55 -08:00
mergify[bot]
8eb0a1091a system-monitor-service: support percentages from bigger numbers (#22597)
(cherry picked from commit cca3dbc76d)

Co-authored-by: Trent Nelson <trent@solana.com>
2022-01-20 23:22:48 +00:00
anatoly yakovenko
cb5106a15b Dedup v1.8 (#22584)
backport
2022-01-19 21:31:55 -08:00
mergify[bot]
99846eea12 Add PacketBatch packet_indexes stat (#22564) (#22574)
* collect stats on packet batch indicies

* cleanup

* cleanup

* cleanup

* change name

(cherry picked from commit 650882217c)

# Conflicts:
#	core/src/banking_stage.rs

Co-authored-by: buffalu <85544055+buffalu@users.noreply.github.com>
2022-01-20 00:48:18 +00:00
mergify[bot]
78b82dedb1 improves sigverify discard_excess_packets performance (backport #22577) (#22579)
* improves sigverify discard_excess_packets performance (#22577)

As shown by the added benchmark, current code does worse if there is a
spam address plus a lot of unique addresses.

on current master:
test bench_packet_discard_many_senders  ... bench:   1,997,960 ns/iter (+/- 103,715)
test bench_packet_discard_mixed_senders ... bench:  14,256,116 ns/iter (+/- 534,865)
test bench_packet_discard_single_sender ... bench:   1,306,809 ns/iter (+/- 61,992)

with this commit:
test bench_packet_discard_many_senders  ... bench:   1,644,025 ns/iter (+/- 83,715)
test bench_packet_discard_mixed_senders ... bench:   1,089,789 ns/iter (+/- 86,324)
test bench_packet_discard_single_sender ... bench:     955,234 ns/iter (+/- 55,953)

(cherry picked from commit dcf44d2523)

# Conflicts:
#	core/benches/sigverify_stage.rs
#	core/src/sigverify_stage.rs

* removes mergify merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-01-19 21:23:34 +00:00
Trent Nelson
eede487797 Bump version to v1.8.14 (#22573) 2022-01-19 17:40:37 +08:00
mergify[bot]
42c3fbc198 Track discard time of excess packets in sigverify (#22554) (#22569)
* discard time histogram

* closer to the if

* update

(cherry picked from commit e616a7ebfc)

# Conflicts:
#	core/src/sigverify_stage.rs

Co-authored-by: anatoly yakovenko <anatoly@solana.com>
2022-01-19 02:42:13 +00:00
Tao Zhu
b357eda15b Revert "count vote transaction units to block cost"
This reverts commit 5655ea0061.
2022-01-18 15:10:49 -07:00
Tao Zhu
fc8f61368d Revert "Added vote limits to be 75% of total block limit"
This reverts commit 3e131a5324.
2022-01-18 15:10:49 -07:00
mergify[bot]
aabcdcf8fb Add execute metrics (backport #22296) (#22334)
* consolidate execute timings to a common module

* Add execute metrics

* Add metrics for executor creation

* Use saturating_add_assign macro

Co-authored-by: Trent Nelson <trent@solana.com>
Co-authored-by: Carl Lin <carl@solana.com>
2022-01-18 19:18:24 +00:00
mergify[bot]
81e65eae0b Use VecDeque instead of Vec in sigverify stage (#22538) (#22549)
avoid bad performance of remove(0) for a single sender

(cherry picked from commit 49443406fd)

# Conflicts:
#	core/src/sigverify_stage.rs

Co-authored-by: sakridge <sakridge@gmail.com>
2022-01-17 22:19:25 +00:00
mergify[bot]
38e72982bc metrics for generate new bank forks (#22492) (#22547)
* metrics for generate new bank forks

* fixed

* Apply suggestions from code review

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

* --fixup

* fixup!

Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
(cherry picked from commit 2d94e6e5d3)

# Conflicts:
#	core/src/replay_stage.rs

Co-authored-by: anatoly yakovenko <anatoly@solana.com>
2022-01-17 21:48:20 +00:00
Tao Zhu
3e131a5324 Added vote limits to be 75% of total block limit 2022-01-14 10:49:17 -06:00
Tao Zhu
5655ea0061 count vote transaction units to block cost 2022-01-14 10:49:17 -06:00
mergify[bot]
40ef11ec86 implements copy-on-write for staked-nodes (backport #19090) (#22507)
* implements copy-on-write for staked-nodes (#19090)

Bank::staked_nodes and Bank::epoch_staked_nodes redundantly clone
staked-nodes HashMap even though an immutable reference will suffice:
https://github.com/solana-labs/solana/blob/a9014cece/runtime/src/vote_account.rs#L77

This commit implements copy-on-write semantics for staked-nodes by
wrapping the underlying HashMap in Arc<...>.

(cherry picked from commit f302774cf7)

# Conflicts:
#	runtime/src/bank.rs
#	runtime/src/stakes.rs
#	runtime/src/vote_account.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-01-14 15:26:11 +00:00
Michael Vines
debac00724 Soften vote account identity mismatch from panic to runtime error 2022-01-13 19:31:03 -08:00
Tao Zhu
1ef48f369e downgrade individual per-program-timing to trace to reduce writes to influx
(cherry picked from commit 6614727be8)
2022-01-12 22:01:56 -06:00
Justin Starry
05e75ae937 Don't forward packets received from TPU forwards port (backport #22078) (#22180)
* Don't forward packets received from TPU forwards port (#22078)

* resolve conflicts
2022-01-10 14:36:56 +08:00
Trent Nelson
9aa7821277 Bump version to v1.8.13 2022-01-08 12:27:11 -07:00
mergify[bot]
f0de9b43be Lower vote-only-mode to 400 (#22210) (#22271)
(cherry picked from commit 2486e21ffe)

Co-authored-by: sakridge <sakridge@gmail.com>
2022-01-04 14:17:31 +00:00
mergify[bot]
6d7b64b140 Fix bug, add error specific timings (#22225) (#22251)
(cherry picked from commit 005592998d)

Co-authored-by: carllin <carl@solana.com>
2022-01-04 09:23:49 +00:00
mergify[bot]
f506851ca1 removes epoch_authorized_voters from VoteTracker (backport #22192) (#22250)
* removes epoch_authorized_voters from VoteTracker (#22192)

https://github.com/solana-labs/solana/pull/22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.

(cherry picked from commit 69d71f8f86)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2022-01-04 02:02:56 +00:00
mergify[bot]
22bbd91843 Count compute units even when transaction errors (backport #22182) (#22198)
* Resolve conflicts

* Return err

Co-authored-by: carllin <carl@solana.com>
2022-01-01 13:16:56 +00:00
mergify[bot]
a53dd611c0 uses enum for shred type (backport #21333) (#22147)
* uses enum for shred type

Current code is using u8 which does not have any type-safety and can
contain invalid values:
https://github.com/solana-labs/solana/blob/66fa062f1/ledger/src/shred.rs#L167

Checks for invalid shred-types are scattered through the code:
https://github.com/solana-labs/solana/blob/66fa062f1/ledger/src/blockstore.rs#L849-L851
https://github.com/solana-labs/solana/blob/66fa062f1/ledger/src/shred.rs#L346-L348

The commit uses enum for shred type with #[repr(u8)]. Backward
compatibility is maintained by implementing Serialize and Deserialize
compatible with u8, and adding a test to assert that.

(cherry picked from commit 57057f8d39)

# Conflicts:
#	core/src/retransmit_stage.rs
#	gossip/src/cluster_info.rs
#	ledger/Cargo.toml
#	ledger/src/blockstore.rs
#	ledger/src/shred.rs

* changes Blockstore::is_shred_duplicate arg type to ShredType

(cherry picked from commit 48dfdfb4d5)

# Conflicts:
#	ledger/src/blockstore.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-12-31 16:47:45 +00:00
mergify[bot]
ec970f9d69 checks for authorized voter early on in the vote-listener pipeline (backport #22169) (#22188)
* checks for authorized voter early on in the vote-listener pipeline (#22169)

Before votes are verified that they are signed by the authorized voter,
they might be dropped in verified-vote-packets code. If there are
enough many spam votes from unauthorized voters, this may potentially
drop valid votes but keep the false ones.
https://github.com/solana-labs/solana/blob/57986f982/core/src/verified_vote_packets.rs#L165-L168

(cherry picked from commit c0c6038654)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-12-30 17:52:36 +00:00
mergify[bot]
3b895104f3 ClusterInfoVoteListener send only missing votes to BankingStage (backport #20873) (#22135)
* ClusterInfoVoteListener send only missing votes to BankingStage (#20873)

(cherry picked from commit b30c94ce55)

# Conflicts:
#	core/src/cluster_info_vote_listener.rs
#	core/src/verified_vote_packets.rs
#	gossip/src/cluster_info.rs
#	local-cluster/tests/local_cluster.rs
#	runtime/src/bank.rs

* Resolve conflicts

* Remove Select

* Fixup tests

Co-authored-by: carllin <carl@solana.com>
2021-12-30 06:38:49 +00:00
mergify[bot]
a305fa0472 implements copy-on-write for vote-accounts (backport #19362) #22139 (#22139)
Bank::vote_accounts redundantly clones vote-accounts HashMap even though
an immutable reference will suffice:
https://github.com/solana-labs/solana/blob/95c998a19/runtime/src/bank.rs#L5174-L5186

This commit implements copy-on-write semantics for vote-accounts by
wrapping the underlying HashMap in Arc<...>.

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-12-28 21:18:37 +00:00
mergify[bot]
262b157d21 renames solana_runtime::vote_account::VoteAccount and makes it private (backport #19153) (#22141)
* makes solana_runtime::vote_account::VoteAccount private

VoteAccount is an implementation detail, and should not be public.
Only ArcVoteAccount is the public type.

(cherry picked from commit 1403eaeefc)

# Conflicts:
#	runtime/src/vote_account.rs

* renames solana_runtime::vote_account::VoteAccount

Rename:
  VoteAccount    -> VoteAccountInner  # the private type
  ArcVoteAccount -> VoteAccount       # the public type
(cherry picked from commit 00e5e12906)

# Conflicts:
#	core/src/progress_map.rs
#	ledger/src/blockstore_processor.rs
#	ledger/src/staking_utils.rs
#	runtime/src/bank.rs
#	runtime/src/epoch_stakes.rs
#	runtime/src/serde_snapshot/tests.rs
#	runtime/src/stakes.rs
#	runtime/src/vote_account.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-12-28 18:26:23 +00:00
mergify[bot]
039244417e removes redundant args from Shredder::try_recovery (backport #21226) (#22126)
* removes redundant args from Shredder::try_recovery (#21226)

Shredder::try_recovery is already taking a Vec<Shred> as an argument. All the
other arguments are embedded in the shreds, and are so redundant.

(cherry picked from commit 5fb0ab9d00)

# Conflicts:
#	ledger/src/shred.rs

* removes backport merge conflicts

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
2021-12-27 21:02:33 +00:00
Trent Nelson
685e40cbf2 validator: add contact-info query to admin port 2021-12-23 20:23:48 +00:00