EOSIO / EOSIO/demux-js

Significant state about forks is stored in ephemeral blockHistory

Open
#123 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
298
Forks
69
PR merge metrics
No merged PRs in 30d

Description

Rollbacks can only be initiated when the action reader sees them happening, with its occurrence stored in AbstractActionReader#blockHistory. If the indexState is on a forked block at startup, then the action reader will not have any way of knowing this and send a block whose blockHash does not match, and it is not trivial to determine how far the Handler needs to roll back.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing AbstractActionReader#blockHistory and the startup handling of indexState, then inspect how Handler determines rollback depth when the indexed block is on a fork. Reproduce the forked-startup scenario and define the expected block-hash and rollback behavior before changing the state model; done means the Handler can recover deterministically without relying on ephemeral block history.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.