Compare commits

..

190 Commits

Author SHA1 Message Date
colinlyguo
634cb73ff2 add batch task detail scripts 2025-04-02 23:35:43 +08:00
colinlyguo
dced0c6a82 bump minor version 2025-04-02 16:16:38 +08:00
colinlyguo
f045984c99 update da-codec deps 2025-04-01 18:36:31 +08:00
colinlyguo
38af170acc chore: auto version bump [bot] 2025-04-01 06:17:30 +00:00
colin
c65622b7f6 Merge branch 'develop' into feat/openvm-euclid-v2 2025-04-01 14:17:06 +08:00
colinlyguo
80af42695d unmask cross-check fields and update scroll-proving-sdk deps 2025-03-31 23:45:28 +08:00
colinlyguo
4c4cff0ca4 temporarily mask KzgProof 2025-03-31 20:04:22 +08:00
colinlyguo
0df9ede841 temporarily mask challenge digest 2025-03-31 19:24:09 +08:00
Velaciela
d1138653e0 upgrade stark-gpu crate 2025-03-28 19:37:56 +08:00
colinlyguo
1572680566 update challenge digest and zkvm prover dep 2025-03-28 19:33:41 +08:00
colinlyguo
8f4fc9af95 uncomment some logic 2025-03-28 15:53:05 +08:00
colinlyguo
917b143557 Remove mask 2025-03-28 02:19:16 +08:00
colinlyguo
c4849251c6 add back BlobBytes 2025-03-28 01:34:24 +08:00
colinlyguo
9bb768e454 fix 2025-03-28 01:09:53 +08:00
colinlyguo
9033471930 tmp comment out a Don't dispatch logic 2025-03-28 00:24:41 +08:00
colinlyguo
886af073c1 fix challenge digest 2025-03-27 23:50:08 +08:00
colinlyguo
2b318ec7c7 add zero padding in BlobBytes 2025-03-27 20:26:39 +08:00
colinlyguo
4c2a75576f fix 2025-03-27 20:08:48 +08:00
colinlyguo
2a8330c346 fix 2025-03-27 18:54:17 +08:00
colinlyguo
d82e109360 update scroll-proving-sdk dep 2025-03-27 18:31:59 +08:00
colinlyguo
42bfcb84d7 add euclid v1 and v2 to hard fork map 2025-03-27 16:55:13 +08:00
colinlyguo
83c0a0870c fix 2025-03-27 16:22:49 +08:00
colinlyguo
78a458daa5 update logs 2025-03-27 16:20:16 +08:00
colinlyguo
01d0e48e9a add more details in the log 2025-03-27 16:16:13 +08:00
colinlyguo
5cfb8b6a69 change string to var 2025-03-27 15:51:25 +08:00
colinlyguo
b59db732c3 hardcode openvm vks 2025-03-27 15:43:57 +08:00
kunxian xia
899476731d upgrade stark-gpu crate 2025-03-27 10:32:50 +08:00
Ho
1bec964097 Adapt to rc11 (unified phase) (#1637)
Signed-off-by: noelwei <fan@scroll.io>
Co-authored-by: kunxian xia <xiakunxian130@gmail.com>
Co-authored-by: colinlyguo <colinlyguo@scroll.io>
2025-03-27 00:28:09 +08:00
Morty
b73acca200 update scroll-proving-sdk commit 2025-03-20 19:01:56 +08:00
colinlyguo
77dceaea35 fix 2025-03-19 23:05:48 +08:00
colinlyguo
d0cb8b9aa5 apply changes for sanity checks 2025-03-19 18:31:49 +08:00
colinlyguo
ed057286d9 add back fixme 2025-03-18 18:40:20 +08:00
colinlyguo
b3e46673f6 remove FIXME 2025-03-18 13:50:33 +08:00
colin
2fb27ceb3d Merge branch 'develop' into feat/openvm-euclid-v2 2025-03-18 11:36:46 +08:00
colinlyguo
e3332885ed merge message.LegacyChunkTaskDetail and message.EuclidV2ChunkTaskDetail 2025-03-18 11:35:12 +08:00
colinlyguo
3ee2d2b39c tweaks 2025-03-18 01:30:06 +08:00
Morty
4b21c79443 update scroll-proving-sdk commit 2025-03-17 18:08:21 +08:00
xkx
c6f0299373 feat: euclid v2 GPU prover (#1623)
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
Co-authored-by: Morty <70688412+yiweichi@users.noreply.github.com>
2025-03-17 15:32:44 +08:00
Morty
3454c6c670 update scroll-proving-sdk commit 2025-03-16 06:03:28 +08:00
colinlyguo
901693a2c0 remove a log 2025-03-14 18:42:31 +08:00
Ho
0bb53140f5 fix: byte48 type required in prover (#1627)
Signed-off-by: noelwei <fan@scroll.io>
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
2025-03-14 17:39:45 +08:00
Morty
09790c4448 fix: clap deprecated warnings 2025-03-14 15:23:30 +08:00
colinlyguo
ae212a919a fix logs 2025-03-14 14:02:07 +08:00
colinlyguo
9b5c42e9d9 tweak logs 2025-03-14 13:46:44 +08:00
Rohit Narurkar
60877d3c16 fix: reduce segment len in prover config (#1631) 2025-03-13 21:28:28 +08:00
Morty
07d1621310 update scroll-proving-sdk commit (#1630) 2025-03-13 19:08:48 +08:00
colinlyguo
11afeb1354 update verifier 2025-03-13 15:31:07 +08:00
Morty
cf41048c0a Update rc3 (#1629) 2025-03-13 15:23:17 +08:00
colinlyguo
77d63226c5 fix 2025-03-13 14:29:53 +08:00
colinlyguo
135073c0ad Reapply "feat: add euclidv2 verifier"
This reverts commit 7d5b77a36c.
2025-03-13 14:26:31 +08:00
colin
bab0e4f8d6 Merge branch 'develop' into feat/openvm-euclid-v2 2025-03-13 13:35:00 +08:00
colinlyguo
2d620ddf4f fix 2025-03-13 05:40:02 +08:00
colinlyguo
8befb84910 fix 2025-03-13 04:51:27 +08:00
colinlyguo
4822d38aba fix 2025-03-13 04:45:54 +08:00
colinlyguo
cb87c7aedd another type fix 2025-03-13 04:24:35 +08:00
colinlyguo
3a3db5fe32 add logs 2025-03-13 03:52:01 +08:00
colinlyguo
b4546af434 remove load vks 2025-03-13 03:29:38 +08:00
colinlyguo
459941d942 use hexutil.Big 2025-03-13 03:27:38 +08:00
colinlyguo
9f480e5397 fix 2025-03-13 03:12:11 +08:00
colinlyguo
7d4ff80edf update type error 2025-03-13 03:07:52 +08:00
colinlyguo
5869bfd825 load low version open vm circuit 2025-03-13 02:59:42 +08:00
colinlyguo
12a262ad99 align new types 2025-03-13 02:25:49 +08:00
colinlyguo
7d5b77a36c Revert "feat: add euclidv2 verifier"
This reverts commit ef9e25f14c.
2025-03-13 00:40:24 +08:00
Morty
5f8bb53dce update scroll-proving-sdk version (#1626) 2025-03-12 23:43:40 +08:00
colinlyguo
87e1235c7f fix 2025-03-12 23:31:47 +08:00
colin
86e6555a54 Merge branch 'develop' into feat/openvm-euclid-v2 2025-03-12 23:19:12 +08:00
colinlyguo
e3b17a0740 add PostMsgQueueHash in chunk info 2025-03-12 23:18:06 +08:00
Ömer Faruk Irmak
ef9e25f14c feat: add euclidv2 verifier 2025-03-12 18:17:59 +03:00
Morty
0fc28cb511 fix(coordinator): euclid v2 prover compatibility (#1625) 2025-03-12 22:22:06 +08:00
colinlyguo
ad2e94e190 support euclidV2 in proof handling 2025-03-12 22:07:44 +08:00
colinlyguo
2846ecffa5 fix a compilatin error 2025-03-12 19:51:26 +08:00
colinlyguo
0e82c63ac4 add back dbg logs 2025-03-12 19:30:02 +08:00
colinlyguo
9996af6227 Revert "revert dbg commits"
This reverts commit fe6451b76c.
2025-03-12 19:29:05 +08:00
colinlyguo
8cf087c63b update scroll-proving-sdk 2025-03-12 18:22:40 +08:00
colinlyguo
b984341991 euclid & euclidv2 compatible logic 2025-03-12 17:44:58 +08:00
colinlyguo
7486236a7a update scroll-proving-sdk 2025-03-12 17:26:45 +08:00
kunxian xia
a6ed321666 update scroll-zkvm-prover v0.1.1-rc.2 2025-03-12 17:10:16 +08:00
colinlyguo
8db4e5c77d update scroll-proving-sdk 2025-03-12 15:55:57 +08:00
colinlyguo
5cf8cda8a7 add logs 2025-03-12 15:06:21 +08:00
colinlyguo
bcc6b0f7e0 add PrevMsgQueueHash in chunk task detail 2025-03-12 14:52:27 +08:00
Rohit Narurkar
fe6451b76c revert dbg commits 2025-03-11 18:34:05 +00:00
Rohit Narurkar
be88ef6c39 dbg: more println 2025-03-11 17:54:00 +00:00
Rohit Narurkar
64368f9a79 dbg: proof types from req 2025-03-11 17:27:21 +00:00
Rohit Narurkar
f288179451 dbg: add dbg logs for prover vks 2025-03-11 17:09:34 +00:00
Rohit Narurkar
b8c7ec2b22 fix: compilation 2025-03-11 17:01:32 +00:00
colinlyguo
88da49383c update prover client 2025-03-12 00:30:16 +08:00
colin
1ea9acafa3 Merge branch 'develop' into feat/openvm-euclid-v2 2025-03-11 22:39:46 +08:00
colin
c743efd99e Merge branch 'develop' into feat/openvm-euclid-v2 2025-03-11 21:48:56 +08:00
Rohit Narurkar
2d40f0f942 fix: chunk task deserialisation from prove request input (#1620) 2025-03-11 21:45:53 +08:00
colinlyguo
fcbaa674c6 update dependencies 2025-03-11 21:45:53 +08:00
colinlyguo
110083c6c8 update rust version in CI 2025-03-11 21:45:53 +08:00
colinlyguo
b3c1df7557 revert a change 2025-03-11 21:45:53 +08:00
colinlyguo
893bf18d62 update Cargo.lock 2025-03-11 21:45:52 +08:00
colinlyguo
7ec6d478b3 feat: openvm euclid v2 2025-03-11 21:45:51 +08:00
colin
eacdc78ba7 fix(bridge-history): overwrite l2geth dependency by replace (#1617) 2025-03-11 19:18:13 +08:00
georgehao
2cc9f65852 chore: auto version bump [bot] 2025-03-11 10:45:50 +00:00
jonastheis
af381223f3 chore: auto version bump [bot] 2025-03-10 23:14:41 +00:00
Jonas Theis
bb6ee2c932 Merge branch 'develop' into feat/use-codec-v6 2025-03-11 07:14:23 +08:00
jonastheis
e99a8515b9 Merge branch 'feat/use-codec-v6' of github.com:scroll-tech/scroll into feat/use-codec-v6 2025-03-10 20:29:20 +08:00
jonastheis
38b3239c6b chore: auto version bump [bot] 2025-03-10 12:29:04 +00:00
jonastheis
d987931e30 go mod tidy 2025-03-10 20:28:59 +08:00
jonastheis
90d15637eb Merge remote-tracking branch 'origin/develop' into feat/use-codec-v6 2025-03-10 20:28:29 +08:00
jonastheis
4d677b344b address review comments 2025-03-10 18:13:02 +08:00
jonastheis
d57e6b0e7b chore: auto version bump [bot] 2025-03-10 09:59:24 +00:00
jonastheis
9b462e4c98 go mod tidy 2025-03-10 17:54:52 +08:00
jonastheis
c9f6e8c6e1 Merge remote-tracking branch 'origin/develop' into feat/use-codec-v6 2025-03-10 17:54:23 +08:00
jonastheis
867307d576 Merge remote-tracking branch 'origin/omerfirmak/euclid-prover' into feat/use-codec-v6 2025-03-10 16:47:34 +08:00
omerfirmak
20dffe4ea5 chore: auto version bump [bot] 2025-03-10 08:43:29 +00:00
Ömer Faruk Irmak
57d50b7183 Merge branch 'develop' into omerfirmak/euclid-prover 2025-03-10 11:33:11 +03:00
jonastheis
7a70e374b8 fix test 2025-03-10 15:22:14 +08:00
jonastheis
0799dd48f2 fix linter 2025-03-10 14:34:46 +08:00
jonastheis
224546e380 add new ABI and add more tests 2025-03-10 14:33:43 +08:00
jonastheis
95adcc378f fix tests 2025-03-10 14:03:02 +08:00
jonastheis
47219f2d86 run goimports 2025-03-10 12:15:04 +08:00
jonastheis
ab7038c0a7 Merge branch 'feat/use-codec-v6' of github.com:scroll-tech/scroll into feat/use-codec-v6 2025-03-10 12:13:23 +08:00
jonastheis
d79aaef35a fix CI 2025-03-10 12:12:50 +08:00
colinlyguo
da963313b6 tweak comments and some renamings 2025-03-09 22:58:29 +08:00
jonastheis
f27ddb7f8e remove debug line 2025-03-08 16:42:53 +08:00
colin
94bee1903a feat(bridge-history): support codecv7 (#1609)
Co-authored-by: jonastheis <4181434+jonastheis@users.noreply.github.com>
2025-03-08 16:35:27 +08:00
jonastheis
b7e7d1a1f1 Merge remote-tracking branch 'origin/omerfirmak/euclid-prover' into feat/use-codec-v6 2025-03-08 11:59:41 +08:00
jonastheis
f1ea4b315c process task with CodecV7, add check for BlobDataProof length and add some comments 2025-03-08 11:57:36 +08:00
colinlyguo
8b08a57f63 Revert "simplify version checks"
This reverts commit a868bc1531.
2025-03-08 01:12:48 +08:00
colinlyguo
a868bc1531 simplify version checks 2025-03-08 01:08:29 +08:00
colinlyguo
101cc46bd9 update dependencies 2025-03-07 23:58:59 +08:00
Morty
9f4c9ee150 fix: prover version (#1611) 2025-03-07 23:12:50 +08:00
Ömer Faruk Irmak
03c63a62cf update batch/chunk details for phase2 2025-03-07 16:15:20 +03:00
colin
b30f4d0b00 chore(zkvm-circuit): upgrade to 0.1.0-rc.6 (#1610) 2025-03-07 13:28:49 +08:00
colinlyguo
4333d51bef Revert "feat(bridge-history): support codecv7"
This reverts commit 82dd5e0e5e.
2025-03-07 01:53:10 +08:00
colinlyguo
82dd5e0e5e feat(bridge-history): support codecv7 2025-03-07 01:52:35 +08:00
Péter Garamvölgyi
f91c999005 fix batch proposer panic 2025-03-06 14:29:11 +01:00
colinlyguo
c8b614fd2f unit tests fix 2025-03-06 19:20:46 +08:00
jonastheis
a1c4562432 add configuration parameter maxChunksPerBatch for batch proposer 2025-03-06 18:42:36 +08:00
jonastheis
d6674e8a3d add configuration parameter maxChunksPerBatch for batch proposer 2025-03-06 18:35:01 +08:00
jonastheis
55b32e1c0c add debug log message 2025-03-06 13:37:57 +08:00
jonastheis
8ea431514d update go.work.sum 2025-03-06 13:36:32 +08:00
jonastheis
26a49cb2a3 Merge remote-tracking branch 'origin/omerfirmak/euclid-prover' into feat/use-codec-v6 2025-03-06 13:35:30 +08:00
Ömer Faruk Irmak
e27ab5a396 Merge remote-tracking branch 'origin/develop' into omerfirmak/euclid-prover 2025-03-05 10:43:19 +03:00
Ömer Faruk Irmak
554a233928 refactor: move euclid prover to new subdir 2025-03-04 14:17:53 +03:00
jonastheis
673777fe63 use go 1.22 in Dockerfile builder 2025-02-28 21:50:09 +07:00
jonastheis
7353f30ff6 update l2geth version in go.mod 2025-02-28 21:49:32 +07:00
Rohit Narurkar
eb5758b693 feat: bump to zkvm-prover rc5 2025-02-28 13:03:55 +03:00
jonastheis
47a6c23b1f fix bug where chunk and batch blocks mismatch 2025-02-28 08:25:52 +07:00
jonastheis
081d28988d update da-codec dependency 2025-02-27 15:33:54 +08:00
jonastheis
782e019f9c Merge branch 'feat/use-codec-v6' of github.com:scroll-tech/scroll into feat/use-codec-v6 2025-02-27 15:05:37 +08:00
jonastheis
89ede0d315 build rollup images with --platform=linux/amd64 2025-02-27 15:04:26 +08:00
colin
a55de1fc09 feat: set code tx support (#1600) 2025-02-27 13:49:32 +08:00
jonastheis
ed394a6369 make sure that all batches committed in the same tx are part of the same bundle 2025-02-27 10:50:09 +08:00
jonastheis
121ce09c80 update config and adjust to new contract ABI 2025-02-27 10:47:56 +08:00
jonastheis
0125dd62a6 add new contract ABI 2025-02-27 10:43:48 +08:00
Ömer Faruk Irmak
bb9d404e85 fix: force byte arrays to be marshaled as JSON arrays 2025-02-24 18:14:28 +03:00
jonastheis
e1a0bab452 add new contract ABI and adjust submission to it 2025-02-24 19:41:53 +08:00
Ömer Faruk Irmak
50ebf179fd fix: generate evm proofs for bundles 2025-02-21 21:25:25 +03:00
Ömer Faruk Irmak
01fa3b34a7 feat: use verifier-only types in coordinator 2025-02-21 16:06:27 +03:00
Ömer Faruk Irmak
2e9827a750 fix: properly propagate verifier errors 2025-02-21 12:05:58 +03:00
Ömer Faruk Irmak
867fda6952 fix: add batch tasks details for v6 codec 2025-02-20 20:06:57 +03:00
jonastheis
fbc14ac91b address review comments 2025-02-20 20:20:13 +08:00
Ömer Faruk Irmak
37924b0ae7 feat: bump zkvm-prover to rc4 2025-02-20 15:06:45 +03:00
jonastheis
8b57dd6381 fixes after merge 2025-02-20 16:27:37 +08:00
jonastheis
f13863e542 Merge remote-tracking branch 'origin/omerfirmak/euclid-prover' into feat/use-codec-v6 2025-02-20 16:25:57 +08:00
jonastheis
d3acd6b510 adjust to recent CodecV7 changes. remove initialL1MessageQueueIndex and renaming to prev and post L1MessageQueueHash 2025-02-19 20:09:56 +08:00
Ömer Faruk Irmak
83c73f8458 fix: coordinator ignore euclid transition chunk 2025-02-17 14:50:08 +03:00
Ömer Faruk Irmak
bf084368c5 fix: prover using wrong resources for batch/bundle circuits 2025-02-17 13:27:20 +03:00
Ömer Faruk Irmak
d503d4a990 fix: base64 encode VKs 2025-02-17 12:52:49 +03:00
Ömer Faruk Irmak
ac17696171 feat: update contracts to euclid version 2025-02-16 16:39:52 +03:00
Ömer Faruk Irmak
b424cef816 feat: add CPU prover dockerfile 2025-02-16 16:39:52 +03:00
Ömer Faruk Irmak
e5ad9c618d feat: allow stopping fake finalization at fork boundary 2025-02-16 16:39:52 +03:00
Ömer Faruk Irmak
848d3a6827 fix: re-enable supported forks check 2025-02-16 16:39:52 +03:00
Ömer Faruk Irmak
2bd0655fda feat: Add Euclid verifier 2025-02-16 16:39:49 +03:00
Ömer Faruk Irmak
f01af24908 fix: potentially flaky testResubmitZeroGasPriceTransaction 2025-02-11 17:48:21 +03:00
Ömer Faruk Irmak
2de45f0d54 feat(coordinator): add euclid proof types
Co-authored-by: noelwei <fan@scroll.io>
2025-02-11 17:48:21 +03:00
Ömer Faruk Irmak
c3a3bad800 feat(rollup-relayer): add Euclid support 2025-02-11 17:48:21 +03:00
Ömer Faruk Irmak
9412c7ff3a feat(coordinator): abstract proof types behind an interface 2025-02-11 17:48:21 +03:00
Ömer Faruk Irmak
5f2295043e feat(prover): euclid prover first draft 2025-02-11 17:48:15 +03:00
jonastheis
69a80d4a4a add testCommitBatchAndFinalizeBundleCodecV7 for relayer 2025-02-10 12:51:47 +08:00
jonastheis
8db5339c1f fix issues with chunks when handling CodecV7 2025-02-10 12:22:25 +08:00
jonastheis
99c0a9fac5 update to latest da-codec 2025-02-10 12:21:45 +08:00
jonastheis
f4e17bcca6 fix ci 2025-02-06 15:30:58 +08:00
jonastheis
e713424e5c update contextIDFromBatches prefix to v7 2025-02-05 17:25:07 +08:00
jonastheis
2efbbd7d77 add support for bundles with CodecV7 2025-02-05 17:05:17 +08:00
jonastheis
310abdd543 add InitialL1MessageQueueHash and LastL1MessageQueueHash to chunk and batch 2025-02-05 13:31:14 +08:00
jonastheis
5a479c3a08 address review comments 2025-02-05 11:28:49 +08:00
jonastheis
783b965deb update go.mod to latest da-codec version V7 2025-02-05 11:28:38 +08:00
jonastheis
182f8e307c update go.mod to latest da-codec version V7 2025-01-28 11:18:28 +08:00
jonastheis
b460d4a717 Merge remote-tracking branch 'origin/omerfirmak/mpt' into feat/use-codec-v6 2025-01-28 11:17:09 +08:00
Ömer Faruk Irmak
421afe9c30 deprecate halo2 provers, start openvm prover 2025-01-27 14:03:03 +03:00
Ömer Faruk Irmak
ca8d930bd6 feat(rollup-relayer): add Euclid support 2025-01-13 11:23:11 +03:00
jonastheis
940fde0cbf implement missing part of commit logic for CodecV6 2024-12-31 14:11:40 +08:00
jonastheis
78c99636dc implement batch submission of multiple batches per transaction and contextID logic to support multiple batches by concatenating batch hashes 2024-12-31 13:56:51 +08:00
jonastheis
0c0c417829 adjust Sender to support multiple blobs when sending a transaction 2024-12-31 13:55:38 +08:00
jonastheis
41606fe7d7 support first version of CodecV6 in relayer and add functionality to submit multiple batches in a single transaction 2024-12-30 18:48:18 +08:00
9 changed files with 190 additions and 28 deletions

View File

@@ -5,7 +5,7 @@ import (
"runtime/debug"
)
var tag = "v4.5.2"
var tag = "v4.5.0"
var commit = func() string {
if info, ok := debug.ReadBuildInfo(); ok {

View File

@@ -95,13 +95,13 @@ func (c *CoordinatorApp) MockConfig(store bool) error {
ParamsPath: "",
AssetsPath: "",
ForkName: "darwin",
MinProverVersion: "v4.4.57",
MinProverVersion: "v4.2.0",
},
HighVersionCircuit: &coordinatorConfig.CircuitConfig{
ParamsPath: "",
AssetsPath: "",
ForkName: "darwinV2",
MinProverVersion: "v4.4.89",
MinProverVersion: "v4.3.0",
},
},
BatchCollectionTimeSec: 60,

View File

@@ -18,6 +18,8 @@ require (
gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde
)
replace github.com/scroll-tech/da-codec => github.com/scroll-tech/da-codec v0.1.3-0.20250327153440-cd3e5728df9c
require (
github.com/bytedance/sonic v1.10.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect

View File

@@ -177,8 +177,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/scroll-tech/da-codec v0.1.3-0.20250401062930-9f9f53898493 h1:Ioc01J0WEMxuwFvEPGJeBKXdf2KY4Yc3XbFky/IxLlI=
github.com/scroll-tech/da-codec v0.1.3-0.20250401062930-9f9f53898493/go.mod h1:yhTS9OVC0xQGhg7DN5iV5KZJvnSIlFWAxDdp+6jxQtY=
github.com/scroll-tech/da-codec v0.1.3-0.20250327153440-cd3e5728df9c h1:MCbuwFynRgxQeoyXwt/wUAPo3vfb61rMWxqADE2he4A=
github.com/scroll-tech/da-codec v0.1.3-0.20250327153440-cd3e5728df9c/go.mod h1:yhTS9OVC0xQGhg7DN5iV5KZJvnSIlFWAxDdp+6jxQtY=
github.com/scroll-tech/go-ethereum v1.10.14-0.20250305151038-478940e79601 h1:NEsjCG6uSvLRBlsP3+x6PL1kM+Ojs3g8UGotIPgJSz8=
github.com/scroll-tech/go-ethereum v1.10.14-0.20250305151038-478940e79601/go.mod h1:OblWe1+QrZwdpwO0j/LY3BSGuKT3YPUFBDQQgvvfStQ=
github.com/scroll-tech/zktrie v0.8.4 h1:UagmnZ4Z3ITCk+aUq9NQZJNAwnWl4gSxsLb2Nl7IgRE=

View File

@@ -75,12 +75,9 @@ func (l *LoginLogic) Check(login *types.LoginParameter) error {
return errors.New("auth message verify failure")
}
// FIXME: for backward compatibility, set prover version as darwin prover version,
// change v4.4.56 to l.cfg.ProverManager.Verifier.LowVersionCircuit.MinProverVersion after Euclid upgrade, including the log.
// hardcode the prover version because l.cfg.ProverManager.Verifier.LowVersionCircuit.MinProverVersion is used in another check and should be set as v4.4.89 for darwinV2 provers.
if !version.CheckScrollRepoVersion(login.Message.ProverVersion, "v4.4.56") {
if !version.CheckScrollRepoVersion(login.Message.ProverVersion, l.cfg.ProverManager.Verifier.LowVersionCircuit.MinProverVersion) {
return fmt.Errorf("incompatible prover version. please upgrade your prover, minimum allowed version: %s, actual version: %s",
"v4.4.56", login.Message.ProverVersion)
l.cfg.ProverManager.Verifier.LowVersionCircuit.MinProverVersion, login.Message.ProverVersion)
}
if len(login.Message.ProverTypes) > 0 {
@@ -142,12 +139,6 @@ func (l *LoginLogic) ProverHardForkName(login *types.LoginParameter) (string, er
}
proverVersion := proverVersionSplits[0]
// allowing darwin provers to login, because darwin provers can prove darwinV2 chunk tasks
if proverVersion == "v4.4.56" {
return "darwin", nil
}
if hardForkNames, ok := l.proverVersionHardForkMap[proverVersion]; ok {
return strings.Join(hardForkNames, ","), nil
}

View File

@@ -121,11 +121,6 @@ func (b *BaseProverTask) hardForkSanityCheck(ctx *gin.Context, taskCtx *proverTa
return "", getHardForkErr
}
// for backward compatibility, darwin chunk prover can still prove darwinV2 chunk tasks
if taskCtx.taskType == message.ProofTypeChunk && hardForkName == "darwinV2" && strings.HasPrefix(taskCtx.ProverVersion, "v4.4.56") {
return hardForkName, nil
}
if _, ok := taskCtx.HardForkNames[hardForkName]; !ok {
return "", fmt.Errorf("to be assigned prover task's hard-fork name is not the same as prover, proverName: %s, proverVersion: %s, proverSupportHardForkNames: %s, taskHardForkName: %v", taskCtx.ProverName, taskCtx.ProverVersion, taskCtx.HardForkNames, hardForkName)
}

View File

@@ -0,0 +1,173 @@
package main
import (
"context"
"encoding/json"
"fmt"
"math/big"
"os"
"strconv"
"strings"
"github.com/scroll-tech/da-codec/encoding"
"github.com/scroll-tech/go-ethereum/common"
"github.com/scroll-tech/go-ethereum/common/hexutil"
"github.com/scroll-tech/go-ethereum/log"
"gorm.io/gorm"
"scroll-tech/common/database"
"scroll-tech/common/types/message"
"scroll-tech/coordinator/internal/orm"
)
func main() {
glogger := log.NewGlogHandler(log.StreamHandler(os.Stderr, log.LogfmtFormat()))
glogger.Verbosity(log.LvlInfo)
log.Root().SetHandler(glogger)
if len(os.Args) < 2 {
log.Crit("no batch index range provided")
return
}
indexRange := os.Args[1]
indices := strings.Split(indexRange, "-")
if len(indices) != 2 {
log.Crit("invalid batch index range format. Use start-end", "providedRange", indexRange)
return
}
startIndex, err := strconv.Atoi(indices[0])
endIndex, err2 := strconv.Atoi(indices[1])
if err != nil || err2 != nil || startIndex > endIndex {
log.Crit("invalid batch index range", "start", indices[0], "end", indices[1], "err", err, "err2", err2)
return
}
db, err := database.InitDB(&database.Config{
DriverName: "postgres",
DSN: os.Getenv("DB_DSN"),
MaxOpenNum: 200,
MaxIdleNum: 20,
})
if err != nil {
log.Crit("failed to init db", "err", err)
}
defer func() {
if deferErr := database.CloseDB(db); deferErr != nil {
log.Error("failed to close db", "err", err)
}
}()
for i := startIndex; i <= endIndex; i++ {
batchIndex := uint64(i)
resultBytes, err := getBatchTask(db, batchIndex)
if err != nil {
log.Crit("failed to get batch task", "batchIndex", batchIndex, "err", err)
continue
}
outputFilename := fmt.Sprintf("batch_task_%d.json", batchIndex)
if err = os.WriteFile(outputFilename, resultBytes, 0644); err != nil {
log.Crit("failed to write output file", "filename", outputFilename, "err", err)
}
}
}
func getBatchTask(db *gorm.DB, batchIndex uint64) ([]byte, error) {
batch, err := orm.NewBatch(db).GetBatchByIndex(context.Background(), batchIndex)
if err != nil {
err = fmt.Errorf("failed to get batch hash by index: %d err: %w ", batchIndex, err)
return nil, err
}
chunks, err := orm.NewChunk(db).GetChunksByBatchHash(context.Background(), batch.Hash)
if err != nil {
err = fmt.Errorf("failed to get chunk proofs for batch task id: %s err: %w ", batch.Hash, err)
return nil, err
}
var chunkProofs []message.ChunkProof
var chunkInfos []*message.ChunkInfo
for _, chunk := range chunks {
fmt.Println("chunk index: ", chunk.Index)
fmt.Print("chunk proof: ", chunk.Proof)
proof := message.NewChunkProof("euclid")
if encodeErr := json.Unmarshal(chunk.Proof, &proof); encodeErr != nil {
return nil, fmt.Errorf("Chunk.GetProofsByBatchHash unmarshal proof error: %w, batch hash: %v, chunk hash: %v", encodeErr, batch.Hash, chunk.Hash)
}
chunkProofs = append(chunkProofs, proof)
chunkInfo := message.ChunkInfo{
ChainID: 534351,
PrevStateRoot: common.HexToHash(chunk.ParentChunkStateRoot),
PostStateRoot: common.HexToHash(chunk.StateRoot),
WithdrawRoot: common.HexToHash(chunk.WithdrawRoot),
DataHash: common.HexToHash(chunk.Hash),
PrevMsgQueueHash: common.HexToHash(chunk.PrevL1MessageQueueHash),
PostMsgQueueHash: common.HexToHash(chunk.PostL1MessageQueueHash),
IsPadding: false,
}
if openvmProof, ok := proof.(*message.OpenVMChunkProof); ok {
chunkInfo.InitialBlockNumber = openvmProof.MetaData.ChunkInfo.InitialBlockNumber
chunkInfo.BlockCtxs = openvmProof.MetaData.ChunkInfo.BlockCtxs
chunkInfo.TxDataLength = openvmProof.MetaData.ChunkInfo.TxDataLength
}
chunkInfos = append(chunkInfos, &chunkInfo)
}
taskDetail, err := getBatchTaskDetail(batch, chunkInfos, chunkProofs)
if err != nil {
return nil, fmt.Errorf("failed to get batch task detail, taskID:%s err:%w", batch.Hash, err)
}
chunkProofsBytes, err := json.MarshalIndent(taskDetail, "", " ")
if err != nil {
return nil, fmt.Errorf("failed to marshal chunk proofs, taskID:%s err:%w", batch.Hash, err)
}
return chunkProofsBytes, nil
}
func getBatchTaskDetail(dbBatch *orm.Batch, chunkInfos []*message.ChunkInfo, chunkProofs []message.ChunkProof) (*message.BatchTaskDetail, error) {
taskDetail := &message.BatchTaskDetail{
ChunkInfos: chunkInfos,
ChunkProofs: chunkProofs,
}
dbBatchCodecVersion := encoding.CodecVersion(dbBatch.CodecVersion)
switch dbBatchCodecVersion {
case encoding.CodecV3, encoding.CodecV4, encoding.CodecV6:
default:
return taskDetail, nil
}
if dbBatchCodecVersion >= encoding.CodecV7 {
taskDetail.ForkName = message.EuclidV2ForkNameForProver
} else {
taskDetail.ForkName = message.EuclidForkNameForProver
}
codec, err := encoding.CodecFromVersion(encoding.CodecVersion(dbBatch.CodecVersion))
if err != nil {
return nil, fmt.Errorf("failed to get codec from version %d, err: %w", dbBatch.CodecVersion, err)
}
batchHeader, decodeErr := codec.NewDABatchFromBytes(dbBatch.BatchHeader)
if decodeErr != nil {
return nil, fmt.Errorf("failed to decode batch header version %d: %w", dbBatch.CodecVersion, decodeErr)
}
taskDetail.BatchHeader = batchHeader
taskDetail.BlobBytes = dbBatch.BlobBytes
challengeDigest, kzgCommitment, kzgProof, err := codec.BlobDataProofFromBlobBytes(dbBatch.BlobBytes)
if err != nil {
return nil, fmt.Errorf("failed to get challenge digest from blob bytes, taskID: %s, err: %w", dbBatch.Hash, err)
}
taskDetail.ChallengeDigest = challengeDigest
taskDetail.KzgProof = message.Byte48{Big: hexutil.Big(*new(big.Int).SetBytes(kzgProof[:]))}
taskDetail.KzgCommitment = message.Byte48{Big: hexutil.Big(*new(big.Int).SetBytes(kzgCommitment[:]))}
return taskDetail, nil
}

View File

@@ -89,13 +89,13 @@ func setupCoordinator(t *testing.T, proversPerSession uint8, coordinatorURL stri
ParamsPath: "",
AssetsPath: "",
ForkName: "homestead",
MinProverVersion: "v4.4.57",
MinProverVersion: "v4.2.0",
},
HighVersionCircuit: &config.CircuitConfig{
ParamsPath: "",
AssetsPath: "",
ForkName: "bernoulli",
MinProverVersion: "v4.4.89",
MinProverVersion: "v4.3.0",
},
},
BatchCollectionTimeSec: 10,
@@ -142,7 +142,7 @@ func setupCoordinator(t *testing.T, proversPerSession uint8, coordinatorURL stri
func setEnv(t *testing.T) {
var err error
version.Version = "v4.4.57"
version.Version = "v4.2.0"
glogger := log.NewGlogHandler(log.StreamHandler(os.Stderr, log.LogfmtFormat()))
glogger.Verbosity(log.LvlInfo)
@@ -285,12 +285,14 @@ func testOutdatedProverVersion(t *testing.T) {
batchProver := newMockProver(t, "prover_batch_test", coordinatorURL, message.ProofTypeBatch, "v1.999.999")
assert.True(t, chunkProver.healthCheckSuccess(t))
expectedErr := fmt.Errorf("check the login parameter failure: incompatible prover version. please upgrade your prover, minimum allowed version: v4.4.56, actual version: %s", chunkProver.proverVersion)
expectedErr := fmt.Errorf("check the login parameter failure: incompatible prover version. please upgrade your prover, minimum allowed version: %s, actual version: %s",
conf.ProverManager.Verifier.LowVersionCircuit.MinProverVersion, chunkProver.proverVersion)
code, errMsg := chunkProver.tryGetProverTask(t, message.ProofTypeChunk)
assert.Equal(t, types.ErrJWTCommonErr, code)
assert.Equal(t, expectedErr, errors.New(errMsg))
expectedErr = fmt.Errorf("check the login parameter failure: incompatible prover version. please upgrade your prover, minimum allowed version: v4.4.56, actual version: %s", batchProver.proverVersion)
expectedErr = fmt.Errorf("check the login parameter failure: incompatible prover version. please upgrade your prover, minimum allowed version: %s, actual version: %s",
conf.ProverManager.Verifier.LowVersionCircuit.MinProverVersion, batchProver.proverVersion)
code, errMsg = batchProver.tryGetProverTask(t, message.ProofTypeBatch)
assert.Equal(t, types.ErrJWTCommonErr, code)
assert.Equal(t, expectedErr, errors.New(errMsg))

View File

@@ -1357,8 +1357,7 @@ github.com/scroll-tech/da-codec v0.1.1-0.20241014152913-2703f226fb0b h1:5H6V6yba
github.com/scroll-tech/da-codec v0.1.1-0.20241014152913-2703f226fb0b/go.mod h1:48uxaqVgpD8ulH8p+nrBtfeLHZ9tX82bVVdPNkW3rPE=
github.com/scroll-tech/da-codec v0.1.3-0.20250227072756-a1482833595f h1:YYbhuUwjowqI4oyXtECRofck7Fyj18e1tcRjuQlZpJE=
github.com/scroll-tech/da-codec v0.1.3-0.20250227072756-a1482833595f/go.mod h1:xECEHZLVzbdUn+tNbRJhRIjLGTOTmnFQuTgUTeVLX58=
github.com/scroll-tech/da-codec v0.1.3-0.20250401062930-9f9f53898493 h1:Ioc01J0WEMxuwFvEPGJeBKXdf2KY4Yc3XbFky/IxLlI=
github.com/scroll-tech/da-codec v0.1.3-0.20250401062930-9f9f53898493/go.mod h1:yhTS9OVC0xQGhg7DN5iV5KZJvnSIlFWAxDdp+6jxQtY=
github.com/scroll-tech/da-codec v0.1.3-0.20250327153440-cd3e5728df9c/go.mod h1:yhTS9OVC0xQGhg7DN5iV5KZJvnSIlFWAxDdp+6jxQtY=
github.com/scroll-tech/go-ethereum v1.10.14-0.20240607130425-e2becce6a1a4/go.mod h1:byf/mZ8jLYUCnUePTicjJWn+RvKdxDn7buS6glTnMwQ=
github.com/scroll-tech/go-ethereum v1.10.14-0.20240821074444-b3fa00861e5e/go.mod h1:swB5NSp8pKNDuYsTxfR08bHS6L56i119PBx8fxvV8Cs=
github.com/scroll-tech/go-ethereum v1.10.14-0.20241010064814-3d88e870ae22/go.mod h1:r9FwtxCtybMkTbWYCyBuevT9TW3zHmOTHqD082Uh+Oo=