RealityETH / reality-eth-monorepo

Monorepo containing reality.eth contracts, UI code and everything else.
38 stars 22 forks source link

V4 candidate 4 remove commit reveal #133

Closed edmundedgar closed 7 months ago

edmundedgar commented 8 months ago

Create the reality.eth v4 version and remove commit-reveal.

Commit-reveal was intended to protect users against people stealing their answers and front-running them. In practice it was never used in a way where that mattered, ie people have never used it to get questions answered while competing for a bounty, and instead use it to prove things they already think they know. In any case we now have private RPCs and other front-running defences. Removing it makes the code simpler and also makes integrations easier.

This PR removes the commit-reveal functions, then deletes code which can never be run in the absence of a commit-reveal answer. For backwards compatibility it leaves the is_commitment parameter in log events and in the hash used to record the record of questions, but always sets it to false.

It should be reasonably simple to check that the ability to supply commit-reveal answers is completely removed, that the other code that is removed would never have run, and that it doesn't make any other changes.