Skip to content
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a59ddbc
kpp's changes for da
kpp Oct 3, 2024
39379d1
fix tests after kpp's changes
eyusufatik Oct 5, 2024
a84812c
make prover service accept bytes so that it can work on different inputs
eyusufatik Oct 5, 2024
e6c0d19
lint
eyusufatik Oct 5, 2024
d294fea
rename prover to batch prover
eyusufatik Oct 5, 2024
e2231af
move prover service to its own crate
eyusufatik Oct 5, 2024
1b82083
rename prover related functions to batch prover *
eyusufatik Oct 5, 2024
90516db
rename more prover related things to batch prover *
eyusufatik Oct 5, 2024
30ab798
create barebone light client prover crate
eyusufatik Oct 5, 2024
daa01e4
add runner to light client prover
eyusufatik Oct 5, 2024
d66ccff
fix cherry pick mistake on da changes
eyusufatik Oct 5, 2024
fdc8d0c
write native part skeleton for light client prover
eyusufatik Oct 5, 2024
560c2f3
add mock da and bitcoin da light client circuit guests
eyusufatik Oct 6, 2024
3fc9d19
Fix light client method ids
yaziciahmet Oct 7, 2024
c340976
Fix typo
yaziciahmet Oct 7, 2024
8e5f559
Remove unused dep
yaziciahmet Oct 7, 2024
50170ec
Add Send + Sync to LightClientLedgerOps
yaziciahmet Oct 7, 2024
54e06c5
Light client starter continued (#1297)
yaziciahmet Oct 8, 2024
96dfc23
Update e2e crate
yaziciahmet Oct 8, 2024
670dc6a
Block on light client run
yaziciahmet Oct 8, 2024
e9159b7
Write light client test skeleton
yaziciahmet Oct 8, 2024
153166f
Add info logs
yaziciahmet Oct 9, 2024
32f0840
Fix lint
yaziciahmet Oct 9, 2024
9d0a142
lint
yaziciahmet Oct 9, 2024
af89498
Target citrea-e2e light client branch
yaziciahmet Oct 9, 2024
b84148e
Add E2E test to light client proof (#1319)
yaziciahmet Oct 14, 2024
2b216fc
Lint
yaziciahmet Oct 14, 2024
ca235e0
Fix lint
yaziciahmet Oct 14, 2024
f397b63
Fix udeps & no-std
yaziciahmet Oct 14, 2024
ddfd420
udeps
yaziciahmet Oct 14, 2024
3008656
Query sequencer when cant find l1 height in ledger
yaziciahmet Oct 14, 2024
e0a3cfd
Merge branch 'nightly' into esad/light-client-starter
yaziciahmet Oct 14, 2024
bb5a641
Wait for sequencer 1st block
yaziciahmet Oct 14, 2024
6da8683
Fix tracing test
yaziciahmet Oct 14, 2024
2d73305
Merge branch 'nightly' into esad/light-client-starter
yaziciahmet Oct 15, 2024
2d65013
Store DaDataLightClient::{Aggregate, Chunk} kinds on DA (#1296)
kpp Oct 16, 2024
90ffbf4
Merge branch 'nightly' into esad/light-client-starter
eyusufatik Oct 23, 2024
0368acb
use current citrea-e2e
eyusufatik Oct 23, 2024
4d38d84
update rev again
eyusufatik Oct 23, 2024
5c5d277
Remove unused secp256k1 patch from LC mock
kpp Oct 23, 2024
2bd2baa
Merge branch 'nightly' into esad/light-client-starter
kpp Oct 23, 2024
640a976
Update citrea-e2e for light client starter (#1372)
kpp Oct 24, 2024
02736d0
Update light client cargo toml to use 1.1.2 risc0
yaziciahmet Oct 24, 2024
0341187
Rename guest methods
yaziciahmet Oct 24, 2024
14327f7
Remove comment
yaziciahmet Oct 24, 2024
4d362fd
Revert add_hint to take BorshSerialize
yaziciahmet Oct 24, 2024
42c5057
update ci yml's to use the correct method id name
eyusufatik Oct 25, 2024
bc27233
Merge branch 'nightly' into esad/light-client-starter
eyusufatik Oct 25, 2024
610eb17
revert add_hint change
eyusufatik Oct 25, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ demo_data/
resources/dbs/da-db/
resources/dbs/sequencer-db/
resources/dbs/full-node-db/
resources/dbs/prover-db/
resources/dbs/batch-prover-db/
resources/dbs/light-client-prover-db/
resources/bitcoin/inscription_txs/
/.vscode/*

Expand Down
134 changes: 98 additions & 36 deletions Cargo.lock

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

14 changes: 9 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ resolver = "2"
members = [
# Citrea
"bin/citrea",
"crates/common",
"crates/primitives",
"crates/pruning",
"crates/batch-prover",
"crates/bitcoin-da",
"crates/evm",
"crates/citrea-stf",
"crates/common",
"crates/ethereum-rpc",
"crates/evm",
"crates/fullnode",
"crates/light-client-prover",
"crates/primitives",
"crates/prover-services",
"crates/pruning",
"crates/risc0-bonsai",
"crates/sequencer",
"crates/sequencer-client",
Expand Down Expand Up @@ -102,7 +106,7 @@ rayon = "1.8.0"
rlimit = "0.10.2"
rustc_version_runtime = { version = "0.3.0", default-features = false }
reqwest = { version = "0.12.5", features = ["rustls-tls", "json", "http2"], default-features = false }
rocksdb = { version = "0.22.0", features = ["lz4"] }
rocksdb = { version = "0.22.0", features = ["lz4"], default-features = false }
serde = { version = "1.0.192", default-features = false, features = ["alloc", "derive"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
sha2 = { version = "0.10.8", default-features = false }
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ clean: ## Cleans compiled

clean-node: ## Cleans local dbs needed for sequencer and nodes
rm -rf resources/dbs/sequencer-db
rm -rf resources/dbs/prover-db
rm -rf resources/dbs/batch-prover-db
rm -rf resources/dbs/light-client-prover-db
rm -rf resources/dbs/full-node-db

clean-txs:
Expand Down
6 changes: 4 additions & 2 deletions bin/citrea/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@ resolver = "2"
[dependencies]
# Citrea deps
bitcoin-da = { path = "../../crates/bitcoin-da", features = ["native"] }
citrea-batch-prover = { path = "../../crates/batch-prover" }
citrea-common = { path = "../../crates/common" }
citrea-fullnode = { path = "../../crates/fullnode" }
citrea-light-client-prover = { path = "../../crates/light-client-prover", features = ["native"] }
citrea-primitives = { path = "../../crates/primitives" }
citrea-prover = { path = "../../crates/prover" }
citrea-risc0 = { package = "risc0", path = "./provers/risc0" }
citrea-risc0-bonsai-adapter = { path = "../../crates/risc0-bonsai", features = ["native"] }
citrea-sequencer = { path = "../../crates/sequencer" }
citrea-stf = { path = "../../crates/citrea-stf", features = ["native"] }
ethereum-rpc = { path = "../../crates/ethereum-rpc" }
prover-services = { path = "../../crates/prover-services" }
sequencer-client = { path = "../../crates/sequencer-client" }

# Sovereign-SDK deps
Expand Down Expand Up @@ -86,7 +88,7 @@ rustc_version_runtime = { workspace = true }
# bitcoin-e2e dependencies
bitcoin.workspace = true
bitcoincore-rpc.workspace = true
citrea-e2e = { git = "https://github.com/chainwayxyz/citrea-e2e", rev = "a96abcf" }
citrea-e2e = { git = "https://github.com/chainwayxyz/citrea-e2e", branch = "yaziciahmet/light-client-final" }

[features]
default = [] # Deviate from convention by making the "native" feature active by default. This aligns with how this package is meant to be used (as a binary first, library second).
Expand Down
2 changes: 1 addition & 1 deletion bin/citrea/provers/risc0/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resolver = "2"
risc0-build = { workspace = true }

[package.metadata.risc0]
methods = ["guest-mock", "guest-bitcoin"]
methods = ["guest-mock", "guest-bitcoin", "guest-light-client-bitcoin", "guest-light-client-mock"]

[features]
bench = []
18 changes: 18 additions & 0 deletions bin/citrea/provers/risc0/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ fn main() {
let elf = r#"
pub const BITCOIN_DA_ELF: &[u8] = &[];
pub const MOCK_DA_ELF: &[u8] = &[];
pub const LIGHT_CLIENT_BITCOIN_DA_ELF: &[u8] = &[];
pub const LIGHT_CLIENT_MOCK_DA_ELF: &[u8] = &[];
pub const BITCOIN_DA_ID: [u32; 8] = [0u32; 8];
pub const MOCK_DA_ID: [u32; 8] = [0u32; 8];
pub const LIGHT_CLIENT_BITCOIN_DA_ID: [u32; 8] = [0u32; 8];
pub const LIGHT_CLIENT_MOCK_DA_ID: [u32; 8] = [0u32; 8];
"#;

return std::fs::write(methods_path, elf).expect("Failed to write mock rollup elf");
Expand Down Expand Up @@ -74,5 +78,19 @@ fn get_guest_options() -> HashMap<&'static str, risc0_build::GuestOptions> {
use_docker: use_docker.clone(),
},
);
guest_pkg_to_options.insert(
"citrea-light-client-bitcoin",
GuestOptions {
features: features.clone(),
use_docker: use_docker.clone(),
},
);
guest_pkg_to_options.insert(
"citrea-light-client-mock",
GuestOptions {
features: features.clone(),
use_docker: use_docker.clone(),
},
);
guest_pkg_to_options
}
37 changes: 37 additions & 0 deletions bin/citrea/provers/risc0/guest-bitcoin/Cargo.lock

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

Loading
Loading