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

Verify chunked txs #1618

Merged
merged 90 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
81039d6
Use anyhow
rakanalh Dec 17, 2024
4cec3cc
Add wxtid data to input / output
rakanalh Dec 17, 2024
7321775
Concatenate chunked proofs and verify
rakanalh Dec 17, 2024
43c911f
Store and pass wtxid_data
rakanalh Dec 17, 2024
073e092
Use flatten
rakanalh Dec 17, 2024
7958609
Fix tests
rakanalh Dec 17, 2024
fff8c1e
Use BTreeSet
rakanalh Dec 17, 2024
a0dcb68
Remove input field
rakanalh Dec 17, 2024
d3feecf
Remove field from storage
rakanalh Dec 17, 2024
0f4aac4
Revert change in da_block_handler
rakanalh Dec 17, 2024
0abc89e
Make wtxid_data mutable
rakanalh Dec 17, 2024
c7a562a
Move import
rakanalh Dec 18, 2024
3f49ea0
Add wtxids to aggregate
rakanalh Dec 20, 2024
8e98069
Pass wtxid to blob init
rakanalh Dec 20, 2024
91c2400
Verify chunk blob
rakanalh Dec 20, 2024
42b203a
Inject wtxid into blob
rakanalh Dec 20, 2024
e522194
fix test compilation
rakanalh Dec 20, 2024
64b9c58
Merge remote-tracking branch 'origin/nightly' into rakanalh/verify-ch…
rakanalh Dec 20, 2024
efc50a1
Fix problem with processing proof
rakanalh Dec 20, 2024
9c1e981
Oh my god, clippy!
rakanalh Dec 20, 2024
f0b2c4a
Get hash unverified
rakanalh Dec 20, 2024
6a07360
Rename wtxid_data to unprocessed_chunks
rakanalh Dec 20, 2024
68d1d14
Distinguish between txid and wtxid
rakanalh Dec 20, 2024
065212f
Check call result
rakanalh Dec 20, 2024
bae6c56
Store unprocessed chunks
rakanalh Dec 21, 2024
b75acbd
Merge remote-tracking branch 'origin/nightly' into rakanalh/verify-ch…
rakanalh Dec 21, 2024
72bebeb
Merge remote-tracking branch 'origin/nightly' into rakanalh/verify-ch…
rakanalh Dec 22, 2024
90d2c0a
pair coding outline for MMR usage
eyusufatik Dec 23, 2024
576495d
Add MMR implementation
rakanalh Dec 24, 2024
98f820b
Store the whole Native MMR in it's own DB
rakanalh Dec 24, 2024
c0bf438
WIP fixes
rakanalh Dec 24, 2024
d3c14c2
Pass MMR DB
rakanalh Dec 26, 2024
32e2858
Merge remote-tracking branch 'origin/nightly' into rakanalh/verify-ch…
rakanalh Dec 26, 2024
6b8e61c
Merge remote-tracking branch 'origin/nightly' into rakanalh/verify-ch…
rakanalh Dec 26, 2024
68ee8b7
Fix tests
rakanalh Dec 26, 2024
bd4b72a
Feed mmr native with unused chunks
rakanalh Dec 26, 2024
3569870
Fix no-std
rakanalh Dec 26, 2024
78cc958
Feed chunks into MMR native
rakanalh Dec 26, 2024
1bde561
Resolve clippy issues
rakanalh Dec 26, 2024
1ce70d6
rustify block
rakanalh Dec 26, 2024
2ca10e9
Finalize logic related to circuit verification
rakanalh Dec 27, 2024
51fac04
Use all hints
rakanalh Dec 27, 2024
22a5e29
Address feedback
rakanalh Jan 2, 2025
8a6106c
Redundant removal
rakanalh Jan 2, 2025
38b2f7c
Add None for non-existent chunks as hint
rakanalh Jan 2, 2025
0c51111
Add storage trait
rakanalh Jan 2, 2025
ed226e0
Implement storage for MmrDB
rakanalh Jan 2, 2025
2c44cb3
Use storage in MMRNative
rakanalh Jan 2, 2025
7e0110e
No need for map
rakanalh Jan 2, 2025
d140ed2
Attach wtxid to every blob in DA data
rakanalh Jan 2, 2025
fe41b30
Satisfy clippy
rakanalh Jan 2, 2025
062283a
Load MMR nodes on demand
rakanalh Jan 5, 2025
69a0f2c
One liner initializations
rakanalh Jan 5, 2025
4bfc9c2
Use single instance MMR and use match
rakanalh Jan 5, 2025
6e2aa5f
Separate native and guest code
rakanalh Jan 5, 2025
c2f1f76
Use type alias
rakanalh Jan 5, 2025
2283cd2
Turn usize into u32
rakanalh Jan 6, 2025
7d491ac
Merge remote-tracking branch 'origin/nightly' into rakanalh/verify-ch…
rakanalh Jan 6, 2025
ac44f59
Clippy stuff
rakanalh Jan 6, 2025
4d9fed6
Remove anyhow from light client circuit
rakanalh Jan 6, 2025
88f63c7
address comments regarding aggregate arm chunk matching
eyusufatik Jan 7, 2025
9d94983
Merge remote-tracking branch 'origin/nightly' into rakanalh/verify-ch…
rakanalh Jan 7, 2025
1bdc35e
optimize get/removing from btree
eyusufatik Jan 7, 2025
793291e
fix comparison logical error
eyusufatik Jan 7, 2025
d1fac3a
Blob with sender versioned serialized (#1680)
yaziciahmet Jan 7, 2025
73f61ac
Add aggregate assumptions && aggregate expected failures && merge nig…
yaziciahmet Jan 7, 2025
60d60f4
Lint
yaziciahmet Jan 7, 2025
77d21d4
Fix overwriting of assumptions
yaziciahmet Jan 7, 2025
093817b
Return None in mmr generate proof if chunk not found
yaziciahmet Jan 8, 2025
fd78a49
WIP implement verify chunked txs test and couple of bug fixes
ercecan Jan 8, 2025
5d23853
Rework decompress chunks method with a more efficient api
yaziciahmet Jan 8, 2025
00ee8ff
Make tests compilable
yaziciahmet Jan 8, 2025
69ef08e
Mine wtxid for chunked txs (#1683)
kpp Jan 8, 2025
df7d392
Verify chunked txs fixes (#1687)
ercecan Jan 9, 2025
b31e323
Fix test
ercecan Jan 9, 2025
6e43d80
Merge branch 'nightly' of https://github.com/chainwayxyz/citrea into …
ercecan Jan 9, 2025
38e247f
Verify aggregate final fixes (#1682)
yaziciahmet Jan 10, 2025
510795b
Merge branch 'nightly' into rakanalh/verify-chunked-txs
yaziciahmet Jan 10, 2025
018befb
Add circuit logs
yaziciahmet Jan 10, 2025
485e7a3
Add logs to native light client prover
yaziciahmet Jan 10, 2025
6c92dda
Less prints in circuit
yaziciahmet Jan 10, 2025
e7603c3
Add unit tests for verify chunked txs
ercecan Jan 10, 2025
3359818
fix body or wtxid change vulnr. (#1691)
eyusufatik Jan 10, 2025
8ac614b
Lints
ercecan Jan 10, 2025
20c31cf
Add malformed mmr hints tests
ercecan Jan 10, 2025
b5b26ad
Add test util function to create mmr hints
ercecan Jan 10, 2025
fbc4b99
println to info
yaziciahmet Jan 10, 2025
d312fe3
Fix commits
ercecan Jan 10, 2025
84660f0
Fix contains check by wtxid
yaziciahmet Jan 10, 2025
e8dca91
Lint
yaziciahmet Jan 10, 2025
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
4 changes: 3 additions & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ alloy-eips = { version = "0.4.2", default-features = false }
alloy-consensus = { version = "0.4.2", default-features = false, features = ["serde", "serde-bincode-compat"] }
alloy-network = { version = "0.4.2", default-features = false }

citrea-e2e = { git = "https://github.com/chainwayxyz/citrea-e2e", rev = "f75fe92" }
citrea-e2e = { git = "https://github.com/chainwayxyz/citrea-e2e", rev = "ab88a607ca5aad2245d3c54f8822e02a1b71f50e" }

[patch.crates-io]
bitcoincore-rpc = { version = "0.18.0", git = "https://github.com/chainwayxyz/rust-bitcoincore-rpc.git", rev = "ca3cfa2" }
Expand Down
1 change: 1 addition & 0 deletions bin/citrea/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ bincode = { workspace = true }
borsh = { workspace = true }
hex = { workspace = true }
jmt = { workspace = true }
rand = { workspace = true }
reqwest = { workspace = true }
risc0-zkvm = { workspace = true, default-features = false, features = ["std"] }
rs_merkle = { workspace = true }
Expand Down
3 changes: 3 additions & 0 deletions bin/citrea/src/rollup/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use citrea_sequencer::CitreaSequencer;
use jsonrpsee::RpcModule;
use sov_db::ledger_db::migrations::LedgerDBMigrator;
use sov_db::ledger_db::{LedgerDB, SharedLedgerOps};
use sov_db::mmr_db::MmrDB;
use sov_db::rocks_db_config::RocksdbConfig;
use sov_db::schema::types::SoftConfirmationNumber;
use sov_modules_api::Spec;
Expand Down Expand Up @@ -449,6 +450,7 @@ pub trait CitreaRollupBlueprint: RollupBlueprint {
None,
);
let ledger_db = self.create_ledger_db(&rocksdb_config);
let mmr_db = MmrDB::new(&rocksdb_config)?;

let prover_service = self
.create_prover_service(
Expand Down Expand Up @@ -500,6 +502,7 @@ pub trait CitreaRollupBlueprint: RollupBlueprint {
batch_prover_code_commitments_by_spec,
light_client_prover_code_commitment,
light_client_prover_elfs,
mmr_db,
task_manager,
)?;

Expand Down
Loading
Loading