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

spending conditions - make block number and time available in exec environment #182

Open
johannbarbie opened this issue Feb 22, 2019 · 2 comments

Comments

@johannbarbie
Copy link
Member

  • read time and height from last period submitted into bridge

Execution time:

  • p+0 -> p+1 -> p+2 -> p+3
  • p+0 is submitted, p+1 not submitted.
  • use time from p+0 for execution.

Challenge time:

  • p+0 -> p+1(tx inclusion) -> p+2 -> p+3
  • p+0 to p+3 all submitted.
  • tx with proof referencing p+1 initiates computation game.
  • solEVM verifier checks the proof, walks 1 period back, takes the time and includes time in initial state.
@johannbarbie johannbarbie added help wanted Extra attention is needed question labels Feb 22, 2019
@troggy
Copy link
Member

troggy commented Feb 25, 2019

so a node needs to keep track of the timestamp and height of the last successful period submission, right?

@johannbarbie
Copy link
Member Author

johannbarbie commented Aug 9, 2019

we are already storing the Ethereum block hash and time in each period submission: https://github.com/leapdao/leap-contracts/blob/master/contracts/Bridge.sol#L98

⚠️ but there is no way to prove the prevPeriod 🤔 ⚠️

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

No branches or pull requests

2 participants