Skip to content

☂️ Reorg resistance of Ethereum backend #19

@matthiasgeihs

Description

@matthiasgeihs

The Ethereum backend is currently build on the assumption that a transaction cannot be reverted. While this may be true for local testnets, it is not true for public testnets and the Ethereum mainnet, where block reorgs can happen.

We should make the Ethereum backend work with Ethereum nets where reorgs appear. An idea how to implement this is as follows: We introduce a parameter ConfirmationBlockDepth. Whenever go-perun accesses on-chain state, we only provide on-chain state if it is at least ConfirmationBlockDepth blocks old.

The following appear to be relevant places in the code where on-chain state is accessed:

  • Contract validation: ValidateAdjudicator, ValidateAssetHolder
  • Event subscription: Watch, Filter
  • Contract deployment: WaitDeployed
  • Transaction confirmation: ConfirmTransaction

Added by @ggwpez:
The current road map for this issue looks like this:

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions