You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs-developers/docs/aztec-nr/framework-description/ethereum-aztec-messaging/outbox.md
+27-29Lines changed: 27 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,80 +4,78 @@ description: Learn about the outbox mechanism in Aztec portals for sending messa
4
4
tags: [portals, contracts]
5
5
---
6
6
7
-
The `Outbox` is a contract deployed on L1 that handles message passing from L2 to L1. Portal contracts call `consume()` to receive and process messages that were sent from L2 contracts. The Rollup contract inserts message roots via `insert()` when checkpoints are proven.
7
+
The `Outbox` is a contract deployed on L1 that handles message passing from L2 to L1. Portal contracts call `consume()` to receive and process messages that were sent from L2 contracts. The Rollup contract inserts message roots via `insert()` when epochs are proven.
|`_message`|`L2ToL1Msg`| The L2 to L1 message to consume |
35
+
|`_epochNumber`|`uint256`| The epoch number specifying the epoch that contains the message to consume |
36
+
|`_leafIndex`|`uint256`| The index inside the merkle tree where the message is located |
37
+
|`_path`|`bytes32[]`| The sibling path used to prove inclusion of the message |
39
38
40
39
### Edge cases
41
40
42
41
- Will revert with `Outbox__PathTooLong()` if the path length is >= 256.
43
42
- Will revert with `Outbox__LeafIndexOutOfBounds(uint256 leafIndex, uint256 pathLength)` if the leaf index exceeds the tree capacity for the given path length.
44
-
- Will revert with `Outbox__CheckpointNotProven(uint256 checkpointNumber)` if the checkpoint has not been proven yet.
45
43
- Will revert with `Outbox__VersionMismatch(uint256 expected, uint256 actual)` if the message version does not match the Outbox version.
46
44
- Will revert with `Outbox__InvalidRecipient(address expected, address actual)` if `msg.sender != _message.recipient.actor`.
47
45
- Will revert with `Outbox__InvalidChainId()` if `block.chainid != _message.recipient.chainId`.
48
-
- Will revert with `Outbox__NothingToConsumeAtCheckpoint(uint256 checkpointNumber)` if the root for the checkpoint has not been set.
49
-
- Will revert with `Outbox__AlreadyNullified(uint256 checkpointNumber, uint256 leafIndex)` if the message has already been consumed.
46
+
- Will revert with `Outbox__NothingToConsumeAtEpoch(uint256 epochNumber)` if the root for the epoch has not been set.
47
+
- Will revert with `Outbox__AlreadyNullified(uint256 epochNumber, uint256 leafIndex)` if the message has already been consumed.
50
48
- Will revert with `MerkleLib__InvalidIndexForPathLength()` if the leaf index has bits set beyond the tree height.
51
49
- Will revert with `MerkleLib__InvalidRoot(bytes32 expected, bytes32 actual, bytes32 leaf, uint256 leafIndex)` if the merkle proof verification fails.
52
50
53
-
## `hasMessageBeenConsumedAtCheckpoint()`
51
+
## `hasMessageBeenConsumedAtEpoch()`
54
52
55
-
Checks if an L2 to L1 message in a specific checkpoint has been consumed.
53
+
Checks if an L2 to L1 message in a specific epoch has been consumed.
Copy file name to clipboardExpand all lines: docs/docs-developers/docs/resources/migration_notes.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -550,6 +550,37 @@ Additionally, any function or struct that previously referenced an L2 block numb
550
550
551
551
Note: current node softwares still produce exactly one L2 block per checkpoint, so for now checkpoint numbers and L2 block numbers remain equal. This may change once multi-block checkpoints are enabled.
552
552
553
+
### [L1 Contracts] L2-to-L1 messages are now grouped by epoch.
554
+
555
+
L2-to-L1 messages are now aggregated and organized per epoch rather than per block. This change affects how you compute membership witnesses for consuming messages on L1. You now need to know the epoch number in which the message was emitted to retrieve and consume the message.
556
+
557
+
**Note**: This is only an API change. The protocol behavior remains the same - messages can still only be consumed once an epoch is proven as before.
558
+
559
+
#### What changed
560
+
561
+
Previously, you might have computed the membership witness without explicitly needing the epoch:
0 commit comments