Skip to content
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

interop: logindex wildcard and intents #108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

protolambda
Copy link
Contributor

Description

Logindex-wildcard for Identifier to not pre-commit to the consumed event being present in a specific place. This allows the block-builder to complete the static declaration of the event.

This is a building block for intents.


The author of an executing-transaction may defer the specification of an exact `logIndex` to the block-builder.
Deferring the `logIndex` enables the executing side to request a message to be initiated.
The `logIndex` value of `0x01000000000000000000000000000000000000000000000000000000000000` functions as wildcard.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value is only 31 bytes long which I suspect is a typo?

Also how was this value chosen? It doesn't seem very unique, perhaps using bytes32(uint256(keccak256("interop.logIndexWildcard")) - 1) is safer (this is the same ERC-1967 slot computation pattern used in contracts). Or even just converting a string like "interop log index wildcard" to hex and padding it

The block-builder is responsible for mapping the wildcard `logIndex` to a valid `logIndex` by appending
it to a list of indices, declared statically in the input data of the last transaction of the block.

This declaring transaction must have a `to` address of `0x42ff000000000000000000000000000000000000`.
Copy link
Contributor

@mds1 mds1 Apr 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have an autogenerated specs page that documents all arbitrary addresses in the 0x42 namespace, or some CI check, to avoid collisions

Edit: probably easier to maintain this manually, and have the CI check ensure that all 0x42 addresses show up on the page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants