- don't store pending tx signatures and costs in CostTracker
- apply tx costs to global state immediately again
- go from commit_or_cancel to update_or_remove, where the cost tracker
is either updated with the true costs for successful tx, or the costs
of a retryable tx is removed
- move the function into qos_service and hold the cost tracker lock for
the whole loop
(cherry picked from commit 924b8ea1eb)
# Conflicts:
# core/src/qos_service.rs
# runtime/src/cost_tracker.rs
- In-fly transactions are pended in cost_tracker until being committed
or cancelled;
(cherry picked from commit 9e07272af8)
# Conflicts:
# core/src/qos_service.rs
# runtime/src/cost_model.rs
# runtime/src/cost_tracker.rs
* Revert "fix tests after merge"
This reverts commit ba2d83f580.
(cherry picked from commit 0a17edcc1f)
* Revert "1. Persist to blockstore less frequently;"
This reverts commit 7aa1fb4e24.
(cherry picked from commit c878c9e2cb)
# Conflicts:
# core/src/cost_update_service.rs
# core/src/tvu.rs
# runtime/src/cost_model.rs
* Revert "use EMA in place of Welford"
This reverts commit 6587dbfa47.
(cherry picked from commit 9acbfa5eb1)
* Revert "- estimate a program cost as 2 standard deviation above mean"
This reverts commit a25ac1c988.
(cherry picked from commit 5a0cd05866)
# Conflicts:
# core/src/cost_update_service.rs
# runtime/src/cost_model.rs
* fix merge conflicts
Co-authored-by: Carl Lin <carl@solana.com>
Co-authored-by: Tao Zhu <tao@solana.com>
* Fix the flaky test test_restart_tower_rollback (#23129)
* Add flag to disable voting until a slot to avoid duplicate voting
* Fix the tower rollback test and remove it from flaky.
(cherry picked from commit ab92578b02)
* Resolve conflicts
Co-authored-by: Ashwin Sekar <ashwin@solana.com>
* Add simulation detection countermeasure (#22880)
* Add simulation detection countermeasures
* Add program and test using TestValidator
* Remove incinerator deposit
* Remove incinerator
* Update Cargo.lock
* Add more features to simulation bank
* Update Cargo.lock per rebase
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
(cherry picked from commit c42b80f099)
# Conflicts:
# programs/bpf/Cargo.lock
# programs/bpf/Cargo.toml
* Update Cargo.lock
Co-authored-by: Michael Vines <mvines@gmail.com>
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
* shrink batches when over 80% of the space is wasted (#23066)
* shrink batches when over 80% of the space is wasted
(cherry picked from commit 83d31c9e65)
# Conflicts:
# core/benches/sigverify_stage.rs
# core/src/sigverify_stage.rs
# perf/src/sigverify.rs
* fixup!
Co-authored-by: anatoly yakovenko <anatoly@solana.com>
* flag end-of-slot when poh bank is gone
(cherry picked from commit 03bf66a51b)
# Conflicts:
# core/src/banking_stage.rs
* merge fix
Co-authored-by: Tao Zhu <tao@solana.com>
* - estimate a program cost as 2 standard deviation above mean
- replaced get_average / get_mode with get_default to assign max units to unknown program
(cherry picked from commit a25ac1c988)
# Conflicts:
# runtime/src/cost_model.rs
* use EMA in place of Welford
(cherry picked from commit 6587dbfa47)
* 1. Persist to blockstore less frequently;
2. reduce alpha for EMA to 1 percent to have roughly 200 data points for estimatio
(cherry picked from commit 7aa1fb4e24)
# Conflicts:
# core/src/cost_update_service.rs
# core/src/tvu.rs
# runtime/src/cost_model.rs
* fix tests after merge
(cherry picked from commit ba2d83f580)
* fix merge
Co-authored-by: Tao Zhu <tao@solana.com>
* rpc: use minimal mode by default
(cherry picked from commit eac4a6df68)
# Conflicts:
# local-cluster/tests/local_cluster.rs
* test-validator-bin: reinstate full rpc method set
Co-authored-by: Trent Nelson <trent@solana.com>
Instead of reconstructing WeightedShuffle struct for each shred
broadcast or retransmit, we can use the same struct with minimal
mutations.
(cherry picked from commit e3b137066d)
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
* Set the correct root in block commitment cache initialization
* clean up test
* bump
(cherry picked from commit d9c259a231)
Co-authored-by: Justin Starry <justin@solana.com>
* Add estimated and actual block cost units metrics (#22326)
* - report cost details for transactions selected to be packed into block;
- report estimated execution units packed into block, and actual units and time after execution
* revert reporting per-transaction details
* rollup transaction cost details (eg signature cost, wirte lock, data cost and execution costs) into block stats
* change naming from units to cu, use struct to replace tuple
(cherry picked from commit 1309a9cea0)
# Conflicts:
# core/src/banking_stage.rs
# core/src/qos_service.rs
* fix conflicts
Co-authored-by: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com>
Co-authored-by: Tao Zhu <tao@solana.com>
* 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/src/sigverify_stage.rs
* removes mergify merge conflicts
Co-authored-by: behzad nouri <behzadnouri@gmail.com>
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>