ethereum-optimism / ethereum-optimism/optimism

op-node: block signing and publishing improvements

Open
#14,580 0 comments 0 reactions 0 assignees View on GitHub
A-op-node
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 38m
Merged PRs (30d)
164

Description

In summary:

- Signing block happens inefficiently, at the less-than-ideal time, and can use documentation.
- Publishing blocks happens with bottleneck and at the less-than-ideal time.
- Committing blocks and sequencer rotation is prone to async-gossip race conditions.

Signing efficiency is fixed with https://github.com/ethereum-optimism/optimism/pull/14478
combined with https://github.com/ethereum-optimism/infra/pull/203

And the V2 API fixes the typing, so alternative remote-signer services can be implemented, on top of a sane API format.

Blocks are currently "async-gossiped". This becomes obsolete with flash-blocks, and never won us that much time.
It did however add fragility: when a block is committed to conductor before it is published,
then there is a continuation issue, where other nodes cannot continue without receiving the missing block.

The conductor does post the missing block with `admin_postUnsafePayload`,
but that doesn't retry or lock, which means the conductor can still fail to handover sequencer control
when the block has not been processed yet, even after success-response.

On top of that, the conductor does not get the block-signature, nor posts the signature back to the node.
This makes sequencer-rotation extra difficult, since a block from the conductor cannot be published to verifiers.
So when the sequencer rotation fails, there can be a verifier hiccup where the block is temporarily missing, since the conductor does not post it everywhere, and block cannot be gossiped out without signature.

We should make the sequencer:

- Handle block signing/committing/posting as following:
- Sign the block before committing to it.
- Post the signature to the conductor, and include the signature.
- Receive the block from the conductor with a commit-API, with signature, *synchronously*,
to ensure the block is there before rotating sequencer responsibility to the node.
- Receive the block from the conductor with a publish-API, with signature, to republish.
- Start using the V2 API:
- Roll out the op-signer change with the V2 block-signing method
- Add v2-block-signing flag to op-node, see [[issue 14499](https://github.com/ethereum-optimism/optimism/issues/14499)](https://github.com/ethereum-optimism/optimism/issues/14499)
- Document the V2 API format

V2 API usage is low-lift and can happen today.
The signing/committing/posting improvement may not be worth it,
and instead lean on the sequencing work to get completed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.