feat: Min and max block times for sequencer#7630
Conversation
Adds two new config variables for the sequencer: min and max block time in seconds. The sequencer now checks the current time against the previous block. If it's less than min, it doesn't build a block. If it's more than max, it builds the block even with no txs.
Docs PreviewHey there! 👋 You can check your preview at https://66a3cd3a4a43fc138d0e7414--aztec-docs-dev.netlify.app |
Benchmark resultsMetrics with a significant change:
Detailed resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Proof generationEach column represents the number of threads used in proof generation.
L2 block published to L1Each column represents the number of txs on an L2 block published to L1.
L2 chain processingEach column represents the number of blocks on the L2 chain where each block has 8 txs.
Circuits statsStats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.
Stats on running time collected for app circuits
AVM SimulationTime to simulate various public functions in the AVM.
Public DB AccessTime to access various public DBs.
Tree insertion statsThe duration to insert a fixed batch of leaves into each tree type.
MiscellaneousTransaction sizes based on how many contract classes are registered in the tx.
Transaction size based on fee payment method | Metric | | |
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.47.1</summary> ## [0.47.1](aztec-package-v0.47.0...aztec-package-v0.47.1) (2024-07-30) ### Features * Do not evict tx objects from p2p tx pool immediately ([#7652](#7652)) ([96492dc](96492dc)) * Min and max block times for sequencer ([#7630](#7630)) ([2a013b8](2a013b8)) * Transaction sender bot ([#7586](#7586)) ([176fd08](176fd08)), closes [#7562](#7562) ### Bug Fixes * Aztec start --prover ([#7617](#7617)) ([ac206a6](ac206a6)) ### Miscellaneous * Add tx bot to terraform ([#7609](#7609)) ([6caa914](6caa914)) * Merge Devnet back to Master ([#7611](#7611)) ([112961c](112961c)) </details> <details><summary>barretenberg.js: 0.47.1</summary> ## [0.47.1](barretenberg.js-v0.47.0...barretenberg.js-v0.47.1) (2024-07-30) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.47.1</summary> ## [0.47.1](aztec-packages-v0.47.0...aztec-packages-v0.47.1) (2024-07-30) ### Features * Add recursive aggregation object to proving/verification keys ([#6770](#6770)) ([f48b069](f48b069)) * Adding aggregation to honk and rollup ([#7466](#7466)) ([2633aa9](2633aa9)) * Allow get_notes to return zero notes ([#7621](#7621)) ([e16452a](e16452a)) * **avm:** Pedersen commit in avm ([#7634](#7634)) ([45e7867](45e7867)) * **avm:** Pedersen commitment sim ([#7632](#7632)) ([cc420a0](cc420a0)) * Do not evict tx objects from p2p tx pool immediately ([#7652](#7652)) ([96492dc](96492dc)) * Handle L1toL2 msgs in prover-node ([#7654](#7654)) ([f35bac5](f35bac5)) * Leonidas ([#7597](#7597)) ([eda498a](eda498a)) * Min and max block times for sequencer ([#7630](#7630)) ([2a013b8](2a013b8)) * **sol-honk:** Integrate solidity honk verifier with bb and acir tests ([#7573](#7573)) ([344ca6f](344ca6f)) * **sol-honk:** Test verifying recursive proof ([#7576](#7576)) ([26408c1](26408c1)) * Static.aztec.network ([#7649](#7649)) ([9dffef5](9dffef5)) * Transaction sender bot ([#7586](#7586)) ([176fd08](176fd08)), closes [#7562](#7562) ### Bug Fixes * Aztec start --prover ([#7617](#7617)) ([ac206a6](ac206a6)) * Bb mac build ([#7619](#7619)) ([e3c5602](e3c5602)) * Faucet correctly derives its account ([#7645](#7645)) ([921773f](921773f)) * Uniswap e2e test "nonce too low" ([#7633](#7633)) ([e9e2318](e9e2318)) ### Miscellaneous * Add tx bot to terraform ([#7609](#7609)) ([6caa914](6caa914)) * **bb readme:** Add installation instructions and TODOs ([#7601](#7601)) ([1a97698](1a97698)) * **bb readme:** Update versioning instructions and add Honk Solidity verifier commands ([#7608](#7608)) ([9dd9195](9dd9195)) * Bench client ivc proof verification ([#7553](#7553)) ([b060309](b060309)) * Call requests ([#7483](#7483)) ([ffedf39](ffedf39)) * Constant inputs for most blackboxes ([#7613](#7613)) ([3247058](3247058)) * **docs:** Fix links ([#7602](#7602)) ([f2029be](f2029be)) * Merge Devnet back to Master ([#7611](#7611)) ([112961c](112961c)) * **p2p:** Tx serialization cleanup ([#7620](#7620)) ([022a899](022a899)) * Replace relative paths to noir-protocol-circuits ([ebaafc7](ebaafc7)) * Replace relative paths to noir-protocol-circuits ([d3b818d](d3b818d)) * Replace relative paths to noir-protocol-circuits ([4a26a19](4a26a19)) </details> <details><summary>barretenberg: 0.47.1</summary> ## [0.47.1](barretenberg-v0.47.0...barretenberg-v0.47.1) (2024-07-30) ### Features * Add recursive aggregation object to proving/verification keys ([#6770](#6770)) ([f48b069](f48b069)) * Adding aggregation to honk and rollup ([#7466](#7466)) ([2633aa9](2633aa9)) * **avm:** Pedersen commit in avm ([#7634](#7634)) ([45e7867](45e7867)) * **avm:** Pedersen commitment sim ([#7632](#7632)) ([cc420a0](cc420a0)) * **sol-honk:** Integrate solidity honk verifier with bb and acir tests ([#7573](#7573)) ([344ca6f](344ca6f)) * **sol-honk:** Test verifying recursive proof ([#7576](#7576)) ([26408c1](26408c1)) ### Bug Fixes * Bb mac build ([#7619](#7619)) ([e3c5602](e3c5602)) ### Miscellaneous * **bb readme:** Add installation instructions and TODOs ([#7601](#7601)) ([1a97698](1a97698)) * **bb readme:** Update versioning instructions and add Honk Solidity verifier commands ([#7608](#7608)) ([9dd9195](9dd9195)) * Call requests ([#7483](#7483)) ([ffedf39](ffedf39)) * Constant inputs for most blackboxes ([#7613](#7613)) ([3247058](3247058)) * Merge Devnet back to Master ([#7611](#7611)) ([112961c](112961c)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.47.1</summary> ## [0.47.1](AztecProtocol/aztec-packages@aztec-package-v0.47.0...aztec-package-v0.47.1) (2024-07-30) ### Features * Do not evict tx objects from p2p tx pool immediately ([#7652](AztecProtocol/aztec-packages#7652)) ([96492dc](AztecProtocol/aztec-packages@96492dc)) * Min and max block times for sequencer ([#7630](AztecProtocol/aztec-packages#7630)) ([2a013b8](AztecProtocol/aztec-packages@2a013b8)) * Transaction sender bot ([#7586](AztecProtocol/aztec-packages#7586)) ([176fd08](AztecProtocol/aztec-packages@176fd08)), closes [#7562](AztecProtocol/aztec-packages#7562) ### Bug Fixes * Aztec start --prover ([#7617](AztecProtocol/aztec-packages#7617)) ([ac206a6](AztecProtocol/aztec-packages@ac206a6)) ### Miscellaneous * Add tx bot to terraform ([#7609](AztecProtocol/aztec-packages#7609)) ([6caa914](AztecProtocol/aztec-packages@6caa914)) * Merge Devnet back to Master ([#7611](AztecProtocol/aztec-packages#7611)) ([112961c](AztecProtocol/aztec-packages@112961c)) </details> <details><summary>barretenberg.js: 0.47.1</summary> ## [0.47.1](AztecProtocol/aztec-packages@barretenberg.js-v0.47.0...barretenberg.js-v0.47.1) (2024-07-30) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.47.1</summary> ## [0.47.1](AztecProtocol/aztec-packages@aztec-packages-v0.47.0...aztec-packages-v0.47.1) (2024-07-30) ### Features * Add recursive aggregation object to proving/verification keys ([#6770](AztecProtocol/aztec-packages#6770)) ([f48b069](AztecProtocol/aztec-packages@f48b069)) * Adding aggregation to honk and rollup ([#7466](AztecProtocol/aztec-packages#7466)) ([2633aa9](AztecProtocol/aztec-packages@2633aa9)) * Allow get_notes to return zero notes ([#7621](AztecProtocol/aztec-packages#7621)) ([e16452a](AztecProtocol/aztec-packages@e16452a)) * **avm:** Pedersen commit in avm ([#7634](AztecProtocol/aztec-packages#7634)) ([45e7867](AztecProtocol/aztec-packages@45e7867)) * **avm:** Pedersen commitment sim ([#7632](AztecProtocol/aztec-packages#7632)) ([cc420a0](AztecProtocol/aztec-packages@cc420a0)) * Do not evict tx objects from p2p tx pool immediately ([#7652](AztecProtocol/aztec-packages#7652)) ([96492dc](AztecProtocol/aztec-packages@96492dc)) * Handle L1toL2 msgs in prover-node ([#7654](AztecProtocol/aztec-packages#7654)) ([f35bac5](AztecProtocol/aztec-packages@f35bac5)) * Leonidas ([#7597](AztecProtocol/aztec-packages#7597)) ([eda498a](AztecProtocol/aztec-packages@eda498a)) * Min and max block times for sequencer ([#7630](AztecProtocol/aztec-packages#7630)) ([2a013b8](AztecProtocol/aztec-packages@2a013b8)) * **sol-honk:** Integrate solidity honk verifier with bb and acir tests ([#7573](AztecProtocol/aztec-packages#7573)) ([344ca6f](AztecProtocol/aztec-packages@344ca6f)) * **sol-honk:** Test verifying recursive proof ([#7576](AztecProtocol/aztec-packages#7576)) ([26408c1](AztecProtocol/aztec-packages@26408c1)) * Static.aztec.network ([#7649](AztecProtocol/aztec-packages#7649)) ([9dffef5](AztecProtocol/aztec-packages@9dffef5)) * Transaction sender bot ([#7586](AztecProtocol/aztec-packages#7586)) ([176fd08](AztecProtocol/aztec-packages@176fd08)), closes [#7562](AztecProtocol/aztec-packages#7562) ### Bug Fixes * Aztec start --prover ([#7617](AztecProtocol/aztec-packages#7617)) ([ac206a6](AztecProtocol/aztec-packages@ac206a6)) * Bb mac build ([#7619](AztecProtocol/aztec-packages#7619)) ([e3c5602](AztecProtocol/aztec-packages@e3c5602)) * Faucet correctly derives its account ([#7645](AztecProtocol/aztec-packages#7645)) ([921773f](AztecProtocol/aztec-packages@921773f)) * Uniswap e2e test "nonce too low" ([#7633](AztecProtocol/aztec-packages#7633)) ([e9e2318](AztecProtocol/aztec-packages@e9e2318)) ### Miscellaneous * Add tx bot to terraform ([#7609](AztecProtocol/aztec-packages#7609)) ([6caa914](AztecProtocol/aztec-packages@6caa914)) * **bb readme:** Add installation instructions and TODOs ([#7601](AztecProtocol/aztec-packages#7601)) ([1a97698](AztecProtocol/aztec-packages@1a97698)) * **bb readme:** Update versioning instructions and add Honk Solidity verifier commands ([#7608](AztecProtocol/aztec-packages#7608)) ([9dd9195](AztecProtocol/aztec-packages@9dd9195)) * Bench client ivc proof verification ([#7553](AztecProtocol/aztec-packages#7553)) ([b060309](AztecProtocol/aztec-packages@b060309)) * Call requests ([#7483](AztecProtocol/aztec-packages#7483)) ([ffedf39](AztecProtocol/aztec-packages@ffedf39)) * Constant inputs for most blackboxes ([#7613](AztecProtocol/aztec-packages#7613)) ([3247058](AztecProtocol/aztec-packages@3247058)) * **docs:** Fix links ([#7602](AztecProtocol/aztec-packages#7602)) ([f2029be](AztecProtocol/aztec-packages@f2029be)) * Merge Devnet back to Master ([#7611](AztecProtocol/aztec-packages#7611)) ([112961c](AztecProtocol/aztec-packages@112961c)) * **p2p:** Tx serialization cleanup ([#7620](AztecProtocol/aztec-packages#7620)) ([022a899](AztecProtocol/aztec-packages@022a899)) * Replace relative paths to noir-protocol-circuits ([ebaafc7](AztecProtocol/aztec-packages@ebaafc7)) * Replace relative paths to noir-protocol-circuits ([d3b818d](AztecProtocol/aztec-packages@d3b818d)) * Replace relative paths to noir-protocol-circuits ([4a26a19](AztecProtocol/aztec-packages@4a26a19)) </details> <details><summary>barretenberg: 0.47.1</summary> ## [0.47.1](AztecProtocol/aztec-packages@barretenberg-v0.47.0...barretenberg-v0.47.1) (2024-07-30) ### Features * Add recursive aggregation object to proving/verification keys ([#6770](AztecProtocol/aztec-packages#6770)) ([f48b069](AztecProtocol/aztec-packages@f48b069)) * Adding aggregation to honk and rollup ([#7466](AztecProtocol/aztec-packages#7466)) ([2633aa9](AztecProtocol/aztec-packages@2633aa9)) * **avm:** Pedersen commit in avm ([#7634](AztecProtocol/aztec-packages#7634)) ([45e7867](AztecProtocol/aztec-packages@45e7867)) * **avm:** Pedersen commitment sim ([#7632](AztecProtocol/aztec-packages#7632)) ([cc420a0](AztecProtocol/aztec-packages@cc420a0)) * **sol-honk:** Integrate solidity honk verifier with bb and acir tests ([#7573](AztecProtocol/aztec-packages#7573)) ([344ca6f](AztecProtocol/aztec-packages@344ca6f)) * **sol-honk:** Test verifying recursive proof ([#7576](AztecProtocol/aztec-packages#7576)) ([26408c1](AztecProtocol/aztec-packages@26408c1)) ### Bug Fixes * Bb mac build ([#7619](AztecProtocol/aztec-packages#7619)) ([e3c5602](AztecProtocol/aztec-packages@e3c5602)) ### Miscellaneous * **bb readme:** Add installation instructions and TODOs ([#7601](AztecProtocol/aztec-packages#7601)) ([1a97698](AztecProtocol/aztec-packages@1a97698)) * **bb readme:** Update versioning instructions and add Honk Solidity verifier commands ([#7608](AztecProtocol/aztec-packages#7608)) ([9dd9195](AztecProtocol/aztec-packages@9dd9195)) * Call requests ([#7483](AztecProtocol/aztec-packages#7483)) ([ffedf39](AztecProtocol/aztec-packages@ffedf39)) * Constant inputs for most blackboxes ([#7613](AztecProtocol/aztec-packages#7613)) ([3247058](AztecProtocol/aztec-packages@3247058)) * Merge Devnet back to Master ([#7611](AztecProtocol/aztec-packages#7611)) ([112961c](AztecProtocol/aztec-packages@112961c)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
# Check out Noir during build Changes the way we sync the code from Noir away from having a periodically synced copy of the codebase, to checking out the code during the build based on a tag/branch/commit indicated by a file or env var. The following new files were added: * `noir/noir-repo-ref` contains the reference in Noir that should be checked out * [noir/scripts/sync.sh](https://github.com/AztecProtocol/aztec-packages/blob/noir-sync-rework/noir/scripts/sync.sh) performs the checkouts; the `init` command does the initial checkout and the `update` command switches to new branches * `noir/bootstrap.sh` performs an `init` and `update` before every command except `clean` TODO: - [x] Sync during the build - [x] Detect the need to switch branches - [x] Create a patch file from local commits - [x] Apply the patch file during checkouts - [x] Fix patch creation to only include non-empty commits because `git am` stops at them, and with `git am --allow-empty` it just fails - [x] Add to the git hooks something to prevent the user from switching branches without creating and committing a patch file, if there are commits in `noir-repo`. (Currently an error is returned by `sync.sh` but if we created a patch file, it should be committed on the aztec-packages branch we switched away from).\ - [x] Update the daily workflow to update `noir-repo-ref` to the next release. - [x] Test the `pull-noir` workflow: * Action that create the PR: https://github.com/AztecProtocol/aztec-packages/actions/runs/13768222542 * PR that bumps the ref: #12608 ## Rationale Currently there is a two-way sync between Noir and aztec-packages, with automated workflows running daily to push changes between the `master` branches by opening (or appending to already open) sync PRs. The two-way sync was required because for example frequent changes in the `bb` interface were easier to update in this repo and pushed back to Noir, than to have to wait for a release cycle. The problem we frequently encounter with the sync from Noir is that some of the integration tests in aztec-packages break due to subtle changes in the compiler, which we don't know about until we open the sync PR. At that point we're looking at a potentially long list of changes (every commit on `master` since the last sync), and it's not clear which one is the culprit. We bisect the build to find a failure, fix it in the PR, but this often just reveals the next bug to be fixed. This process can take days, and during that time the sync process has to be paused - if it runs it just makes the PR bigger, with potentially more bugs. Regardless of whether we pause it or let it append to the PR, no new features or fixes get merged into aztec-packages until all the bugs are squashed. Instead what we wish to achieve here is that we can: 1. Point aztec-packages at an integration/release branch, or nightly tags to be synced from, and if there is a problem then we can cherry pick changes from `master` onto the release branch so that the good stuff can go in. 2. Initiate CI runs against arbitrary branches on Noir, so that we can test smaller change sets before they are synced to aztec-packages, to see their effect in isolation. ## Example The following example shows: 1. Initialising `noir-repo` to a tag 2. Creating a file and commit 3. Trying to switch branch is rejected because the commit is not in the patch 4. Creating a patch 5. Switching to a branch 6. Creating another commit and adding it to the patch 7. Switching to a commit 8. See both commits are re-applied ```console % rm -rf noir-repo % cat noir-repo-ref nightly-2025-03-07 % scripts/sync.sh init Cloning into 'noir-repo'... ... Note: switching to '37be49fd081f33dc7256d23cee8ccc0719c50a82'. ... HEAD is now at 37be49fd08 chore!: convert `TraitMethodNotInScope` to error (#7427) ➤ YN0000: ┌ Resolution step ➤ YN0002: │ @algolia/autocomplete-core@npm:1.9.3 doesn't provide @algolia/client-search (pbc410), requested by @algolia/autocomplete-shared ... ➤ YN0000: Done with warnings in 20s 227ms [detached HEAD 6cee7cd4d6] Noir local fixup commit. 4 files changed, 8 insertions(+), 9 deletions(-) [detached HEAD 94cffa4cb1] Noir local patch commit. % ./scripts/sync.sh info Fixup commit: 30d08b921c71edb1c75491e459df6d54917c5e51 Checkout commit: 37be49fd081f33dc7256d23cee8ccc0719c50a82 Wanted: nightly-2025-03-07 Needs switch: no Needs patch: no Detached: yes On branch: no Branch name: n/a Has wanted tag: yes Has tag commit: yes Has patch commit: yes Last commit is patch: yes Has fixup and patch: yes % cd noir-repo % git status Not currently on any branch. nothing to commit, working tree clean % echo "Hello" > hello.txt && git add . && git commit -m "Hello" [detached HEAD 6053b5e04c] Hello 1 file changed, 1 insertion(+) create mode 100644 hello.txt % cd .. % NOIR_REPO_REF=master scripts/sync.sh update noir-repo is on a detached HEAD and the last commit is not the patch marker commit; switching from nightly-2025-03-07 to master could meand losing those commits. Please use the 'make-patch' command to create a noir-repo.patch file and commit it in aztec-packages, so that it is applied after each checkout; make sure to commit the patch on the branch where it should be. % scripts/sync.sh make-patch ../patches/0001-Noir-local-patch-commit.patch ../patches/0002-Hello.patch [detached HEAD 28f53e097b] Noir local patch commit. % NOIR_REPO_REF=master scripts/sync.sh update ... From https://github.com/noir-lang/noir * branch master -> FETCH_HEAD Warning: you are leaving 4 commits behind, not connected to any of your branches: 28f53e097b Noir local patch commit. 6053b5e04c Hello 94cffa4cb1 Noir local patch commit. 6cee7cd4d6 Noir local fixup commit. If you want to keep them by creating a new branch, this may be a good time to do so with: git branch <new-branch-name> 28f53e097b branch 'master' set up to track 'origin/master'. Switched to a new branch 'master' Already up to date. ➤ YN0000: ┌ Resolution step ➤ YN0002: │ @algolia/autocomplete-core@npm:1.9.3 doesn't provide @algolia/client-search (pbc410), requested by @algolia/autocomplete-shared ... ➤ YN0000: Done with warnings in 2s 686ms [master 7cee0c05bb] Noir local fixup commit. 4 files changed, 8 insertions(+), 9 deletions(-) Applying: Hello [master ad6812fae7] Noir local patch commit. % cd noir-repo % echo "World" > world.txt && git add . && git commit -m "World" [master 16f0054dc9] World 1 file changed, 1 insertion(+) create mode 100644 world.txt % cd .. % cat .noir-repo-last-ref master % scripts/sync.sh make-patch ../patches/0001-Hello.patch ../patches/0002-Noir-local-patch-commit.patch ../patches/0003-World.patch [master 2cc18fd434] Noir local patch commit. % cat noir-repo.patch From 6a8c19cd6fd70e4b982ec8ca10b4b70363636f97 Mon Sep 17 00:00:00 2001 From: aakoshh <akosh@aztecprotocol.com> Date: Fri, 7 Mar 2025 23:46:36 +0000 Subject: [PATCH 1/3] Hello --- hello.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 hello.txt diff --git a/hello.txt b/hello.txt new file mode 100644 index 0000000000..e965047ad7 --- /dev/null +++ b/hello.txt @@ -0,0 +1 @@ +Hello -- 9.43.0 From 16f0054dc961105cdb264d6ace10ff9061b7b96d Mon Sep 17 00:00:00 2001 From: aakoshh <akosh@aztecprotocol.com> Date: Fri, 7 Mar 2025 23:49:19 +0000 Subject: [PATCH 3/3] World --- world.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 world.txt diff --git a/world.txt b/world.txt new file mode 100644 index 0000000000..216e97ce08 --- /dev/null +++ b/world.txt @@ -0,0 +1 @@ +World -- 2.43.0 % export NOIR_REPO_REF=a9de769f3743733ac754a5d6c4e147ba8283a336 % scripts/sync.sh update ... From https://github.com/noir-lang/noir * branch a9de769f3743733ac754a5d6c4e147ba8283a336 -> FETCH_HEAD Note: switching to 'a9de769f3743733ac754a5d6c4e147ba8283a336'. ... HEAD is now at a9de769f37 feat: add optional oracle resolver url in `acvm_cli` (#7630) ➤ YN0000: ┌ Resolution step ... ➤ YN0000: └ Completed in 1s 219ms ➤ YN0000: Done with warnings in 2s 643ms [detached HEAD 53cbe7bae4] Noir local fixup commit. 4 files changed, 8 insertions(+), 9 deletions(-) Applying: Hello Applying: World [detached HEAD c4921bc4a8] Noir local patch commit. % ls noir-repo/*.txt 16s noir-repo/hello.txt noir-repo/world.txt % ``` --------- Co-authored-by: ludamad <adam.domurad@gmail.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Adds two new config variables for the sequencer: min and max block time in seconds. The sequencer now checks the current time against the previous block. If it's less than min, it doesn't build a block. If it's more than max, it builds the block even with no txs.