Skip to content

Block processing should use storage atomically #21

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: evstack/ev-node#457, evstack/ev-node#474

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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