Skip to content

Conversation

@spalladino
Copy link
Contributor

@spalladino spalladino commented Jul 29, 2025

If the previous pending block on L1 has invalid attestations, the proposer for the next slot invalidates it as part of its multicall.

Main changes involved:

  • Archiver's validateBlockAttestations returns an object with the validation errors that can be used for constructing the invalidate request.
  • Archiver also stores the validation result for the last block it has fetched, so sequencer can check it to know if it needs to invalidate.
  • Rollup contract wrapper can construct a state override to execute simulations as if the pending block was different, which is used to simulate that the invalid block has already been removed when constructing a block proposal.
  • Sequencer enqueues a call to invalidate that is executed as part of its multicall before the block proposal lands.

@spalladino spalladino added the ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure label Jul 29, 2025
Base automatically changed from palla/do-not-sync-invalid-blocks to next July 29, 2025 13:46
@spalladino spalladino force-pushed the palla/proposer-invalidates branch from 80a4090 to 5ecc113 Compare July 29, 2025 15:57
@PhilWindle PhilWindle added this pull request to the merge queue Jul 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 31, 2025
If the previous pending block on L1 has invalid attestations, the
proposer for the next slot invalidates it as part of its multicall.

Next step is for the prover to invalidate the last block in the epoch it
wants to prove.
@spalladino spalladino force-pushed the palla/proposer-invalidates branch from 419ed31 to 3a1d656 Compare July 31, 2025 13:11
@spalladino spalladino enabled auto-merge July 31, 2025 13:33
@spalladino spalladino added this pull request to the merge queue Jul 31, 2025
Merged via the queue into next with commit eaede92 Jul 31, 2025
4 checks passed
@spalladino spalladino deleted the palla/proposer-invalidates branch July 31, 2025 15:35
github-merge-queue bot pushed a commit that referenced this pull request Aug 1, 2025
We expect proposers to invalidate the previous block if it is invalid,
but if they fail to do so, validators will eventually do it,
prioritizing the committee members and then any validator whatsoever.

This commit includes other fixes:
- If a proposer cannot build a block due to not enough txs, it still
tries to invalidate the previous one.
- The archiver keeps track of the earliest (not latest) invalid block it
has seen, so the sequencer can use this info to invalidate the earliest
one.

Builds on top of #16067
federicobarbacovi added a commit that referenced this pull request Aug 4, 2025
commit eb94d3a
Merge: f847091 3b76348
Author: AztecBot <[email protected]>
Date:   Mon Aug 4 05:45:06 2025 +0000

    Merge branch 'next' into merge-train/barretenberg

commit 3b76348
Author: Lasse Herskind <[email protected]>
Date:   Mon Aug 4 06:03:02 2025 +0100

    chore: address comments (#16175)

    Please read [contributing guidelines](CONTRIBUTING.md) and remove this
    line.

    For audit-related pull requests, please use the [audit PR
    template](?expand=1&template=audit.md).

commit f847091
Merge: a86bcc3 b0affa7
Author: AztecBot <[email protected]>
Date:   Sun Aug 3 22:08:04 2025 +0000

    Merge branch 'next' into merge-train/barretenberg

commit b0affa7
Author: Lasse Herskind <[email protected]>
Date:   Sun Aug 3 22:26:43 2025 +0100

    chore: updated fmt settings foundry.toml (#16155)

    Updated the `foundry.toml` to also wrap the comments and use the default
    line_length of 120 instead of the previous 100. Threw some thousands
    separators in there as well for constant values.

    ```toml
    [fmt]
    line_length = 120
    tab_width = 2
    variable_override_spacing=false
    wrap_comments = true
    number_underscore = "thousands"
    override_spacing = false
    ```

commit a86bcc3
Merge: c7a5799 3ded0f6
Author: AztecBot <[email protected]>
Date:   Sun Aug 3 20:41:47 2025 +0000

    Merge branch 'next' into merge-train/barretenberg

commit c7a5799
Merge: fd73d0e 935a8fa
Author: AztecBot <[email protected]>
Date:   Sun Aug 3 20:11:19 2025 +0000

    Merge branch 'next' into merge-train/barretenberg

commit 3ded0f6
Author: Jan Beneš <[email protected]>
Date:   Sun Aug 3 21:56:09 2025 +0200

    chore: minor fixes and docs improvements in governance (#16039)

    When doing my internal review of governance contracts I stumbled upon
    plenty of small and uncontroversial issues with which it didn't really
    make sense to clutter my review document.

    ---------

    Co-authored-by: LHerskind <[email protected]>

commit fd73d0e
Merge: e2b45d5 99e70e6
Author: AztecBot <[email protected]>
Date:   Sun Aug 3 19:29:46 2025 +0000

    Merge branch 'next' into merge-train/barretenberg

commit 935a8fa
Author: Maddiaa <[email protected]>
Date:   Sun Aug 3 20:16:22 2025 +0100

    feat(sol): vk hashing (#16015)

    Perform vk hashing in the solidity verifier

    Takes a different approach to the traditional verifiers.
    As the vk is fixed ahead of time, we hash it and include it in the
    precompiled contract, therefore it is preprocessed
    and does not need to be recomputed by the verifier.

commit 99e70e6
Author: Lasse Herskind <[email protected]>
Date:   Sun Aug 3 19:46:27 2025 +0100

    chore!: depositAmount and minimumStake naming (#16148)

    Addressing feedback from @benesjan. Also using his prompt idea to see
    how well it works.

    ---

    This PR refactors validator staking terminology throughout the Aztec
    codebase to improve clarity and better reflect the purpose of key
    staking parameters. The main changes involve renaming `depositAmount` to
    `activationThreshold` and `minimumStake` to `ejectionThreshold`, along
    with related library and method renames.
    - **`depositAmount` → `activationThreshold`**: The amount of tokens
    required to activate a validator and join the validator set
    - **`minimumStake` → `ejectionThreshold`**: The minimum token balance
    below which a validator is ejected from the active set
    - **Solidity Contracts**: Updated all references in `Rollup.sol`,
    `IStaking.sol`, `GSE.sol`, and related contracts
    - **Libraries**:
    - `UserLib` → `CheckpointedUintLib` (more descriptive name for
    checkpoint management)
      - `DelegationLib` → `StakeDelegationLib` (clearer purpose indication)
    - **Methods**: `finaliseHelper()` → `finaliseWithdraw()` in GSE contract
    for better clarity
    - Updated environment variables:
      - `AZTEC_DEPOSIT_AMOUNT` → `AZTEC_ACTIVATION_THRESHOLD`
      - `AZTEC_MINIMUM_STAKE` → `AZTEC_EJECTION_THRESHOLD`
    - Updated all configuration files, test constants, and deployment
    scripts
    - Updated CLI reference documentation to reflect new parameter names
    - Updated all code comments to use the new terminology

    1. **Improved Clarity**: The new names clearly indicate the purpose of
    each parameter - one for entering the validator set, one for being
    removed from it
    2. **Better Developer Experience**: Developers can immediately
    understand what these thresholds represent without needing additional
    context
    3. **Consistency**: Uniform terminology across the entire codebase
    reduces confusion
    4. **Future-Proof**: The new names are more generic and adaptable to
    potential future staking mechanism changes

    ⚠️ **This is a breaking change** that affects:

    1. **Environment Variables**: Any deployment or configuration using the
    old environment variable names (`AZTEC_DEPOSIT_AMOUNT`,
    `AZTEC_MINIMUM_STAKE`) must be updated
    2. **Contract Interfaces**: External systems calling
    `getDepositAmount()`, `getMinimumStake()`, or `finaliseHelper()` must
    update to use the new method names
    3. **Configuration Files**: Any JSON/YAML configuration files using the
    old parameter names need updates
    4. **Deployment Scripts**: Custom deployment scripts referencing the old
    names will need modification
    - Replace `depositAmount` with `activationThreshold` in all
    configurations
    - Replace `minimumStake` with `ejectionThreshold` in all configurations
    - Update contract calls:
      - `getDepositAmount()` → `getActivationThreshold()`
      - `getMinimumStake()` → `getEjectionThreshold()`
      - `finaliseHelper()` → `finaliseWithdraw()`

commit e2b45d5
Author: AztecBot <[email protected]>
Date:   Fri Aug 1 20:40:41 2025 +0000

    [empty] Start merge-train. Choo choo.

commit 5d75421
Author: Aztec Bot <[email protected]>
Date:   Fri Aug 1 21:02:38 2025 +0100

    feat: merge-train/barretenberg (#16170)

    See
    [merge-train-readme.md](https://github.com/AztecProtocol/aztec-packages/blob/next/.github/workflows/merge-train-readme.md).

    BEGIN_COMMIT_OVERRIDE
    chore:  civc tests refactor (#16159)
    END_COMMIT_OVERRIDE

    ---------

    Co-authored-by: AztecBot <[email protected]>
    Co-authored-by: maramihali <[email protected]>

commit 9ab0377
Author: Maddiaa <[email protected]>
Date:   Fri Aug 1 16:19:44 2025 +0100

    chore(sol): remove unused param in relations.sol (#16166)

    Fixes a compiler warning

commit 0ab7472
Author: Aztec Bot <[email protected]>
Date:   Fri Aug 1 16:02:34 2025 +0100

    feat: merge-train/barretenberg (#16153)

    See
    [merge-train-readme.md](https://github.com/AztecProtocol/aztec-packages/blob/next/.github/workflows/merge-train-readme.md).

    BEGIN_COMMIT_OVERRIDE
    chore: add a `PG_TAIL` proof type and queue type (#16156)
    END_COMMIT_OVERRIDE

    ---------

    Co-authored-by: AztecBot <[email protected]>
    Co-authored-by: Khashayar Barooti <[email protected]>
    Co-authored-by: Suyash Bagad <[email protected]>
    Co-authored-by: federicobarbacovi <[email protected]>
    Co-authored-by: maramihali <[email protected]>
    Co-authored-by: Jonathan Hao <[email protected]>

commit eccd655
Author: ludamad <[email protected]>
Date:   Fri Aug 1 10:18:11 2025 -0400

    chore(release): aztec-nr releases like l1-contracts (#16123)

    Just overwrite the git contents and tag it / push to branch. Doesn't
    attempt to keep history

commit 82bb4d8
Author: Santiago Palladino <[email protected]>
Date:   Fri Aug 1 11:17:11 2025 -0300

    feat: Validators invalidate invalid blocks (#16120)

    We expect proposers to invalidate the previous block if it is invalid,
    but if they fail to do so, validators will eventually do it,
    prioritizing the committee members and then any validator whatsoever.

    This commit includes other fixes:
    - If a proposer cannot build a block due to not enough txs, it still
    tries to invalidate the previous one.
    - The archiver keeps track of the earliest (not latest) invalid block it
    has seen, so the sequencer can use this info to invalidate the earliest
    one.

    Builds on top of #16067

commit b18c823
Author: josh crites <[email protected]>
Date:   Fri Aug 1 09:49:18 2025 -0400

    chore(docs): Update testnet info (#16163)

    Updates the testnet contract and version info in docs/docs, to be
    backported to master so that this info is correct when new releases are
    cut.

    Also sets the default testnet version to be published to be 1.2.0

commit e8bfa98
Author: Álvaro Rodríguez <[email protected]>
Date:   Fri Aug 1 14:14:17 2025 +0200

    feat(avm)!: Tree opcodes fail in static context (#16158)

    Small PR to make emit notehash, emit nullifier and sstore fail on static
    contexts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants