diff --git a/.github/workflows/ci3.yml b/.github/workflows/ci3.yml index 1a1f0e2ae210..4e8a32bd15b7 100644 --- a/.github/workflows/ci3.yml +++ b/.github/workflows/ci3.yml @@ -70,6 +70,12 @@ jobs: EXTERNAL_ETHEREUM_CONSENSUS_HOST: "https://beacon.${{ secrets.GCP_SEPOLIA_URL }}" EXTERNAL_ETHEREUM_CONSENSUS_HOST_API_KEY: ${{ secrets.GCP_SEPOLIA_API_KEY }} EXTERNAL_ETHEREUM_CONSENSUS_HOST_API_KEY_HEADER: "X-goog-api-key" + TARGET_BRANCH: >- + ${{ + github.event_name == 'pull_request' && github.event.pull_request.base.ref + || github.event_name == 'merge_group' && github.event.merge_group.pull_requests[0].pull_request.base_ref + || github.ref_name + }} run: | if [ "${{ github.event_name }}" == "merge_group" ] || [ "${CI_FULL:-0}" -eq 1 ]; then exec ./ci.sh merge-queue @@ -90,7 +96,7 @@ jobs: uses: benchmark-action/github-action-benchmark@4de1bed97a47495fc4c5404952da0499e31f5c29 with: name: Aztec Benchmarks - benchmark-data-dir-path: "bench/master" + benchmark-data-dir-path: "bench/${{ github.event.merge_group.pull_requests[0].pull_request.base_ref }}" tool: "customSmallerIsBetter" output-file-path: ./bench-out/bench.json github-token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 5cb0b3f9e1ce..a6821f28965d 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -1,10 +1,11 @@ name: release-please -# Trigger on merges to 'master' branch +# Trigger on merges to 'master' branch and 'next' branch on: push: branches: - master + - next permissions: contents: write diff --git a/.test_patterns.yml b/.test_patterns.yml index d79c54679b87..d4d673062c62 100644 --- a/.test_patterns.yml +++ b/.test_patterns.yml @@ -102,6 +102,10 @@ tests: error_regex: "FormattedViemError: Nonce provided for the transaction is lower than the current nonce of the account." owners: - *sean + - regex: "src/e2e_p2p/reqresp" + error_regex: 'CodeError: writable end state is "writing" not "ready"' + owners: + - *sean - regex: "src/e2e_p2p" error_regex: "TimeoutError: Timeout awaiting blocks mined" owners: diff --git a/barretenberg/cpp/bootstrap.sh b/barretenberg/cpp/bootstrap.sh index c34886bf2edc..51d3153f654d 100755 --- a/barretenberg/cpp/bootstrap.sh +++ b/barretenberg/cpp/bootstrap.sh @@ -229,10 +229,10 @@ function build_bench { # Run builds in parallel with different targets per preset # bb_cli_bench is later used in yarn-project. parallel --line-buffered denoise ::: \ - "build_preset $native_preset --target ultra_honk_bench --target client_ivc_bench --target bb_cli_bench" \ - "build_preset wasm-threads --target ultra_honk_bench --target client_ivc_bench --target bb_cli_bench" + "build_preset $native_preset --target ultra_honk_bench --target client_ivc_bench --target bb_cli_bench" \ + "build_preset wasm-threads --target ultra_honk_bench --target client_ivc_bench --target bb_cli_bench" cache_upload barretenberg-benchmarks-$hash.zst \ - {build,build-wasm-threads}/bin/{ultra_honk_bench,client_ivc_bench} + {build,build-wasm-threads}/bin/{ultra_honk_bench,client_ivc_bench,bb_cli_bench} fi } diff --git a/ci3/bootstrap_ec2 b/ci3/bootstrap_ec2 index 184327a30bce..658a5b1ae0b8 100755 --- a/ci3/bootstrap_ec2 +++ b/ci3/bootstrap_ec2 @@ -140,7 +140,7 @@ container_script=$(cat </dev/null || true; sleep 30; done & function run { - echo "env: REF_NAME=\$REF_NAME COMMIT_HASH=\$COMMIT_HASH CURRENT_VERSION=\$CURRENT_VERSION" + echo "env: REF_NAME=\$REF_NAME COMMIT_HASH=\$COMMIT_HASH CURRENT_VERSION=\$CURRENT_VERSION TARGET_BRANCH=\$TARGET_BRANCH" if semver check "\$REF_NAME"; then echo "Performing a release because \$REF_NAME is a semver." fi @@ -228,6 +228,7 @@ function run { -e RUN_ID=${RUN_ID:-} \ -e JOB_ID=${JOB_ID:-} \ -e REF_NAME=${REF_NAME:-} \ + -e TARGET_BRANCH=${TARGET_BRANCH:-} \ -e PARENT_LOG_URL=${PARENT_LOG_URL:-} \ -e NO_CACHE=${NO_CACHE:-} \ -e CI_REDIS='ci-redis-tiered.lzka0i.ng.0001.use2.cache.amazonaws.com' \ diff --git a/l1-contracts/bootstrap.sh b/l1-contracts/bootstrap.sh index d4c28aa5ec22..9b2a5cbd9b10 100755 --- a/l1-contracts/bootstrap.sh +++ b/l1-contracts/bootstrap.sh @@ -48,14 +48,17 @@ function build { --optimizer-runs 1 \ --no-metadata - cache_upload $artifact out + cache_upload $artifact out generated fi } function test_cmds { echo "$hash cd l1-contracts && solhint --config ./.solhint.json \"src/**/*.sol\"" echo "$hash cd l1-contracts && forge fmt --check" - echo "$hash cd l1-contracts && forge test --no-match-contract UniswapPortalTest" + echo "$hash cd l1-contracts && forge test" + if [ "${TARGET_BRANCH:-}" == "master" ]; then + echo "$hash cd l1-contracts && forge test --no-match-contract UniswapPortalTest --match-contract ScreamAndShoutTest" + fi } function test { diff --git a/l1-contracts/foundry.toml b/l1-contracts/foundry.toml index 13c51f8addf2..c20229922b95 100644 --- a/l1-contracts/foundry.toml +++ b/l1-contracts/foundry.toml @@ -31,6 +31,8 @@ fs_permissions = [ {access = "read", path = "./test/fixtures/fee_data_points.json"}, ] +no_match_contract="(ScreamAndShoutTest|UniswapPortalTest)" + [fmt] line_length = 100 tab_width = 2 diff --git a/l1-contracts/test/shouting.t.sol b/l1-contracts/test/shouting.t.sol new file mode 100644 index 000000000000..b2a728961126 --- /dev/null +++ b/l1-contracts/test/shouting.t.sol @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity >=0.8.27; + +import {Test} from "forge-std/Test.sol"; +import {Rollup} from "@aztec/core/Rollup.sol"; +import {Registry} from "@aztec/governance/Registry.sol"; +import {Governance} from "@aztec/governance/Governance.sol"; +import {HonkVerifier} from "../generated/HonkVerifier.sol"; + +/** + * @notice This test is used to ensure that changes to L1 contracts don't go unnoticed. + * While still allowing the addition of more tests etc without having to update it. + * The test is fairly simple, check if the creation code has changed for the important + * contracts. If it has, the test will fail, so it needs to be updated. + * This should not be needed for master, so if you have a diff, it probably have to go to NEXT. + */ +contract ScreamAndShoutTest is Test { + string internal constant ERR_STRING = "This belongs in NEXT!"; + + function test_GovernanceCreationCode() public pure { + bytes memory creationCode = type(Governance).creationCode; + bytes32 codeHash = keccak256(creationCode); + + assertEq( + codeHash, 0x8660a25b0d480424b950324ef5d078cfb12a06d5c807ab09ade301968ac20ae1, ERR_STRING + ); + } + + function test_HonkVerifierCreationCode() public pure { + bytes memory creationCode = type(HonkVerifier).creationCode; + bytes32 codeHash = keccak256(creationCode); + + assertEq( + codeHash, 0x1ee8b65cce354f0149f5dc00ff4314acf147d4efe28a789016a4031adebec039, ERR_STRING + ); + } + + function test_RegistryCreationCode() public pure { + bytes memory creationCode = type(Registry).creationCode; + bytes32 codeHash = keccak256(creationCode); + + assertEq( + codeHash, 0x1c9e54944cd8c92ee57305f1fba26284638268a934f9fab38b7c6a4facb92ee5, ERR_STRING + ); + } + + function test_RollupCreationCode() public pure { + bytes memory creationCode = type(Rollup).creationCode; + bytes32 codeHash = keccak256(creationCode); + + assertEq( + codeHash, 0xddd8431ed52d33e28fb5072e1dd57fbecb5fd919da403bc20cdad17ca2113726, ERR_STRING + ); + } +} diff --git a/release-please-config.json b/release-please-config.json index 6d05c8ab5dd1..9030fe0526c4 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,19 +1,42 @@ { - "release-type": "simple", - "bump-minor-pre-major": true, - "bump-patch-for-minor-pre-major": true, - "prerelease": true, - "group-pull-request-title-pattern": "chore(master): Release ${version}", - "pull-request-header": ":robot: I have created a new Aztec Packages release", - "versioning": "default", - "include-component-in-tag": false, - "changelog-sections": [ - { "type": "feat", "section": "Features", "hidden": false }, - { "type": "fix", "section": "Bug Fixes", "hidden": false }, - { "type": "chore", "section": "Miscellaneous", "hidden": false }, - { "type": "test", "section": "Miscellaneous", "hidden": false }, - { "type": "refactor", "section": "Miscellaneous", "hidden": false }, - { "type": "docs", "section": "Documentation", "hidden": false } + "branches": [ + { + "branch": "master", + "release-type": "simple", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "group-pull-request-title-pattern": "chore(master): Release ${version}", + "pull-request-header": ":robot: I have created a new Aztec Packages release", + "versioning": "default", + "include-component-in-tag": false, + "changelog-sections": [ + { "type": "feat", "section": "Features", "hidden": false }, + { "type": "fix", "section": "Bug Fixes", "hidden": false }, + { "type": "chore", "section": "Miscellaneous", "hidden": false }, + { "type": "test", "section": "Miscellaneous", "hidden": false }, + { "type": "refactor", "section": "Miscellaneous", "hidden": false }, + { "type": "docs", "section": "Documentation", "hidden": false } + ] + }, + { + "branch": "next", + "release-type": "simple", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "prerelease": true, + "group-pull-request-title-pattern": "chore(next): Release ${version}", + "pull-request-header": ":robot: I have created a new Aztec Packages next release", + "versioning": "default", + "include-component-in-tag": false, + "changelog-sections": [ + { "type": "feat", "section": "Features", "hidden": false }, + { "type": "fix", "section": "Bug Fixes", "hidden": false }, + { "type": "chore", "section": "Miscellaneous", "hidden": false }, + { "type": "test", "section": "Miscellaneous", "hidden": false }, + { "type": "refactor", "section": "Miscellaneous", "hidden": false }, + { "type": "docs", "section": "Documentation", "hidden": false } + ] + } ], "packages": { ".": {