event_reader.reorganisation_monitor

Documentation for eth_defi.event_reader.reorganisation_monitor Python module.

Chain reorganisation handling during the chain data reading.

All EMV based blockchains are subject to minor chain reorganisation, when nodes have not yet reached consensus on the chain tip around the world.

Functions

create_reorganisation_monitor(web3[, ...])

Set up a chain reorganisation monitor tactic based on the node supported APIs

Classes

ChainReorganisationResolution

How did we fare getting hashes and timestamps for the latest blocks.

GraphQLReorganisationMonitor

Watch blockchain for reorgs using GoEthereum /graphql API.

JSONRPCReorganisationMonitor

Watch blockchain for reorgs using eth_getBlockByNumber JSON-RPC API.

MockChainAndReorganisationMonitor

A dummy reorganisation monitor for unit testing.

ReorganisationMonitor

Watch blockchain for reorgs.

Exceptions

BlockNotAvailable

Tried to ask timestamp data for a block that does not exist yet.

ChainReorganisationDetected

ReorganisationResolutionFailure

Chould not figure out chain reorgs after mutliple attempt.

TooLongRange

Reorg scan range is too long.