Skip to content

[pull] main from agglayer:main#127

Merged
pull[bot] merged 3 commits into
Jokacar10:mainfrom
agglayer:main
Jun 9, 2026
Merged

[pull] main from agglayer:main#127
pull[bot] merged 3 commits into
Jokacar10:mainfrom
agglayer:main

Conversation

@pull

@pull pull Bot commented Jun 9, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Freyskeyd added 3 commits June 8, 2026 08:59
Allow config loading to handle paths like agglayer.toml without
requiring a parent directory.

This keeps local CLI and node startup paths usable when operators pass a
bare filename from the current working directory.
Reconcile FEP/aggchain-proof certificates that settled on L1 but were
stuck InError, by querying the aggchain hash at the pre-settlement L1
block instead of `latest`.

## Problem

Stateful aggchain contracts (e.g. AggchainFEP) revert getAggchainHash
with L2BlockNumberLessThanNextBlockNumber() once their nextBlockNumber
advances past a certificate's L2 range. After a certificate settles on
L1, any re-certification of it (recompute_state -> witness_generation)
called getAggchainHash at `latest` and hit this revert. An
InError-but-settled certificate could therefore never be reconciled
(admin_forceEditCertificate to Candidate kept failing), and the network
stayed stuck.

## Fix

Pin get_aggchain_hash to the L1 block immediately before the settlement
transaction, mirroring get_prev_pessimistic_root, which already reads
historical state from that same settlement tx in this exact path. At
that block nextBlockNumber has not advanced, so getAggchainHash returns
the hash and the existing integrity comparison is preserved. The query
falls back to `latest` for pending/missing/reverted receipts, leaving
the happy path and pending-settlement restarts unaffected.

This also fixes the latent case where a node restart during settlement
of a Candidate certificate (tx already mined) hit the same revert.

## Notes

- Internal `AggchainContract::get_aggchain_hash` gains an additive
  `before_tx_hash: Option<TxHash>` argument; all call sites and mocks
  are updated. No config, protocol, or operator-facing change.
- Recovery reads historical L1 state at the settlement block, which
  needs archive access. get_prev_pessimistic_root already requires this
  on the same path, so there is no new operational requirement.

## Testing

- 5 new unit tests for the block selection (block_before_inclusion).
- cargo check --workspace --tests --all-features: pass.
- cargo nextest run on affected crates: 156 passed.
- cargo clippy --tests -- -D warnings: clean.
Make proof decoding use explicit read and write acceptance policies.

This separates storage reads from new writes so historical supported
proof formats stay readable while new writes remain restricted to
writable versions.
@pull pull Bot locked and limited conversation to collaborators Jun 9, 2026
@pull pull Bot added the ⤵️ pull label Jun 9, 2026
@pull pull Bot merged commit 836826c into Jokacar10:main Jun 9, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant