diff --git a/.github/workflows/prover.yml b/.github/workflows/prover.yml deleted file mode 100644 index 72d0ab825e..0000000000 --- a/.github/workflows/prover.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: Prover - -on: - push: - branches: - - main - - staging - - develop - - alpha - paths: - - 'prover/**' - - '.github/workflows/prover.yml' - pull_request: - types: - - opened - - reopened - - synchronize - - ready_for_review - paths: - - 'prover/**' - - '.github/workflows/prover.yml' - -defaults: - run: - working-directory: 'prover' - -jobs: - skip_check: - runs-on: ubuntu-latest - outputs: - should_skip: ${{ steps.skip_check.outputs.should_skip }} - steps: - - id: skip_check - uses: fkirc/skip-duplicate-actions@v5 - with: - cancel_others: 'true' - concurrent_skipping: 'same_content_newer' - paths_ignore: '["**/README.md"]' - - fmt: - needs: [skip_check] - if: | - github.event.pull_request.draft == false && - (github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2023-12-03 - components: rustfmt - - name: Cargo cache - uses: Swatinem/rust-cache@v2 - with: - workspaces: "prover -> target" - - name: Cargo check - run: cargo check --all-features - - name: Cargo fmt - run: cargo fmt --all -- --check - - clippy: - needs: [skip_check, fmt] - if: | - github.event.pull_request.draft == false && - (github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2023-12-03 - components: clippy - - name: Cargo cache - uses: Swatinem/rust-cache@v2 - with: - workspaces: "prover -> target" - - name: Run clippy - run: cargo clippy --all-features --all-targets -- -D warnings - - compile: - needs: [skip_check, clippy] - if: | - github.event.pull_request.draft == false && - (github.event.action == 'ready_for_review' || needs.skip_check.outputs.should_skip != 'true') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly-2023-12-03 - - name: Cache cargo - uses: Swatinem/rust-cache@v2 - with: - workspaces: "prover -> target" - - name: Test - run: | - make prover \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8f7d2cc89d..f20808680d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ Please note that this project is released with a [Contributor Code of Conduct][c ## Contribute to Scroll -Did you know there are many ways of contributing to Scroll? If you are looking to contribute to by adding Scroll to existing Dev Tools or by doing integrations please go to the [Contribute to Scroll](https://github.com/scroll-tech/contribute-to-scroll) repo instead. If you are looking to contribute to Scroll's Halo2 zkEVM circuits please refer to the [zkEVM circuits](https://github.com/scroll-tech/zkevm-circuits) repo. This repository covers the Scroll infrastructure and smart contracts, if you want to contribute to these areas continue reading this document. +Did you know there are many ways of contributing to Scroll? If you are looking to contribute to by adding Scroll to existing Dev Tools or by doing integrations please go to the [Contribute to Scroll](https://github.com/scroll-tech/contribute-to-scroll) repo instead. This repository covers the Scroll infrastructure and smart contracts, if you want to contribute to these areas continue reading this document. ## Issues and PRs diff --git a/common/libzkp/impl/src/lib.rs b/common/libzkp/impl/src/lib.rs index 25d856d047..0bab2012bf 100644 --- a/common/libzkp/impl/src/lib.rs +++ b/common/libzkp/impl/src/lib.rs @@ -26,12 +26,6 @@ pub unsafe extern "C" fn verify_chunk_proof( fn verify_proof(proof: *const c_char, fork_name: *const c_char, task_type: TaskType) -> c_char { let fork_name_str = c_char_to_str(fork_name); - // Skip verification for darwinV2 as we can't host darwinV2 and euclid verifiers on the same - // binary. - if fork_name_str == "darwinV2" { - return true as c_char; - } - let proof = c_char_to_vec(proof); let verifier = verifier::get_verifier(fork_name_str); diff --git a/common/types/message/message.go b/common/types/message/message.go index 6b69ce00cc..97005ced82 100644 --- a/common/types/message/message.go +++ b/common/types/message/message.go @@ -14,7 +14,6 @@ const ( EuclidFork = "euclid" EuclidV2Fork = "euclidV2" - EuclidForkNameForProver = "euclidv1" EuclidV2ForkNameForProver = "euclidv2" ) @@ -99,22 +98,22 @@ func (e *Byte48) UnmarshalJSON(input []byte) error { // BatchTaskDetail is a type containing BatchTask detail. type BatchTaskDetail struct { // use one of the string of EuclidFork / EuclidV2Fork - ForkName string `json:"fork_name"` - ChunkInfos []*ChunkInfo `json:"chunk_infos"` - ChunkProofs []ChunkProof `json:"chunk_proofs"` - BatchHeader interface{} `json:"batch_header"` - BlobBytes []byte `json:"blob_bytes"` - KzgProof Byte48 `json:"kzg_proof,omitempty"` - KzgCommitment Byte48 `json:"kzg_commitment,omitempty"` - ChallengeDigest common.Hash `json:"challenge_digest,omitempty"` + ForkName string `json:"fork_name"` + ChunkInfos []*ChunkInfo `json:"chunk_infos"` + ChunkProofs []*OpenVMChunkProof `json:"chunk_proofs"` + BatchHeader interface{} `json:"batch_header"` + BlobBytes []byte `json:"blob_bytes"` + KzgProof Byte48 `json:"kzg_proof,omitempty"` + KzgCommitment Byte48 `json:"kzg_commitment,omitempty"` + ChallengeDigest common.Hash `json:"challenge_digest,omitempty"` } // BundleTaskDetail consists of all the information required to describe the task to generate a proof for a bundle of batches. type BundleTaskDetail struct { // use one of the string of EuclidFork / EuclidV2Fork - ForkName string `json:"fork_name"` - BatchProofs []BatchProof `json:"batch_proofs"` - BundleInfo *OpenVMBundleInfo `json:"bundle_info,omitempty"` + ForkName string `json:"fork_name"` + BatchProofs []*OpenVMBatchProof `json:"batch_proofs"` + BundleInfo *OpenVMBundleInfo `json:"bundle_info,omitempty"` } // ChunkInfo is for calculating pi_hash for chunk @@ -143,157 +142,6 @@ type BlockContextV2 struct { NumL1Msgs uint16 `json:"num_l1_msgs"` } -// SubCircuitRowUsage tracing info added in v0.11.0rc8 -type SubCircuitRowUsage struct { - Name string `json:"name"` - RowNumber uint64 `json:"row_number"` -} - -// ChunkProof -type ChunkProof interface { - Proof() []byte -} - -// NewChunkProof creates a new ChunkProof instance. -func NewChunkProof(hardForkName string) ChunkProof { - switch hardForkName { - case EuclidFork, EuclidV2Fork: - return &OpenVMChunkProof{} - default: - return &Halo2ChunkProof{} - } -} - -// Halo2ChunkProof includes the proof info that are required for chunk verification and rollup. -type Halo2ChunkProof struct { - StorageTrace []byte `json:"storage_trace,omitempty"` - Protocol []byte `json:"protocol"` - RawProof []byte `json:"proof"` - Instances []byte `json:"instances"` - Vk []byte `json:"vk"` - // cross-reference between cooridinator computation and prover compution - ChunkInfo *ChunkInfo `json:"chunk_info,omitempty"` - GitVersion string `json:"git_version,omitempty"` - RowUsages []SubCircuitRowUsage `json:"row_usages,omitempty"` -} - -// Proof returns the proof bytes of a ChunkProof -func (ap *Halo2ChunkProof) Proof() []byte { - return ap.RawProof -} - -// BatchProof -type BatchProof interface { - SanityCheck() error - Proof() []byte -} - -// NewBatchProof creates a new BatchProof instance. -func NewBatchProof(hardForkName string) BatchProof { - switch hardForkName { - case EuclidFork, EuclidV2Fork: - return &OpenVMBatchProof{} - default: - return &Halo2BatchProof{} - } -} - -// Halo2BatchProof includes the proof info that are required for batch verification and rollup. -type Halo2BatchProof struct { - Protocol []byte `json:"protocol"` - RawProof []byte `json:"proof"` - Instances []byte `json:"instances"` - Vk []byte `json:"vk"` - // cross-reference between cooridinator computation and prover compution - BatchHash common.Hash `json:"batch_hash"` - GitVersion string `json:"git_version,omitempty"` -} - -// Proof returns the proof bytes of a BatchProof -func (ap *Halo2BatchProof) Proof() []byte { - return ap.RawProof -} - -// SanityCheck checks whether a BatchProof is in a legal format -func (ap *Halo2BatchProof) SanityCheck() error { - if ap == nil { - return errors.New("agg_proof is nil") - } - - if len(ap.RawProof) == 0 { - return errors.New("proof not ready") - } - - if len(ap.RawProof)%32 != 0 { - return fmt.Errorf("proof buffer length must be a multiple of 32, got: %d", len(ap.RawProof)) - } - - if len(ap.Instances) == 0 { - return errors.New("instance not ready") - } - - if len(ap.Vk) == 0 { - return errors.New("vk not ready") - } - - return nil -} - -// BundleProof -type BundleProof interface { - SanityCheck() error - Proof() []byte -} - -// NewBundleProof creates a new BundleProof instance. -func NewBundleProof(hardForkName string) BundleProof { - switch hardForkName { - case EuclidFork, EuclidV2Fork: - return &OpenVMBundleProof{} - default: - return &Halo2BundleProof{} - } -} - -// BundleProof includes the proof info that are required for verification of a bundle of batch proofs. -type Halo2BundleProof struct { - RawProof []byte `json:"proof"` - Instances []byte `json:"instances"` - Vk []byte `json:"vk"` - // cross-reference between cooridinator computation and prover compution - GitVersion string `json:"git_version,omitempty"` -} - -// Proof returns the proof bytes of a BundleProof -func (ap *Halo2BundleProof) Proof() []byte { - return ap.RawProof -} - -// SanityCheck checks whether a BundleProof is in a legal format -func (ap *Halo2BundleProof) SanityCheck() error { - if ap == nil { - return errors.New("agg_proof is nil") - } - - if len(ap.RawProof) == 0 { - return errors.New("proof not ready") - } - - if len(ap.RawProof)%32 != 0 { - return fmt.Errorf("proof buffer length must be a multiple of 32, got: %d", len(ap.RawProof)) - } - - if len(ap.Instances) == 0 { - return errors.New("instance not ready") - } - - if len(ap.Vk) == 0 { - return errors.New("vk not ready") - } - - return nil -} - // Proof for flatten VM proof type OpenVMProof struct { Proof []byte `json:"proofs"` diff --git a/common/version/version.go b/common/version/version.go index 794e3c5978..1a52f93d65 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -5,7 +5,7 @@ import ( "runtime/debug" ) -var tag = "v4.5.9" +var tag = "v4.5.10" var commit = func() string { if info, ok := debug.ReadBuildInfo(); ok { diff --git a/coordinator/cmd/api/app/mock_app.go b/coordinator/cmd/api/app/mock_app.go index 74971048fb..5fa8eb3af4 100644 --- a/coordinator/cmd/api/app/mock_app.go +++ b/coordinator/cmd/api/app/mock_app.go @@ -90,17 +90,9 @@ func (c *CoordinatorApp) MockConfig(store bool) error { cfg.ProverManager = &coordinatorConfig.ProverManager{ ProversPerSession: 1, Verifier: &coordinatorConfig.VerifierConfig{ - MockMode: true, - LowVersionCircuit: &coordinatorConfig.CircuitConfig{ - ParamsPath: "", - AssetsPath: "", - ForkName: "darwin", - MinProverVersion: "v4.4.57", - }, HighVersionCircuit: &coordinatorConfig.CircuitConfig{ - ParamsPath: "", AssetsPath: "", - ForkName: "darwinV2", + ForkName: "euclidV2", MinProverVersion: "v4.4.89", }, }, diff --git a/coordinator/cmd/tool/tool.go b/coordinator/cmd/tool/tool.go index b709e143d2..a13f516dc6 100644 --- a/coordinator/cmd/tool/tool.go +++ b/coordinator/cmd/tool/tool.go @@ -62,14 +62,14 @@ func action(ctx *cli.Context) error { return fmt.Errorf("failed to get batch proofs for bundle task id:%s, no batch found", taskID) } - var batchProofs []message.BatchProof + var batchProofs []*message.OpenVMBatchProof for _, batch := range batches { - proof := message.NewBatchProof("darwinV2") + var proof message.OpenVMBatchProof if encodeErr := json.Unmarshal(batch.Proof, &proof); encodeErr != nil { log.Error("failed to unmarshal batch proof") return fmt.Errorf("failed to unmarshal proof: %w, bundle hash: %v, batch hash: %v", encodeErr, taskID, batch.Hash) } - batchProofs = append(batchProofs, proof) + batchProofs = append(batchProofs, &proof) } taskDetail := message.BundleTaskDetail{ diff --git a/coordinator/conf/config.json b/coordinator/conf/config.json index fb738926c6..301f89e12c 100644 --- a/coordinator/conf/config.json +++ b/coordinator/conf/config.json @@ -7,17 +7,9 @@ "batch_collection_time_sec": 180, "chunk_collection_time_sec": 180, "verifier": { - "mock_mode": true, - "low_version_circuit": { - "params_path": "params", - "assets_path": "assets", - "fork_name": "darwin", - "min_prover_version": "v4.4.43" - }, "high_version_circuit": { - "params_path": "params", "assets_path": "assets", - "fork_name": "darwinV2", + "fork_name": "euclidV2", "min_prover_version": "v4.4.45" } } diff --git a/coordinator/internal/config/config.go b/coordinator/internal/config/config.go index 52a9158d0b..110405fb00 100644 --- a/coordinator/internal/config/config.go +++ b/coordinator/internal/config/config.go @@ -51,7 +51,6 @@ type Config struct { // CircuitConfig circuit items. type CircuitConfig struct { - ParamsPath string `json:"params_path"` AssetsPath string `json:"assets_path"` ForkName string `json:"fork_name"` MinProverVersion string `json:"min_prover_version"` @@ -59,8 +58,6 @@ type CircuitConfig struct { // VerifierConfig load zk verifier config. type VerifierConfig struct { - MockMode bool `json:"mock_mode"` - LowVersionCircuit *CircuitConfig `json:"low_version_circuit"` HighVersionCircuit *CircuitConfig `json:"high_version_circuit"` } diff --git a/coordinator/internal/config/config_test.go b/coordinator/internal/config/config_test.go index 748fe9c2a9..1fde0598a8 100644 --- a/coordinator/internal/config/config_test.go +++ b/coordinator/internal/config/config_test.go @@ -15,15 +15,18 @@ func TestConfig(t *testing.T) { "prover_manager": { "provers_per_session": 1, "session_attempts": 5, + "external_prover_threshold": 32, + "bundle_collection_time_sec": 180, "batch_collection_time_sec": 180, "chunk_collection_time_sec": 180, "verifier": { - "mock_mode": true, - "params_path": "", - "agg_vk_path": "" + "high_version_circuit": { + "assets_path": "assets", + "fork_name": "euclidV2", + "min_prover_version": "v4.4.45" + } }, - "max_verifier_workers": 4, - "min_prover_version": "v1.0.0" + "max_verifier_workers": 4 }, "db": { "driver_name": "postgres", diff --git a/coordinator/internal/controller/api/controller.go b/coordinator/internal/controller/api/controller.go index b5d3f6719f..3e7a569617 100644 --- a/coordinator/internal/controller/api/controller.go +++ b/coordinator/internal/controller/api/controller.go @@ -26,7 +26,7 @@ func InitController(cfg *config.Config, chainCfg *params.ChainConfig, db *gorm.D panic("proof receiver new verifier failure") } - log.Info("verifier created", "chunkVerifier", vf.ChunkVKMap, "batchVerifier", vf.BatchVKMap, "bundleVerifier", vf.BundleVkMap, "openVmVerifier", vf.OpenVMVkMap) + log.Info("verifier created", "openVmVerifier", vf.OpenVMVkMap) Auth = NewAuthController(db, cfg, vf) GetTask = NewGetTaskController(cfg, chainCfg, db, reg) diff --git a/coordinator/internal/logic/auth/login.go b/coordinator/internal/logic/auth/login.go index e8278f91b8..cc095f7c3a 100644 --- a/coordinator/internal/logic/auth/login.go +++ b/coordinator/internal/logic/auth/login.go @@ -22,9 +22,6 @@ import ( type LoginLogic struct { cfg *config.Config challengeOrm *orm.Challenge - chunkVks map[string]struct{} - batchVKs map[string]struct{} - bundleVks map[string]struct{} openVmVks map[string]struct{} @@ -34,28 +31,14 @@ type LoginLogic struct { // NewLoginLogic new a LoginLogic func NewLoginLogic(db *gorm.DB, cfg *config.Config, vf *verifier.Verifier) *LoginLogic { proverVersionHardForkMap := make(map[string][]string) - if version.CheckScrollRepoVersion(cfg.ProverManager.Verifier.LowVersionCircuit.MinProverVersion, cfg.ProverManager.Verifier.HighVersionCircuit.MinProverVersion) { - log.Error("config file error, low verifier min_prover_version should not more than high verifier min_prover_version", - "low verifier min_prover_version", cfg.ProverManager.Verifier.LowVersionCircuit.MinProverVersion, - "high verifier min_prover_version", cfg.ProverManager.Verifier.HighVersionCircuit.MinProverVersion) - panic("verifier config file error") - } var highHardForks []string highHardForks = append(highHardForks, cfg.ProverManager.Verifier.HighVersionCircuit.ForkName) - if cfg.ProverManager.Verifier.HighVersionCircuit.ForkName != message.EuclidFork && cfg.ProverManager.Verifier.HighVersionCircuit.ForkName != message.EuclidV2Fork { - highHardForks = append(highHardForks, cfg.ProverManager.Verifier.LowVersionCircuit.ForkName) - } highHardForks = append(highHardForks, message.EuclidFork, message.EuclidV2Fork) proverVersionHardForkMap[cfg.ProverManager.Verifier.HighVersionCircuit.MinProverVersion] = highHardForks - proverVersionHardForkMap[cfg.ProverManager.Verifier.LowVersionCircuit.MinProverVersion] = []string{cfg.ProverManager.Verifier.LowVersionCircuit.ForkName} - return &LoginLogic{ cfg: cfg, - chunkVks: vf.ChunkVKMap, - batchVKs: vf.BatchVKMap, - bundleVks: vf.BundleVkMap, openVmVks: vf.OpenVMVkMap, challengeOrm: orm.NewChallenge(db), proverVersionHardForkMap: proverVersionHardForkMap, @@ -75,49 +58,25 @@ 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") { - return fmt.Errorf("incompatible prover version. please upgrade your prover, minimum allowed version: %s, actual version: %s", - "v4.4.56", login.Message.ProverVersion) + if !version.CheckScrollRepoVersion(login.Message.ProverVersion, l.cfg.ProverManager.Verifier.HighVersionCircuit.MinProverVersion) { + return fmt.Errorf("incompatible prover version. please upgrade your prover, minimum allowed version: %s, actual version: %s", l.cfg.ProverManager.Verifier.HighVersionCircuit.MinProverVersion, login.Message.ProverVersion) } - if len(login.Message.ProverTypes) > 0 { - vks := make(map[string]struct{}) - for _, proverType := range login.Message.ProverTypes { - switch proverType { - case types.ProverTypeChunk: - for vk := range l.chunkVks { - vks[vk] = struct{}{} - } - case types.ProverTypeBatch: - for vk := range l.batchVKs { - vks[vk] = struct{}{} - } - for vk := range l.bundleVks { - vks[vk] = struct{}{} - } - case types.ProverTypeOpenVM: - for vk := range l.openVmVks { - vks[vk] = struct{}{} - } - default: - log.Error("invalid prover_type", "value", proverType, "prover name", login.Message.ProverName, "prover_version", login.Message.ProverVersion) - } - } + vks := make(map[string]struct{}) + for vk := range l.openVmVks { + vks[vk] = struct{}{} + } - for _, vk := range login.Message.VKs { - if _, ok := vks[vk]; !ok { - log.Error("vk inconsistency", "prover vk", vk, "prover name", login.Message.ProverName, - "prover_version", login.Message.ProverVersion, "message", login.Message) - if !version.CheckScrollProverVersion(login.Message.ProverVersion) { - return fmt.Errorf("incompatible prover version. please upgrade your prover, expect version: %s, actual version: %s", - version.Version, login.Message.ProverVersion) - } - // if the prover reports a same prover version - return errors.New("incompatible vk. please check your params files or config files") + for _, vk := range login.Message.VKs { + if _, ok := vks[vk]; !ok { + log.Error("vk inconsistency", "prover vk", vk, "prover name", login.Message.ProverName, + "prover_version", login.Message.ProverVersion, "message", login.Message) + if !version.CheckScrollProverVersion(login.Message.ProverVersion) { + return fmt.Errorf("incompatible prover version. please upgrade your prover, expect version: %s, actual version: %s", + version.Version, login.Message.ProverVersion) } + // if the prover reports a same prover version + return errors.New("incompatible vk. please check your params files or config files") } } @@ -142,12 +101,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 } diff --git a/coordinator/internal/logic/provertask/batch_prover_task.go b/coordinator/internal/logic/provertask/batch_prover_task.go index 5103530760..b598f3bc39 100644 --- a/coordinator/internal/logic/provertask/batch_prover_task.go +++ b/coordinator/internal/logic/provertask/batch_prover_task.go @@ -197,34 +197,27 @@ func (bp *BatchProverTask) formatProverTask(ctx context.Context, task *orm.Prove return nil, fmt.Errorf("no chunk found for batch task id:%s", task.TaskID) } - var chunkProofs []message.ChunkProof + var chunkProofs []*message.OpenVMChunkProof var chunkInfos []*message.ChunkInfo for _, chunk := range chunks { - proof := message.NewChunkProof(hardForkName) + var proof message.OpenVMChunkProof 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, task.TaskID, chunk.Hash) } - chunkProofs = append(chunkProofs, proof) + chunkProofs = append(chunkProofs, &proof) chunkInfo := message.ChunkInfo{ - ChainID: bp.cfg.L2.ChainID, - 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 halo2Proof, ok := proof.(*message.Halo2ChunkProof); ok { - if halo2Proof.ChunkInfo != nil { - chunkInfo.TxBytes = halo2Proof.ChunkInfo.TxBytes - } - } - 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 + ChainID: bp.cfg.L2.ChainID, + 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, + InitialBlockNumber: proof.MetaData.ChunkInfo.InitialBlockNumber, + BlockCtxs: proof.MetaData.ChunkInfo.BlockCtxs, + TxDataLength: proof.MetaData.ChunkInfo.TxDataLength, } chunkInfos = append(chunkInfos, &chunkInfo) } @@ -258,7 +251,7 @@ func (bp *BatchProverTask) recoverActiveAttempts(ctx *gin.Context, batchTask *or } } -func (bp *BatchProverTask) getBatchTaskDetail(dbBatch *orm.Batch, chunkInfos []*message.ChunkInfo, chunkProofs []message.ChunkProof, hardForkName string) (*message.BatchTaskDetail, error) { +func (bp *BatchProverTask) getBatchTaskDetail(dbBatch *orm.Batch, chunkInfos []*message.ChunkInfo, chunkProofs []*message.OpenVMChunkProof, hardForkName string) (*message.BatchTaskDetail, error) { taskDetail := &message.BatchTaskDetail{ ChunkInfos: chunkInfos, ChunkProofs: chunkProofs, @@ -266,8 +259,9 @@ func (bp *BatchProverTask) getBatchTaskDetail(dbBatch *orm.Batch, chunkInfos []* if hardForkName == message.EuclidV2Fork { taskDetail.ForkName = message.EuclidV2ForkNameForProver - } else if hardForkName == message.EuclidFork { - taskDetail.ForkName = message.EuclidForkNameForProver + } else { + log.Error("unsupported hard fork name", "hard_fork_name", hardForkName) + return nil, fmt.Errorf("unsupported hard fork name: %s", hardForkName) } dbBatchCodecVersion := encoding.CodecVersion(dbBatch.CodecVersion) diff --git a/coordinator/internal/logic/provertask/bundle_prover_task.go b/coordinator/internal/logic/provertask/bundle_prover_task.go index 1f9dc1a46e..93a46df0c1 100644 --- a/coordinator/internal/logic/provertask/bundle_prover_task.go +++ b/coordinator/internal/logic/provertask/bundle_prover_task.go @@ -200,13 +200,13 @@ func (bp *BundleProverTask) formatProverTask(ctx context.Context, task *orm.Prov return nil, fmt.Errorf("failed to get parent batch for batch task id:%s err:%w", task.TaskID, err) } - var batchProofs []message.BatchProof + var batchProofs []*message.OpenVMBatchProof for _, batch := range batches { - proof := message.NewBatchProof(hardForkName) + var proof message.OpenVMBatchProof if encodeErr := json.Unmarshal(batch.Proof, &proof); encodeErr != nil { return nil, fmt.Errorf("failed to unmarshal proof: %w, bundle hash: %v, batch hash: %v", encodeErr, task.TaskID, batch.Hash) } - batchProofs = append(batchProofs, proof) + batchProofs = append(batchProofs, &proof) } taskDetail := message.BundleTaskDetail{ @@ -215,8 +215,9 @@ func (bp *BundleProverTask) formatProverTask(ctx context.Context, task *orm.Prov if hardForkName == message.EuclidV2Fork { taskDetail.ForkName = message.EuclidV2ForkNameForProver - } else if hardForkName == message.EuclidFork { - taskDetail.ForkName = message.EuclidForkNameForProver + } else { + log.Error("unsupported hard fork name", "hard_fork_name", hardForkName) + return nil, fmt.Errorf("unsupported hard fork name: %s", hardForkName) } taskDetail.BundleInfo = &message.OpenVMBundleInfo{ @@ -227,10 +228,7 @@ func (bp *BundleProverTask) formatProverTask(ctx context.Context, task *orm.Prov NumBatches: uint32(len(batches)), PrevBatchHash: common.HexToHash(batches[0].ParentBatchHash), BatchHash: common.HexToHash(batches[len(batches)-1].Hash), - } - - if hardForkName == message.EuclidV2Fork { - taskDetail.BundleInfo.MsgQueueHash = common.HexToHash(batches[len(batches)-1].PostL1MessageQueueHash) + MsgQueueHash: common.HexToHash(batches[len(batches)-1].PostL1MessageQueueHash), } batchProofsBytes, err := json.Marshal(taskDetail) diff --git a/coordinator/internal/logic/provertask/chunk_prover_task.go b/coordinator/internal/logic/provertask/chunk_prover_task.go index 40e34674f2..0915f3538c 100644 --- a/coordinator/internal/logic/provertask/chunk_prover_task.go +++ b/coordinator/internal/logic/provertask/chunk_prover_task.go @@ -195,8 +195,9 @@ func (cp *ChunkProverTask) formatProverTask(ctx context.Context, task *orm.Prove if hardForkName == message.EuclidV2Fork { taskDetail.ForkName = message.EuclidV2ForkNameForProver - } else if hardForkName == message.EuclidFork { - taskDetail.ForkName = message.EuclidForkNameForProver + } else { + log.Error("unsupported hard fork name", "hard_fork_name", hardForkName) + return nil, fmt.Errorf("unsupported hard fork name: %s", hardForkName) } var err error diff --git a/coordinator/internal/logic/provertask/prover_task.go b/coordinator/internal/logic/provertask/prover_task.go index e7fe4db78b..1c4f2fd3e6 100644 --- a/coordinator/internal/logic/provertask/prover_task.go +++ b/coordinator/internal/logic/provertask/prover_task.go @@ -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) } diff --git a/coordinator/internal/logic/submitproof/proof_receiver.go b/coordinator/internal/logic/submitproof/proof_receiver.go index 38a878f2c9..444670ffe4 100644 --- a/coordinator/internal/logic/submitproof/proof_receiver.go +++ b/coordinator/internal/logic/submitproof/proof_receiver.go @@ -171,19 +171,19 @@ func (m *ProofReceiverLogic) HandleZkProof(ctx *gin.Context, proofParameter coor switch message.ProofType(proofParameter.TaskType) { case message.ProofTypeChunk: - chunkProof := message.NewChunkProof(hardForkName) + chunkProof := &message.OpenVMChunkProof{} if unmarshalErr := json.Unmarshal([]byte(proofParameter.Proof), &chunkProof); unmarshalErr != nil { return unmarshalErr } success, verifyErr = m.verifier.VerifyChunkProof(chunkProof, hardForkName) case message.ProofTypeBatch: - batchProof := message.NewBatchProof(hardForkName) + batchProof := &message.OpenVMBatchProof{} if unmarshalErr := json.Unmarshal([]byte(proofParameter.Proof), &batchProof); unmarshalErr != nil { return unmarshalErr } success, verifyErr = m.verifier.VerifyBatchProof(batchProof, hardForkName) case message.ProofTypeBundle: - bundleProof := message.NewBundleProof(hardForkName) + bundleProof := &message.OpenVMBundleProof{} if unmarshalErr := json.Unmarshal([]byte(proofParameter.Proof), &bundleProof); unmarshalErr != nil { return unmarshalErr } diff --git a/coordinator/internal/logic/verifier/mock.go b/coordinator/internal/logic/verifier/mock.go index 05d986c12f..0649dbdeaf 100644 --- a/coordinator/internal/logic/verifier/mock.go +++ b/coordinator/internal/logic/verifier/mock.go @@ -10,31 +10,26 @@ import ( // NewVerifier Sets up a mock verifier. func NewVerifier(cfg *config.VerifierConfig) (*Verifier, error) { - batchVKMap := map[string]struct{}{"mock_vk": {}} - chunkVKMap := map[string]struct{}{"mock_vk": {}} - return &Verifier{cfg: cfg, ChunkVKMap: chunkVKMap, BatchVKMap: batchVKMap}, nil + return &Verifier{cfg: cfg, OpenVMVkMap: map[string]struct{}{"mock_vk": {}}}, nil } // VerifyChunkProof return a mock verification result for a ChunkProof. -func (v *Verifier) VerifyChunkProof(proof message.ChunkProof, forkName string) (bool, error) { - if string(proof.Proof()) == InvalidTestProof { +func (v *Verifier) VerifyChunkProof(proof *message.OpenVMChunkProof, forkName string) (bool, error) { + if proof.VmProof != nil && string(proof.VmProof.Proof) == InvalidTestProof { return false, nil } return true, nil } // VerifyBatchProof return a mock verification result for a BatchProof. -func (v *Verifier) VerifyBatchProof(proof message.BatchProof, forkName string) (bool, error) { - if string(proof.Proof()) == InvalidTestProof { +func (v *Verifier) VerifyBatchProof(proof *message.OpenVMBatchProof, forkName string) (bool, error) { + if proof.VmProof != nil && string(proof.VmProof.Proof) == InvalidTestProof { return false, nil } return true, nil } // VerifyBundleProof return a mock verification result for a BundleProof. -func (v *Verifier) VerifyBundleProof(proof message.BundleProof, forkName string) (bool, error) { - if string(proof.Proof()) == InvalidTestProof { - return false, nil - } +func (v *Verifier) VerifyBundleProof(proof *message.OpenVMBundleProof, forkName string) (bool, error) { return true, nil } diff --git a/coordinator/internal/logic/verifier/types.go b/coordinator/internal/logic/verifier/types.go index 88815743e7..686ef384aa 100644 --- a/coordinator/internal/logic/verifier/types.go +++ b/coordinator/internal/logic/verifier/types.go @@ -7,11 +7,8 @@ import ( // InvalidTestProof invalid proof used in tests const InvalidTestProof = "this is a invalid proof" -// Verifier represents a rust ffi to a halo2 verifier. +// Verifier represents a rust ffi to a verifier. type Verifier struct { cfg *config.VerifierConfig - ChunkVKMap map[string]struct{} - BatchVKMap map[string]struct{} - BundleVkMap map[string]struct{} OpenVMVkMap map[string]struct{} } diff --git a/coordinator/internal/logic/verifier/verifier.go b/coordinator/internal/logic/verifier/verifier.go index 33de675619..7bf7f670c0 100644 --- a/coordinator/internal/logic/verifier/verifier.go +++ b/coordinator/internal/logic/verifier/verifier.go @@ -30,14 +30,12 @@ import ( // in `*config.CircuitConfig` being changed type rustCircuitConfig struct { ForkName string `json:"fork_name"` - ParamsPath string `json:"params_path"` AssetsPath string `json:"assets_path"` } func newRustCircuitConfig(cfg *config.CircuitConfig) *rustCircuitConfig { return &rustCircuitConfig{ ForkName: cfg.ForkName, - ParamsPath: cfg.ParamsPath, AssetsPath: cfg.AssetsPath, } } @@ -46,13 +44,11 @@ func newRustCircuitConfig(cfg *config.CircuitConfig) *rustCircuitConfig { // Define a brand new struct here is to eliminate side effects in case fields // in `*config.VerifierConfig` being changed type rustVerifierConfig struct { - LowVersionCircuit *rustCircuitConfig `json:"low_version_circuit"` HighVersionCircuit *rustCircuitConfig `json:"high_version_circuit"` } func newRustVerifierConfig(cfg *config.VerifierConfig) *rustVerifierConfig { return &rustVerifierConfig{ - LowVersionCircuit: newRustCircuitConfig(cfg.LowVersionCircuit), HighVersionCircuit: newRustCircuitConfig(cfg.HighVersionCircuit), } } @@ -65,19 +61,6 @@ type rustVkDump struct { // NewVerifier Sets up a rust ffi to call verify. func NewVerifier(cfg *config.VerifierConfig) (*Verifier, error) { - if cfg.MockMode { - chunkVKMap := map[string]struct{}{"mock_vk": {}} - batchVKMap := map[string]struct{}{"mock_vk": {}} - bundleVKMap := map[string]struct{}{"mock_vk": {}} - openVMVkMap := map[string]struct{}{"mock_vk": {}} - return &Verifier{ - cfg: cfg, - ChunkVKMap: chunkVKMap, - BatchVKMap: batchVKMap, - BundleVkMap: bundleVKMap, - OpenVMVkMap: openVMVkMap, - }, nil - } verifierConfig := newRustVerifierConfig(cfg) configBytes, err := json.Marshal(verifierConfig) if err != nil { @@ -93,16 +76,9 @@ func NewVerifier(cfg *config.VerifierConfig) (*Verifier, error) { v := &Verifier{ cfg: cfg, - ChunkVKMap: make(map[string]struct{}), - BatchVKMap: make(map[string]struct{}), - BundleVkMap: make(map[string]struct{}), OpenVMVkMap: make(map[string]struct{}), } - if err := v.loadLowVersionVKs(cfg); err != nil { - return nil, err - } - if err := v.loadOpenVMVks(message.EuclidFork); err != nil { return nil, err } @@ -111,21 +87,11 @@ func NewVerifier(cfg *config.VerifierConfig) (*Verifier, error) { return nil, err } - v.loadDarwinVKs() - return v, nil } -// VerifyBatchProof Verify a ZkProof by marshaling it and sending it to the Halo2 Verifier. -func (v *Verifier) VerifyBatchProof(proof message.BatchProof, forkName string) (bool, error) { - if v.cfg.MockMode { - log.Info("Mock mode, batch verifier disabled") - if string(proof.Proof()) == InvalidTestProof { - return false, nil - } - return true, nil - - } +// VerifyBatchProof Verify a ZkProof by marshaling it and sending it to the Verifier. +func (v *Verifier) VerifyBatchProof(proof *message.OpenVMBatchProof, forkName string) (bool, error) { buf, err := json.Marshal(proof) if err != nil { return false, err @@ -143,16 +109,8 @@ func (v *Verifier) VerifyBatchProof(proof message.BatchProof, forkName string) ( return verified != 0, nil } -// VerifyChunkProof Verify a ZkProof by marshaling it and sending it to the Halo2 Verifier. -func (v *Verifier) VerifyChunkProof(proof message.ChunkProof, forkName string) (bool, error) { - if v.cfg.MockMode { - log.Info("Mock mode, verifier disabled") - if string(proof.Proof()) == InvalidTestProof { - return false, nil - } - return true, nil - - } +// VerifyChunkProof Verify a ZkProof by marshaling it and sending it to the Verifier. +func (v *Verifier) VerifyChunkProof(proof *message.OpenVMChunkProof, forkName string) (bool, error) { buf, err := json.Marshal(proof) if err != nil { return false, err @@ -171,15 +129,7 @@ func (v *Verifier) VerifyChunkProof(proof message.ChunkProof, forkName string) ( } // VerifyBundleProof Verify a ZkProof for a bundle of batches, by marshaling it and verifying it via the EVM verifier. -func (v *Verifier) VerifyBundleProof(proof message.BundleProof, forkName string) (bool, error) { - if v.cfg.MockMode { - log.Info("Mock mode, verifier disabled") - if string(proof.Proof()) == InvalidTestProof { - return false, nil - } - return true, nil - - } +func (v *Verifier) VerifyBundleProof(proof *message.OpenVMBundleProof, forkName string) (bool, error) { buf, err := json.Marshal(proof) if err != nil { return false, err @@ -209,32 +159,6 @@ func (v *Verifier) readVK(filePat string) (string, error) { return base64.StdEncoding.EncodeToString(byt), nil } -// load low version vks, current is darwin -func (v *Verifier) loadLowVersionVKs(cfg *config.VerifierConfig) error { - bundleVK, err := v.readVK(path.Join(cfg.LowVersionCircuit.AssetsPath, "vk_bundle.vkey")) - if err != nil { - return err - } - batchVK, err := v.readVK(path.Join(cfg.LowVersionCircuit.AssetsPath, "vk_batch.vkey")) - if err != nil { - return err - } - chunkVK, err := v.readVK(path.Join(cfg.LowVersionCircuit.AssetsPath, "vk_chunk.vkey")) - if err != nil { - return err - } - v.BundleVkMap[bundleVK] = struct{}{} - v.BatchVKMap[batchVK] = struct{}{} - v.ChunkVKMap[chunkVK] = struct{}{} - return nil -} - -func (v *Verifier) loadDarwinVKs() { - v.BundleVkMap["AAAAGgAAAARX2S0K1wF333B1waOsnG/vcASJmWG9YM6SNWCBy1ywD5dsp1rEy7PSqiIFikkkOPqKokLW2mZSwCbtKdkfLQcvTxARUwHSe4iZe27PRJ5WWaLqtRV1+x6+pSVKtcPtaV4kE7v2YJRf0582hxiAF0IBaOoREdpyNfA2a9cvhWb2TMaPrUYP9EDQ7CUiW1FQzxbjGc95ua2htscnpU7d9S5stHWzKb7okkCG7bTIL9aG6qTQo2YXW7n3H3Ir47oVJB7IKrUzKGvI5Wmanh2zpZOJ9Qm4/wY24cT7cJz+Ux6wAg=="] = struct{}{} - v.BatchVKMap["AAAAGgAAAARX2S0K1wF333B1waOsnG/vcASJmWG9YM6SNWCBy1ywD1DEjW4Kell67H07wazT5DdzrSh4+amh+cmosQHp9p9snFypyoBGt3UHtoJGQBZlywZWDS9ht5pnaEoGBdaKcQk+lFb+WxTiId0KOAa0mafTZTQw8yToy57Jple64qzlRu1dux30tZZGuerLN1CKzg5Xl2iOpMK+l87jCINwVp5cUtF/XrvhBbU7onKh3KBiy99iUqVyA3Y6iiIZhGKWBSuSA4bNgDYIoVkqjHpdL35aEShoRO6pNXt7rDzxFoPzH0JuPI54nE4OhVrzZXwtkAEosxVa/fszcE092FH+HhhtxZBYe/KEzwdISU9TOPdId3UF/UMYC0MiYOlqffVTgAg="] = struct{}{} - v.ChunkVKMap["AAAAGQAAAATyWEABRbJ6hQQ5/zLX1gTasr7349minA9rSgMS6gDeHwZKqikRiO3md+pXjjxMHnKQtmXYgMXhJSvlmZ+Ws+cheuly2X1RuNQzcZuRImaKPR9LJsVZYsXfJbuqdKX8p0Gj8G83wMJOmTzNVUyUol0w0lTU+CEiTpHOnxBsTF3EWaW3s1u4ycOgWt1c9M6s7WmaBZLYgAWYCunO5CLCLApNGbCASeck/LuSoedEri5u6HccCKU2khG6zl6W07jvYSbDVLJktbjRiHv+/HQix+K14j8boo8Z/unhpwXCsPxkQA=="] = struct{}{} -} - func (v *Verifier) loadOpenVMVks(forkName string) error { tempFile := path.Join(os.TempDir(), "openVmVk.json") defer func() { diff --git a/coordinator/internal/logic/verifier/verifier_test.go b/coordinator/internal/logic/verifier/verifier_test.go index fa2fbefa41..d23790597a 100644 --- a/coordinator/internal/logic/verifier/verifier_test.go +++ b/coordinator/internal/logic/verifier/verifier_test.go @@ -29,17 +29,9 @@ func TestFFI(t *testing.T) { as := assert.New(t) cfg := &config.VerifierConfig{ - MockMode: false, - LowVersionCircuit: &config.CircuitConfig{ - ParamsPath: *paramsPath, - AssetsPath: *assetsPathLo, - ForkName: "darwin", - MinProverVersion: "", - }, HighVersionCircuit: &config.CircuitConfig{ - ParamsPath: *paramsPath, AssetsPath: *assetsPathHi, - ForkName: "darwinV2", + ForkName: "euclidV2", MinProverVersion: "", }, } @@ -48,43 +40,43 @@ func TestFFI(t *testing.T) { as.NoError(err) chunkProof1 := readChunkProof(*chunkProofPath1, as) - chunkOk1, err := v.VerifyChunkProof(chunkProof1, "darwinV2") + chunkOk1, err := v.VerifyChunkProof(chunkProof1, "euclidV2") as.NoError(err) as.True(chunkOk1) t.Log("Verified chunk proof 1") chunkProof2 := readChunkProof(*chunkProofPath2, as) - chunkOk2, err := v.VerifyChunkProof(chunkProof2, "darwinV2") + chunkOk2, err := v.VerifyChunkProof(chunkProof2, "euclidV2") as.NoError(err) as.True(chunkOk2) t.Log("Verified chunk proof 2") batchProof := readBatchProof(*batchProofPath, as) - batchOk, err := v.VerifyBatchProof(batchProof, "darwinV2") + batchOk, err := v.VerifyBatchProof(batchProof, "euclidV2") as.NoError(err) as.True(batchOk) t.Log("Verified batch proof") } -func readBatchProof(filePat string, as *assert.Assertions) types.BatchProof { +func readBatchProof(filePat string, as *assert.Assertions) *types.OpenVMBatchProof { f, err := os.Open(filePat) as.NoError(err) byt, err := io.ReadAll(f) as.NoError(err) - proof := &types.Halo2BatchProof{} + proof := &types.OpenVMBatchProof{} as.NoError(json.Unmarshal(byt, proof)) return proof } -func readChunkProof(filePat string, as *assert.Assertions) types.ChunkProof { +func readChunkProof(filePat string, as *assert.Assertions) *types.OpenVMChunkProof { f, err := os.Open(filePat) as.NoError(err) byt, err := io.ReadAll(f) as.NoError(err) - proof := &types.Halo2ChunkProof{} + proof := &types.OpenVMChunkProof{} as.NoError(json.Unmarshal(byt, proof)) return proof diff --git a/coordinator/internal/types/auth_test.go b/coordinator/internal/types/auth_test.go index 2aa833b678..c427bbe994 100644 --- a/coordinator/internal/types/auth_test.go +++ b/coordinator/internal/types/auth_test.go @@ -22,7 +22,7 @@ func TestAuthMessageSignAndVerify(t *testing.T) { ProverVersion: "v0.0.1", Challenge: "abcdef", ProverProviderType: ProverProviderTypeInternal, - ProverTypes: []ProverType{ProverTypeBatch}, + ProverTypes: []ProverType{ProverTypeOpenVM}, VKs: []string{"vk1", "vk2"}, }, PublicKey: publicKeyHex, @@ -64,7 +64,7 @@ func TestGenerateSignature(t *testing.T) { ProverVersion: "v4.4.45-37af5ef5-38a68e2-1c5093c", Challenge: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjQ4Mzg0ODUsIm9yaWdfaWF0IjoxNzI0ODM0ODg1LCJyYW5kb20iOiJ6QmdNZGstNGc4UzNUNTFrVEFsYk1RTXg2TGJ4SUs4czY3ejM2SlNuSFlJPSJ9.x9PvihhNx2w4_OX5uCrv8QJCNYVQkIi-K2k8XFXYmik", ProverProviderType: ProverProviderTypeInternal, - ProverTypes: []ProverType{ProverTypeChunk}, + ProverTypes: []ProverType{ProverTypeOpenVM}, VKs: []string{"mock_vk"}, }, PublicKey: publicKeyHex, diff --git a/coordinator/internal/types/prover.go b/coordinator/internal/types/prover.go index e579279fcd..ab603bc235 100644 --- a/coordinator/internal/types/prover.go +++ b/coordinator/internal/types/prover.go @@ -2,7 +2,6 @@ package types import ( "fmt" - "scroll-tech/common/types/message" ) @@ -21,10 +20,10 @@ type ProverType uint8 func (r ProverType) String() string { switch r { - case ProverTypeChunk: - return "prover type chunk" - case ProverTypeBatch: - return "prover type batch" + case ProverTypeChunkDeprecated: + return "prover type chunk (deprecated)" + case ProverTypeBatchDeprecated: + return "prover type batch (deprecated)" case ProverTypeOpenVM: return "prover type openvm" default: @@ -35,10 +34,10 @@ func (r ProverType) String() string { const ( // ProverTypeUndefined is an unknown prover type ProverTypeUndefined ProverType = iota - // ProverTypeChunk signals it's a chunk prover, which can prove chunk_tasks - ProverTypeChunk - // ProverTypeBatch signals it's a batch prover, which can prove batch_tasks and bundle_tasks - ProverTypeBatch + // ProverTypeChunk signals it's a chunk prover, which can prove chunk_tasks, which is deprecated + ProverTypeChunkDeprecated + // ProverTypeBatch signals it's a batch prover, which can prove batch_tasks and bundle_tasks, which is deprecated + ProverTypeBatchDeprecated // ProverTypeOpenVM ProverTypeOpenVM ) @@ -47,9 +46,9 @@ const ( func MakeProverType(proofType message.ProofType) ProverType { switch proofType { case message.ProofTypeChunk: - return ProverTypeChunk + return ProverTypeChunkDeprecated case message.ProofTypeBatch, message.ProofTypeBundle: - return ProverTypeBatch + return ProverTypeBatchDeprecated default: return ProverTypeUndefined } diff --git a/coordinator/test/api_test.go b/coordinator/test/api_test.go index 0fa2d405ef..68c5edbd68 100644 --- a/coordinator/test/api_test.go +++ b/coordinator/test/api_test.go @@ -67,7 +67,7 @@ func randomURL() string { return fmt.Sprintf("localhost:%d", 10000+2000+id.Int64()) } -func setupCoordinator(t *testing.T, proversPerSession uint8, coordinatorURL string, forks []string) (*cron.Collector, *http.Server) { +func setupCoordinator(t *testing.T, proversPerSession uint8, coordinatorURL string) (*cron.Collector, *http.Server) { var err error db, err = testApps.GetGormDBClient() @@ -84,17 +84,9 @@ func setupCoordinator(t *testing.T, proversPerSession uint8, coordinatorURL stri ProverManager: &config.ProverManager{ ProversPerSession: proversPerSession, Verifier: &config.VerifierConfig{ - MockMode: true, - LowVersionCircuit: &config.CircuitConfig{ - ParamsPath: "", - AssetsPath: "", - ForkName: "homestead", - MinProverVersion: "v4.4.57", - }, HighVersionCircuit: &config.CircuitConfig{ - ParamsPath: "", AssetsPath: "", - ForkName: "bernoulli", + ForkName: "euclidV2", MinProverVersion: "v4.4.89", }, }, @@ -109,20 +101,17 @@ func setupCoordinator(t *testing.T, proversPerSession uint8, coordinatorURL stri }, } - var chainConf params.ChainConfig - for _, forkName := range forks { - switch forkName { - case "bernoulli": - chainConf.BernoulliBlock = big.NewInt(100) - case "homestead": - chainConf.HomesteadBlock = big.NewInt(0) - } - } - proofCollector := cron.NewCollector(context.Background(), db, conf, nil) router := gin.New() - api.InitController(conf, &chainConf, db, nil) + api.InitController(conf, ¶ms.ChainConfig{ + BernoulliBlock: big.NewInt(0), + CurieBlock: big.NewInt(0), + DarwinTime: new(uint64), + DarwinV2Time: new(uint64), + EuclidTime: new(uint64), + EuclidV2Time: new(uint64), + }, db, nil) route.Route(router, conf, nil) srv := &http.Server{ Addr: coordinatorURL, @@ -142,7 +131,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.4.89" glogger := log.NewGlogHandler(log.StreamHandler(os.Stderr, log.LogfmtFormat())) glogger.Verbosity(log.LvlInfo) @@ -198,7 +187,7 @@ func TestApis(t *testing.T) { func testHandshake(t *testing.T) { // Setup coordinator and http server. coordinatorURL := randomURL() - proofCollector, httpHandler := setupCoordinator(t, 1, coordinatorURL, []string{"homestead"}) + proofCollector, httpHandler := setupCoordinator(t, 1, coordinatorURL) defer func() { proofCollector.Stop() assert.NoError(t, httpHandler.Shutdown(context.Background())) @@ -211,7 +200,7 @@ func testHandshake(t *testing.T) { func testFailedHandshake(t *testing.T) { // Setup coordinator and http server. coordinatorURL := randomURL() - proofCollector, httpHandler := setupCoordinator(t, 1, coordinatorURL, []string{"homestead"}) + proofCollector, httpHandler := setupCoordinator(t, 1, coordinatorURL) defer func() { proofCollector.Stop() }() @@ -229,7 +218,7 @@ func testFailedHandshake(t *testing.T) { func testGetTaskBlocked(t *testing.T) { coordinatorURL := randomURL() - collector, httpHandler := setupCoordinator(t, 3, coordinatorURL, []string{"homestead"}) + collector, httpHandler := setupCoordinator(t, 3, coordinatorURL) defer func() { collector.Stop() assert.NoError(t, httpHandler.Shutdown(context.Background())) @@ -273,7 +262,7 @@ func testGetTaskBlocked(t *testing.T) { func testOutdatedProverVersion(t *testing.T) { coordinatorURL := randomURL() - collector, httpHandler := setupCoordinator(t, 3, coordinatorURL, []string{"homestead"}) + collector, httpHandler := setupCoordinator(t, 3, coordinatorURL) defer func() { collector.Stop() assert.NoError(t, httpHandler.Shutdown(context.Background())) @@ -285,12 +274,12 @@ 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: v4.4.89, actual version: %s", 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: v4.4.89, actual version: %s", batchProver.proverVersion) code, errMsg = batchProver.tryGetProverTask(t, message.ProofTypeBatch) assert.Equal(t, types.ErrJWTCommonErr, code) assert.Equal(t, expectedErr, errors.New(errMsg)) @@ -298,7 +287,7 @@ func testOutdatedProverVersion(t *testing.T) { func testValidProof(t *testing.T) { coordinatorURL := randomURL() - collector, httpHandler := setupCoordinator(t, 3, coordinatorURL, []string{"homestead"}) + collector, httpHandler := setupCoordinator(t, 3, coordinatorURL) defer func() { collector.Stop() assert.NoError(t, httpHandler.Shutdown(context.Background())) @@ -381,7 +370,7 @@ func testValidProof(t *testing.T) { func testInvalidProof(t *testing.T) { // Setup coordinator and ws server. coordinatorURL := randomURL() - collector, httpHandler := setupCoordinator(t, 3, coordinatorURL, []string{"darwinV2"}) + collector, httpHandler := setupCoordinator(t, 3, coordinatorURL) defer func() { collector.Stop() assert.NoError(t, httpHandler.Shutdown(context.Background())) @@ -469,7 +458,7 @@ func testInvalidProof(t *testing.T) { func testProofGeneratedFailed(t *testing.T) { // Setup coordinator and ws server. coordinatorURL := randomURL() - collector, httpHandler := setupCoordinator(t, 3, coordinatorURL, []string{"darwinV2"}) + collector, httpHandler := setupCoordinator(t, 3, coordinatorURL) defer func() { collector.Stop() assert.NoError(t, httpHandler.Shutdown(context.Background())) @@ -570,7 +559,7 @@ func testProofGeneratedFailed(t *testing.T) { func testTimeoutProof(t *testing.T) { // Setup coordinator and ws server. coordinatorURL := randomURL() - collector, httpHandler := setupCoordinator(t, 1, coordinatorURL, []string{"darwinV2"}) + collector, httpHandler := setupCoordinator(t, 1, coordinatorURL) defer func() { collector.Stop() assert.NoError(t, httpHandler.Shutdown(context.Background())) @@ -593,7 +582,9 @@ func testTimeoutProof(t *testing.T) { assert.NoError(t, err) err = chunkOrm.UpdateBatchHashInRange(context.Background(), 0, 100, batch.Hash) assert.NoError(t, err) - encodeData, err := json.Marshal(message.Halo2ChunkProof{}) + encodeData, err := json.Marshal(message.OpenVMChunkProof{VmProof: &message.OpenVMProof{}, MetaData: struct { + ChunkInfo *message.ChunkInfo `json:"chunk_info"` + }{ChunkInfo: &message.ChunkInfo{}}}) assert.NoError(t, err) assert.NotEmpty(t, encodeData) err = chunkOrm.UpdateProofAndProvingStatusByHash(context.Background(), dbChunk.Hash, encodeData, types.ProvingTaskUnassigned, 1) diff --git a/coordinator/test/mock_prover.go b/coordinator/test/mock_prover.go index 7a23b5bd80..2b87b2df6e 100644 --- a/coordinator/test/mock_prover.go +++ b/coordinator/test/mock_prover.go @@ -207,14 +207,16 @@ func (r *mockProver) submitProof(t *testing.T, proverTaskSchema *types.GetTaskSc } var proof []byte - switch proverTaskSchema.TaskType { - case int(message.ProofTypeChunk): - encodeData, err := json.Marshal(message.Halo2ChunkProof{}) + switch message.ProofType(proverTaskSchema.TaskType) { + case message.ProofTypeChunk: + encodeData, err := json.Marshal(message.OpenVMChunkProof{VmProof: &message.OpenVMProof{}, MetaData: struct { + ChunkInfo *message.ChunkInfo `json:"chunk_info"` + }{ChunkInfo: &message.ChunkInfo{}}}) assert.NoError(t, err) assert.NotEmpty(t, encodeData) proof = encodeData - case int(message.ProofTypeBatch): - encodeData, err := json.Marshal(message.Halo2BatchProof{}) + case message.ProofTypeBatch: + encodeData, err := json.Marshal(message.OpenVMBatchProof{VmProof: &message.OpenVMProof{}}) assert.NoError(t, err) assert.NotEmpty(t, encodeData) proof = encodeData @@ -223,16 +225,14 @@ func (r *mockProver) submitProof(t *testing.T, proverTaskSchema *types.GetTaskSc if proofStatus == verifiedFailed { switch proverTaskSchema.TaskType { case int(message.ProofTypeChunk): - chunkProof := message.Halo2ChunkProof{} - chunkProof.RawProof = []byte(verifier.InvalidTestProof) - encodeData, err := json.Marshal(&chunkProof) + encodeData, err := json.Marshal(message.OpenVMChunkProof{VmProof: &message.OpenVMProof{Proof: []byte(verifier.InvalidTestProof)}, MetaData: struct { + ChunkInfo *message.ChunkInfo `json:"chunk_info"` + }{ChunkInfo: &message.ChunkInfo{}}}) assert.NoError(t, err) assert.NotEmpty(t, encodeData) proof = encodeData case int(message.ProofTypeBatch): - batchProof := message.Halo2BatchProof{} - batchProof.RawProof = []byte(verifier.InvalidTestProof) - encodeData, err := json.Marshal(&batchProof) + encodeData, err := json.Marshal(&message.OpenVMBatchProof{VmProof: &message.OpenVMProof{Proof: []byte(verifier.InvalidTestProof)}}) assert.NoError(t, err) assert.NotEmpty(t, encodeData) proof = encodeData diff --git a/prover/Cargo.lock b/prover/Cargo.lock deleted file mode 100644 index e625d64d0e..0000000000 --- a/prover/Cargo.lock +++ /dev/null @@ -1,5854 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if 1.0.0", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aggregator" -version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" -dependencies = [ - "ark-std 0.3.0", - "bitstream-io", - "c-kzg", - "ctor 0.1.26", - "encoder", - "env_logger 0.10.2", - "eth-types 0.12.0", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "gadgets 0.12.0", - "halo2-base", - "halo2-ecc", - "halo2_proofs", - "hex", - "itertools 0.11.0", - "log", - "num-bigint", - "once_cell", - "rand", - "revm-precompile", - "revm-primitives", - "serde", - "serde_json", - "snark-verifier", - "snark-verifier-sdk", - "strum 0.25.0", - "strum_macros 0.25.3", - "zkevm-circuits 0.12.0", -] - -[[package]] -name = "aggregator" -version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" -dependencies = [ - "ark-std 0.3.0", - "bitstream-io", - "c-kzg", - "ctor 0.1.26", - "encoder", - "env_logger 0.10.2", - "eth-types 0.13.0", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "gadgets 0.13.0", - "halo2-base", - "halo2-ecc", - "halo2_proofs", - "hex", - "itertools 0.11.0", - "log", - "num-bigint", - "once_cell", - "rand", - "revm-precompile", - "revm-primitives", - "serde", - "serde_json", - "snark-verifier", - "snark-verifier-sdk", - "strum 0.25.0", - "strum_macros 0.25.3", - "zkevm-circuits 0.13.0", -] - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - -[[package]] -name = "alloy-primitives" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8aa973e647ec336810a9356af8aea787249c9d00b1525359f3db29a68d231b" -dependencies = [ - "alloy-rlp", - "bytes", - "cfg-if 1.0.0", - "const-hex", - "derive_more", - "hex-literal", - "itoa", - "k256", - "keccak-asm", - "proptest", - "rand", - "ruint", - "serde", - "tiny-keccak", -] - -[[package]] -name = "alloy-rlp" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b155716bab55763c95ba212806cf43d05bcc70e5f35b02bad20cf5ec7fe11fed" -dependencies = [ - "arrayvec", - "bytes", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" - -[[package]] -name = "anstyle-parse" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64c907d4e79225ac72e2a354c9ce84d50ebb4586dee56c82b3ee73004f537f5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" - -[[package]] -name = "arc-swap" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" - -[[package]] -name = "ark-ff" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" -dependencies = [ - "ark-ff-asm 0.3.0", - "ark-ff-macros 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "derivative", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.3.3", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "digest 0.10.7", - "itertools 0.10.5", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.4.0", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" -dependencies = [ - "num-bigint", - "num-traits", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-serialize" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" -dependencies = [ - "ark-std 0.3.0", - "digest 0.9.0", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-std 0.4.0", - "digest 0.10.7", - "num-bigint", -] - -[[package]] -name = "ark-std" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" -dependencies = [ - "num-traits", - "rand", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand", -] - -[[package]] -name = "array-init" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "async-compression" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c90a406b4495d129f00461241616194cb8a032c8d1c53c657f0961d5f8e0498" -dependencies = [ - "flate2", - "futures-core", - "memchr", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "async-trait" -version = "0.1.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" -dependencies = [ - "futures", - "pharos", - "rustc_version 0.4.0", -] - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "aurora-engine-modexp" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aef7712851e524f35fbbb74fa6599c5cd8692056a1c36f9ca0d2001b670e7e5" -dependencies = [ - "hex", - "num", -] - -[[package]] -name = "auto_impl" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - -[[package]] -name = "axum" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" -dependencies = [ - "async-trait", - "axum-core", - "bitflags 1.3.2", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "mime", - "rustversion", - "tower-layer", - "tower-service", -] - -[[package]] -name = "backtrace" -version = "0.3.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" -dependencies = [ - "addr2line", - "cc", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bindgen" -version = "0.69.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" -dependencies = [ - "bitflags 2.5.0", - "cexpr", - "clang-sys", - "itertools 0.10.5", - "lazy_static", - "lazycell", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.66", -] - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" - -[[package]] -name = "bitstream-io" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c12d1856e42f0d817a835fe55853957c85c8c8a470114029143d3f12671446e" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "blake2b_simd" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" -dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding", - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "bls12_381" -version = "0.8.0" -source = "git+https://github.com/scroll-tech/bls12_381?branch=feat/impl_scalar_field#2c515f73a2462fef8681c8e884edf1710f52b22a" -dependencies = [ - "ff", - "group", - "pairing", - "pasta_curves", - "rand_core", - "subtle", -] - -[[package]] -name = "blst" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" -dependencies = [ - "cc", - "glob", - "threadpool", - "zeroize", -] - -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "sha2", - "tinyvec", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "bus-mapping" -version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" -dependencies = [ - "eth-types 0.12.0", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "ethers-providers 2.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-signers", - "gadgets 0.12.0", - "halo2_proofs", - "hex", - "itertools 0.11.0", - "log", - "mock 0.12.0", - "mpt-zktrie 0.12.0", - "num", - "poseidon-circuit", - "revm-precompile", - "serde", - "serde_json", - "strum 0.25.0", - "strum_macros 0.25.3", -] - -[[package]] -name = "bus-mapping" -version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" -dependencies = [ - "eth-types 0.13.0", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "ethers-providers 2.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-signers", - "gadgets 0.13.0", - "halo2_proofs", - "hex", - "itertools 0.11.0", - "log", - "mock 0.13.0", - "mpt-zktrie 0.13.0", - "num", - "poseidon-circuit", - "revm-precompile", - "serde", - "serde_json", - "strum 0.25.0", - "strum_macros 0.25.3", -] - -[[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" -dependencies = [ - "serde", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "c-kzg" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" -dependencies = [ - "blst", - "cc", - "glob", - "hex", - "libc", - "serde", -] - -[[package]] -name = "cc" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" -dependencies = [ - "jobserver", - "libc", - "once_cell", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-targets 0.52.5", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "4.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim 0.11.1", -] - -[[package]] -name = "clap_derive" -version = "4.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "clap_lex" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" - -[[package]] -name = "coins-bip32" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" -dependencies = [ - "bs58", - "coins-core", - "digest 0.10.7", - "hmac", - "k256", - "serde", - "sha2", - "thiserror", -] - -[[package]] -name = "coins-bip39" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" -dependencies = [ - "bitvec", - "coins-bip32", - "hmac", - "once_cell", - "pbkdf2 0.12.2", - "rand", - "sha2", - "thiserror", -] - -[[package]] -name = "coins-core" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" -dependencies = [ - "base64 0.21.7", - "bech32", - "bs58", - "digest 0.10.7", - "generic-array", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2", - "sha3 0.10.8", - "thiserror", -] - -[[package]] -name = "colorchoice" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" - -[[package]] -name = "const-hex" -version = "1.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ff96486ccc291d36a958107caf2c0af8c78c0af7d31ae2f35ce055130de1a6" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "hex", - "proptest", - "serde", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ctor" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" -dependencies = [ - "quote", - "syn 2.0.66", -] - -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - -[[package]] -name = "der" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.0", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "dotenv" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" - -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "dyn-clone" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "either" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "encoder" -version = "0.1.0" -source = "git+https://github.com/scroll-tech/da-codec.git?tag=v0.1.0#5a28b752d4504bf0966734fe4a6a5433981c74c2" -dependencies = [ - "zstd", -] - -[[package]] -name = "encoding_rs" -version = "0.8.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "enr" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf56acd72bb22d2824e66ae8e9e5ada4d0de17a69c7fd35569dde2ada8ec9116" -dependencies = [ - "base64 0.13.1", - "bytes", - "hex", - "k256", - "log", - "rand", - "rlp", - "serde", - "sha3 0.10.8", - "zeroize", -] - -[[package]] -name = "enumn" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "env_filter" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" -dependencies = [ - "humantime", - "is-terminal", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "env_logger" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "humantime", - "log", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "eth-keystore" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" -dependencies = [ - "aes", - "ctr", - "digest 0.10.7", - "hex", - "hmac", - "pbkdf2 0.11.0", - "rand", - "scrypt", - "serde", - "serde_json", - "sha2", - "sha3 0.10.8", - "thiserror", - "uuid", -] - -[[package]] -name = "eth-types" -version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" -dependencies = [ - "base64 0.13.1", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "ethers-signers", - "halo2curves", - "hex", - "itertools 0.11.0", - "log", - "num", - "num-bigint", - "poseidon-base", - "regex", - "revm-precompile", - "revm-primitives", - "serde", - "serde_json", - "serde_with", - "sha3 0.10.8", - "strum 0.25.0", - "strum_macros 0.25.3", - "subtle", - "uint", -] - -[[package]] -name = "eth-types" -version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" -dependencies = [ - "base64 0.13.1", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "ethers-signers", - "halo2curves", - "hex", - "itertools 0.11.0", - "log", - "num", - "num-bigint", - "poseidon-base", - "regex", - "revm-precompile", - "revm-primitives", - "serde", - "serde_json", - "serde_with", - "sha3 0.10.8", - "strum 0.25.0", - "strum_macros 0.25.3", - "subtle", - "uint", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3 0.10.8", - "thiserror", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", -] - -[[package]] -name = "ethers-core" -version = "2.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6da5fa198af0d3be20c19192df2bd9590b92ce09a8421e793bec8851270f1b05" -dependencies = [ - "arrayvec", - "bytes", - "chrono", - "elliptic-curve", - "ethabi", - "generic-array", - "hex", - "k256", - "num_enum 0.6.1", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum 0.24.1", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "ethers-core" -version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" -dependencies = [ - "arrayvec", - "bytes", - "chrono", - "elliptic-curve", - "ethabi", - "generic-array", - "hex", - "k256", - "num_enum 0.6.1", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum 0.24.1", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "ethers-providers" -version = "2.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b498fd2a6c019d023e43e83488cd1fb0721f299055975aa6bac8dbf1e95f2c" -dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes", - "enr", - "ethers-core 2.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-channel", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "hex", - "http 0.2.12", - "instant", - "once_cell", - "pin-project", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", -] - -[[package]] -name = "ethers-providers" -version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" -dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes", - "enr", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "futures-channel", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "hex", - "http 0.2.12", - "instant", - "once_cell", - "pin-project", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", -] - -[[package]] -name = "ethers-signers" -version = "2.0.7" -source = "git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7#e32dfd62e7cdec31160b91c5a646883594a586ba" -dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "elliptic-curve", - "eth-keystore", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "hex", - "rand", - "sha2", - "thiserror", - "tracing", -] - -[[package]] -name = "external-tracer" -version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" -dependencies = [ - "eth-types 0.12.0", - "geth-utils 0.12.0", - "log", - "serde", - "serde_json", - "serde_stacker", -] - -[[package]] -name = "external-tracer" -version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" -dependencies = [ - "eth-types 0.13.0", - "geth-utils 0.13.0", - "log", - "serde", - "serde_json", - "serde_stacker", -] - -[[package]] -name = "fastrand" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" - -[[package]] -name = "fastrlp" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "bitvec", - "rand_core", - "subtle", -] - -[[package]] -name = "fixed-hash" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" -dependencies = [ - "byteorder", - "rand", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "flate2" -version = "1.0.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "gadgets" -version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" -dependencies = [ - "eth-types 0.12.0", - "halo2_proofs", - "poseidon-base", - "sha3 0.10.8", - "strum 0.25.0", -] - -[[package]] -name = "gadgets" -version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" -dependencies = [ - "eth-types 0.13.0", - "halo2_proofs", - "poseidon-base", - "sha3 0.10.8", - "strum 0.25.0", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "geth-utils" -version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" -dependencies = [ - "env_logger 0.10.2", - "gobuild", - "log", -] - -[[package]] -name = "geth-utils" -version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" -dependencies = [ - "env_logger 0.10.2", - "gobuild", - "log", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "git-version" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad568aa3db0fcbc81f2f116137f263d7304f512a1209b35b85150d3ef88ad19" -dependencies = [ - "git-version-macro", -] - -[[package]] -name = "git-version-macro" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "gobuild" -version = "0.1.0-alpha.2" -source = "git+https://github.com/scroll-tech/gobuild.git#24935c2b8f677841f22acd6710957621bb294e0e" -dependencies = [ - "cc", -] - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core", - "subtle", -] - -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http 1.1.0", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "halo2-base" -version = "0.2.2" -source = "git+https://github.com/scroll-tech/halo2-lib?branch=develop#817cace374a9f4b2eca682b1cc36f143255ea25f" -dependencies = [ - "ff", - "halo2_proofs", - "itertools 0.10.5", - "num-bigint", - "num-integer", - "num-traits", - "rand_chacha", - "rustc-hash", -] - -[[package]] -name = "halo2-ecc" -version = "0.2.2" -source = "git+https://github.com/scroll-tech/halo2-lib?branch=develop#817cace374a9f4b2eca682b1cc36f143255ea25f" -dependencies = [ - "ff", - "group", - "halo2-base", - "itertools 0.10.5", - "num-bigint", - "num-integer", - "num-traits", - "rand", - "rand_chacha", - "rand_core", - "serde", - "serde_json", -] - -[[package]] -name = "halo2-gate-generator" -version = "0.1.0" -source = "git+https://github.com/scroll-tech/halo2gategen?branch=scroll#2fa5c39aa67d0f97d660f37954daa9e897d0a4c1" -dependencies = [ - "halo2_proofs", - "lazy_static", - "num-bigint", - "rand", - "serde", - "serde_json", - "strum 0.24.1", - "strum_macros 0.24.3", - "subtle", -] - -[[package]] -name = "halo2-mpt-circuits" -version = "0.1.0" -source = "git+https://github.com/scroll-tech/mpt-circuit.git?branch=v0.7#daa3a06e2e96d00337188280ac43fa879e722804" -dependencies = [ - "ethers-core 2.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "halo2_proofs", - "hex", - "itertools 0.10.5", - "lazy_static", - "log", - "num-bigint", - "num-traits", - "poseidon-circuit", - "rand", - "rand_chacha", - "serde", - "serde_json", - "strum 0.24.1", - "strum_macros 0.24.3", - "thiserror", -] - -[[package]] -name = "halo2_gadgets" -version = "1.1.0" -source = "git+https://github.com/scroll-tech/halo2.git?branch=v1.1#e5ddf67e5ae16be38d6368ed355c7c41906272ab" -dependencies = [ - "arrayvec", - "bitvec", - "ff", - "group", - "halo2_proofs", - "halo2curves", - "lazy_static", - "rand", - "subtle", - "uint", -] - -[[package]] -name = "halo2_proofs" -version = "1.1.0" -source = "git+https://github.com/scroll-tech/halo2.git?branch=v1.1#e5ddf67e5ae16be38d6368ed355c7c41906272ab" -dependencies = [ - "ark-std 0.3.0", - "blake2b_simd", - "cfg-if 0.1.10", - "crossbeam", - "ff", - "group", - "halo2curves", - "log", - "maybe-rayon", - "num-bigint", - "num-integer", - "poseidon", - "rand_chacha", - "rand_core", - "rayon", - "sha3 0.9.1", - "subtle", - "tracing", -] - -[[package]] -name = "halo2curves" -version = "0.1.0" -source = "git+https://github.com/scroll-tech/halo2curves?branch=v0.1.0#112f5b9bf27f6b1708ba7d1c2fc14cb3c6e55604" -dependencies = [ - "blake2b_simd", - "bls12_381", - "ff", - "group", - "lazy_static", - "maybe-rayon", - "num-bigint", - "num-traits", - "pasta_curves", - "paste", - "rand", - "rand_core", - "serde", - "serde_arrays", - "static_assertions", - "subtle", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] - -[[package]] -name = "hashers" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" -dependencies = [ - "fxhash", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - -[[package]] -name = "http-body" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" -dependencies = [ - "bytes", - "http 1.1.0", -] - -[[package]] -name = "http-body-util" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" -dependencies = [ - "bytes", - "futures-core", - "http 1.1.0", - "http-body 1.0.0", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.0", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.28", - "rustls", - "tokio", - "tokio-rustls", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper 1.3.1", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d8d52be92d09acc2e01dddb7fde3ad983fc6489c7db4837e605bc3fca4cb63e" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.3.1", - "pin-project-lite", - "socket2", - "tokio", - "tower", - "tower-service", - "tracing", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown 0.14.5", -] - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "is-terminal" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "jobserver" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" -dependencies = [ - "cfg-if 1.0.0", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", - "signature", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "keccak-asm" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47a3633291834c4fbebf8673acbc1b04ec9d151418ff9b8e26dcd79129928758" -dependencies = [ - "digest 0.10.7", - "sha3-asm", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin 0.5.2", -] - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.155" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "libloading" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" -dependencies = [ - "cfg-if 1.0.0", - "windows-targets 0.48.5", -] - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "librocksdb-sys" -version = "0.17.1+9.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b7869a512ae9982f4d46ba482c2a304f1efd80c6412a3d4bf57bb79a619679f" -dependencies = [ - "bindgen", - "bzip2-sys", - "cc", - "libc", - "libz-sys", - "lz4-sys", - "zstd-sys 2.0.13+zstd.1.5.6", -] - -[[package]] -name = "libz-sys" -version = "1.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "log-mdc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" - -[[package]] -name = "log4rs" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0816135ae15bd0391cf284eab37e6e3ee0a6ee63d2ceeb659862bd8d0a984ca6" -dependencies = [ - "anyhow", - "arc-swap", - "chrono", - "derivative", - "fnv", - "libc", - "log", - "log-mdc", - "once_cell", - "parking_lot 0.12.3", - "thiserror", - "thread-id", - "winapi", -] - -[[package]] -name = "lz4-sys" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "maybe-rayon" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" -dependencies = [ - "cfg-if 1.0.0", - "rayon", -] - -[[package]] -name = "memchr" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "misc-precompiled-circuit" -version = "0.1.0" -source = "git+https://github.com/scroll-tech/misc-precompiled-circuit.git?branch=main#dcb5018d84e8a9adec59cd33f5348a3971cec194" -dependencies = [ - "halo2-gate-generator", - "halo2_proofs", - "num-bigint", - "rand", - "serde", - "serde_json", - "strum 0.25.0", - "strum_macros 0.25.3", - "subtle", -] - -[[package]] -name = "mock" -version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" -dependencies = [ - "eth-types 0.12.0", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "ethers-signers", - "external-tracer 0.12.0", - "itertools 0.11.0", - "log", - "rand", - "rand_chacha", -] - -[[package]] -name = "mock" -version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" -dependencies = [ - "eth-types 0.13.0", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "ethers-signers", - "external-tracer 0.13.0", - "itertools 0.11.0", - "log", - "rand", - "rand_chacha", -] - -[[package]] -name = "mpt-zktrie" -version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" -dependencies = [ - "eth-types 0.12.0", - "halo2curves", - "hex", - "log", - "num-bigint", - "poseidon-base", - "zktrie 0.3.0 (git+https://github.com/scroll-tech/zktrie.git?branch=main)", -] - -[[package]] -name = "mpt-zktrie" -version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" -dependencies = [ - "eth-types 0.13.0", - "halo2curves", - "hex", - "log", - "num-bigint", - "poseidon-base", - "zktrie 0.3.0 (git+https://github.com/scroll-tech/zktrie.git?branch=v0.9)", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" -dependencies = [ - "num-integer", - "num-traits", - "rand", -] - -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" -dependencies = [ - "num_enum_derive 0.5.11", -] - -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "openssl" -version = "0.10.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" -dependencies = [ - "bitflags 2.5.0", - "cfg-if 1.0.0", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group", -] - -[[package]] -name = "parity-scale-codec" -version = "3.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" -dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" -dependencies = [ - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.10", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall 0.5.1", - "smallvec", - "windows-targets 0.52.5", -] - -[[package]] -name = "pasta_curves" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" -dependencies = [ - "blake2b_simd", - "ff", - "group", - "lazy_static", - "rand", - "static_assertions", - "subtle", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", - "hmac", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pest" -version = "2.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pharos" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" -dependencies = [ - "futures", - "rustc_version 0.4.0", -] - -[[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "poseidon" -version = "0.2.0" -source = "git+https://github.com/scroll-tech/poseidon.git?branch=main#5787dd3d2ce7a9e9601a035c396ac0c03449b54d" -dependencies = [ - "halo2curves", - "subtle", -] - -[[package]] -name = "poseidon-base" -version = "0.1.0" -source = "git+https://github.com/scroll-tech/poseidon-circuit.git?branch=main#7b96835c6201afdbfaf3d13d641efbaaf5db2d20" -dependencies = [ - "bitvec", - "halo2curves", - "lazy_static", -] - -[[package]] -name = "poseidon-circuit" -version = "0.1.0" -source = "git+https://github.com/scroll-tech/poseidon-circuit.git?branch=main#7b96835c6201afdbfaf3d13d641efbaaf5db2d20" -dependencies = [ - "ff", - "halo2_proofs", - "log", - "poseidon-base", - "rand", - "rand_xorshift", - "thiserror", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "primitive-types" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" -dependencies = [ - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -dependencies = [ - "toml_edit 0.21.1", -] - -[[package]] -name = "proc-macro2" -version = "1.0.84" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proptest" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" -dependencies = [ - "bit-set", - "bit-vec", - "bitflags 2.5.0", - "lazy_static", - "num-traits", - "rand", - "rand_chacha", - "rand_xorshift", - "regex-syntax 0.8.3", - "rusty-fork", - "tempfile", - "unarray", -] - -[[package]] -name = "prover" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait", - "base64 0.13.1", - "clap", - "ctor 0.2.8", - "env_logger 0.11.3", - "eth-keystore", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "ethers-providers 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "futures", - "halo2_proofs", - "hex", - "http 1.1.0", - "log", - "once_cell", - "prover 0.12.0", - "prover 0.13.0", - "rand", - "reqwest 0.12.4", - "reqwest-middleware", - "reqwest-retry", - "rlp", - "scroll-proving-sdk", - "serde", - "serde_json", - "sled", - "snark-verifier-sdk", - "tiny-keccak", - "tokio", -] - -[[package]] -name = "prover" -version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" -dependencies = [ - "aggregator 0.12.0", - "anyhow", - "base64 0.13.1", - "blake2", - "bus-mapping 0.12.0", - "chrono", - "dotenvy", - "eth-types 0.12.0", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "git-version", - "halo2_proofs", - "hex", - "itertools 0.11.0", - "log", - "log4rs", - "mpt-zktrie 0.12.0", - "num-bigint", - "rand", - "rand_xorshift", - "serde", - "serde_derive", - "serde_json", - "serde_stacker", - "sha2", - "snark-verifier", - "snark-verifier-sdk", - "zkevm-circuits 0.12.0", -] - -[[package]] -name = "prover" -version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" -dependencies = [ - "aggregator 0.13.0", - "anyhow", - "base64 0.13.1", - "blake2", - "bus-mapping 0.13.0", - "chrono", - "dotenvy", - "eth-types 0.13.0", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "git-version", - "halo2_proofs", - "hex", - "itertools 0.11.0", - "log", - "log4rs", - "mpt-zktrie 0.13.0", - "num-bigint", - "rand", - "rand_xorshift", - "serde", - "serde_derive", - "serde_json", - "serde_stacker", - "sha2", - "snark-verifier", - "snark-verifier-sdk", - "zkevm-circuits 0.13.0", -] - -[[package]] -name = "psm" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" -dependencies = [ - "cc", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" -dependencies = [ - "bitflags 2.5.0", -] - -[[package]] -name = "regex" -version = "1.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.3", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.3", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" - -[[package]] -name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", - "hyper-rustls", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-rustls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots 0.25.4", - "winreg 0.50.0", -] - -[[package]] -name = "reqwest" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" -dependencies = [ - "async-compression", - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.4.5", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.3.1", - "hyper-tls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile 2.1.2", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-native-tls", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg 0.52.0", -] - -[[package]] -name = "reqwest-middleware" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a45d100244a467870f6cb763c4484d010a6bed6bd610b3676e3825d93fb4cfbd" -dependencies = [ - "anyhow", - "async-trait", - "http 1.1.0", - "reqwest 0.12.4", - "serde", - "thiserror", - "tower-service", -] - -[[package]] -name = "reqwest-retry" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40f342894422862af74c50e1e9601cf0931accc9c6981e5eb413c46603b616b5" -dependencies = [ - "anyhow", - "async-trait", - "chrono", - "futures", - "getrandom", - "http 1.1.0", - "hyper 1.3.1", - "parking_lot 0.11.2", - "reqwest 0.12.4", - "reqwest-middleware", - "retry-policies", - "tokio", - "tracing", - "wasm-timer", -] - -[[package]] -name = "retry-policies" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "493b4243e32d6eedd29f9a398896e35c6943a123b55eec97dcaee98310d25810" -dependencies = [ - "anyhow", - "chrono", - "rand", -] - -[[package]] -name = "revm" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73d84c8f9836efb0f5f5f8de4700a953c4e1f3119e5cfcb0aad8e5be73daf991" -dependencies = [ - "arrayref", - "auto_impl", - "bytes", - "hashbrown 0.13.2", - "num_enum 0.5.11", - "primitive-types", - "revm_precompiles", - "rlp", - "sha3 0.10.8", -] - -[[package]] -name = "revm-precompile" -version = "7.0.0" -source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v36#36c304d9e9ba4e4b2d5468d91a6bd27210133b6a" -dependencies = [ - "aurora-engine-modexp", - "c-kzg", - "k256", - "once_cell", - "revm-primitives", - "ripemd", - "secp256k1 0.29.0", - "sha2", - "substrate-bn", -] - -[[package]] -name = "revm-primitives" -version = "4.0.0" -source = "git+https://github.com/scroll-tech/revm?branch=scroll-evm-executor/v36#36c304d9e9ba4e4b2d5468d91a6bd27210133b6a" -dependencies = [ - "alloy-primitives", - "auto_impl", - "bitflags 2.5.0", - "bitvec", - "c-kzg", - "cfg-if 1.0.0", - "derive_more", - "dyn-clone", - "enumn", - "halo2curves", - "hashbrown 0.14.5", - "hex", - "once_cell", - "poseidon-base", - "serde", -] - -[[package]] -name = "revm_precompiles" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0353d456ef3e989dc9190f42c6020f09bc2025930c37895826029304413204b5" -dependencies = [ - "bytes", - "hashbrown 0.13.2", - "num", - "once_cell", - "primitive-types", - "ripemd", - "secp256k1 0.24.3", - "sha2", - "sha3 0.10.8", - "substrate-bn", -] - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if 1.0.0", - "getrandom", - "libc", - "spin 0.9.8", - "untrusted 0.9.0", - "windows-sys 0.52.0", -] - -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "rlp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" -dependencies = [ - "bytes", - "rlp-derive", - "rustc-hex", -] - -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "rocksdb" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26ec73b20525cb235bad420f911473b69f9fe27cc856c5461bccd7e4af037f43" -dependencies = [ - "libc", - "librocksdb-sys", -] - -[[package]] -name = "ruint" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" -dependencies = [ - "alloy-rlp", - "ark-ff 0.3.0", - "ark-ff 0.4.2", - "bytes", - "fastrlp", - "num-bigint", - "num-traits", - "parity-scale-codec", - "primitive-types", - "proptest", - "rand", - "rlp", - "ruint-macro", - "serde", - "valuable", - "zeroize", -] - -[[package]] -name = "ruint-macro" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.23", -] - -[[package]] -name = "rustix" -version = "0.38.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" -dependencies = [ - "bitflags 2.5.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring 0.17.8", - "rustls-webpki 0.101.7", - "sct", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - -[[package]] -name = "rustls-pemfile" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" -dependencies = [ - "base64 0.22.1", - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" - -[[package]] -name = "rustls-webpki" -version = "0.100.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6a5fc258f1c1276dfe3016516945546e2d5383911efc0fc4f1cdc5df3a4ae3" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - -[[package]] -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" - -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error", - "tempfile", - "wait-timeout", -] - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher", -] - -[[package]] -name = "scale-info" -version = "2.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" -dependencies = [ - "cfg-if 1.0.0", - "derive_more", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" -dependencies = [ - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scroll-proving-sdk" -version = "0.1.0" -source = "git+https://github.com/scroll-tech/scroll-proving-sdk.git?rev=160db6c#160db6ceec45235f13b0f2581802a614f7e90a4b" -dependencies = [ - "anyhow", - "async-trait", - "axum", - "clap", - "dotenv", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "ethers-providers 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "hex", - "http 1.1.0", - "log", - "prover 0.13.0", - "rand", - "reqwest 0.12.4", - "reqwest-middleware", - "reqwest-retry", - "rlp", - "rocksdb", - "serde", - "serde_json", - "tiny-keccak", - "tokio", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "scrypt" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" -dependencies = [ - "hmac", - "pbkdf2 0.11.0", - "salsa20", - "sha2", -] - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "secp256k1" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" -dependencies = [ - "secp256k1-sys 0.6.1", -] - -[[package]] -name = "secp256k1" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e0cc0f1cf93f4969faf3ea1c7d8a9faed25918d96affa959720823dfe86d4f3" -dependencies = [ - "rand", - "secp256k1-sys 0.10.0", -] - -[[package]] -name = "secp256k1-sys" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83080e2c2fc1006e625be82e5d1eb6a43b7fd9578b617fcc55814daf286bba4b" -dependencies = [ - "cc", -] - -[[package]] -name = "secp256k1-sys" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1433bd67156263443f14d603720b082dd3121779323fce20cba2aa07b874bc1b" -dependencies = [ - "cc", -] - -[[package]] -name = "security-framework" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" -dependencies = [ - "bitflags 2.5.0", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" - -[[package]] -name = "send_wrapper" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" - -[[package]] -name = "serde" -version = "1.0.203" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_arrays" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38636132857f68ec3d5f3eb121166d2af33cb55174c4d5ff645db6165cbef0fd" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.203" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "serde_json" -version = "1.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_path_to_error" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" -dependencies = [ - "itoa", - "serde", -] - -[[package]] -name = "serde_stacker" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "babfccff5773ff80657f0ecf553c7c516bdc2eb16389c0918b36b73e7015276e" -dependencies = [ - "serde", - "stacker", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" -dependencies = [ - "serde", - "serde_with_macros", -] - -[[package]] -name = "serde_with_macros" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "keccak", -] - -[[package]] -name = "sha3-asm" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b57fd861253bff08bb1919e995f90ba8f4889de2726091c8876f3a4e823b40" -dependencies = [ - "cc", - "cfg-if 1.0.0", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest 0.10.7", - "rand_core", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "sled" -version = "0.34.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" -dependencies = [ - "crc32fast", - "crossbeam-epoch", - "crossbeam-utils", - "fs2", - "fxhash", - "libc", - "log", - "parking_lot 0.11.2", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "snark-verifier" -version = "0.1.0" -source = "git+https://github.com/scroll-tech/snark-verifier?branch=develop#58c46b74c73156b9e09dc27617369d2acfb4461b" -dependencies = [ - "bytes", - "ethereum-types", - "halo2-base", - "halo2-ecc", - "hex", - "itertools 0.12.1", - "num-bigint", - "num-integer", - "num-traits", - "poseidon", - "rand", - "revm", - "rlp", - "rustc-hash", - "serde", - "sha3 0.10.8", -] - -[[package]] -name = "snark-verifier-sdk" -version = "0.0.1" -source = "git+https://github.com/scroll-tech/snark-verifier?branch=develop#58c46b74c73156b9e09dc27617369d2acfb4461b" -dependencies = [ - "bincode", - "ethereum-types", - "ff", - "halo2-base", - "hex", - "itertools 0.12.1", - "log", - "num-bigint", - "num-integer", - "num-traits", - "rand", - "rand_chacha", - "serde", - "serde_json", - "snark-verifier", -] - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "stacker" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" -dependencies = [ - "cc", - "cfg-if 1.0.0", - "libc", - "psm", - "winapi", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "strum" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" -dependencies = [ - "strum_macros 0.24.3", -] - -[[package]] -name = "strum" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" - -[[package]] -name = "strum_macros" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.66", -] - -[[package]] -name = "substrate-bn" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b5bbfa79abbae15dd642ea8176a21a635ff3c00059961d1ea27ad04e5b441c" -dependencies = [ - "byteorder", - "crunchy", - "lazy_static", - "rand", - "rustc-hex", -] - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if 1.0.0", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "thread-id" -version = "4.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ec81c46e9eb50deaa257be2f148adf052d1fb7701cfd55ccfab2525280b70b" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot 0.12.3", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c" -dependencies = [ - "futures-util", - "log", - "rustls", - "tokio", - "tokio-rustls", - "tungstenite", - "webpki-roots 0.23.1", -] - -[[package]] -name = "tokio-util" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml_datetime" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "tungstenite" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.12", - "httparse", - "log", - "rand", - "rustls", - "sha1", - "thiserror", - "url", - "utf-8", - "webpki", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "ucd-trie" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom", - "serde", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if 1.0.0", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.66", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" -dependencies = [ - "futures", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - -[[package]] -name = "webpki-roots" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" -dependencies = [ - "rustls-webpki 0.100.3", -] - -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if 1.0.0", - "windows-sys 0.48.0", -] - -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if 1.0.0", - "windows-sys 0.48.0", -] - -[[package]] -name = "ws_stream_wasm" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" -dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version 0.4.0", - "send_wrapper 0.6.0", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "zerocopy" -version = "0.7.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "zkevm-circuits" -version = "0.12.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.12.2#6f7b46a3b1ccf9dc448735e8455e1ac6f9e30643" -dependencies = [ - "array-init", - "bus-mapping 0.12.0", - "either", - "env_logger 0.10.2", - "eth-types 0.12.0", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "ethers-signers", - "ff", - "gadgets 0.12.0", - "halo2-base", - "halo2-ecc", - "halo2-mpt-circuits", - "halo2_gadgets", - "halo2_proofs", - "hex", - "itertools 0.11.0", - "log", - "misc-precompiled-circuit", - "mock 0.12.0", - "mpt-zktrie 0.12.0", - "num", - "num-bigint", - "poseidon-circuit", - "rand", - "rand_chacha", - "rand_xorshift", - "rayon", - "serde", - "serde_json", - "sha3 0.10.8", - "snark-verifier", - "snark-verifier-sdk", - "strum 0.25.0", - "strum_macros 0.25.3", - "subtle", -] - -[[package]] -name = "zkevm-circuits" -version = "0.13.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.13.1#4009e5593f13ba73f64f556011ee5ef47bc4ebf3" -dependencies = [ - "array-init", - "bus-mapping 0.13.0", - "either", - "env_logger 0.10.2", - "eth-types 0.13.0", - "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", - "ethers-signers", - "ff", - "gadgets 0.13.0", - "halo2-base", - "halo2-ecc", - "halo2-mpt-circuits", - "halo2_gadgets", - "halo2_proofs", - "hex", - "itertools 0.11.0", - "log", - "misc-precompiled-circuit", - "mock 0.13.0", - "mpt-zktrie 0.13.0", - "num", - "num-bigint", - "poseidon-circuit", - "rand", - "rand_chacha", - "rand_xorshift", - "rayon", - "serde", - "serde_json", - "sha3 0.10.8", - "snark-verifier", - "snark-verifier-sdk", - "strum 0.25.0", - "strum_macros 0.25.3", - "subtle", -] - -[[package]] -name = "zktrie" -version = "0.3.0" -source = "git+https://github.com/scroll-tech/zktrie.git?branch=main#23181f209e94137f74337b150179aeb80c72e7c8" -dependencies = [ - "gobuild", - "zktrie_rust 0.3.0 (git+https://github.com/scroll-tech/zktrie.git?branch=main)", -] - -[[package]] -name = "zktrie" -version = "0.3.0" -source = "git+https://github.com/scroll-tech/zktrie.git?branch=v0.9#460b8c22af65b7809164548cba1e0253b6db5a70" -dependencies = [ - "gobuild", - "zktrie_rust 0.3.0 (git+https://github.com/scroll-tech/zktrie.git?branch=v0.9)", -] - -[[package]] -name = "zktrie_rust" -version = "0.3.0" -source = "git+https://github.com/scroll-tech/zktrie.git?branch=main#23181f209e94137f74337b150179aeb80c72e7c8" -dependencies = [ - "hex", - "lazy_static", - "num", - "num-derive", - "num-traits", - "strum 0.24.1", - "strum_macros 0.24.3", -] - -[[package]] -name = "zktrie_rust" -version = "0.3.0" -source = "git+https://github.com/scroll-tech/zktrie.git?branch=v0.9#460b8c22af65b7809164548cba1e0253b6db5a70" -dependencies = [ - "hex", - "lazy_static", - "num", - "num-derive", - "num-traits", - "strum 0.24.1", - "strum_macros 0.24.3", -] - -[[package]] -name = "zstd" -version = "0.13.0" -source = "git+https://github.com/scroll-tech/zstd-rs?branch=hack/mul-block#5c0892b6567dab31394d701477183ce9d6a32aca" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.0.0" -source = "git+https://github.com/scroll-tech/zstd-rs?branch=hack/mul-block#5c0892b6567dab31394d701477183ce9d6a32aca" -dependencies = [ - "zstd-sys 2.0.9+zstd.1.5.5", -] - -[[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" -source = "git+https://github.com/scroll-tech/zstd-rs?branch=hack/mul-block#5c0892b6567dab31394d701477183ce9d6a32aca" -dependencies = [ - "cc", - "pkg-config", -] - -[[package]] -name = "zstd-sys" -version = "2.0.13+zstd.1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/prover/Cargo.toml b/prover/Cargo.toml deleted file mode 100644 index 89ef9b54b3..0000000000 --- a/prover/Cargo.toml +++ /dev/null @@ -1,50 +0,0 @@ -[package] -name = "prover" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - - -[patch.crates-io] -ethers-signers = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" } -halo2curves = { git = "https://github.com/scroll-tech/halo2curves", branch = "v0.1.0" } -[patch."https://github.com/privacy-scaling-explorations/halo2.git"] -halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "v1.1" } -[patch."https://github.com/privacy-scaling-explorations/poseidon.git"] -poseidon = { git = "https://github.com/scroll-tech/poseidon.git", branch = "main" } -[patch."https://github.com/privacy-scaling-explorations/bls12_381"] -bls12_381 = { git = "https://github.com/scroll-tech/bls12_381", branch = "feat/impl_scalar_field" } - - -[dependencies] -anyhow = "1.0" -log = "0.4" -env_logger = "0.11.3" -serde = { version = "1.0.198", features = ["derive"] } -serde_json = "1.0.116" -futures = "0.3.30" - -ethers-core = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" } -ethers-providers = { git = "https://github.com/scroll-tech/ethers-rs.git", branch = "v2.0.7" } -halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "v1.1" } -snark-verifier-sdk = { git = "https://github.com/scroll-tech/snark-verifier", branch = "develop", default-features = false, features = ["loader_halo2", "loader_evm", "halo2-pse"] } -prover_darwin = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.12.2", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } -prover_darwin_v2 = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.13.1", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } -scroll-proving-sdk = { git = "https://github.com/scroll-tech/scroll-proving-sdk.git", rev = "160db6c"} -base64 = "0.13.1" -reqwest = { version = "0.12.4", features = ["gzip"] } -reqwest-middleware = "0.3" -reqwest-retry = "0.5" -once_cell = "1.19.0" -hex = "0.4.3" -tiny-keccak = { version = "2.0.0", features = ["sha3", "keccak"] } -rand = "0.8.5" -eth-keystore = "0.5.0" -rlp = "0.5.2" -tokio = "1.37.0" -async-trait = "0.1" -sled = "0.34.7" -http = "1.1.0" -clap = { version = "4.5", features = ["derive"] } -ctor = "0.2.8" diff --git a/prover/Makefile b/prover/Makefile deleted file mode 100644 index 6bcd3faa7f..0000000000 --- a/prover/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -.PHONY: prover lint tests_binary - -ifeq (4.3,$(firstword $(sort $(MAKE_VERSION) 4.3))) - HALO2_VERSION=$(shell grep -m 1 "halo2.git" ./Cargo.lock | cut -d "#" -f2 | cut -c-7) -else - HALO2_VERSION=$(shell grep -m 1 "halo2.git" ./Cargo.lock | cut -d "\#" -f2 | cut -c-7) -endif - -ZKEVM_VERSION=$(shell ./print_high_zkevm_version.sh) -ifeq (${ZKEVM_VERSION},) - $(error ZKEVM_VERSION not set) -else - $(info ZKEVM_VERSION is ${ZKEVM_VERSION}) -endif - -ZKEVM_COMMIT=$(shell echo ${ZKEVM_VERSION} | cut -d " " -f2) -$(info ZKEVM_COMMIT is ${ZKEVM_COMMIT}) - -HALO2_GPU_VERSION=$(shell ./print_halo2gpu_version.sh | sed -n '2p') - -GIT_REV=$(shell git rev-parse --short HEAD) -GO_TAG=$(shell grep "var tag = " ../common/version/version.go | cut -d "\"" -f2) - -ifeq (${GO_TAG},) - $(error GO_TAG not set) -else - $(info GO_TAG is ${GO_TAG}) -endif - -ifeq (${HALO2_GPU_VERSION},) - # use halo2_proofs with CPU - ZK_VERSION=${ZKEVM_COMMIT}-${HALO2_VERSION} -else - # use halo2_gpu - ZK_VERSION=${ZKEVM_COMMIT}-${HALO2_GPU_VERSION} -endif - -prover: - GO_TAG=${GO_TAG} GIT_REV=${GIT_REV} ZK_VERSION=${ZK_VERSION} cargo build --release - -tests_binary: - cargo clean && cargo test --release --no-run - ls target/release/deps/prover* | grep -v "\.d" | xargs -I{} ln -sf {} ./prover.test - -lint: - cargo check --all-features - cargo clippy --all-features --all-targets -- -D warnings - cargo fmt --all diff --git a/prover/config.json b/prover/config.json deleted file mode 100644 index 10aef21fa2..0000000000 --- a/prover/config.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "sdk_config": { - "prover_name_prefix": "prover-1", - "keys_dir": "keys", - "coordinator": { - "base_url": "http://localhost:8555", - "retry_count": 10, - "retry_wait_time_sec": 10, - "connection_timeout_sec": 30 - }, - "l2geth": { - "endpoint": "http://localhost:9999" - }, - "prover": { - "circuit_types": [1,2,3], - "circuit_version": "v0.13.1" - }, - "db_path": "unique-db-path-for-prover-1" - }, - "low_version_circuit": { - "hard_fork_name": "darwin", - "params_path": "params", - "assets_path": "assets" - }, - "high_version_circuit": { - "hard_fork_name": "darwinV2", - "params_path": "params", - "assets_path": "assets" - } -} diff --git a/prover/print_halo2gpu_version.sh b/prover/print_halo2gpu_version.sh deleted file mode 100755 index 7806811ab1..0000000000 --- a/prover/print_halo2gpu_version.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -config_file="$HOME/.cargo/config" - -if [ ! -e "$config_file" ]; then - exit 0 -fi - -if [[ $(head -n 1 "$config_file") == "#"* ]]; then - exit 0 -fi - -halo2gpu_path=$(grep -Po '(?<=paths = \[")([^"]*)' $config_file) - -pushd $halo2gpu_path - -commit_hash=$(git log --pretty=format:%h -n 1) -echo "${commit_hash:0:7}" - -popd - diff --git a/prover/print_high_zkevm_version.sh b/prover/print_high_zkevm_version.sh deleted file mode 100755 index 9b44b1b778..0000000000 --- a/prover/print_high_zkevm_version.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -ue - -higher_zkevm_item=`grep "zkevm-circuits.git" ./Cargo.lock | sort | uniq | awk -F "[#=]" '{print $3" "$4}' | sort -k 1 | tail -n 1` - -higher_version=`echo $higher_zkevm_item | awk '{print $1}'` - -higher_commit=`echo $higher_zkevm_item | cut -d ' ' -f2 | cut -c-7` - -echo "$higher_version $higher_commit" \ No newline at end of file diff --git a/prover/rust-toolchain b/prover/rust-toolchain deleted file mode 100644 index 27c108be5c..0000000000 --- a/prover/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -nightly-2023-12-03 diff --git a/prover/rustfmt.toml b/prover/rustfmt.toml deleted file mode 100644 index b7a6013264..0000000000 --- a/prover/rustfmt.toml +++ /dev/null @@ -1,9 +0,0 @@ -edition = "2021" - -comment_width = 100 -imports_granularity = "Crate" -max_width = 100 -newline_style = "Unix" -# normalize_comments = true -reorder_imports = true -wrap_comments = true diff --git a/prover/src/config.rs b/prover/src/config.rs deleted file mode 100644 index 4effb958d0..0000000000 --- a/prover/src/config.rs +++ /dev/null @@ -1,51 +0,0 @@ -use anyhow::{bail, Result}; - -static SCROLL_PROVER_ASSETS_DIR_ENV_NAME: &str = "SCROLL_PROVER_ASSETS_DIR"; -static mut SCROLL_PROVER_ASSETS_DIRS: Vec = vec![]; - -#[derive(Debug)] -pub struct AssetsDirEnvConfig {} - -impl AssetsDirEnvConfig { - pub fn init() -> Result<()> { - let value = std::env::var(SCROLL_PROVER_ASSETS_DIR_ENV_NAME)?; - let dirs: Vec<&str> = value.split(',').collect(); - if dirs.len() != 2 { - bail!("env variable SCROLL_PROVER_ASSETS_DIR value must be 2 parts seperated by comma.") - } - unsafe { - SCROLL_PROVER_ASSETS_DIRS = dirs.into_iter().map(|s| s.to_string()).collect(); - log::info!( - "init SCROLL_PROVER_ASSETS_DIRS: {:?}", - SCROLL_PROVER_ASSETS_DIRS - ); - } - Ok(()) - } - - pub fn enable_first() { - unsafe { - log::info!( - "set env {SCROLL_PROVER_ASSETS_DIR_ENV_NAME} to {}", - &SCROLL_PROVER_ASSETS_DIRS[0] - ); - std::env::set_var( - SCROLL_PROVER_ASSETS_DIR_ENV_NAME, - &SCROLL_PROVER_ASSETS_DIRS[0], - ); - } - } - - pub fn enable_second() { - unsafe { - log::info!( - "set env {SCROLL_PROVER_ASSETS_DIR_ENV_NAME} to {}", - &SCROLL_PROVER_ASSETS_DIRS[1] - ); - std::env::set_var( - SCROLL_PROVER_ASSETS_DIR_ENV_NAME, - &SCROLL_PROVER_ASSETS_DIRS[1], - ); - } - } -} diff --git a/prover/src/main.rs b/prover/src/main.rs deleted file mode 100644 index 95ba061aa0..0000000000 --- a/prover/src/main.rs +++ /dev/null @@ -1,76 +0,0 @@ -#![feature(lazy_cell)] -#![feature(core_intrinsics)] - -mod config; -mod prover; -mod types; -mod utils; -mod zk_circuits_handler; - -use clap::{ArgAction, Parser}; -use prover::{LocalProver, LocalProverConfig}; -use scroll_proving_sdk::{ - prover::ProverBuilder, - utils::{get_version, init_tracing}, -}; -use tokio::runtime; -use utils::get_prover_type; - -#[derive(Parser, Debug)] -#[command(disable_version_flag = true)] -struct Args { - /// Path of config file - #[arg(long = "config", default_value = "conf/config.json")] - config_file: String, - - /// Version of this prover - #[arg(short, long, action = ArgAction::SetTrue)] - version: bool, - - /// Path of log file - #[arg(long = "log.file")] - log_file: Option, -} - -fn main() -> anyhow::Result<()> { - let rt = runtime::Builder::new_multi_thread() - .thread_stack_size(16 * 1024 * 1024) // Set stack size to 16MB - .enable_all() - .build() - .expect("Failed to create Tokio runtime"); - - rt.block_on(async { - init_tracing(); - - let args = Args::parse(); - - if args.version { - println!("version is {}", get_version()); - std::process::exit(0); - } - - let cfg = LocalProverConfig::from_file(args.config_file)?; - let sdk_config = cfg.sdk_config.clone(); - let mut prover_types = vec![]; - sdk_config - .prover - .circuit_types - .iter() - .for_each(|circuit_type| { - if let Some(pt) = get_prover_type(*circuit_type) { - if !prover_types.contains(&pt) { - prover_types.push(pt); - } - } - }); - let local_prover = LocalProver::new(cfg, prover_types); - let prover = ProverBuilder::new(sdk_config) - .with_proving_service(Box::new(local_prover)) - .build() - .await?; - - prover.run().await; - - Ok(()) - }) -} diff --git a/prover/src/prover.rs b/prover/src/prover.rs deleted file mode 100644 index 73d8cec799..0000000000 --- a/prover/src/prover.rs +++ /dev/null @@ -1,192 +0,0 @@ -use crate::{ - types::ProverType, - utils::get_prover_type, - zk_circuits_handler::{CircuitsHandler, CircuitsHandlerProvider}, -}; -use anyhow::{anyhow, Result}; -use async_trait::async_trait; -use scroll_proving_sdk::{ - config::Config as SdkConfig, - prover::{ - proving_service::{ - GetVkRequest, GetVkResponse, ProveRequest, ProveResponse, QueryTaskRequest, - QueryTaskResponse, TaskStatus, - }, - ProvingService, - }, -}; -use serde::{Deserialize, Serialize}; -use std::{ - fs::File, - sync::{Arc, Mutex}, - time::{SystemTime, UNIX_EPOCH}, -}; -use tokio::{runtime::Handle, sync::RwLock, task::JoinHandle}; - -#[derive(Clone, Serialize, Deserialize)] -pub struct LocalProverConfig { - pub sdk_config: SdkConfig, - pub high_version_circuit: CircuitConfig, - pub low_version_circuit: CircuitConfig, -} - -impl LocalProverConfig { - pub fn from_reader(reader: R) -> Result - where - R: std::io::Read, - { - serde_json::from_reader(reader).map_err(|e| anyhow!(e)) - } - - pub fn from_file(file_name: String) -> Result { - let file = File::open(file_name)?; - Self::from_reader(&file) - } -} - -#[derive(Clone, Serialize, Deserialize)] -pub struct CircuitConfig { - pub hard_fork_name: String, - pub params_path: String, - pub assets_path: String, -} - -pub struct LocalProver { - config: LocalProverConfig, - prover_types: Vec, - circuits_handler_provider: RwLock, - next_task_id: Arc>, - current_task: Arc>>>>, -} - -#[async_trait] -impl ProvingService for LocalProver { - fn is_local(&self) -> bool { - true - } - async fn get_vks(&self, req: GetVkRequest) -> GetVkResponse { - let mut prover_types = vec![]; - req.circuit_types.iter().for_each(|circuit_type| { - if let Some(pt) = get_prover_type(*circuit_type) { - if !prover_types.contains(&pt) { - prover_types.push(pt); - } - } - }); - - let vks = self - .circuits_handler_provider - .read() - .await - .init_vks(&self.config, prover_types) - .await; - GetVkResponse { vks, error: None } - } - async fn prove(&self, req: ProveRequest) -> ProveResponse { - let handler = self - .circuits_handler_provider - .write() - .await - .get_circuits_handler(&req.hard_fork_name, self.prover_types.clone()) - .expect("failed to get circuit handler"); - - match self.do_prove(req, handler).await { - Ok(resp) => resp, - Err(e) => ProveResponse { - status: TaskStatus::Failed, - error: Some(format!("failed to request proof: {}", e)), - ..Default::default() - }, - } - } - - async fn query_task(&self, req: QueryTaskRequest) -> QueryTaskResponse { - let handle = self.current_task.lock().unwrap().take(); - if let Some(handle) = handle { - if handle.is_finished() { - return match handle.await { - Ok(Ok(proof)) => QueryTaskResponse { - task_id: req.task_id, - status: TaskStatus::Success, - proof: Some(proof), - ..Default::default() - }, - Ok(Err(e)) => QueryTaskResponse { - task_id: req.task_id, - status: TaskStatus::Failed, - error: Some(format!("proving task failed: {}", e)), - ..Default::default() - }, - Err(e) => QueryTaskResponse { - task_id: req.task_id, - status: TaskStatus::Failed, - error: Some(format!("proving task panicked: {}", e)), - ..Default::default() - }, - }; - } else { - *self.current_task.lock().unwrap() = Some(handle); - return QueryTaskResponse { - task_id: req.task_id, - status: TaskStatus::Proving, - ..Default::default() - }; - } - } - // If no handle is found - QueryTaskResponse { - task_id: req.task_id, - status: TaskStatus::Failed, - error: Some("no proving task is running".to_string()), - ..Default::default() - } - } -} - -impl LocalProver { - pub fn new(config: LocalProverConfig, prover_types: Vec) -> Self { - let circuits_handler_provider = CircuitsHandlerProvider::new(config.clone()) - .expect("failed to create circuits handler provider"); - - Self { - config, - prover_types, - circuits_handler_provider: RwLock::new(circuits_handler_provider), - next_task_id: Arc::new(Mutex::new(0)), - current_task: Arc::new(Mutex::new(None)), - } - } - - async fn do_prove( - &self, - req: ProveRequest, - handler: Arc>, - ) -> Result { - let task_id = { - let mut next_task_id = self.next_task_id.lock().unwrap(); - *next_task_id += 1; - *next_task_id - }; - - let duration = SystemTime::now().duration_since(UNIX_EPOCH).unwrap(); - let created_at = duration.as_secs() as f64 + duration.subsec_nanos() as f64 * 1e-9; - - let req_clone = req.clone(); - let handle = Handle::current(); - let task_handle = - tokio::task::spawn_blocking(move || handle.block_on(handler.get_proof_data(req_clone))); - - *self.current_task.lock().unwrap() = Some(task_handle); - - Ok(ProveResponse { - task_id: task_id.to_string(), - circuit_type: req.circuit_type, - circuit_version: req.circuit_version, - hard_fork_name: req.hard_fork_name, - status: TaskStatus::Proving, - created_at, - input: Some(req.input), - ..Default::default() - }) - } -} diff --git a/prover/src/types.rs b/prover/src/types.rs deleted file mode 100644 index 39a99b37c8..0000000000 --- a/prover/src/types.rs +++ /dev/null @@ -1,153 +0,0 @@ -use ethers_core::types::H256; -use serde::{Deserialize, Deserializer, Serialize, Serializer}; - -use scroll_proving_sdk::prover::types::CircuitType; - -pub type CommonHash = H256; - -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub enum ProverType { - Chunk, - Batch, -} - -impl ProverType { - fn from_u8(v: u8) -> Self { - match v { - 1 => ProverType::Chunk, - 2 => ProverType::Batch, - _ => { - panic!("invalid prover_type") - } - } - } -} - -impl Serialize for ProverType { - fn serialize(&self, serializer: S) -> Result - where - S: Serializer, - { - match *self { - ProverType::Chunk => serializer.serialize_u8(1), - ProverType::Batch => serializer.serialize_u8(2), - } - } -} - -impl<'de> Deserialize<'de> for ProverType { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let v: u8 = u8::deserialize(deserializer)?; - Ok(ProverType::from_u8(v)) - } -} - -#[derive(Serialize, Deserialize, Default)] -pub struct Task { - #[serde(rename = "type", default)] - pub task_type: CircuitType, - pub task_data: String, - #[serde(default)] - pub hard_fork_name: String, -} - -#[derive(Serialize, Deserialize, Default)] -pub struct ProofDetail { - pub id: String, - #[serde(rename = "type", default)] - pub proof_type: CircuitType, - pub proof_data: String, - pub error: String, -} - -#[derive(Debug, Clone, Copy, PartialEq)] -pub enum ProofFailureType { - Undefined, - Panic, - NoPanic, -} - -impl ProofFailureType { - fn from_u8(v: u8) -> Self { - match v { - 1 => ProofFailureType::Panic, - 2 => ProofFailureType::NoPanic, - _ => ProofFailureType::Undefined, - } - } -} - -impl Serialize for ProofFailureType { - fn serialize(&self, serializer: S) -> Result - where - S: Serializer, - { - match *self { - ProofFailureType::Undefined => serializer.serialize_u8(0), - ProofFailureType::Panic => serializer.serialize_u8(1), - ProofFailureType::NoPanic => serializer.serialize_u8(2), - } - } -} - -impl<'de> Deserialize<'de> for ProofFailureType { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let v: u8 = u8::deserialize(deserializer)?; - Ok(ProofFailureType::from_u8(v)) - } -} - -impl Default for ProofFailureType { - fn default() -> Self { - Self::Undefined - } -} - -#[derive(Debug, Clone, Copy, PartialEq)] -pub enum ProofStatus { - Ok, - Error, -} - -impl ProofStatus { - fn from_u8(v: u8) -> Self { - match v { - 0 => ProofStatus::Ok, - _ => ProofStatus::Error, - } - } -} - -impl Serialize for ProofStatus { - fn serialize(&self, serializer: S) -> Result - where - S: Serializer, - { - match *self { - ProofStatus::Ok => serializer.serialize_u8(0), - ProofStatus::Error => serializer.serialize_u8(1), - } - } -} - -impl<'de> Deserialize<'de> for ProofStatus { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let v: u8 = u8::deserialize(deserializer)?; - Ok(ProofStatus::from_u8(v)) - } -} - -impl Default for ProofStatus { - fn default() -> Self { - Self::Ok - } -} diff --git a/prover/src/utils.rs b/prover/src/utils.rs deleted file mode 100644 index b0602e9965..0000000000 --- a/prover/src/utils.rs +++ /dev/null @@ -1,18 +0,0 @@ -use crate::types::ProverType; -use scroll_proving_sdk::prover::types::CircuitType; - -pub fn get_circuit_types(prover_type: ProverType) -> Vec { - match prover_type { - ProverType::Chunk => vec![CircuitType::Chunk], - ProverType::Batch => vec![CircuitType::Batch, CircuitType::Bundle], - } -} - -pub fn get_prover_type(task_type: CircuitType) -> Option { - match task_type { - CircuitType::Undefined => None, - CircuitType::Chunk => Some(ProverType::Chunk), - CircuitType::Batch => Some(ProverType::Batch), - CircuitType::Bundle => Some(ProverType::Batch), - } -} diff --git a/prover/src/zk_circuits_handler.rs b/prover/src/zk_circuits_handler.rs deleted file mode 100644 index a32d870afc..0000000000 --- a/prover/src/zk_circuits_handler.rs +++ /dev/null @@ -1,165 +0,0 @@ -mod common; -mod darwin; -mod darwin_v2; - -use crate::{ - config::AssetsDirEnvConfig, prover::LocalProverConfig, types::ProverType, - utils::get_circuit_types, -}; -use anyhow::{bail, Result}; -use async_trait::async_trait; -use darwin::DarwinHandler; -use darwin_v2::DarwinV2Handler; -use scroll_proving_sdk::prover::{proving_service::ProveRequest, CircuitType}; -use std::{collections::HashMap, sync::Arc}; - -type HardForkName = String; - -pub mod utils { - pub fn encode_vk(vk: Vec) -> String { - base64::encode(vk) - } -} - -#[async_trait] -pub trait CircuitsHandler: Send + Sync { - async fn get_vk(&self, task_type: CircuitType) -> Option>; - - async fn get_proof_data(&self, prove_request: ProveRequest) -> Result; -} - -type CircuitsHandlerBuilder = fn( - prover_types: Vec, - config: &LocalProverConfig, -) -> Result>; - -pub struct CircuitsHandlerProvider { - config: LocalProverConfig, - circuits_handler_builder_map: HashMap, - current_fork_name: Option, - current_circuit: Option>>, -} - -impl CircuitsHandlerProvider { - pub fn new(config: LocalProverConfig) -> Result { - let mut m: HashMap = HashMap::new(); - - if let Err(e) = AssetsDirEnvConfig::init() { - panic!("AssetsDirEnvConfig init failed: {:#}", e); - } - - fn handler_builder( - prover_types: Vec, - config: &LocalProverConfig, - ) -> Result> { - log::info!( - "now init zk circuits handler, hard_fork_name: {}", - &config.low_version_circuit.hard_fork_name - ); - AssetsDirEnvConfig::enable_first(); - DarwinHandler::new( - prover_types, - &config.low_version_circuit.params_path, - &config.low_version_circuit.assets_path, - ) - .map(|handler| Box::new(handler) as Box) - } - m.insert( - config.low_version_circuit.hard_fork_name.clone(), - handler_builder, - ); - - fn next_handler_builder( - prover_types: Vec, - config: &LocalProverConfig, - ) -> Result> { - log::info!( - "now init zk circuits handler, hard_fork_name: {}", - &config.high_version_circuit.hard_fork_name - ); - AssetsDirEnvConfig::enable_second(); - DarwinV2Handler::new( - prover_types, - &config.high_version_circuit.params_path, - &config.high_version_circuit.assets_path, - ) - .map(|handler| Box::new(handler) as Box) - } - - m.insert( - config.high_version_circuit.hard_fork_name.clone(), - next_handler_builder, - ); - - let provider = CircuitsHandlerProvider { - config, - circuits_handler_builder_map: m, - current_fork_name: None, - current_circuit: None, - }; - - Ok(provider) - } - - pub fn get_circuits_handler( - &mut self, - hard_fork_name: &String, - prover_types: Vec, - ) -> Result>> { - match &self.current_fork_name { - Some(fork_name) if fork_name == hard_fork_name => { - log::info!("get circuits handler from cache"); - if let Some(handler) = &self.current_circuit { - Ok(handler.clone()) - } else { - bail!("missing cached handler, there must be something wrong.") - } - } - _ => { - log::info!( - "failed to get circuits handler from cache, create a new one: {hard_fork_name}" - ); - if let Some(builder) = self.circuits_handler_builder_map.get(hard_fork_name) { - log::info!("building circuits handler for {hard_fork_name}"); - let handler = builder(prover_types, &self.config) - .expect("failed to build circuits handler"); - self.current_fork_name = Some(hard_fork_name.clone()); - let arc_handler = Arc::new(handler); - self.current_circuit = Some(arc_handler.clone()); - Ok(arc_handler) - } else { - bail!("missing builder, there must be something wrong.") - } - } - } - } - - pub async fn init_vks( - &self, - config: &LocalProverConfig, - prover_types: Vec, - ) -> Vec { - let mut vks = Vec::new(); - for (hard_fork_name, build) in self.circuits_handler_builder_map.iter() { - let handler = - build(prover_types.clone(), config).expect("failed to build circuits handler"); - - for prover_type in prover_types.iter() { - for task_type in get_circuit_types(*prover_type).into_iter() { - let vk = handler - .get_vk(task_type) - .await - .map_or("".to_string(), utils::encode_vk); - log::info!( - "vk for {hard_fork_name}, is {vk}, task_type: {:?}", - task_type - ); - if !vk.is_empty() { - vks.push(vk) - } - } - } - } - vks - } -} diff --git a/prover/src/zk_circuits_handler/common.rs b/prover/src/zk_circuits_handler/common.rs deleted file mode 100644 index e88628ad65..0000000000 --- a/prover/src/zk_circuits_handler/common.rs +++ /dev/null @@ -1,33 +0,0 @@ -use std::{collections::BTreeMap, rc::Rc}; - -use crate::types::ProverType; - -use once_cell::sync::OnceCell; - -use halo2_proofs::{halo2curves::bn256::Bn256, poly::kzg::commitment::ParamsKZG}; - -static mut PARAMS_MAP: OnceCell>>> = OnceCell::new(); - -pub fn get_params_map_instance<'a, F>(load_params_func: F) -> &'a BTreeMap> -where - F: FnOnce() -> BTreeMap>, -{ - unsafe { - PARAMS_MAP.get_or_init(|| { - let params_map = load_params_func(); - Rc::new(params_map) - }) - } -} - -pub fn get_degrees(prover_types: &std::collections::HashSet, f: F) -> Vec -where - F: FnMut(&ProverType) -> Vec, -{ - prover_types - .iter() - .flat_map(f) - .collect::>() - .into_iter() - .collect() -} diff --git a/prover/src/zk_circuits_handler/darwin.rs b/prover/src/zk_circuits_handler/darwin.rs deleted file mode 100644 index 1644dabb4b..0000000000 --- a/prover/src/zk_circuits_handler/darwin.rs +++ /dev/null @@ -1,401 +0,0 @@ -use super::{common::*, CircuitsHandler}; -use crate::types::ProverType; -use anyhow::{bail, Context, Ok, Result}; -use async_trait::async_trait; -use once_cell::sync::Lazy; -use scroll_proving_sdk::prover::{proving_service::ProveRequest, CircuitType}; -use serde::Deserialize; -use tokio::sync::RwLock; - -use crate::types::CommonHash; -use std::env; - -use prover_darwin::{ - aggregator::Prover as BatchProver, - check_chunk_hashes, - common::Prover as CommonProver, - config::{AGG_DEGREES, ZKEVM_DEGREES}, - zkevm::Prover as ChunkProver, - BatchProof, BatchProvingTask, BlockTrace, BundleProof, BundleProvingTask, ChunkInfo, - ChunkProof, ChunkProvingTask, -}; - -// Only used for debugging. -static OUTPUT_DIR: Lazy> = Lazy::new(|| env::var("PROVER_OUTPUT_DIR").ok()); - -#[derive(Debug, Clone, Deserialize)] -pub struct BatchTaskDetail { - pub chunk_infos: Vec, - #[serde(flatten)] - pub batch_proving_task: BatchProvingTask, -} - -type BundleTaskDetail = BundleProvingTask; - -#[derive(Debug, Clone, Deserialize)] -pub struct ChunkTaskDetail { - pub block_hashes: Vec, -} - -#[derive(Default)] -pub struct DarwinHandler { - chunk_prover: Option>>, - batch_prover: Option>>, -} - -impl DarwinHandler { - pub fn new_multi( - prover_types: Vec, - params_dir: &str, - assets_dir: &str, - ) -> Result { - let class_name = std::intrinsics::type_name::(); - let prover_types_set = prover_types - .into_iter() - .collect::>(); - let mut handler = Self { - batch_prover: None, - chunk_prover: None, - }; - let degrees: Vec = get_degrees(&prover_types_set, |prover_type| match prover_type { - ProverType::Chunk => ZKEVM_DEGREES.clone(), - ProverType::Batch => AGG_DEGREES.clone(), - }); - let params_map = get_params_map_instance(|| { - log::info!( - "calling get_params_map from {}, prover_types: {:?}, degrees: {:?}", - class_name, - prover_types_set, - degrees - ); - CommonProver::load_params_map(params_dir, °rees) - }); - for prover_type in prover_types_set { - match prover_type { - ProverType::Chunk => { - handler.chunk_prover = Some(RwLock::new(ChunkProver::from_params_and_assets( - params_map, assets_dir, - ))); - } - ProverType::Batch => { - handler.batch_prover = Some(RwLock::new(BatchProver::from_params_and_assets( - params_map, assets_dir, - ))) - } - } - } - Ok(handler) - } - - pub fn new(prover_types: Vec, params_dir: &str, assets_dir: &str) -> Result { - Self::new_multi(prover_types, params_dir, assets_dir) - } - - async fn gen_chunk_proof_raw(&self, chunk_trace: Vec) -> Result { - if let Some(prover) = self.chunk_prover.as_ref() { - let chunk = ChunkProvingTask::from(chunk_trace); - - let chunk_proof = - prover - .write() - .await - .gen_chunk_proof(chunk, None, None, self.get_output_dir())?; - - return Ok(chunk_proof); - } - unreachable!("please check errors in proof_type logic") - } - - async fn gen_chunk_proof(&self, prove_request: ProveRequest) -> Result { - let chunk_traces: Vec = serde_json::from_str(&prove_request.input)?; - let chunk_proof = self.gen_chunk_proof_raw(chunk_traces).await?; - Ok(serde_json::to_string(&chunk_proof)?) - } - - async fn gen_batch_proof_raw(&self, batch_task_detail: BatchTaskDetail) -> Result { - if let Some(prover) = self.batch_prover.as_ref() { - let chunk_hashes_proofs: Vec<(ChunkInfo, ChunkProof)> = batch_task_detail - .chunk_infos - .clone() - .into_iter() - .zip(batch_task_detail.batch_proving_task.chunk_proofs.clone()) - .collect(); - - let chunk_proofs: Vec = - chunk_hashes_proofs.iter().map(|t| t.1.clone()).collect(); - - let is_valid = prover.read().await.check_protocol_of_chunks(&chunk_proofs); - - if !is_valid { - bail!("non-match chunk protocol") - } - check_chunk_hashes("", &chunk_hashes_proofs).context("failed to check chunk info")?; - let batch_proof = prover.write().await.gen_batch_proof( - batch_task_detail.batch_proving_task, - None, - self.get_output_dir(), - )?; - - return Ok(batch_proof); - } - unreachable!("please check errors in proof_type logic") - } - - async fn gen_batch_proof(&self, prove_request: ProveRequest) -> Result { - let batch_task_detail: BatchTaskDetail = serde_json::from_str(&prove_request.input)?; - let batch_proof = self.gen_batch_proof_raw(batch_task_detail).await?; - Ok(serde_json::to_string(&batch_proof)?) - } - - async fn gen_bundle_proof_raw( - &self, - bundle_task_detail: BundleTaskDetail, - ) -> Result { - if let Some(prover) = self.batch_prover.as_ref() { - let bundle_proof = prover.write().await.gen_bundle_proof( - bundle_task_detail, - None, - self.get_output_dir(), - )?; - - return Ok(bundle_proof); - } - unreachable!("please check errors in proof_type logic") - } - - async fn gen_bundle_proof(&self, prove_request: ProveRequest) -> Result { - let bundle_task_detail: BundleTaskDetail = serde_json::from_str(&prove_request.input)?; - let bundle_proof = self.gen_bundle_proof_raw(bundle_task_detail).await?; - Ok(serde_json::to_string(&bundle_proof)?) - } - - fn get_output_dir(&self) -> Option<&str> { - OUTPUT_DIR.as_deref() - } -} - -#[async_trait] -impl CircuitsHandler for DarwinHandler { - async fn get_vk(&self, task_type: CircuitType) -> Option> { - match task_type { - CircuitType::Chunk => self.chunk_prover.as_ref().unwrap().read().await.get_vk(), - CircuitType::Batch => self - .batch_prover - .as_ref() - .unwrap() - .read() - .await - .get_batch_vk(), - CircuitType::Bundle => self - .batch_prover - .as_ref() - .unwrap() - .read() - .await - .get_bundle_vk(), - _ => unreachable!(), - } - } - - async fn get_proof_data(&self, prove_request: ProveRequest) -> Result { - match prove_request.circuit_type { - CircuitType::Chunk => self.gen_chunk_proof(prove_request).await, - CircuitType::Batch => self.gen_batch_proof(prove_request).await, - CircuitType::Bundle => self.gen_bundle_proof(prove_request).await, - _ => unreachable!(), - } - } -} - -// =================================== tests module ======================================== - -#[cfg(test)] -mod tests { - use super::*; - use crate::zk_circuits_handler::utils::encode_vk; - use prover_darwin::utils::chunk_trace_to_witness_block; - use scroll_proving_sdk::utils::init_tracing; - use std::{path::PathBuf, sync::LazyLock}; - - #[ctor::ctor] - fn init() { - init_tracing(); - log::info!("logger initialized"); - } - - static DEFAULT_WORK_DIR: &str = "/assets"; - static WORK_DIR: LazyLock = LazyLock::new(|| { - std::env::var("DARWIN_TEST_DIR") - .unwrap_or(String::from(DEFAULT_WORK_DIR)) - .trim_end_matches('/') - .to_string() - }); - static PARAMS_PATH: LazyLock = LazyLock::new(|| format!("{}/test_params", *WORK_DIR)); - static ASSETS_PATH: LazyLock = LazyLock::new(|| format!("{}/test_assets", *WORK_DIR)); - static PROOF_DUMP_PATH: LazyLock = - LazyLock::new(|| format!("{}/proof_data", *WORK_DIR)); - static BATCH_DIR_PATH: LazyLock = - LazyLock::new(|| format!("{}/traces/batch_24", *WORK_DIR)); - static BATCH_VK_PATH: LazyLock = - LazyLock::new(|| format!("{}/test_assets/vk_batch.vkey", *WORK_DIR)); - static CHUNK_VK_PATH: LazyLock = - LazyLock::new(|| format!("{}/test_assets/vk_chunk.vkey", *WORK_DIR)); - - #[test] - fn it_works() { - let result = true; - assert!(result); - } - - #[tokio::test] - async fn test_circuits() -> Result<()> { - let bi_handler = DarwinHandler::new_multi( - vec![ProverType::Chunk, ProverType::Batch], - &PARAMS_PATH, - &ASSETS_PATH, - )?; - - let chunk_handler = bi_handler; - let chunk_vk = chunk_handler.get_vk(CircuitType::Chunk).await.unwrap(); - - check_vk(CircuitType::Chunk, chunk_vk, "chunk vk must be available"); - let chunk_dir_paths = get_chunk_dir_paths()?; - log::info!("chunk_dir_paths, {:?}", chunk_dir_paths); - let mut chunk_infos = vec![]; - let mut chunk_proofs = vec![]; - for (id, chunk_path) in chunk_dir_paths.into_iter().enumerate() { - let chunk_id = format!("chunk_proof{}", id + 1); - log::info!("start to process {chunk_id}"); - let chunk_trace = read_chunk_trace(chunk_path)?; - - let chunk_info = traces_to_chunk_info(chunk_trace.clone())?; - chunk_infos.push(chunk_info); - - log::info!("start to prove {chunk_id}"); - let chunk_proof = chunk_handler.gen_chunk_proof_raw(chunk_trace).await?; - let proof_data = serde_json::to_string(&chunk_proof)?; - dump_proof(chunk_id, proof_data)?; - chunk_proofs.push(chunk_proof); - } - - let batch_handler = chunk_handler; - let batch_vk = batch_handler.get_vk(CircuitType::Batch).await.unwrap(); - check_vk(CircuitType::Batch, batch_vk, "batch vk must be available"); - let batch_task_detail = make_batch_task_detail(chunk_infos, chunk_proofs); - log::info!("start to prove batch"); - let batch_proof = batch_handler.gen_batch_proof_raw(batch_task_detail).await?; - let proof_data = serde_json::to_string(&batch_proof)?; - dump_proof("batch_proof".to_string(), proof_data)?; - - Ok(()) - } - - fn make_batch_task_detail(_: Vec, _: Vec) -> BatchTaskDetail { - todo!(); - // BatchTaskDetail { - // chunk_infos, - // batch_proving_task: BatchProvingTask { - // parent_batch_hash: todo!(), - // parent_state_root: todo!(), - // batch_header: todo!(), - // chunk_proofs, - // }, - // } - } - - fn check_vk(proof_type: CircuitType, vk: Vec, info: &str) { - log::info!("check_vk, {:?}", proof_type); - let vk_from_file = read_vk(proof_type).unwrap(); - assert_eq!(vk_from_file, encode_vk(vk), "{info}") - } - - fn read_vk(proof_type: CircuitType) -> Result { - log::info!("read_vk, {:?}", proof_type); - let vk_file = match proof_type { - CircuitType::Chunk => CHUNK_VK_PATH.clone(), - CircuitType::Batch => BATCH_VK_PATH.clone(), - CircuitType::Bundle => todo!(), - CircuitType::Undefined => unreachable!(), - }; - - let data = std::fs::read(vk_file)?; - Ok(encode_vk(data)) - } - - fn read_chunk_trace(path: PathBuf) -> Result> { - log::info!("read_chunk_trace, {:?}", path); - let mut chunk_trace: Vec = vec![]; - - fn read_block_trace(file: &PathBuf) -> Result { - let f = std::fs::File::open(file)?; - Ok(serde_json::from_reader(&f)?) - } - - if path.is_dir() { - let entries = std::fs::read_dir(&path)?; - let mut files: Vec = entries - .into_iter() - .filter_map(|e| { - if e.is_err() { - return None; - } - let entry = e.unwrap(); - if entry.path().is_dir() { - return None; - } - if let Result::Ok(file_name) = entry.file_name().into_string() { - Some(file_name) - } else { - None - } - }) - .collect(); - files.sort(); - - log::info!("files in chunk {:?} is {:?}", path, files); - for file in files { - let block_trace = read_block_trace(&path.join(file))?; - chunk_trace.push(block_trace); - } - } else { - let block_trace = read_block_trace(&path)?; - chunk_trace.push(block_trace); - } - Ok(chunk_trace) - } - - fn get_chunk_dir_paths() -> Result> { - let batch_path = PathBuf::from(BATCH_DIR_PATH.clone()); - let entries = std::fs::read_dir(&batch_path)?; - let mut files: Vec = entries - .filter_map(|e| { - if e.is_err() { - return None; - } - let entry = e.unwrap(); - if entry.path().is_dir() { - if let Result::Ok(file_name) = entry.file_name().into_string() { - Some(file_name) - } else { - None - } - } else { - None - } - }) - .collect(); - files.sort(); - log::info!("files in batch {:?} is {:?}", batch_path, files); - Ok(files.into_iter().map(|f| batch_path.join(f)).collect()) - } - - fn traces_to_chunk_info(chunk_trace: Vec) -> Result { - let witness_block = chunk_trace_to_witness_block(chunk_trace)?; - Ok(ChunkInfo::from_witness_block(&witness_block, false)) - } - - fn dump_proof(id: String, proof_data: String) -> Result<()> { - let dump_path = PathBuf::from(PROOF_DUMP_PATH.clone()); - Ok(std::fs::write(dump_path.join(id), proof_data)?) - } -} diff --git a/prover/src/zk_circuits_handler/darwin_v2.rs b/prover/src/zk_circuits_handler/darwin_v2.rs deleted file mode 100644 index d6e5813ff9..0000000000 --- a/prover/src/zk_circuits_handler/darwin_v2.rs +++ /dev/null @@ -1,459 +0,0 @@ -use super::{common::*, CircuitsHandler}; -use crate::types::ProverType; -use anyhow::{bail, Context, Ok, Result}; -use async_trait::async_trait; -use once_cell::sync::Lazy; -use scroll_proving_sdk::prover::{proving_service::ProveRequest, CircuitType}; -use serde::Deserialize; -use tokio::sync::RwLock; - -use crate::types::CommonHash; -use std::env; - -use prover_darwin_v2::{ - aggregator::Prover as BatchProver, - check_chunk_hashes, - common::Prover as CommonProver, - config::{AGG_DEGREES, ZKEVM_DEGREES}, - zkevm::Prover as ChunkProver, - BatchProof, BatchProvingTask, BlockTrace, BundleProof, BundleProvingTask, ChunkInfo, - ChunkProof, ChunkProvingTask, -}; - -// Only used for debugging. -static OUTPUT_DIR: Lazy> = Lazy::new(|| env::var("PROVER_OUTPUT_DIR").ok()); - -#[derive(Debug, Clone, Deserialize)] -pub struct BatchTaskDetail { - pub chunk_infos: Vec, - #[serde(flatten)] - pub batch_proving_task: BatchProvingTask, -} - -type BundleTaskDetail = BundleProvingTask; - -#[derive(Debug, Clone, Deserialize)] -pub struct ChunkTaskDetail { - pub block_hashes: Vec, -} - -#[derive(Default)] -pub struct DarwinV2Handler { - chunk_prover: Option>>, - batch_prover: Option>>, -} - -impl DarwinV2Handler { - pub fn new_multi( - prover_types: Vec, - params_dir: &str, - assets_dir: &str, - ) -> Result { - let class_name = std::intrinsics::type_name::(); - let prover_types_set = prover_types - .into_iter() - .collect::>(); - let mut handler = Self { - batch_prover: None, - chunk_prover: None, - }; - let degrees: Vec = get_degrees(&prover_types_set, |prover_type| match prover_type { - ProverType::Chunk => ZKEVM_DEGREES.clone(), - ProverType::Batch => AGG_DEGREES.clone(), - }); - let params_map = get_params_map_instance(|| { - log::info!( - "calling get_params_map from {}, prover_types: {:?}, degrees: {:?}", - class_name, - prover_types_set, - degrees - ); - CommonProver::load_params_map(params_dir, °rees) - }); - for prover_type in prover_types_set { - match prover_type { - ProverType::Chunk => { - handler.chunk_prover = Some(RwLock::new(ChunkProver::from_params_and_assets( - params_map, assets_dir, - ))); - } - ProverType::Batch => { - handler.batch_prover = Some(RwLock::new(BatchProver::from_params_and_assets( - params_map, assets_dir, - ))) - } - } - } - Ok(handler) - } - - pub fn new(prover_types: Vec, params_dir: &str, assets_dir: &str) -> Result { - Self::new_multi(prover_types, params_dir, assets_dir) - } - - async fn gen_chunk_proof_raw(&self, chunk_trace: Vec) -> Result { - if let Some(prover) = self.chunk_prover.as_ref() { - let chunk = ChunkProvingTask::from(chunk_trace); - - let chunk_proof = - prover - .write() - .await - .gen_chunk_proof(chunk, None, None, self.get_output_dir())?; - - return Ok(chunk_proof); - } - unreachable!("please check errors in proof_type logic") - } - - async fn gen_chunk_proof(&self, prove_request: ProveRequest) -> Result { - let chunk_traces: Vec = serde_json::from_str(&prove_request.input)?; - let chunk_proof = self.gen_chunk_proof_raw(chunk_traces).await?; - Ok(serde_json::to_string(&chunk_proof)?) - } - - async fn gen_batch_proof_raw(&self, batch_task_detail: BatchTaskDetail) -> Result { - if let Some(prover) = self.batch_prover.as_ref() { - let chunk_hashes_proofs: Vec<(ChunkInfo, ChunkProof)> = batch_task_detail - .chunk_infos - .clone() - .into_iter() - .zip(batch_task_detail.batch_proving_task.chunk_proofs.clone()) - .collect(); - - let chunk_proofs: Vec = - chunk_hashes_proofs.iter().map(|t| t.1.clone()).collect(); - - let is_valid = prover.write().await.check_protocol_of_chunks(&chunk_proofs); - - if !is_valid { - bail!("non-match chunk protocol") - } - check_chunk_hashes("", &chunk_hashes_proofs).context("failed to check chunk info")?; - let batch_proof = prover.write().await.gen_batch_proof( - batch_task_detail.batch_proving_task, - None, - self.get_output_dir(), - )?; - - return Ok(batch_proof); - } - unreachable!("please check errors in proof_type logic") - } - - async fn gen_batch_proof(&self, prove_request: ProveRequest) -> Result { - let batch_task_detail: BatchTaskDetail = serde_json::from_str(&prove_request.input)?; - let batch_proof = self.gen_batch_proof_raw(batch_task_detail).await?; - Ok(serde_json::to_string(&batch_proof)?) - } - - async fn gen_bundle_proof_raw( - &self, - bundle_task_detail: BundleTaskDetail, - ) -> Result { - if let Some(prover) = self.batch_prover.as_ref() { - let bundle_proof = prover.write().await.gen_bundle_proof( - bundle_task_detail, - None, - self.get_output_dir(), - )?; - - return Ok(bundle_proof); - } - unreachable!("please check errors in proof_type logic") - } - - async fn gen_bundle_proof(&self, prove_request: ProveRequest) -> Result { - let bundle_task_detail: BundleTaskDetail = serde_json::from_str(&prove_request.input)?; - let bundle_proof = self.gen_bundle_proof_raw(bundle_task_detail).await?; - Ok(serde_json::to_string(&bundle_proof)?) - } - - fn get_output_dir(&self) -> Option<&str> { - OUTPUT_DIR.as_deref() - } -} - -#[async_trait] -impl CircuitsHandler for DarwinV2Handler { - async fn get_vk(&self, task_type: CircuitType) -> Option> { - match task_type { - CircuitType::Chunk => self.chunk_prover.as_ref().unwrap().read().await.get_vk(), - CircuitType::Batch => self - .batch_prover - .as_ref() - .unwrap() - .read() - .await - .get_batch_vk(), - CircuitType::Bundle => self - .batch_prover - .as_ref() - .unwrap() - .read() - .await - .get_bundle_vk(), - _ => unreachable!(), - } - } - - async fn get_proof_data(&self, prove_request: ProveRequest) -> Result { - match prove_request.circuit_type { - CircuitType::Chunk => self.gen_chunk_proof(prove_request).await, - CircuitType::Batch => self.gen_batch_proof(prove_request).await, - CircuitType::Bundle => self.gen_bundle_proof(prove_request).await, - _ => unreachable!(), - } - } -} - -// =================================== tests module ======================================== - -#[cfg(test)] -mod tests { - use super::*; - use crate::zk_circuits_handler::utils::encode_vk; - use ethers_core::types::H256; - use prover_darwin_v2::{ - aggregator::eip4844, utils::chunk_trace_to_witness_block, BatchData, BatchHeader, - MAX_AGG_SNARKS, - }; - use scroll_proving_sdk::utils::init_tracing; - use std::{path::PathBuf, sync::LazyLock}; - - #[ctor::ctor] - fn init() { - init_tracing(); - log::info!("logger initialized"); - } - - static DEFAULT_WORK_DIR: &str = "/assets"; - static WORK_DIR: LazyLock = LazyLock::new(|| { - std::env::var("DARWIN_V2_TEST_DIR") - .unwrap_or(String::from(DEFAULT_WORK_DIR)) - .trim_end_matches('/') - .to_string() - }); - static PARAMS_PATH: LazyLock = LazyLock::new(|| format!("{}/test_params", *WORK_DIR)); - static ASSETS_PATH: LazyLock = LazyLock::new(|| format!("{}/test_assets", *WORK_DIR)); - static PROOF_DUMP_PATH: LazyLock = - LazyLock::new(|| format!("{}/proof_data", *WORK_DIR)); - static BATCH_DIR_PATH: LazyLock = - LazyLock::new(|| format!("{}/traces/batch_24", *WORK_DIR)); - static BATCH_VK_PATH: LazyLock = - LazyLock::new(|| format!("{}/test_assets/vk_batch.vkey", *WORK_DIR)); - static CHUNK_VK_PATH: LazyLock = - LazyLock::new(|| format!("{}/test_assets/vk_chunk.vkey", *WORK_DIR)); - - #[test] - fn it_works() { - let result = true; - assert!(result); - } - - #[tokio::test] - async fn test_circuits() -> Result<()> { - let bi_handler = DarwinV2Handler::new_multi( - vec![ProverType::Chunk, ProverType::Batch], - &PARAMS_PATH, - &ASSETS_PATH, - )?; - - let chunk_handler = bi_handler; - let chunk_vk = chunk_handler.get_vk(CircuitType::Chunk).await.unwrap(); - - check_vk(CircuitType::Chunk, chunk_vk, "chunk vk must be available"); - let chunk_dir_paths = get_chunk_dir_paths()?; - log::info!("chunk_dir_paths, {:?}", chunk_dir_paths); - let mut chunk_traces = vec![]; - let mut chunk_infos = vec![]; - let mut chunk_proofs = vec![]; - for (id, chunk_path) in chunk_dir_paths.into_iter().enumerate() { - let chunk_id = format!("chunk_proof{}", id + 1); - log::info!("start to process {chunk_id}"); - let chunk_trace = read_chunk_trace(chunk_path)?; - chunk_traces.push(chunk_trace.clone()); - let chunk_info = traces_to_chunk_info(chunk_trace.clone())?; - chunk_infos.push(chunk_info); - - log::info!("start to prove {chunk_id}"); - let chunk_proof = chunk_handler.gen_chunk_proof_raw(chunk_trace).await?; - let proof_data = serde_json::to_string(&chunk_proof)?; - dump_proof(chunk_id, proof_data)?; - chunk_proofs.push(chunk_proof); - } - - let batch_handler = chunk_handler; - let batch_vk = batch_handler.get_vk(CircuitType::Batch).await.unwrap(); - check_vk(CircuitType::Batch, batch_vk, "batch vk must be available"); - let batch_task_detail = make_batch_task_detail(chunk_traces, chunk_proofs, None); - log::info!("start to prove batch"); - let batch_proof = batch_handler.gen_batch_proof_raw(batch_task_detail).await?; - let proof_data = serde_json::to_string(&batch_proof)?; - dump_proof("batch_proof".to_string(), proof_data)?; - - Ok(()) - } - - // copied from https://github.com/scroll-tech/scroll-prover/blob/main/integration/src/prove.rs - fn get_blob_from_chunks(chunks: &[ChunkInfo]) -> Vec { - let num_chunks = chunks.len(); - - let padded_chunk = - ChunkInfo::mock_padded_chunk_info_for_testing(chunks.last().as_ref().unwrap()); - let chunks_with_padding = [ - chunks.to_vec(), - vec![padded_chunk; MAX_AGG_SNARKS - num_chunks], - ] - .concat(); - let batch_data = BatchData::<{ MAX_AGG_SNARKS }>::new(chunks.len(), &chunks_with_padding); - let batch_bytes = batch_data.get_batch_data_bytes(); - let blob_bytes = eip4844::get_blob_bytes(&batch_bytes); - log::info!("blob_bytes len {}", blob_bytes.len()); - blob_bytes - } - - // TODO: chunk_infos can be extracted from chunk_proofs. - // Still needed? - fn make_batch_task_detail( - chunk_traces: Vec>, - chunk_proofs: Vec, - last_batcher_header: Option>, - ) -> BatchTaskDetail { - // dummy parent batch hash - let dummy_parent_batch_hash = H256([ - 0xab, 0xac, 0xad, 0xae, 0xaf, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - ]); - let chunk_infos: Vec<_> = chunk_proofs.iter().map(|p| p.chunk_info.clone()).collect(); - - let l1_message_popped = chunk_traces - .iter() - .flatten() - .map(|chunk| chunk.num_l1_txs()) - .sum(); - let last_block_timestamp = chunk_traces.last().map_or(0, |block_traces| { - block_traces - .last() - .map_or(0, |block_trace| block_trace.header.timestamp.as_u64()) - }); - - let blob_bytes = get_blob_from_chunks(&chunk_infos); - let batch_header = BatchHeader::construct_from_chunks( - last_batcher_header.map_or(4, |header| header.version), - last_batcher_header.map_or(123, |header| header.batch_index + 1), - l1_message_popped, - last_batcher_header.map_or(l1_message_popped, |header| { - header.total_l1_message_popped + l1_message_popped - }), - last_batcher_header.map_or(dummy_parent_batch_hash, |header| header.batch_hash()), - last_block_timestamp, - &chunk_infos, - &blob_bytes, - ); - BatchTaskDetail { - chunk_infos, - batch_proving_task: BatchProvingTask { - chunk_proofs, - batch_header, - blob_bytes, - }, - } - } - - fn check_vk(proof_type: CircuitType, vk: Vec, info: &str) { - log::info!("check_vk, {:?}", proof_type); - let vk_from_file = read_vk(proof_type).unwrap(); - assert_eq!(vk_from_file, encode_vk(vk), "{info}") - } - - fn read_vk(proof_type: CircuitType) -> Result { - log::info!("read_vk, {:?}", proof_type); - let vk_file = match proof_type { - CircuitType::Chunk => CHUNK_VK_PATH.clone(), - CircuitType::Batch => BATCH_VK_PATH.clone(), - CircuitType::Bundle => todo!(), - CircuitType::Undefined => unreachable!(), - }; - - let data = std::fs::read(vk_file)?; - Ok(encode_vk(data)) - } - - fn read_chunk_trace(path: PathBuf) -> Result> { - log::info!("read_chunk_trace, {:?}", path); - let mut chunk_trace: Vec = vec![]; - - fn read_block_trace(file: &PathBuf) -> Result { - let f = std::fs::File::open(file)?; - Ok(serde_json::from_reader(&f)?) - } - - if path.is_dir() { - let entries = std::fs::read_dir(&path)?; - let mut files: Vec = entries - .into_iter() - .filter_map(|e| { - if e.is_err() { - return None; - } - let entry = e.unwrap(); - if entry.path().is_dir() { - return None; - } - if let Result::Ok(file_name) = entry.file_name().into_string() { - Some(file_name) - } else { - None - } - }) - .collect(); - files.sort(); - - log::info!("files in chunk {:?} is {:?}", path, files); - for file in files { - let block_trace = read_block_trace(&path.join(file))?; - chunk_trace.push(block_trace); - } - } else { - let block_trace = read_block_trace(&path)?; - chunk_trace.push(block_trace); - } - Ok(chunk_trace) - } - - fn get_chunk_dir_paths() -> Result> { - let batch_path = PathBuf::from(BATCH_DIR_PATH.clone()); - let entries = std::fs::read_dir(&batch_path)?; - let mut files: Vec = entries - .filter_map(|e| { - if e.is_err() { - return None; - } - let entry = e.unwrap(); - if entry.path().is_dir() { - if let Result::Ok(file_name) = entry.file_name().into_string() { - Some(file_name) - } else { - None - } - } else { - None - } - }) - .collect(); - files.sort(); - log::info!("files in batch {:?} is {:?}", batch_path, files); - Ok(files.into_iter().map(|f| batch_path.join(f)).collect()) - } - - fn traces_to_chunk_info(chunk_trace: Vec) -> Result { - let witness_block = chunk_trace_to_witness_block(chunk_trace)?; - Ok(ChunkInfo::from_witness_block(&witness_block, false)) - } - - fn dump_proof(id: String, proof_data: String) -> Result<()> { - let dump_path = PathBuf::from(PROOF_DUMP_PATH.clone()); - Ok(std::fs::write(dump_path.join(id), proof_data)?) - } -} diff --git a/rollup/internal/controller/relayer/l2_relayer.go b/rollup/internal/controller/relayer/l2_relayer.go index 15ac84445e..9accf38353 100644 --- a/rollup/internal/controller/relayer/l2_relayer.go +++ b/rollup/internal/controller/relayer/l2_relayer.go @@ -724,11 +724,9 @@ func (r *Layer2Relayer) finalizeBundle(bundle *orm.Bundle, withProof bool) error return fmt.Errorf("failed to get end chunk of batch: %w", err) } - hardForkName := encoding.GetHardforkName(r.chainCfg, firstChunk.StartBlockNumber, firstChunk.StartBlockTime) - - var aggProof message.BundleProof + var aggProof *message.OpenVMBundleProof if withProof { - aggProof, err = r.bundleOrm.GetVerifiedProofByHash(r.ctx, bundle.Hash, hardForkName) + aggProof, err = r.bundleOrm.GetVerifiedProofByHash(r.ctx, bundle.Hash) if err != nil { return fmt.Errorf("failed to get verified proof by bundle index: %d, err: %w", bundle.Index, err) } @@ -1049,7 +1047,7 @@ func (r *Layer2Relayer) constructCommitBatchPayloadCodecV7(batchesToSubmit []*db return calldata, blobs, maxBlockHeight, totalGasUsed, nil } -func (r *Layer2Relayer) constructFinalizeBundlePayloadCodecV4(dbBatch *orm.Batch, aggProof message.BundleProof) ([]byte, error) { +func (r *Layer2Relayer) constructFinalizeBundlePayloadCodecV4(dbBatch *orm.Batch, aggProof *message.OpenVMBundleProof) ([]byte, error) { if aggProof != nil { // finalizeBundle with proof. calldata, packErr := r.l1RollupABI.Pack( "finalizeBundleWithProof", @@ -1077,7 +1075,7 @@ func (r *Layer2Relayer) constructFinalizeBundlePayloadCodecV4(dbBatch *orm.Batch return calldata, nil } -func (r *Layer2Relayer) constructFinalizeBundlePayloadCodecV7(dbBatch *orm.Batch, endChunk *orm.Chunk, aggProof message.BundleProof) ([]byte, error) { +func (r *Layer2Relayer) constructFinalizeBundlePayloadCodecV7(dbBatch *orm.Batch, endChunk *orm.Chunk, aggProof *message.OpenVMBundleProof) ([]byte, error) { if aggProof != nil { // finalizeBundle with proof. calldata, packErr := r.l1RollupABI.Pack( "finalizeBundlePostEuclidV2", diff --git a/rollup/internal/controller/relayer/l2_relayer_test.go b/rollup/internal/controller/relayer/l2_relayer_test.go index 3126cc6313..ab7ea4b357 100644 --- a/rollup/internal/controller/relayer/l2_relayer_test.go +++ b/rollup/internal/controller/relayer/l2_relayer_test.go @@ -148,11 +148,12 @@ func testL2RelayerProcessPendingBundles(t *testing.T) { // no valid proof, rollup status remains the same assert.Equal(t, types.RollupPending, types.RollupStatus(bundles[0].RollupStatus)) - proof := &message.Halo2BundleProof{ - RawProof: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, - Instances: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, - Vk: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, - } + patchGuard := gomonkey.ApplyMethodFunc((*message.OpenVMBundleProof)(nil), "SanityCheck", func() error { + return nil + }) + defer patchGuard.Reset() + + proof := &message.OpenVMBundleProof{EvmProof: &message.OpenVMEvmProof{Instances: make([]byte, 384)}} err = bundleOrm.UpdateProofAndProvingStatusByHash(context.Background(), bundle.Hash, proof, types.ProvingTaskVerified, 600) assert.NoError(t, err) diff --git a/rollup/internal/orm/batch.go b/rollup/internal/orm/batch.go index 95f5a7bf82..0fb4ee0127 100644 --- a/rollup/internal/orm/batch.go +++ b/rollup/internal/orm/batch.go @@ -121,7 +121,7 @@ func (o *Batch) GetBatchCount(ctx context.Context) (uint64, error) { } // GetVerifiedProofByHash retrieves the verified aggregate proof for a batch with the given hash. -func (o *Batch) GetVerifiedProofByHash(ctx context.Context, hash, hardForkName string) (message.BatchProof, error) { +func (o *Batch) GetVerifiedProofByHash(ctx context.Context, hash string) (*message.OpenVMBatchProof, error) { db := o.db.WithContext(ctx) db = db.Model(&Batch{}) db = db.Select("proof") @@ -132,11 +132,11 @@ func (o *Batch) GetVerifiedProofByHash(ctx context.Context, hash, hardForkName s return nil, fmt.Errorf("Batch.GetVerifiedProofByHash error: %w, batch hash: %v", err, hash) } - proof := message.NewBatchProof(hardForkName) + var proof message.OpenVMBatchProof if err := json.Unmarshal(batch.Proof, &proof); err != nil { return nil, fmt.Errorf("Batch.GetVerifiedProofByHash error: %w, batch hash: %v", err, hash) } - return proof, nil + return &proof, nil } // GetLatestBatch retrieves the latest batch from the database. @@ -432,7 +432,7 @@ func (o *Batch) UpdateFinalizeTxHashAndRollupStatus(ctx context.Context, hash st // UpdateProofByHash updates the batch proof by hash. // for unit test. -func (o *Batch) UpdateProofByHash(ctx context.Context, hash string, proof message.BatchProof, proofTimeSec uint64) error { +func (o *Batch) UpdateProofByHash(ctx context.Context, hash string, proof *message.OpenVMBatchProof, proofTimeSec uint64) error { proofBytes, err := json.Marshal(proof) if err != nil { return fmt.Errorf("Batch.UpdateProofByHash error: %w, batch hash: %v", err, hash) diff --git a/rollup/internal/orm/bundle.go b/rollup/internal/orm/bundle.go index 044434838d..1076e10d25 100644 --- a/rollup/internal/orm/bundle.go +++ b/rollup/internal/orm/bundle.go @@ -134,7 +134,7 @@ func (o *Bundle) GetFirstPendingBundle(ctx context.Context) (*Bundle, error) { } // GetVerifiedProofByHash retrieves the verified aggregate proof for a bundle with the given hash. -func (o *Bundle) GetVerifiedProofByHash(ctx context.Context, hash, hardForkName string) (message.BundleProof, error) { +func (o *Bundle) GetVerifiedProofByHash(ctx context.Context, hash string) (*message.OpenVMBundleProof, error) { db := o.db.WithContext(ctx) db = db.Model(&Bundle{}) db = db.Select("proof") @@ -145,11 +145,11 @@ func (o *Bundle) GetVerifiedProofByHash(ctx context.Context, hash, hardForkName return nil, fmt.Errorf("Bundle.GetVerifiedProofByHash error: %w, bundle hash: %v", err, hash) } - proof := message.NewBundleProof(hardForkName) + var proof message.OpenVMBundleProof if err := json.Unmarshal(bundle.Proof, &proof); err != nil { return nil, fmt.Errorf("Bundle.GetVerifiedProofByHash error: %w, bundle hash: %v", err, hash) } - return proof, nil + return &proof, nil } // InsertBundle inserts a new bundle into the database. @@ -256,7 +256,7 @@ func (o *Bundle) UpdateRollupStatus(ctx context.Context, hash string, status typ // UpdateProofAndProvingStatusByHash updates the bundle proof and proving status by hash. // only used in unit tests. -func (o *Bundle) UpdateProofAndProvingStatusByHash(ctx context.Context, hash string, proof message.BundleProof, provingStatus types.ProvingStatus, proofTimeSec uint64, dbTX ...*gorm.DB) error { +func (o *Bundle) UpdateProofAndProvingStatusByHash(ctx context.Context, hash string, proof *message.OpenVMBundleProof, provingStatus types.ProvingStatus, proofTimeSec uint64, dbTX ...*gorm.DB) error { db := o.db if len(dbTX) > 0 && dbTX[0] != nil { db = dbTX[0] diff --git a/rollup/internal/orm/orm_test.go b/rollup/internal/orm/orm_test.go index 7b6f9496a5..89cd1ad323 100644 --- a/rollup/internal/orm/orm_test.go +++ b/rollup/internal/orm/orm_test.go @@ -292,7 +292,7 @@ func TestBatchOrm(t *testing.T) { err = batchOrm.UpdateProvingStatus(context.Background(), batchHash2, types.ProvingTaskVerified) assert.NoError(t, err) - dbProof, err := batchOrm.GetVerifiedProofByHash(context.Background(), batchHash1, "darwinV2") + dbProof, err := batchOrm.GetVerifiedProofByHash(context.Background(), batchHash1) assert.Error(t, err) assert.Nil(t, dbProof) @@ -451,18 +451,16 @@ func TestBundleOrm(t *testing.T) { }) t.Run("GetVerifiedProofByHash", func(t *testing.T) { - proof := &message.Halo2BundleProof{ - RawProof: []byte("test proof"), - } + proof := &message.OpenVMBundleProof{EvmProof: &message.OpenVMEvmProof{Instances: make([]byte, 384)}} proofBytes, err := json.Marshal(proof) assert.NoError(t, err) err = db.Model(&Bundle{}).Where("hash = ?", bundle1.Hash).Update("proof", proofBytes).Error assert.NoError(t, err) - retrievedProof, err := bundleOrm.GetVerifiedProofByHash(context.Background(), bundle1.Hash, "darwinV2") + retrievedProof, err := bundleOrm.GetVerifiedProofByHash(context.Background(), bundle1.Hash) assert.NoError(t, err) - assert.Equal(t, proof.RawProof, retrievedProof.Proof()) + assert.Equal(t, proof.Proof(), retrievedProof.Proof()) }) t.Run("GetBundles", func(t *testing.T) { @@ -474,9 +472,7 @@ func TestBundleOrm(t *testing.T) { }) t.Run("UpdateProofAndProvingStatusByHash", func(t *testing.T) { - proof := &message.Halo2BundleProof{ - RawProof: []byte("new test proof"), - } + proof := &message.OpenVMBundleProof{EvmProof: &message.OpenVMEvmProof{Instances: make([]byte, 384)}} err := bundleOrm.UpdateProofAndProvingStatusByHash(context.Background(), bundle2.Hash, proof, types.ProvingTaskVerified, 600) assert.NoError(t, err) @@ -487,10 +483,10 @@ func TestBundleOrm(t *testing.T) { assert.Equal(t, int32(600), bundle.ProofTimeSec) assert.NotNil(t, bundle.ProvedAt) - retrievedProof := message.Halo2BundleProof{} + retrievedProof := &message.OpenVMBundleProof{} err = json.Unmarshal(bundle.Proof, &retrievedProof) assert.NoError(t, err) - assert.Equal(t, proof.RawProof, retrievedProof.Proof()) + assert.Equal(t, proof.Proof(), retrievedProof.Proof()) }) t.Run("UpdateRollupStatus", func(t *testing.T) { diff --git a/rollup/tests/bridge_test.go b/rollup/tests/bridge_test.go index cccd1affd4..66541a4f3a 100644 --- a/rollup/tests/bridge_test.go +++ b/rollup/tests/bridge_test.go @@ -208,7 +208,7 @@ func TestFunction(t *testing.T) { // l1 rollup and watch rollup events t.Run("TestCommitAndFinalizeGenesisBatch", testCommitAndFinalizeGenesisBatch) - t.Run("testCommitBatchAndFinalizeBundleCodecV4V5V6", testCommitBatchAndFinalizeBundleCodecV4V5V6) + t.Run("TestCommitBatchAndFinalizeBundleCodecV4V5V6", testCommitBatchAndFinalizeBundleCodecV4V5V6) t.Run("TestCommitBatchAndFinalizeBundleCodecV7", testCommitBatchAndFinalizeBundleCodecV7) // l1 gas oracle diff --git a/rollup/tests/rollup_test.go b/rollup/tests/rollup_test.go index 597b8e23ef..e9d0f2ade4 100644 --- a/rollup/tests/rollup_test.go +++ b/rollup/tests/rollup_test.go @@ -8,6 +8,7 @@ import ( "testing" "time" + "github.com/agiledragon/gomonkey/v2" "github.com/scroll-tech/da-codec/encoding" "github.com/scroll-tech/go-ethereum/common" gethTypes "github.com/scroll-tech/go-ethereum/core/types" @@ -147,11 +148,12 @@ func testCommitBatchAndFinalizeBundleCodecV4V5V6(t *testing.T) { bup.TryProposeBundle() // The proposed bundle contains two batches when codec version is codecv3. - batchProof := &message.Halo2BatchProof{ - RawProof: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, - Instances: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, - Vk: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, - } + patchGuard1 := gomonkey.ApplyMethodFunc((*message.OpenVMBatchProof)(nil), "SanityCheck", func() error { + return nil + }) + defer patchGuard1.Reset() + + batchProof := &message.OpenVMBatchProof{} batches, err := batchOrm.GetBatches(context.Background(), map[string]interface{}{}, nil, 0) assert.NoError(t, err) batches = batches[1:] @@ -162,11 +164,12 @@ func testCommitBatchAndFinalizeBundleCodecV4V5V6(t *testing.T) { assert.NoError(t, err) } - bundleProof := &message.Halo2BundleProof{ - RawProof: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, - Instances: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, - Vk: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, - } + patchGuard2 := gomonkey.ApplyMethodFunc((*message.OpenVMBundleProof)(nil), "SanityCheck", func() error { + return nil + }) + defer patchGuard2.Reset() + + bundleProof := &message.OpenVMBundleProof{EvmProof: &message.OpenVMEvmProof{Instances: make([]byte, 384)}} bundles, err := bundleOrm.GetBundles(context.Background(), map[string]interface{}{}, nil, 0) assert.NoError(t, err) for _, bundle := range bundles {