-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Quorum Store] Implementation of quorum store components #6055
Merged
Merged
Changes from all commits
Commits
Show all changes
395 commits
Select commit
Hold shift + click to select a range
c97f66f
change back to close loop forge, comment something from QS DB
danielxiangzl 3c0adf5
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl 4baff03
try different network workers for different QS message types
danielxiangzl cd664e3
add end_batch counter
danielxiangzl 04422a9
comment out expiration round check just to see performance
danielxiangzl e5d0eb8
Merge branch 'main' into quorum-store-reset
danielxiangzl 6202909
Merge branch 'main' into quorum-store-reset
sasha8 91d16a0
test 1 network worker
danielxiangzl 016677e
back to multiple network workers, bring back QC DB
danielxiangzl 351a062
try parameters
danielxiangzl aca53f9
parameters
danielxiangzl b0308eb
disable tokio-console
danielxiangzl 487975d
parameter
danielxiangzl cd0cb7f
parameter
danielxiangzl 4e3cc5e
change run time
danielxiangzl e108bed
nit
danielxiangzl 32c0c7d
parameter
danielxiangzl 6f01d67
order PoS for consensus
sasha8 bbffe5f
Merge branch 'quorum-store-reset' of https://github.com/aptos-labs/ap…
sasha8 abed4b3
fmt
sasha8 66b5720
Merge branch 'main' into quorum-store-reset
sasha8 785759a
try parameter
danielxiangzl a89fcdf
run forge with different tps
danielxiangzl 801393f
trucking num bytes in PoS plus security bug fix
sasha8 9a21bb5
Merge branch 'quorum-store-reset' of https://github.com/aptos-labs/ap…
sasha8 68659b0
Merge branch 'main' into quorum-store-reset
sasha8 775494a
try standard forge
danielxiangzl 04d23b7
Merge branch 'main' into quorum-store-reset
danielxiangzl d4313ff
Merge branch 'main' into quorum-store-reset
danielxiangzl 36e0818
run limited bw test
danielxiangzl e91acf4
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl c8ec6f0
bw test
danielxiangzl 8196c4b
3 region test
danielxiangzl e2f7e11
3 region test with 100 nodes
danielxiangzl bd0ea25
3 region with 100 nodes and 100mbps BW
danielxiangzl 99dafd1
0 memory quota test
danielxiangzl 1248ed0
Merge branch 'main' into quorum-store-reset
danielxiangzl 246ad6b
3 region 100nodes test with 0 memory quota
danielxiangzl eb480f8
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl 9b29b08
Differ verifying batch respond to batch requester
sasha8 41ecafc
3 region 200 nodes
danielxiangzl 7b21541
300 nodes
danielxiangzl 229d7ff
debug print for batch out of order
danielxiangzl 1adfaa1
debug prints
danielxiangzl f68c225
try with larger timeouts
danielxiangzl 9da55f4
try parameters
danielxiangzl acf8353
Merge branch 'main' into quorum-store-reset
danielxiangzl 27acb22
no epoch change
danielxiangzl 6877ffe
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl 79c6795
debug
danielxiangzl d6cc33f
update logicaltime for quorum store when state sync
danielxiangzl d4d13f9
fix
danielxiangzl f9e85c3
Merge branch 'main' into quorum-store-reset
danielxiangzl bf1b8d3
temp fix just to see performance
danielxiangzl 9158b56
merge
danielxiangzl 1271079
quick fix
danielxiangzl d3223fd
Merge branch 'main' into quorum-store-reset
sasha8 0fd6982
update logical time differently
danielxiangzl c34ba26
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl 20e36ca
Merge branch 'main' into quorum-store-reset
danielxiangzl 6393490
test fix
sasha8 2add524
Merge branch 'quorum-store-reset' of https://github.com/aptos-labs/ap…
sasha8 1776f4e
revert change for testing
danielxiangzl 04a4163
debug
danielxiangzl dacd451
3 region 100 nodes
danielxiangzl b7a1556
debug info
danielxiangzl a501ca5
normal forge
danielxiangzl 84bd1d0
epoch change may contain nonincreasing rounds
danielxiangzl 5777f9c
fix
danielxiangzl 08c2cf0
parameter
danielxiangzl ad5321c
revert
danielxiangzl 09dfa09
fix batch_reader race between expiry extension and clear, add test
gelash f4267ad
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
gelash 0cc5e17
counter
danielxiangzl 083d991
add back notify commit during state sync
danielxiangzl 754cedf
nit
danielxiangzl c0825b7
revert for debug
danielxiangzl 1c749da
fix
danielxiangzl 0e51891
100 nodes
danielxiangzl 5395b63
low load test
danielxiangzl dccb79c
nit
danielxiangzl bf7dc6f
100nodes low tps test
danielxiangzl b92c31f
run high load test
danielxiangzl a7e60a5
Merge branch 'main' into quorum-store-reset
danielxiangzl e6d8dee
add 2 sec to expiration limit when pull from mempool, for high load test
danielxiangzl 7420196
add 10 sec to mempool expiration
danielxiangzl 58295f3
add back pressure to quorum sotre
danielxiangzl 9b01f70
fix
danielxiangzl 6a92694
parameter
danielxiangzl 31cd140
Merge branch 'main' into quorum-store-reset
danielxiangzl 000168b
parameter
danielxiangzl 50fcff8
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl 31a80af
test normal load
danielxiangzl dbb5c59
revert mempool
danielxiangzl 13e0bd7
close loop
danielxiangzl ec9374f
revert backpressure for testing
danielxiangzl 4b9a698
parameter with backpressure
danielxiangzl cd3cb36
end batch when QS is back pressured
danielxiangzl 2390ad1
Merge branch 'main' into quorum-store-reset
danielxiangzl c25d57c
parameter
danielxiangzl 9df8890
Merge branch 'main' into quorum-store-reset
danielxiangzl 47c7555
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl 2245d13
3 region 100 nodes with backpressure
danielxiangzl 2f5ad01
QS backpressure only when consensus also backpressure
danielxiangzl fee7830
Merge branch 'main' into quorum-store-reset
danielxiangzl 848eee4
test with larger block size
danielxiangzl a82ada8
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl 63c4cc5
parameter and counters
danielxiangzl b1fe287
Merge branch 'main' into quorum-store-reset
danielxiangzl b9fec28
block size
danielxiangzl 19ac30b
Merge branch 'main' into quorum-store-reset
danielxiangzl c19335e
200 nodes test
danielxiangzl a487d47
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl e2ffd17
counter
danielxiangzl a90e084
larger block size
danielxiangzl 0edf8ce
Merge branch 'main' into quorum-store-reset
danielxiangzl 6d6f7dc
close loop
danielxiangzl 625a180
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl 521ae2f
open loop 8k
danielxiangzl dfb0d9a
Merge branch 'main' into quorum-store-reset
danielxiangzl 11a4b2a
nit
danielxiangzl b7406cc
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl 9669e3d
close loop mempool 60k
danielxiangzl 56c554c
change backpressure
danielxiangzl f1d8277
change PoS queue
danielxiangzl 97b1c38
close loop
danielxiangzl 7361084
larger parameters
danielxiangzl 1cea780
test 20 nodes
danielxiangzl d349092
separate config file
danielxiangzl f410f0a
100nodes
danielxiangzl 98de606
Merge branch 'main' into quorum-store-reset
danielxiangzl 3ddbee5
hacky way to check if steaming is needed
danielxiangzl 1eed335
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl d2d0970
100 nodes test
danielxiangzl 840b284
parameters
danielxiangzl 383d24a
smaller block to remove expiration
danielxiangzl 9f80aad
add batch counts, fix unit test, clean up
danielxiangzl 7b51c8c
Merge branch 'main' into quorum-store-reset
danielxiangzl 75bb8f1
merge DataMenagers
sasha8 13e04e5
Merge branch 'quorum-store-reset' of https://github.com/aptos-labs/ap…
sasha8 57d0b8c
fix
danielxiangzl fd327fe
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl eff2ab4
Merge branch 'main' into quorum-store-reset
danielxiangzl 896dab0
rebase
danielxiangzl 0883f49
Merge branch 'main' into quorum-store-reset
danielxiangzl 8778191
fix potential panic
danielxiangzl 939ab4e
Merge branch 'quorum-store-reset' of github.com:aptos-labs/aptos-core…
danielxiangzl b566128
parameter and revert pos queue
danielxiangzl ac49162
test perf without fragment
danielxiangzl 1e3cbc0
use fragments, 8k open loop
danielxiangzl 680ecfd
Merge branch 'main' into quorum-store-reset
bchocho 8d1d229
fix build
bchocho 47dc97e
proper fix
bchocho c4a87db
fix forge
bchocho 7b28b21
fix a warning
bchocho 8a10655
Merge branch 'main' into quorum-store-reset
bchocho 9934587
fix test
bchocho 2b4a1c5
small fix for non-qs
bchocho 50ee113
Merge branch 'main' into quorum-store-reset
bchocho de2ac8c
Fix Cargo.lock from main
bchocho 919cb36
remove unnecessary changes in lib.rs
bchocho b311017
Fix unit test build
bchocho 230f1f1
quick fix for twins tests with quorum store off - need a better strat…
bchocho 38b8457
Make quorum store shutdown faster on epoch change
bchocho e119a8e
cleanup temp test files
bchocho ee299cc
revert changes in testsuite (forge-related changes)
bchocho 0461cc3
[DONOTLAND] hard-code quorum store
bchocho a8dd235
Fix CleanRequest?
bchocho 8f92f8f
submitting txn to all nodes
danielxiangzl a00a8df
3 region test
danielxiangzl c811c30
fix
danielxiangzl b32207b
Revert mempool expiration change (that fails tests)
bchocho 64205c4
Turn QS off to get baseline
bchocho ed0ab40
revert to QS
danielxiangzl 3bf4bad
Merge branch 'main' into quorum-store-reset
danielxiangzl 7966ffa
Merge branch 'main' into quorum-store-reset
danielxiangzl 88d0ffb
fmt
danielxiangzl d1310de
Create Batch Generator
bchocho e4e322c
Update changes to compile
bchocho 09eb646
batch_coordinator and quorum_store_coordinator
bchocho a6f238f
Add quorum_store_builder
bchocho fc3a00e
cleanup some build warnings
bchocho 2b8b839
checkpoint - mostly done?
bchocho 52e4aa3
passes most smoke tests
bchocho 8365fd2
fix unit test compile
bchocho 9d6bfea
remove unnecessary changes as prep for merge
bchocho 74c0764
Merge branch 'main' into brian/quorum-store-restructure-1230
bchocho d7fb5d9
some cleanup
bchocho aeed10a
Change tokio::spawn to spawn_named
bchocho b931d4b
Some cleanup, no more warnings in cargo build
bchocho efed7f5
Merge branch 'main' into brian/quorum-store-restructure-1230
bchocho 95aca26
resolve panics during shutdown
bchocho 8da5f9a
Merge branch 'main' into brian/quorum-store-restructure-1230
bchocho 1004508
add simple counter for QS backpressure, and change QS backpressure to…
danielxiangzl 98f8b16
more counters and simple counter fix
danielxiangzl 7e3b8e1
Merge branch 'main' into brian/quorum-store-restructure-1230
bchocho 5c366af
push backpressure from proof_manager to batch_generator
bchocho 6d01626
adding latest consensus back pressure when creating QS batch
danielxiangzl e87a9bb
Merge branch 'main' into brian/quorum-store-restructure-1230
danielxiangzl 2a1eaa6
update QS backpressure upon every commit
danielxiangzl cc9eedc
Merge branch 'brian/quorum-store-restructure-1230' of github.com:apto…
danielxiangzl 5297114
backpressure optimization and add counters
danielxiangzl 6e926bd
small fix
danielxiangzl bc7f367
counter
danielxiangzl 50ba3fd
Merge branch 'main' into brian/quorum-store-restructure-1230
danielxiangzl acb5413
counters and parameters
danielxiangzl 531cc99
counter
danielxiangzl f6d1234
Create multiple batch_coordinators and a single network listener
bchocho ad45f86
some cleanup for batch coordinator creation
bchocho e52b39b
more cleanup
bchocho 2e64ad8
fix some lints
bchocho ea60749
fix some lint issues
bchocho e6d225e
cargo +nightly fmt
bchocho c0d9a3b
fix cargo sort
bchocho 801e53a
some more cleanup
bchocho 400e9ce
Merge branch 'main' into brian/quorum-store-restructure-1230
danielxiangzl 401ae3b
wrap in a box
bchocho 0901934
Merge branch 'brian/quorum-store-restructure-1230' of https://github.…
bchocho 19b6cfd
Reset quorum store enabled to false in ConsensusConfigV1 for landing …
bchocho c64fb6c
More cleanup
bchocho ba64b3d
tiny cleanup
bchocho 7ed3102
More small cleanup
bchocho 44a87ad
cargo fmt
bchocho f408413
Revert forge changes and more cleanup and formatting
bchocho 7746750
Move quorum_store shutdown to the end, to avoid any new incoming requ…
bchocho d12abca
Turn quorum store back on for sanity check of cleanup
bchocho 461628c
proof_manager tests
bchocho a551956
batch_generator tests
bchocho d3b5ef9
remove unneeded config
bchocho 35118ba
some more cleanup
bchocho ae160d8
remove back pressure updates on proposal
bchocho 97cf10f
logic fix for backpressure proof cleanning
danielxiangzl aef1dab
Merge branch 'main' into brian/quorum-store-restructure-1230
danielxiangzl 6554cbb
more cleanup: remove all println
bchocho 95bd55a
linter
bchocho 4b6a3cb
unit test: check proof_manager_rx
bchocho 088b8ce
add a fail_point test
bchocho 795e8ca
Remove unused Result in init_proof
bchocho 278aca6
Add smoke test that flips quorum store to enabled
bchocho 1e915b1
Add batch_store_recovery unit test
bchocho 54bb290
Merge branch 'main' into brian/quorum-store-restructure-1230
bchocho 24d4fba
Reset values in prep for merge
bchocho e5cd3a2
address naming
bchocho 976dfbf
Merge branch 'main' into brian/quorum-store-restructure-1230
bchocho 4a2ad6f
Fix consensus-only test
bchocho ce2a170
Comment fix
bchocho 940b5c5
Build resource_groups test packages in a separate thread, to avoid st…
bchocho fc60dc9
cleanup spawn_named macro
bchocho 22d15ce
remove aptos-console as default
bchocho fc7cfc2
Merge branch 'main' into brian/quorum-store-restructure-1230
bchocho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright (c) Aptos | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use aptos_types::block_info::Round; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] | ||
#[serde(default, deny_unknown_fields)] | ||
pub struct QuorumStoreConfig { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you add some more comments what are the constants and what are they referring to? for example what channel is "channel_size" here |
||
pub channel_size: usize, | ||
pub proof_timeout_ms: usize, | ||
pub batch_request_num_peers: usize, | ||
pub mempool_pulling_interval: usize, | ||
pub end_batch_ms: u128, | ||
pub max_batch_counts: usize, | ||
pub max_batch_bytes: usize, | ||
pub batch_request_timeout_ms: usize, | ||
/// Used when setting up the expiration time for the batch initation. | ||
pub batch_expiry_round_gap_when_init: Round, | ||
/// Batches may have expiry set for batch_expiry_rounds_gap rounds after the | ||
/// latest committed round, and it will not be cleared from storage for another | ||
/// so other batch_expiry_grace_rounds rounds, so the peers on the network | ||
/// can still fetch the data they fall behind (later, they would have to state-sync). | ||
/// Used when checking the expiration time of the received batch against current logical time to prevent DDoS. | ||
pub batch_expiry_round_gap_behind_latest_certified: Round, | ||
pub batch_expiry_round_gap_beyond_latest_certified: Round, | ||
pub batch_expiry_grace_rounds: Round, | ||
pub memory_quota: usize, | ||
pub db_quota: usize, | ||
pub mempool_txn_pull_max_count: u64, | ||
pub mempool_txn_pull_max_bytes: u64, | ||
pub back_pressure_local_batch_num: usize, | ||
pub num_workers_for_remote_fragments: usize, | ||
} | ||
|
||
impl Default for QuorumStoreConfig { | ||
fn default() -> QuorumStoreConfig { | ||
QuorumStoreConfig { | ||
channel_size: 1000, | ||
proof_timeout_ms: 10000, | ||
batch_request_num_peers: 2, | ||
mempool_pulling_interval: 100, | ||
end_batch_ms: 500, | ||
max_batch_counts: 300, | ||
max_batch_bytes: 1000000, | ||
batch_request_timeout_ms: 10000, | ||
batch_expiry_round_gap_when_init: 100, | ||
batch_expiry_round_gap_behind_latest_certified: 500, | ||
batch_expiry_round_gap_beyond_latest_certified: 500, | ||
batch_expiry_grace_rounds: 5, | ||
memory_quota: 100000000, | ||
db_quota: 10000000000, | ||
mempool_txn_pull_max_count: 300, | ||
mempool_txn_pull_max_bytes: 1000000, | ||
// QS will be backpressured if the remaining local batches is more than this number | ||
back_pressure_local_batch_num: 10, | ||
// number of batch coordinators to handle QS Fragment messages, should be >= 1 | ||
num_workers_for_remote_fragments: 2, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change isn't strictly required, but it's right on the brink of a stack overflow on compilation (see #6523) so I kept it in the PR.