Skip to content

stacks deep re-orgs are not handled properly #734

@rafaelcr

Description

@rafaelcr

Chainhooks v1 only handles re-orgs 6 blocks deep correctly. This is however a very old rule because Nakamoto re-orgs caused by Bitcoin may be hundreds of blocks deep, so when Chainhooks tries to resolve it we end up having an orphaned chain section that is never actually processed

Stacks Block #5023358 (0x90a1...53e5) successfully appended to Fork [Block #5023358 (0x90a1...53e5), Block #5023357 (0x1105...76b7), Block #5023356 (0x4df7...44ab), Block #5023355 (0x846b...29ae), Block #5023354 (0x20f9...9089), Block #5023353 (0x078f...1f75), Block #5023352 (0x71a8...3dd6)], length = 7
Unable to infer chain event out of Fork [Block #5023358 (0x90a1...53e5), Block #5023357 (0x1105...76b7), Block #5023356 (0x4df7...44ab), Block #5023355 (0x846b...29ae), Block #5023354 (0x20f9...9089), Block #5023353 (0x078f...1f75), Block #5023352 (0x71a8...3dd6)], length = 7 and Fork [Block #5023358 (0xc7d6...b267), Block #5023357 (0x48a8...5a56), Block #5023356 (0x71e2...4049), Block #5023355 (0x1079...abe6), Block #5023354 (0x5591...2efb), Block #5023353 (0x7f2f...463b)], length = 6

This logic should be altered to deal with burnchain block count instead of Stacks block count

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions