Skip to content

chore: merge v4 into backport-to-v4-next-staging#23140

Merged
alexghr merged 10 commits into
backport-to-v4-next-stagingfrom
v4
May 11, 2026
Merged

chore: merge v4 into backport-to-v4-next-staging#23140
alexghr merged 10 commits into
backport-to-v4-next-stagingfrom
v4

Conversation

@alexghr

@alexghr alexghr commented May 11, 2026

Copy link
Copy Markdown
Contributor

.

spalladino and others added 9 commits May 6, 2026 14:15
…oposal check (#22989)

`hasPayloadBeenProposed` (now `hasActiveProposalWithPayload`) used
`eth_getLogs` over the rollup's full L1 deployment range to find prior
`PayloadSubmitted` events. On long-lived rollups that range exceeds
typical RPC provider block-range caps and the call times out, silently
breaking the sequencer's "stop signaling for an already-proposed
payload" logic. The previous in-memory cache also permanently
blacklisted any payload it saw as proposed once, which is wrong: each
round on `EmpireBase` is independent and the same payload can
legitimately be re-signaled and re-submitted after a prior proposal
becomes Dropped/Rejected/Expired/Executed.

Replace the log scan with a bounded view-call sweep over
`Governance.proposals`. The sweep walks newest -> oldest using
`proposalCount`, unwraps each proposal's `GSEPayload` via
`getOriginalPayload()`, and treats only
`Pending`/`Active`/`Queued`/`Executable` as "in an active proposal" --
terminal states allow re-signaling. The descent has a hard early-stop on
the protocol-wide proposal lifetime cap (`4 *
ConfigurationLib.TIME_UPPER = 360 days`), which is safe regardless of
per-proposal frozen configs because every config field is bounded by
`TIME_UPPER` on-chain. Two in-memory caches absorb the per-call cost
over time: terminal proposals (provably immutable on-chain) and wrapper
-> original payload unwraps (immutable bytecode).

- **ethereum/contracts/governance**: New
`hasActiveProposalWithPayload(payload)` and `getProposalCount()` on
`ReadOnlyGovernanceContract`. Inlines a minimal `IProposerPayload` ABI
(just `getOriginalPayload`) to avoid generating a full artifact. Handles
`proposeWithLock`-style proposals (no GSEPayload wrapper) by catching
the unwrap revert and skipping.
- **ethereum/contracts/governance (types)**: Adds explicit types
(`Proposal`, `ProposalConfiguration`, `GovernanceConfiguration`,
`ProposeWithLockConfiguration`, `Ballot`) and maps the viem return
shapes of `getProposal` / `getConfiguration` onto them. `Proposal` now
carries both `cachedState` (raw stored) and `state` (live, time-derived
from `getProposalState`); `getProposal` issues both reads in parallel so
callers don't need a separate state RPC.
- **ethereum/contracts/governance (caching)**: Adds two memoization
layers on `ReadOnlyGovernanceContract`. Proposals are cached when
`state` is in any of the four terminal phases
(Executed/Rejected/Dropped/Expired) -- once terminal the entire struct
is provably immutable on-chain. Wrapper unwraps are keyed by wrapper
address and cached forever (deployed bytecode is immutable).
`GovernanceProposerContract` already memoizes its `getGovernance()`, so
the same `ReadOnlyGovernanceContract` instance (and its caches) is
reused across slots in the sequencer publisher.
- **ethereum/contracts/governance_proposer**: Drops the event-based
`hasPayloadBeenProposed`. Adds a memoized `getGovernance()` accessor and
a thin `hasActiveProposalWithPayload` delegate that resolves the
Governance address via the on-chain registry lookup.
- **ethereum/contracts/empire_base**: Removes `hasPayloadBeenProposed`
from `IEmpireBase` -- it's a Governance concern, not a generic empire
concern (slasher doesn't need it).
- **sequencer-client/publisher**: Removes the permanent
`payloadProposedCache` so the publisher re-checks every slot, allowing
re-signaling once a prior proposal is terminal. Switches the failure
mode from fail-closed to fail-open (a flaky L1 endpoint should not
silence governance participation; a duplicate signal is harmless).
Narrows the helper's `base` param from `IEmpireBase` to
`GovernanceProposerContract` since this code path is governance-only.
- **ethereum/contracts (tests)**: New `hasActiveProposalWithPayload`
describe block hitting a real anvil-deployed Governance. Impersonates
the `governanceProposer`, calls `Governance.propose` directly, and
etches hand-rolled mock wrapper bytecode at chosen addresses to drive
(wrapper, original) pairs. Covers: empty governance, live match, no
match, terminal state via warp, reverting wrapper
(proposeWithLock-style), descent past unrelated proposals,
case-insensitive match, and the 360-day hard cutoff via warp. Also adds
a sync-guard describe block that probes `Governance.updateConfiguration`
via impersonated `eth_call` to assert each of
`votingDelay`/`votingDuration`/`executionDelay`/`gracePeriod` accepts
`TIME_UPPER` and rejects `TIME_UPPER + 1` -- if those caps change
on-chain, this trips and `MAX_PROPOSAL_LIFETIME_SECONDS` must be
revisited.
- **sequencer-client/publisher (tests)**: Replaces the cache test with a
"re-checks each call so re-signaling resumes after terminal" test.
Updates the RPC-failure semantics test from fail-closed to fail-open.
…21779)

Moves the "CI3 failed on backport PR" Slack notification from
`#team-alpha` to `#backports`, which is where all other backport-related
notifications already go.

- Updated `.github/workflows/ci3.yml`: changed the Slack channel for
backport CI failure notifications from `#team-alpha` to `#backports`

ClaudeBox log: https://claudebox.work/s/d16f655779423037?run=1
Use same structure as the handles missed message inserted by an L1 reorg
test to wait for checkpoint when sending L2 txs to help trigger mbps.

Co-authored-by: danielntmd <danielntmd@nethermind.io>
(cherry picked from commit 3c007ed)
BEGIN_COMMIT_OVERRIDE
chore: route backport CI failure notifications to #backports channel
(#21779)
END_COMMIT_OVERRIDE
`verifyAvmProof`(from `execute.ts`) was using the shared
`this.config.bbWorkingDirectory`path to write the `avm_inputs.bin` file.
Under concurrent operations, the files could get overwritten and
verification would fail.

This PR plumbs the temporary path so that it gets used.
@alexghr alexghr requested a review from charlielye as a code owner May 11, 2026 10:58
@alexghr alexghr merged commit c5a33a0 into backport-to-v4-next-staging May 11, 2026
15 of 18 checks passed
benesjan added a commit that referenced this pull request May 12, 2026
BEGIN_COMMIT_OVERRIDE
fix(sequencer): bounded sweep instead of event scan for governance
proposal check (#22989)
fix(sequencer): bounded sweep instead of event scan for governance
proposal check (#22989) (#23001)
chore: route backport CI failure notifications to #backports channel
(#21779)
fix: (A-589) epochs l1 reorgs test (#20999)
chore: Accumulated backports to v4 (#23065)
fix(bb-prover): use temp directory for avm_verify (#23138)
chore: notify on v4-next sync (#23139)
refactor(pxe): use findLeavesIndexes for read request verification
(#23123)
refactor(pxe): skip storage reads for never-updated contracts (#23131)
fix(pxe): skip registerContractFunctionSignatures when no public fns
(#23134)
chore: Update Noir to nightly-2026-04-15 (#22572)
chore: Update Noir to nightly-2026-04-16 (#22594)
chore: Update Noir to nightly-2026-04-17 (#22633)
chore: Update Noir to nightly-2026-04-23 (#22653)
chore: Update Noir to nightly-2026-04-28 (#22755)
chore: Update Noir to nightly-2026-05-01 (#22836)
chore: Update Noir to nightly-2026-05-05 (#22911)
chore: Update Noir to nightly-2026-05-11 (#23023)
chore: backport noir sync PRs to backport-to-v4-next-staging (#23148)
refactor(pxe): prefetch updated class id hints per unique contract
(#23130)
chore(aztec-nr): Public self constructor function to prevent static byte
code size blow up (#23062)
chore: merge v4 into backport-to-v4-next-staging (#23140)
chore(aztec-nr): Public self constructor function (backport #23062)
(#23156)
refactor(pxe): avoid expensive toTx() call when computing tx hash
(#23136)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants