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

create ExitChallenger service #119

Closed
johannbarbie opened this issue Jul 3, 2019 · 7 comments
Closed

create ExitChallenger service #119

johannbarbie opened this issue Jul 3, 2019 · 7 comments

Comments

@johannbarbie
Copy link
Member

johannbarbie commented Jul 3, 2019

Bounty

this service checks for every started exit if the exit is valid. if not it tries to submit a challenge.

Challenger Services (2)

The service uses prevOut index to check if the UTXO registered in an exit has been spend by an exit type tx (valid exit), or by another type of transaction (invalid exit). If the UTXO has not been spent at all (should not happen, as event scanner maintains distance to chain tip), the service reports an error through slack.

Scope

  • receive events from Message Queue (filter out only valid)
  • for each event/Exit/UTXO determine valid/invalid
  • try to challenge
  • if challenge not possible, or UTXO not spent, report on slack
  • for each invalid exit, report on slack
  • keep an encrypted private key in config used for sending challenges

DevOps Requirements

  • require less than $5/month of running cost
  • provide fail-over

Deliverables

  • code
  • tests
  • deployment

Gain for the project

  • ability to challenge invalid exits

Roles

bounty gardener: @troggy / 10%
bounty worker: @roleengineer / 70%
bounty reviewer: name / 20%

@johannbarbie johannbarbie added this to the CAS milestone Jul 3, 2019
@pinkiebell
Copy link
Contributor

Ditto:
Let's assume MessageQueue and EventScanner are the same thing on an standalone app - point of view?

@johannbarbie
Copy link
Member Author

not a fan. i designed the modularity on purpose, so the challenger services can be stateless, and only the event service needs a DB.

@johannbarbie johannbarbie removed this from the 🐲CAS milestone Jul 4, 2019
@TimDaub TimDaub self-assigned this Oct 24, 2019
@johannbarbie
Copy link
Member Author

bounty timed out

@troggy
Copy link
Member

troggy commented Dec 25, 2019

Event Scanner is already implemented here: https://github.com/leapdao/challenge-services

@troggy
Copy link
Member

troggy commented Dec 25, 2019

@TimDaub what was your plan with event scanner? https://github.com/leapdao/challenge-services
Was it designed to be used by many consumers ? E.g. Exit challenger and CAS challenger. Or every consumer is meant to run it is own copy of event scanner?

@roleengineer
Copy link

Usefull links.
start exit:
https://github.com/leapdao/leap-contracts/blob/master/contracts/ExitHandler.sol#L106
getTxbyPrevOut:
https://github.com/leapdao/leap-node/blob/master/src/api/methods/getTransactionByPrevOut.js
challenge Exit:
https://github.com/leapdao/leap-contracts/blob/master/contracts/ExitHandler.sol#L320
challenge exit example: https://github.com/leapdao/leap-guardian/blob/master/scripts/challengeExit.js (old code)
Fix for exit double spend. If you roll back or otherwise disable it, you will be able to easily reproduce double spends in Bridge UI leapdao/leap-node#339

@troggy
Copy link
Member

troggy commented Apr 6, 2020

@troggy troggy closed this as completed Apr 6, 2020
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

5 participants