-
Notifications
You must be signed in to change notification settings - Fork 626
feat: openvm euclid v2 #1613
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
Merged
Merged
feat: openvm euclid v2 #1613
Changes from all commits
Commits
Show all changes
189 commits
Select commit
Hold shift + click to select a range
41606fe
support first version of CodecV6 in relayer and add functionality to …
jonastheis 0c0c417
adjust Sender to support multiple blobs when sending a transaction
jonastheis 78c9963
implement batch submission of multiple batches per transaction and co…
jonastheis 940fde0
implement missing part of commit logic for CodecV6
jonastheis ca8d930
feat(rollup-relayer): add Euclid support
omerfirmak 421afe9
deprecate halo2 provers, start openvm prover
omerfirmak b460d4a
Merge remote-tracking branch 'origin/omerfirmak/mpt' into feat/use-co…
jonastheis 182f8e3
update go.mod to latest da-codec version V7
jonastheis 783b965
update go.mod to latest da-codec version V7
jonastheis 5a479c3
address review comments
jonastheis 310abdd
add InitialL1MessageQueueHash and LastL1MessageQueueHash to chunk and…
jonastheis 2efbbd7
add support for bundles with CodecV7
jonastheis e713424
update contextIDFromBatches prefix to v7
jonastheis f4e17bc
fix ci
jonastheis 99c0a9f
update to latest da-codec
jonastheis 8db5339
fix issues with chunks when handling CodecV7
jonastheis 69a80d4
add testCommitBatchAndFinalizeBundleCodecV7 for relayer
jonastheis 5f22950
feat(prover): euclid prover first draft
omerfirmak 9412c7f
feat(coordinator): abstract proof types behind an interface
omerfirmak c3a3bad
feat(rollup-relayer): add Euclid support
omerfirmak 2de45f0
feat(coordinator): add euclid proof types
omerfirmak f01af24
fix: potentially flaky testResubmitZeroGasPriceTransaction
omerfirmak 2bd0655
feat: Add Euclid verifier
omerfirmak 848d3a6
fix: re-enable supported forks check
omerfirmak e5ad9c6
feat: allow stopping fake finalization at fork boundary
omerfirmak b424cef
feat: add CPU prover dockerfile
omerfirmak ac17696
feat: update contracts to euclid version
omerfirmak d503d4a
fix: base64 encode VKs
omerfirmak bf08436
fix: prover using wrong resources for batch/bundle circuits
omerfirmak 83c73f8
fix: coordinator ignore euclid transition chunk
omerfirmak d3acd6b
adjust to recent CodecV7 changes. remove initialL1MessageQueueIndex a…
jonastheis f13863e
Merge remote-tracking branch 'origin/omerfirmak/euclid-prover' into f…
jonastheis 8b57dd6
fixes after merge
jonastheis 37924b0
feat: bump zkvm-prover to rc4
omerfirmak fbc14ac
address review comments
jonastheis 867fda6
fix: add batch tasks details for v6 codec
omerfirmak 2e9827a
fix: properly propagate verifier errors
omerfirmak 01fa3b3
feat: use verifier-only types in coordinator
omerfirmak 50ebf17
fix: generate evm proofs for bundles
omerfirmak e1a0bab
add new contract ABI and adjust submission to it
jonastheis bb9d404
fix: force byte arrays to be marshaled as JSON arrays
omerfirmak 0125dd6
add new contract ABI
jonastheis 121ce09
update config and adjust to new contract ABI
jonastheis ed394a6
make sure that all batches committed in the same tx are part of the s…
jonastheis a55de1f
feat: set code tx support (#1600)
colinlyguo 89ede0d
build rollup images with --platform=linux/amd64
jonastheis 782e019
Merge branch 'feat/use-codec-v6' of github.com:scroll-tech/scroll int…
jonastheis 081d289
update da-codec dependency
jonastheis 47a6c23
fix bug where chunk and batch blocks mismatch
jonastheis eb5758b
feat: bump to zkvm-prover rc5
roynalnaruto 7353f30
update l2geth version in go.mod
jonastheis 673777f
use go 1.22 in Dockerfile builder
jonastheis 554a233
refactor: move euclid prover to new subdir
omerfirmak e27ab5a
Merge remote-tracking branch 'origin/develop' into omerfirmak/euclid-…
omerfirmak 26a49cb
Merge remote-tracking branch 'origin/omerfirmak/euclid-prover' into f…
jonastheis 8ea4315
update go.work.sum
jonastheis 55b32e1
add debug log message
jonastheis d6674e8
add configuration parameter maxChunksPerBatch for batch proposer
jonastheis a1c4562
add configuration parameter maxChunksPerBatch for batch proposer
jonastheis c8b614f
unit tests fix
f91c999
fix batch proposer panic
Thegaram 82dd5e0
feat(bridge-history): support codecv7
4333d51
Revert "feat(bridge-history): support codecv7"
b30f4d0
chore(zkvm-circuit): upgrade to 0.1.0-rc.6 (#1610)
colinlyguo 03c63a6
update batch/chunk details for phase2
omerfirmak 9f4c9ee
fix: prover version (#1611)
yiweichi 101cc46
update dependencies
a868bc1
simplify version checks
8b08a57
Revert "simplify version checks"
f1ea4b3
process task with CodecV7, add check for BlobDataProof length and add…
jonastheis b7e7d1a
Merge remote-tracking branch 'origin/omerfirmak/euclid-prover' into f…
jonastheis 94bee19
feat(bridge-history): support codecv7 (#1609)
colinlyguo f27ddb7
remove debug line
jonastheis da96331
tweak comments and some renamings
d79aaef
fix CI
jonastheis ab7038c
Merge branch 'feat/use-codec-v6' of github.com:scroll-tech/scroll int…
jonastheis 47219f2
run goimports
jonastheis 95adcc3
fix tests
jonastheis 224546e
add new ABI and add more tests
jonastheis 0799dd4
fix linter
jonastheis 7a70e37
fix test
jonastheis 57d50b7
Merge branch 'develop' into omerfirmak/euclid-prover
omerfirmak 20dffe4
chore: auto version bump [bot]
omerfirmak 867307d
Merge remote-tracking branch 'origin/omerfirmak/euclid-prover' into f…
jonastheis c9f6e8c
Merge remote-tracking branch 'origin/develop' into feat/use-codec-v6
jonastheis 9b462e4
go mod tidy
jonastheis d57e6b0
chore: auto version bump [bot]
jonastheis 4d677b3
address review comments
jonastheis 90d1563
Merge remote-tracking branch 'origin/develop' into feat/use-codec-v6
jonastheis d987931
go mod tidy
jonastheis 38b3239
chore: auto version bump [bot]
jonastheis e99a851
Merge branch 'feat/use-codec-v6' of github.com:scroll-tech/scroll int…
jonastheis bb6ee2c
Merge branch 'develop' into feat/use-codec-v6
jonastheis af38122
chore: auto version bump [bot]
jonastheis 2cc9f65
chore: auto version bump [bot]
georgehao eacdc78
fix(bridge-history): overwrite l2geth dependency by replace (#1617)
colinlyguo 7ec6d47
feat: openvm euclid v2
893bf18
update Cargo.lock
b3c1df7
revert a change
110083c
update rust version in CI
fcbaa67
update dependencies
2d40f0f
fix: chunk task deserialisation from prove request input (#1620)
roynalnaruto c743efd
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo 1ea9aca
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo 88da493
update prover client
b8c7ec2
fix: compilation
roynalnaruto f288179
dbg: add dbg logs for prover vks
roynalnaruto 64368f9
dbg: proof types from req
roynalnaruto be88ef6
dbg: more println
roynalnaruto fe6451b
revert dbg commits
roynalnaruto bcc6b0f
add PrevMsgQueueHash in chunk task detail
5cf8cda
add logs
8db4e5c
update scroll-proving-sdk
a6ed321
update scroll-zkvm-prover v0.1.1-rc.2
kunxian-xia 7486236
update scroll-proving-sdk
b984341
euclid & euclidv2 compatible logic
8cf087c
update scroll-proving-sdk
9996af6
Revert "revert dbg commits"
0e82c63
add back dbg logs
2846ecf
fix a compilatin error
ad2e94e
support euclidV2 in proof handling
0fc28cb
fix(coordinator): euclid v2 prover compatibility (#1625)
yiweichi ef9e25f
feat: add euclidv2 verifier
omerfirmak e3b17a0
add PostMsgQueueHash in chunk info
86e6555
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo 87e1235
fix
5f8bb53
update scroll-proving-sdk version (#1626)
yiweichi 7d5b77a
Revert "feat: add euclidv2 verifier"
12a262a
align new types
5869bfd
load low version open vm circuit
7d4ff80
update type error
9f480e5
fix
459941d
use hexutil.Big
b4546af
remove load vks
3a3db5f
add logs
cb87c7a
another type fix
4822d38
fix
8befb84
fix
2d620dd
fix
bab0e4f
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo 135073c
Reapply "feat: add euclidv2 verifier"
77d6322
fix
cf41048
Update rc3 (#1629)
yiweichi 11afeb1
update verifier
07d1621
update scroll-proving-sdk commit (#1630)
yiweichi 60877d3
fix: reduce segment len in prover config (#1631)
roynalnaruto 9b5c42e
tweak logs
ae212a9
fix logs
09790c4
fix: clap deprecated warnings
yiweichi 0bb5314
fix: byte48 type required in prover (#1627)
noel2004 901693a
remove a log
3454c6c
update scroll-proving-sdk commit
yiweichi c6f0299
feat: euclid v2 GPU prover (#1623)
kunxian-xia 4b21c79
update scroll-proving-sdk commit
yiweichi 3ee2d2b
tweaks
e333288
merge message.LegacyChunkTaskDetail and message.EuclidV2ChunkTaskDetail
2fb27ce
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo b3e4667
remove FIXME
ed05728
add back fixme
d0cb8b9
apply changes for sanity checks
77dceae
fix
b73acca
update scroll-proving-sdk commit
yiweichi 1bec964
Adapt to rc11 (unified phase) (#1637)
noel2004 8994767
upgrade stark-gpu crate
kunxian-xia b59db73
hardcode openvm vks
5cfb8b6
change string to var
01d0e48
add more details in the log
78a458d
update logs
83c0a08
fix
42bfcb8
add euclid v1 and v2 to hard fork map
d82e109
update scroll-proving-sdk dep
2a8330c
fix
4c2a755
fix
2b318ec
add zero padding in BlobBytes
886af07
fix challenge digest
9033471
tmp comment out a Don't dispatch logic
9bb768e
fix
c484925
add back BlobBytes
917b143
Remove mask
8f4fc9a
uncomment some logic
1572680
update challenge digest and zkvm prover dep
d113865
upgrade stark-gpu crate
Velaciela 0df9ede
temporarily mask challenge digest
4c4cff0
temporarily mask KzgProof
80af426
unmask cross-check fields and update scroll-proving-sdk deps
c65622b
Merge branch 'develop' into feat/openvm-euclid-v2
colinlyguo 38af170
chore: auto version bump [bot]
colinlyguo f045984
update da-codec deps
dced0c6
bump minor version
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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,65 @@ | ||
| use super::{ProofVerifier, TaskType, VKDump}; | ||
|
|
||
| use anyhow::Result; | ||
|
|
||
| use crate::utils::panic_catch; | ||
| use euclid_prover::{BatchProof, BundleProof, ChunkProof}; | ||
| use euclid_verifier::verifier::{BatchVerifier, BundleVerifierEuclidV2, ChunkVerifier}; | ||
| use std::{fs::File, path::Path}; | ||
|
|
||
| pub struct EuclidV2Verifier { | ||
| chunk_verifier: ChunkVerifier, | ||
| batch_verifier: BatchVerifier, | ||
| bundle_verifier: BundleVerifierEuclidV2, | ||
| } | ||
|
|
||
| impl EuclidV2Verifier { | ||
| pub fn new(assets_dir: &str) -> Self { | ||
| let verifier_bin = Path::new(assets_dir).join("verifier.bin"); | ||
| let config = Path::new(assets_dir).join("root-verifier-vm-config"); | ||
| let exe = Path::new(assets_dir).join("root-verifier-committed-exe"); | ||
|
|
||
| Self { | ||
| chunk_verifier: ChunkVerifier::setup(&config, &exe, &verifier_bin) | ||
| .expect("Setting up chunk verifier"), | ||
| batch_verifier: BatchVerifier::setup(&config, &exe, &verifier_bin) | ||
| .expect("Setting up batch verifier"), | ||
| bundle_verifier: BundleVerifierEuclidV2::setup(&config, &exe, &verifier_bin) | ||
| .expect("Setting up bundle verifier"), | ||
| } | ||
| } | ||
| } | ||
|
|
||
| impl ProofVerifier for EuclidV2Verifier { | ||
| fn verify(&self, task_type: super::TaskType, proof: Vec<u8>) -> Result<bool> { | ||
| panic_catch(|| match task_type { | ||
| TaskType::Chunk => { | ||
| let proof = serde_json::from_slice::<ChunkProof>(proof.as_slice()).unwrap(); | ||
| self.chunk_verifier | ||
| .verify_proof(proof.proof.as_root_proof().unwrap()) | ||
| } | ||
| TaskType::Batch => { | ||
| let proof = serde_json::from_slice::<BatchProof>(proof.as_slice()).unwrap(); | ||
| self.batch_verifier | ||
| .verify_proof(proof.proof.as_root_proof().unwrap()) | ||
| } | ||
| TaskType::Bundle => { | ||
| let proof = serde_json::from_slice::<BundleProof>(proof.as_slice()).unwrap(); | ||
| self.bundle_verifier | ||
| .verify_proof_evm(&proof.proof.as_evm_proof().unwrap()) | ||
| } | ||
| }) | ||
| .map_err(|err_str: String| anyhow::anyhow!(err_str)) | ||
| } | ||
|
|
||
| fn dump_vk(&self, file: &Path) { | ||
| let f = File::create(file).expect("Failed to open file to dump VK"); | ||
|
|
||
| let dump = VKDump { | ||
| chunk_vk: base64::encode(self.chunk_verifier.get_app_vk()), | ||
| batch_vk: base64::encode(self.batch_verifier.get_app_vk()), | ||
| bundle_vk: base64::encode(self.bundle_verifier.get_app_vk()), | ||
| }; | ||
| serde_json::to_writer(f, &dump).expect("Failed to dump VK"); | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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,22 @@ | ||
| package message | ||
|
|
||
| import ( | ||
| "fmt" | ||
| "testing" | ||
| ) | ||
|
|
||
| func TestBytes48(t *testing.T) { | ||
| ti := &Byte48{} | ||
| ti.UnmarshalText([]byte("0x1")) | ||
| if s, err := ti.MarshalText(); err == nil { | ||
| if len(s) != 98 { | ||
| panic(fmt.Sprintf("wrong str: %s", s)) | ||
| } | ||
| } | ||
| ti.UnmarshalText([]byte("0x0")) | ||
| if s, err := ti.MarshalText(); err == nil { | ||
| if len(s) != 98 { | ||
| panic(fmt.Sprintf("wrong str: %s", s)) | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.