From c895052eb032ac65976d3b83f08dedc6da859b24 Mon Sep 17 00:00:00 2001 From: Ivo Kubjas Date: Thu, 26 Sep 2024 19:05:47 +0200 Subject: [PATCH 1/4] fix: target Solidity 0.8.26 (#75) Co-authored-by: Victorien Gauch <85494462+VGau@users.noreply.github.com> Co-authored-by: The Dark Jester --- prover/circuits/setup.go | 11 +++++++++-- .../testcase-gen/compression-aggregation/cmd.go | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/prover/circuits/setup.go b/prover/circuits/setup.go index fe2df7eb5..3bf635cbe 100644 --- a/prover/circuits/setup.go +++ b/prover/circuits/setup.go @@ -19,6 +19,7 @@ import ( plonk_bls12377 "github.com/consensys/gnark/backend/plonk/bls12-377" plonk_bn254 "github.com/consensys/gnark/backend/plonk/bn254" plonk_bw6761 "github.com/consensys/gnark/backend/plonk/bw6-761" + "github.com/consensys/gnark/backend/solidity" "github.com/sirupsen/logrus" kzg377 "github.com/consensys/gnark-crypto/ecc/bls12-377/kzg" @@ -31,6 +32,12 @@ import ( "github.com/consensys/linea-monorepo/prover/utils" ) +const ( + // solidityPragmaVersion is the version of the Solidity compiler to target. + // it is used for generating the verifier contract from the PLONK verifying key. + solidityPragmaVersion = "0.8.26" +) + // Setup contains the proving and verifying keys of a circuit, as well as the constraint system. // It's a common structure used to pass around the resources associated with a circuit. type Setup struct { @@ -76,7 +83,7 @@ func MakeSetup( hasSolidity := setup.Circuit.Field().String() == ecc.BN254.ScalarField().String() if hasSolidity { h := sha256.New() - if err = vk.ExportSolidity(h); err != nil { + if err = vk.ExportSolidity(h, solidity.WithPragmaVersion(solidityPragmaVersion)); err != nil { return Setup{}, fmt.Errorf("computing checksum for verifier contract: %w", err) } setup.Manifest.Checksums.VerifierContract = "0x" + hex.EncodeToString(h.Sum(nil)) @@ -131,7 +138,7 @@ func (s *Setup) WriteTo(rootDir string) error { return fmt.Errorf("creating verifier contract file: %w", err) } defer f.Close() - if err = s.VerifyingKey.ExportSolidity(f); err != nil { + if err = s.VerifyingKey.ExportSolidity(f, solidity.WithPragmaVersion(solidityPragmaVersion)); err != nil { return fmt.Errorf("exporting verifier contract to file: %w", err) } } diff --git a/prover/cmd/dev-tools/testcase-gen/compression-aggregation/cmd.go b/prover/cmd/dev-tools/testcase-gen/compression-aggregation/cmd.go index 0e61f8310..4606596e4 100644 --- a/prover/cmd/dev-tools/testcase-gen/compression-aggregation/cmd.go +++ b/prover/cmd/dev-tools/testcase-gen/compression-aggregation/cmd.go @@ -11,6 +11,7 @@ import ( "strings" "github.com/consensys/gnark-crypto/ecc" + "github.com/consensys/gnark/backend/solidity" "github.com/consensys/linea-monorepo/prover/backend/aggregation" "github.com/consensys/linea-monorepo/prover/backend/blobsubmission" "github.com/consensys/linea-monorepo/prover/backend/files" @@ -367,7 +368,7 @@ func dumpVerifierContract(odir string, circID circuits.MockCircuitID) { printlnAndExit("could not create public parameters: %v", err) } - if err := pp.VerifyingKey.ExportSolidity(f); err != nil { + if err := pp.VerifyingKey.ExportSolidity(f, solidity.WithPragmaVersion("0.8.26")); err != nil { printlnAndExit("could not export verifying key to solidity: %v", err) } } From 2ee4363da2aca374b224a35ef2bd033b8dbb5322 Mon Sep 17 00:00:00 2001 From: Roman Vaseev <4833306+Filter94@users.noreply.github.com> Date: Thu, 26 Sep 2024 20:27:46 +0200 Subject: [PATCH 2/4] Trying to update Sequencer to v0.6.0-rc6.1 (#107) --- docker/compose-local-dev-traces-v2.overrides.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/compose-local-dev-traces-v2.overrides.yml b/docker/compose-local-dev-traces-v2.overrides.yml index cdd02acfc..c13565f9c 100644 --- a/docker/compose-local-dev-traces-v2.overrides.yml +++ b/docker/compose-local-dev-traces-v2.overrides.yml @@ -9,7 +9,7 @@ services: - ../config/common/traces-limits-besu-v2.toml:/var/lib/besu/traces-limits.toml:ro linea-besu-sequencer-plugin-downloader: - command: [ "sh", "/file-downloader.sh", "https://github.com/Consensys/linea-sequencer/releases/download/v0.6.0-rc5.1/linea-sequencer-v0.6.0-rc5.1.jar", "/linea-besu-sequencer" ] + command: [ "sh", "/file-downloader.sh", "https://github.com/Consensys/linea-sequencer/releases/download/v0.6.0-rc6.1/linea-sequencer-v0.6.0-rc6.1.jar", "/linea-besu-sequencer" ] traces-node: command: ['echo', 'forced exit as replaced by traces-node-v2'] From 5d7cda2bd59211dc346032f66f0fdf1f4926c09a Mon Sep 17 00:00:00 2001 From: Bradley Bown Date: Fri, 27 Sep 2024 10:59:02 +0100 Subject: [PATCH 3/4] Set build and e2e test workflows to test-and-builds environment (#49) * Added test-and-builds environment to some workflows * Rename environment * Cleanup deployments for this branch * Testing hardcoded branch name * Testing github variables * Use github.ref_name in deployment cleanup * Add needs to cleanup * Add always() tag to job to delete deployments even when jobs fail --- .github/workflows/coordinator-build-and-publish.yml | 1 + .github/workflows/main.yml | 12 ++++++++++++ .github/workflows/postman-build-and-publish.yml | 1 + .github/workflows/prover-build-and-publish.yml | 1 + .github/workflows/reuse-run-e2e-tests.yml | 1 + .../traces-api-facade-build-and-publish.yml | 1 + 6 files changed, 17 insertions(+) diff --git a/.github/workflows/coordinator-build-and-publish.yml b/.github/workflows/coordinator-build-and-publish.yml index 92466c051..7aa59d8b4 100644 --- a/.github/workflows/coordinator-build-and-publish.yml +++ b/.github/workflows/coordinator-build-and-publish.yml @@ -35,6 +35,7 @@ jobs: build-and-publish: runs-on: ubuntu-22.04 name: Coordinator build + environment: docker-build-and-e2e env: COMMIT_TAG: ${{ inputs.commit_tag }} DEVELOP_TAG: ${{ inputs.develop_tag }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9dc83e87a..c94513402 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -187,3 +187,15 @@ jobs: untested_tag_suffix: ${{ needs.store-image-name-and-tags.outputs.untested_tag_suffix }} image_names: '["consensys/linea-coordinator", "consensys/linea-postman", "consensys/linea-prover", "consensys/linea-traces-api-facade"]' secrets: inherit + + cleanup-deployments: + needs: [ run-e2e-tests, run-e2e-tests-geth-tracing ] + if: ${{ always() }} + runs-on: besu-arm64 + steps: + - uses: strumwolf/delete-deployment-environment@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + environment: docker-build-and-e2e + ref: ${{ github.ref_name }} + onlyRemoveDeployments: true diff --git a/.github/workflows/postman-build-and-publish.yml b/.github/workflows/postman-build-and-publish.yml index 068cc1573..32aa8829d 100644 --- a/.github/workflows/postman-build-and-publish.yml +++ b/.github/workflows/postman-build-and-publish.yml @@ -35,6 +35,7 @@ jobs: build-and-publish: runs-on: ubuntu-22.04 name: Postman build + environment: docker-build-and-e2e env: COMMIT_TAG: ${{ inputs.commit_tag }} DEVELOP_TAG: ${{ inputs.develop_tag }} diff --git a/.github/workflows/prover-build-and-publish.yml b/.github/workflows/prover-build-and-publish.yml index ca9bbb314..1c29cd678 100644 --- a/.github/workflows/prover-build-and-publish.yml +++ b/.github/workflows/prover-build-and-publish.yml @@ -38,6 +38,7 @@ jobs: build-and-publish: runs-on: ubuntu-latest name: Prover build + environment: docker-build-and-e2e env: COMMIT_TAG: ${{ inputs.commit_tag }} DEVELOP_TAG: ${{ inputs.develop_tag }} diff --git a/.github/workflows/reuse-run-e2e-tests.yml b/.github/workflows/reuse-run-e2e-tests.yml index 2ea3bb9bb..757493cc9 100644 --- a/.github/workflows/reuse-run-e2e-tests.yml +++ b/.github/workflows/reuse-run-e2e-tests.yml @@ -76,6 +76,7 @@ jobs: outputs: tests_outcome: ${{ steps.run_e2e_tests.outcome }} runs-on: ubuntu-22.04 + environment: docker-build-and-e2e steps: - name: Setup upterm session if: ${{ inputs.e2e-tests-with-ssh }} diff --git a/.github/workflows/traces-api-facade-build-and-publish.yml b/.github/workflows/traces-api-facade-build-and-publish.yml index 8442460b1..42e2822a2 100644 --- a/.github/workflows/traces-api-facade-build-and-publish.yml +++ b/.github/workflows/traces-api-facade-build-and-publish.yml @@ -35,6 +35,7 @@ jobs: build-and-publish: runs-on: ubuntu-latest name: Traces api facade build + environment: docker-build-and-e2e env: COMMIT_TAG: ${{ inputs.commit_tag }} DEVELOP_TAG: ${{ inputs.develop_tag }} From dec6a299ac7a48681335eefcc35e63052e9ebb27 Mon Sep 17 00:00:00 2001 From: Bradley Bown Date: Fri, 27 Sep 2024 12:02:40 +0100 Subject: [PATCH 4/4] Fix linux runner arch (#111) --- .github/workflows/prover-native-lib-blob-compressor-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prover-native-lib-blob-compressor-release.yml b/.github/workflows/prover-native-lib-blob-compressor-release.yml index d20b7edfd..7a5b80937 100644 --- a/.github/workflows/prover-native-lib-blob-compressor-release.yml +++ b/.github/workflows/prover-native-lib-blob-compressor-release.yml @@ -21,7 +21,7 @@ on: jobs: build-linux: - runs-on: besu-arm64 + runs-on: ubuntu-24.04 steps: - name: Checkout code uses: actions/checkout@v4