Skip to content

Validate what happens if aggregator crashes after submitBlockToDA() #457

@jbowen93

Description

@jbowen93

What happens if submitBlockToDA was successful but the node crashes immediately after that? Can it still recover? What about the other steps in between?

Originally posted by @liamsi in #442 (comment)

Response in PR by @jbowen93

I'll admit I'm not 100% sure.

The BlockResponse, State, and Validators are never read from Store so those calls don't currently matter.

If it crashes before m.store.SetHeight(block.Header.Height) or m.executor.Commit(ctx, newState, block, responses) are called (which is immediately after submitBlockToDA()) then there may be an issue.

The sequencer will have written a block to the DA layer but will not have broadcast a header for other nodes to retrieve this block. Since state hasn't been committed to the proxyApp (via m.executor.Commit()) I think the sequencer will simply try again with the same block as the block height hasn't been incremented.

I think the primary consequence here is that the sequencer will have to pay Celestia to submit a block multiple times. This could be handled better by having the sequencer check if the block is already present in the DA layer by using fetchBlock(daHeight).

Metadata

Metadata

Assignees

Labels

T:testingRelated to testing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions