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

specs: supervisor api #533

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

specs: supervisor api #533

wants to merge 4 commits into from

Conversation

tynes
Copy link
Contributor

@tynes tynes commented Jan 22, 2025

Description

Take a quick pass at the supervisor api. This is useful because there
are many teams integrating into this right now.

op-geth has already integrated, the op-reth integration is ongoing as
well as the rbuilder integration should be happening soon.

This enables us to point to spec as the source of truth in how the API
is meant to work.

Take a quick pass at the supervisor api. This is useful because there
are many teams integrating into this right now.

op-geth has already integrated, the op-reth integration is ongoing as
well as the rbuilder integration should be happening soon.

This enables us to point to spec as the source of truth in how the API
is meant to work.
@emhane emhane added the H-interop Hardfork: change planned for Interop upgrade label Jan 23, 2025
@tynes
Copy link
Contributor Author

tynes commented Jan 23, 2025

This doesn't include all of the methods, see https://github.com/ethereum-optimism/optimism/blob/develop/op-supervisor/supervisor/frontend/frontend.go#L18-L28 h/t @refcell

Comment on lines +26 to +32
## RPC API

### `supervisor_checkMessage`

Checks the safety level of a specific message based on its identifier and message hash.
This RPC is useful for the block builder to determine if a message is should be included
in a block.
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks to me like there are a few more RPC methods defined in the op-supervisor. Noting this so they are not forgotten if needed.

The op-supervisor defines the set of query methods here.

These methods are then exposed as RPC methods by the server here under the supervisor_* prefix.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need these @clabby @ajsutton ?

### `supervisor_checkMessage`

Checks the safety level of a specific message based on its identifier and message hash.
This RPC is useful for the block builder to determine if a message is should be included
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This RPC is useful for the block builder to determine if a message is should be included
This RPC is useful for the block builder to determine if a message should be included

#### Parameters

- identifier: [Identifier](./messaging.md#message-identifier) - The identifier of the message to check.
- message hash: Hash - Hash of the initiating message.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- message hash: Hash - Hash of the initiating message.
- message hash: Hash - Hash of the initiating message payload.

Comment on lines +50 to +70
### `supervisor_superRootAtTimestamp`

Gets the super root at a specific timestamp.

#### Parameters

- timestamp: hexutil.Uint64 - Timestamp to query.

#### Returns

- object
- timestamp: hexutil.Uint64 - The timestamp of the super root
- superRoot: Hash - The root of the super root
- chains: []object - List of chains included in the super root
- chainId: hexutil.Uint64 - The chainid
- canonical: Hash - output root at the latest canonical block
- pending: hexutil.Bytes - output root preimage

#### Description

Retrieves the super root state at the specified timestamp, which represents the global state across all monitored chains.
Copy link
Member

Choose a reason for hiding this comment

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

would be nice with a sentence about why this is used, like the method above says "to determine if a message should be included in a block"...what's the point of knowing a super root at a certain timestamp?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
H-interop Hardfork: change planned for Interop upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants