diff --git a/.github/workflows/docker-coordinator-api-arm64.yml b/.github/workflows/docker-coordinator-api-arm64.yml new file mode 100644 index 0000000000..24932786fc --- /dev/null +++ b/.github/workflows/docker-coordinator-api-arm64.yml @@ -0,0 +1,41 @@ +name: Docker-coordinator-api-arm64 + +on: + workflow_dispatch: + inputs: + tag: + description: "tag of this image (suffix -arm64 is added automatically)" + required: true + type: string + +jobs: + build-and-push-arm64-image: + runs-on: ubuntu-latest + strategy: + matrix: + arch: + - aarch64 + + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Set up QEMU + run: | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + docker buildx create --name multiarch --driver docker-container --use + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build docker image + uses: docker/build-push-action@v2 + with: + platforms: linux/arm64 + context: . + file: ./build/dockerfiles/coordinator-api.Dockerfile + push: true + tags: scrolltech/coordinator-api:${{inputs.tag}}-arm64 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4592c02942..83a412bfd6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -361,7 +361,6 @@ jobs: with: context: . file: ./build/dockerfiles/coordinator-api.Dockerfile - platforms: linux/amd64 push: true tags: | ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }} diff --git a/Makefile b/Makefile index a15f863f03..d3b86cd8c4 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,6 @@ update: cd $(PWD)/common/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG}&& go mod tidy cd $(PWD)/coordinator/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy cd $(PWD)/database/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy - cd $(PWD)/prover/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG}&& go mod tidy cd $(PWD)/rollup/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy cd $(PWD)/tests/integration-test/ && go get -u github.com/scroll-tech/go-ethereum@${L2GETH_TAG} && go mod tidy @@ -21,7 +20,6 @@ lint: ## The code's format and security checks. make -C common lint make -C coordinator lint make -C database lint - make -C prover lint make -C bridge-history-api lint fmt: ## format the code @@ -30,7 +28,6 @@ fmt: ## format the code cd $(PWD)/common/ && go mod tidy cd $(PWD)/coordinator/ && go mod tidy cd $(PWD)/database/ && go mod tidy - cd $(PWD)/prover/ && go mod tidy cd $(PWD)/rollup/ && go mod tidy cd $(PWD)/tests/integration-test/ && go mod tidy @@ -38,7 +35,6 @@ fmt: ## format the code goimports -local $(PWD)/common/ -w . goimports -local $(PWD)/coordinator/ -w . goimports -local $(PWD)/database/ -w . - goimports -local $(PWD)/prover/ -w . goimports -local $(PWD)/rollup/ -w . goimports -local $(PWD)/tests/integration-test/ -w . diff --git a/common/libzkp/impl/Cargo.lock b/common/libzkp/impl/Cargo.lock index b2bc00de6a..a4ceafdbf8 100644 --- a/common/libzkp/impl/Cargo.lock +++ b/common/libzkp/impl/Cargo.lock @@ -31,7 +31,7 @@ dependencies = [ [[package]] name = "aggregator" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "ark-std 0.3.0", "bitstream-io", @@ -537,7 +537,7 @@ checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "bus-mapping" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "eth-types", "ethers-core", @@ -1126,7 +1126,7 @@ dependencies = [ [[package]] name = "eth-types" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "base64 0.13.1", "ethers-core", @@ -1283,7 +1283,7 @@ dependencies = [ [[package]] name = "external-tracer" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "eth-types", "geth-utils", @@ -1465,7 +1465,7 @@ dependencies = [ [[package]] name = "gadgets" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "eth-types", "halo2_proofs", @@ -1488,7 +1488,7 @@ dependencies = [ [[package]] name = "geth-utils" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "env_logger 0.10.0", "gobuild", @@ -2237,7 +2237,7 @@ dependencies = [ [[package]] name = "mock" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "eth-types", "ethers-core", @@ -2252,7 +2252,7 @@ dependencies = [ [[package]] name = "mpt-zktrie" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "eth-types", "halo2curves", @@ -2724,7 +2724,7 @@ dependencies = [ [[package]] name = "prover" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "aggregator", "anyhow", @@ -4361,7 +4361,7 @@ dependencies = [ [[package]] name = "zkevm-circuits" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "array-init", "bus-mapping", diff --git a/common/libzkp/impl/Cargo.toml b/common/libzkp/impl/Cargo.toml index 966f6df2e4..d12c7a31a6 100644 --- a/common/libzkp/impl/Cargo.toml +++ b/common/libzkp/impl/Cargo.toml @@ -25,7 +25,7 @@ bls12_381 = { git = "https://github.com/scroll-tech/bls12_381", branch = "feat/i [dependencies] 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 = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.11.3", default-features = false, features = ["parallel_syn", "scroll"] } +prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.11.4", default-features = false, features = ["parallel_syn", "scroll"] } base64 = "0.13.0" env_logger = "0.9.0" diff --git a/common/version/version.go b/common/version/version.go index 143731c1ba..d31cceb4b7 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -5,7 +5,7 @@ import ( "runtime/debug" ) -var tag = "v4.4.19" +var tag = "v4.4.20" var commit = func() string { if info, ok := debug.ReadBuildInfo(); ok { diff --git a/prover/Cargo.lock b/prover/Cargo.lock index 07d75081e2..9789a1240a 100644 --- a/prover/Cargo.lock +++ b/prover/Cargo.lock @@ -59,7 +59,7 @@ dependencies = [ [[package]] name = "aggregator" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "ark-std 0.3.0", "bitstream-io", @@ -661,7 +661,7 @@ dependencies = [ [[package]] name = "bus-mapping" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "eth-types 0.11.0", "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", @@ -1391,7 +1391,7 @@ dependencies = [ [[package]] name = "eth-types" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "base64 0.13.1", "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", @@ -1625,7 +1625,7 @@ dependencies = [ [[package]] name = "external-tracer" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "eth-types 0.11.0", "geth-utils 0.11.0", @@ -1863,7 +1863,7 @@ dependencies = [ [[package]] name = "gadgets" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "eth-types 0.11.0", "halo2_proofs", @@ -1896,7 +1896,7 @@ dependencies = [ [[package]] name = "geth-utils" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "env_logger 0.10.2", "gobuild", @@ -2795,7 +2795,7 @@ dependencies = [ [[package]] name = "mock" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "eth-types 0.11.0", "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", @@ -2825,7 +2825,7 @@ dependencies = [ [[package]] name = "mpt-zktrie" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "eth-types 0.11.0", "halo2curves", @@ -3451,7 +3451,7 @@ dependencies = [ [[package]] name = "prover" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "aggregator 0.11.0", "anyhow", @@ -5595,7 +5595,7 @@ dependencies = [ [[package]] name = "zkevm-circuits" version = "0.11.0" -source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.3#19c813167ed0dfa72753a9f1eacdac969c6e94e6" +source = "git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.4#38a68e22d3d8449bd39a50c22da55b9e741de453" dependencies = [ "array-init", "bus-mapping 0.11.0", diff --git a/prover/Cargo.toml b/prover/Cargo.toml index 41cbfe2a95..bd145fa562 100644 --- a/prover/Cargo.toml +++ b/prover/Cargo.toml @@ -30,7 +30,7 @@ ethers-providers = { git = "https://github.com/scroll-tech/ethers-rs.git", branc 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 = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "v0.10", default-features = false, features = ["parallel_syn", "scroll", "shanghai"] } -prover_next = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.11.3", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } +prover_next = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.11.4", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } base64 = "0.13.1" reqwest = { version = "0.12.4", features = ["gzip"] } reqwest-middleware = "0.3" diff --git a/rollup/internal/controller/relayer/l2_relayer.go b/rollup/internal/controller/relayer/l2_relayer.go index 7b979dc47b..d49f136d67 100644 --- a/rollup/internal/controller/relayer/l2_relayer.go +++ b/rollup/internal/controller/relayer/l2_relayer.go @@ -34,12 +34,7 @@ import ( rutils "scroll-tech/rollup/internal/utils" ) -// Layer2Relayer is responsible for -// 1. Committing and finalizing L2 blocks on L1 -// 2. Relaying messages from L2 to L1 -// -// Actions are triggered by new head from layer 1 geth node. -// @todo It's better to be triggered by watcher. +// Layer2Relayer is responsible for committing and finalizing L2 blocks on L1. type Layer2Relayer struct { ctx context.Context @@ -602,7 +597,7 @@ func (r *Layer2Relayer) finalizeBatch(dbBatch *orm.Batch, withProof bool) error log.Info("finalizeBatch in layer1", "with proof", withProof, "index", dbBatch.Index, "batch hash", dbBatch.Hash, "tx hash", txHash.String()) - // record and sync with db, @todo handle db error + // Updating rollup status in database. if err := r.batchOrm.UpdateFinalizeTxHashAndRollupStatus(r.ctx, dbBatch.Hash, txHash.String(), types.RollupFinalizing); err != nil { log.Error("UpdateFinalizeTxHashAndRollupStatus failed", "index", dbBatch.Index, "batch hash", dbBatch.Hash, "tx hash", txHash.String(), "err", err) return err