Skip to content

Block processing should use storage atomically #21

Closed as duplicate of#2274
rollkit/rollkit
#1782
@tzdybal

Description

@tzdybal

Currently ApplyBlock, SaveBlock, Commit, SaveBlockResponses and SetHeight are executed as completely separate operations - this potentially leads to inconsistencies in database.
https://github.com/celestiaorg/optimint/blob/b1df4346508c124d59504555f34210773a4e5b50/block/manager.go#L216-L247
https://github.com/celestiaorg/optimint/blob/b1df4346508c124d59504555f34210773a4e5b50/block/manager.go#L392-L433

Ideally all those operations should use single KV batch to ensure atomicity.

Ref: rollkit/rollkit#457, rollkit/rollkit#474

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions