Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement verifyWalk for a heartbeat challenge game #279

Open
troggy opened this issue Feb 15, 2020 · 3 comments
Open

Implement verifyWalk for a heartbeat challenge game #279

troggy opened this issue Feb 15, 2020 · 3 comments
Labels

Comments

@troggy
Copy link
Member

troggy commented Feb 15, 2020

Bounty

We've designed a validator heartbeat challenge game as defined here (alternative link). Some parts of it are not yet implemented. Including a period walk proof verification. Since we now have previous period hash in a period proof, we can implement it. This bounty is all about that.

Scope

  • implement a PoaOperator.verifyWalk to verify the period chain: they should be consecutive referencing one another

Deliverables

  • updated code
  • updated tests

Gain for the project

ability to use minimumPulse > 0 for validator heartbeat challenges

Roles

bounty gardener: @troggy / 50 DAI
bounty worker: name / share
bounty reviewer: name / share

Funded by

Dev Circle

@troggy troggy added bounty size-S total effort of ~350 DAI labels Feb 15, 2020
@troggy
Copy link
Member Author

troggy commented Feb 15, 2020

@TheReturnOfJan I don't really get the structure of walkProof. Can you explain? In a period proof we now have a prev period hash, so given a period proof we can check that the previous period was submitted. Should we provide a proof for that previous as well? Otherwise I don't see how can we check that they are indeed consecutive.

So the walkProof is an array like [evenMorePreviousPeriodProof, previousPeriodProof, periodProof] ?

@troggy troggy added enhancement New feature or request Status: Proposal labels Feb 15, 2020
@troggy troggy changed the title Implement verifyWalk for heartbeat challenge game Implement verifyWalk for a heartbeat challenge game Feb 15, 2020
@TheReturnOfJan
Copy link

TheReturnOfJan commented Feb 17, 2020

So the walkProof is an array like [evenMorePreviousPeriodProof, previousPeriodProof, periodProof]

Yes. You can think of it as array of arrays of bytes32 [[bytes32, bytes32, bytes32], [bytes32, bytes32, bytes32], [bytes32, bytes32, bytes32],...]. The length of the outer array is the length of the walk (how many periods back you go), and the length of the inner array is the size of the prevPeriod inclusion proof, which is constant (but I do not know of the top of my head what it is).
The input parameter type is currently bytes, since at the time I did not want to commit to details yet. But maybe it would make sense to change the type of walkProof to bytes32[][].

@troggy
Copy link
Member Author

troggy commented Apr 6, 2020

expired. Needs to be resubmitted by gardener

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants