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

EXTCODEHASH to prove commit block #38

Open
deluca-mike opened this issue Oct 5, 2020 · 0 comments
Open

EXTCODEHASH to prove commit block #38

deluca-mike opened this issue Oct 5, 2020 · 0 comments

Comments

@deluca-mike
Copy link

deluca-mike commented Oct 5, 2020

Just heard of Submarine Sends today, and read the documentation and smart contracts, so forgive me if my question or suggestion is naive.

Instead of using proofs or challenges as a mechanism to retrieve or trust the commit block, why not have the contract itself store the block number of the latest/last commit by the user. This can either be done via the constructor when it was deployed, or via a payable commit function.

Now, we want to be able to trust that the value of the public commitBlock was written to appropriately, so we just use EXTCODEHASH to check that the contract code actually does exactly that. We know what the contract code should always look like, given some fixed compiler version, so the deployed code's hash should be enough.

Am I missing something?

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

No branches or pull requests

1 participant