Wisp Messages
Wisp Message Flow
As part of their flow, the Wisp goes through three stages until delivered.
Sending
The first stage of the flow for a is the sending of the message by the user or the representing contract. Once a message is sent, the rollup saves it in its state in the contract.
On the smart contract level, this stage is marked by the emitting of the MessageSent
event from the contract inside . This event notifies the state and message relayers to start monitoring the necessary conditions for the relay of this message and rollup state.
In Transit
The second stage of the flow for a is when it "enters the L1". This stage begins when the rollup anchors state that includes the message in L1. This allows the later verification of the inside the source rollup via the L1.
On the smart contract level, this stage is marked by the emitting an event by showcasing the anchoring of inside L1. In the case of Optimism Bedrock this is the OutputProposed
of the L2OutputOracle.
This event notifies the state relayers that a can be produced and submit it inside (obviously subject to their economic incentive and willingness to do so). This event also notifies the message relayers to start monitoring the for updates refering a block which is >=
than the L1 block in which the rollup state was posted that contains the .
Delivery
The third stage of the flow for a is when it is getting delivered. This flow can only kick in when the state relayers have relayed an L1 block >= of the block that anchored the state containing the message. The beginning of this stage is marked by the HeadUpdate
event inside the Wisp .
Once such a block is relayed, the message relayer can gather all the necessary proofs and submit them to contract on . The contract will query and using the L1 Execution State root, verify the existance of . Once the message is verified , triggers the execution of the effectively performing the operation.
Further States of the CRC Flow
While the above stages conclude the life of the from the perspective of the end user, some post-effects of its delivery are still present and are part of the flow of the relayers.
While the user has paid its fees for delivery in the first stage of the flow, to this point the relayers have not claimed their fees. The last state of the CRC flow involves the state relayers generating the that includes the state of in order to prove the and inside . This allows them to collected the fees they are owed and creates a positive feedback loop of .
Properties / Format
For the alpha version of the protocol, the format can be found here. For future versions, the following format is considered to be used EIP-5164.
Last updated