-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem:
https://twitter.com/PhABCD/status/1129987674213945344
Solution:
Implement a commit reveal schema:
def submitSolution(_solutionHash: bytes32) -> uint256:
self.submittedSolutions[msg.sender] = _solutionHash
def revealSolution(_x1: unit256, _x2: uint256, _salt: string[16]) -> uint256:
assert self.submittedSolutions[msg.sender] == keccak(_x1 + _x2 + _salt)
newSolution: uint256
newSolution = self._calculateNewSolution(_x1, _x2)
if self.currentBestSolution < newSolution:
self.self.currentBestSolution = newSolution
self.addressOfWinner = msg.sender
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request