Skip to content

AggLayer: Re-orient CLAIM notes to flow through the bridge account #2506

@mmagician

Description

@mmagician

Context

Currently, CLAIM notes during bridge-in are sent directly to the faucet:

  • Bridge in: CLAIM → faucet → P2ID
  • Bridge out: B2AGG → bridge → BURN → faucet

This asymmetry means the bridge has no visibility into incoming bridged assets, which blocks several downstream requirements.

Proposed Flow

Re-orient CLAIM notes to pass through the bridge first:

  • Bridge in: CLAIM → bridge (checks GER, updates local balance) → MINT → faucet → P2ID
  • Bridge out: unchanged

This makes the bridge the single coordination point for all bridging state changes, mirroring the original design by @partylikeits1983.

Why This Is a Prerequisite

This re-orientation unblocks two open issues:

  • AggLayer: track claims via nullifiers #2416 (CLAIM nullifiers): Currently, nullifiers must be stored in the faucet because the bridge storage can't be updated during an FPI call. Once CLAIM notes flow through the bridge directly, nullifiers can be tracked there — which is the right place for them. Implementation of AggLayer: track claims via nullifiers #2416 is explicitly deferred pending this change.

  • AggLayer: Store a claimed global index hash chain #2386 (GER hash chain): The GER hash chain must be updated upon consumption of the CLAIM note. With the current flow, the faucet consumes CLAIM and can only reach the bridge via FPI — but FPI calls cannot update the callee's storage. Re-orienting CLAIM to the bridge resolves this: the bridge consumes the note directly and can update its own GER hash chain without restriction.

It also simplifies the path to implementing localBalanceTree invariance checks (#2330), avoiding the need for an UPDATE_LOCAL_BALANCE_TREE intermediary note.

User-Facing Impact

Only the recipient of the CLAIM note changes (bridge instead of faucet). The rest of the bridging UX is unchanged.

References

Metadata

Metadata

Labels

agglayerPRs or issues related to AggLayer bridging integration

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions