Skip to content

FilterIter may not handle reorgs properly. #1848

Open
@evanlinjin

Description

@evanlinjin

We need to test this against reorgs. It seems like the architecture of this may result in inconsistent state of checkpoints during reorgs.

  1. Have a chain with blocks .. [100:A] [101:B] with relevant txs in both A and B.
  2. Sync up to 100 (calling .next).
  3. Reorg so that blocks from 100 are replaced (inclusive). .. [100:A'] [101:B'].
  4. Call .next again.
  5. Check that checkpoints end in .. [100:A'] [101:B'] and we have emitted relevant txs in A' and B'.

Originally posted by @evanlinjin in #1614 (comment)

Metadata

Metadata

Labels

bugSomething isn't workingtests

Type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions