Skip to content

Ensure saved offchain solution matches creation snapshop #462

Open
@kianenigma

Description

@kianenigma

Related to paritytech/substrate#8641 and paritytech/substrate#8290.

We will support offchain worker resubmission soon. The problem is that the solution is created once and then sent blindly again. This can lead to bad solutions because the snapshot might have changed due to a revert.

Initially, we thought we can use fork-aware offchain storage, but that is not implemented.

Alternatively, in paritytech/substrate#8290 we fall back to just calling feasibility_check one last time before resubmission of cached solution to makes sure it is not faffy.

This is rather suboptimal. A nicer approach is to have a hash of the snapshot saved somewhere alongside the cached solution, so we can check it against the hash that is stored onchain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I2-bugThe node fails to follow expected behavior.

    Type

    No type

    Projects

    Status

    ⌛️ Sometime-soon

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions