Skip to content
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

feat: rewritten gossip sync to be async from block processing #711

Merged
merged 32 commits into from
Jan 13, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bcc0c8d
strongly typed config
pompon0 Dec 13, 2023
26e43f1
WIP making it compile
pompon0 Dec 18, 2023
6f9539d
compiles with todos
pompon0 Dec 18, 2023
cb26d29
wip shifting payload to dal
pompon0 Dec 18, 2023
5ee4456
snapshot: before FinalBlock -> CommitQC
pompon0 Dec 19, 2023
b896301
simplified stuff
pompon0 Dec 19, 2023
dc103b0
snapshot
pompon0 Dec 19, 2023
0ea4776
last_in_batch in payload
pompon0 Dec 20, 2023
033d690
deduplicated gossip storage
pompon0 Dec 28, 2023
19850df
test db copying
pompon0 Dec 31, 2023
3039ef1
cloning db works
pompon0 Dec 31, 2023
93b7fa0
tests implemented, but fail
pompon0 Jan 1, 2024
31666b8
fast compilation
pompon0 Jan 2, 2024
2c3b870
consensus tests and documentation
pompon0 Jan 2, 2024
432ada4
Merge remote-tracking branch 'origin/main' into gprusak-consensus-con…
pompon0 Jan 3, 2024
261ad59
merged
pompon0 Jan 3, 2024
926cd26
zk fmt
pompon0 Jan 3, 2024
cc83a75
zk fmt, reverted en configuration
pompon0 Jan 3, 2024
27ed6b8
updated deps
pompon0 Jan 3, 2024
16e73f9
spellcheck
pompon0 Jan 3, 2024
827e2d1
removed unused deps
pompon0 Jan 3, 2024
4a9d4f3
applied comments
pompon0 Jan 3, 2024
ef6f949
added test of fetcher backfilling certs
pompon0 Jan 8, 2024
7e70bc0
removed the dal testonly method
pompon0 Jan 8, 2024
706559a
bumped era-consensus
pompon0 Jan 9, 2024
24ea1a6
Merge remote-tracking branch 'origin/main' into gprusak-consensus-con…
pompon0 Jan 10, 2024
5f12db2
missing changes
pompon0 Jan 10, 2024
3a6d733
sqlx queries
pompon0 Jan 10, 2024
7ec7094
applied comments
pompon0 Jan 10, 2024
dfa7497
lint
pompon0 Jan 10, 2024
622d26d
Merge branch 'main' into gprusak-consensus-config-work
pompon0 Jan 11, 2024
556e429
Merge branch 'main' into gprusak-consensus-config-work
pompon0 Jan 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 22 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions core/lib/dal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ zksync_system_constants = { path = "../constants" }
zksync_contracts = { path = "../contracts" }
zksync_types = { path = "../types" }
zksync_health_check = { path = "../health_check" }
zksync_consensus_roles = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "84cdd9e45fd84bc1fac0b394c899ae33aef91afa" }
zksync_consensus_storage = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "84cdd9e45fd84bc1fac0b394c899ae33aef91afa" }
zksync_protobuf = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "84cdd9e45fd84bc1fac0b394c899ae33aef91afa" }
zksync_consensus_roles = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "f2dae9a67b461ce3fe9a2f9eaade4172a051a87f" }
zksync_consensus_storage = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "f2dae9a67b461ce3fe9a2f9eaade4172a051a87f" }
zksync_protobuf = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "f2dae9a67b461ce3fe9a2f9eaade4172a051a87f" }

itertools = "0.10.1"
thiserror = "1.0"
Expand Down Expand Up @@ -54,4 +54,4 @@ tracing = "0.1"
assert_matches = "1.5.0"

[build-dependencies]
zksync_protobuf_build = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "84cdd9e45fd84bc1fac0b394c899ae33aef91afa" }
zksync_protobuf_build = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "f2dae9a67b461ce3fe9a2f9eaade4172a051a87f" }
2 changes: 1 addition & 1 deletion core/lib/dal/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fn main() {
zksync_protobuf_build::Config {
input_root: "src/models/proto".into(),
proto_root: "zksync/dal".into(),
dependencies: vec!["::zksync_consensus_roles::proto".parse().unwrap()],
dependencies: vec![],
protobuf_crate: "::zksync_protobuf".parse().unwrap(),
is_public: true,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DROP TABLE miniblocks_consensus;
ALTER TABLE miniblocks ADD COLUMN consensus JSONB NULL;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ALTER TABLE miniblocks DROP COLUMN consensus;

CREATE TABLE miniblocks_consensus (
number BIGINT NOT NULL,
certificate JSONB NOT NULL,
PRIMARY KEY(number),
CHECK((certificate->'message'->'proposal'->'number')::jsonb::numeric = number),
slowli marked this conversation as resolved.
Show resolved Hide resolved
CONSTRAINT miniblocks_fk FOREIGN KEY(number)
REFERENCES miniblocks(number)
ON DELETE CASCADE
);
Loading