Skip to content

L2tol2cdm gasreceipt update #286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ecosystem/l2tol2cdm-sentmsg-ctx.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ is likely too low level. -->
Introudce opaque context bytes field in `SentMessage`. This field MUST be versioned such that it can evolve with new or removed fields.

```solidity
event SentMessage(uint256 indexed destination, address indexed target, uint256 indexed messageNonce, address sender, bytes message, bytes context);
event SentMessage(uint256 indexed destination, address indexed target, uint256 indexed messageNonce, address sender, bytes message, bytes originContext);
```

This proposal simply includes this field without specifying the first versioned format. By leaving it as empty for now, we can populate the first version in a later
Expand All @@ -56,7 +56,7 @@ design that requires it.
- See [RelayedMessageGasReceipt](https://github.com/ethereum-optimism/design-docs/pull/282).
- See [incentivized message delivery](https://github.com/ethereum-optimism/design-docs/pull/272).

**Note**: The context itself **MUST** be included in the pre-image of the cross domain message hash. While `CrossL2Inbox` validation ensures log integrity, we must include the context in the preimage in order for `resendMessage` which re-emits stale `SentMessage` event to gaurantee that context hasn't been tampered with.
**Note**: The context itself **MUST** be included in the pre-image of the cross domain message hash. While `CrossL2Inbox` validation ensures log integrity, we must include the context in the preimage in order for `resendMessage` which re-emits stale `SentMessage` event to gaurantee that context hasn't been tampered with. The pre-image hashing process begins by computing the messagePayloadHash from the core message payload. The originContext is then constructed by encoding the ORIGIN_CONTEXT_ENCODING_VERSION alongside the messagePayloadHash. Finally, the messageHash is derived by hashing the messagePayloadHash and the originContext together.

## Resource Usage

Expand Down