Git Product home page Git Product logo

nahmii-challenge-bot's People

Contributors

ebaklund avatar hubiierik avatar morfj avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nahmii-challenge-bot's Issues

Resume feature

Given the challenge bot is restarting after a crash
when the challenge-bot is starting
then it must be able to check last block it has processes
in order to capture all contract events that were sent during downtime.

Dispute largest overrun

Given a settlement is disputable
then the challenge-bot should select the receipt that shows the larges overrun
in order to increase the odds of winning a dispute.

Metric statistics

Given challenge-bot is running
when processing challenges
then metric statistics should be generated.
The metrics should include progress notifications and current L0 balance.

Crash in ChallengeHandler - nonce sequance

Message: 'Receipt has wrong nonce.'

Code checks that payments nonces are in sequence.
This is wrong since the list only contains sender receipts.
It is enough to check that nonce sequence is increasing.
Otherwise all receipts have to be part of the payment list.

Test Bob settlements

Settlement workflow must also work for Bob.
i.e. Settlement must work for an initiator for which the last event before/at settlement was an incoming event.

Tests for this is missing and must be made.

Contract provider

Given a contract provider
when the challenge handler needs contracts
then it should get the contracts from the contract provider.

Currently, the app is creating contracts and handling them to the challenge handler as arguments.
An alternative is to let the challenge handler get the contracts from a contract provider.
This issue is about doing the necessary re factorization

Send metric notification of current ETH balance.

When the challenge bot handles a contract event,
then register the current ETH balance of the bot as a metric
in order to be able to track and ensure that the challenge bot has enough funds.

Seize balance on successful dispute

Given a dispute has been successful
when the notifications that confirms this arrives
the challenge but must seize the balance of the offending wallet.

Send send metric notification if dispute fails

Given the challenge-bot has detected an overdraw and initiates a call
when this dispute fails because of technical issues
a notification should be sent to a human operator
in order to raise awareness that a fraud may be going on.

VM errors not handled

When a dispute causes a VM revert
then the challenge bot fails to detect it as an error.

To detect real error, the challenge bot should check for all proposal conditions that may
make dispute rejectable and handle all VM reverts as fatal errors.

In particular DSC proposalDisqualificationNonce() should be checked before dispute is attempted.

Seizing

Given the challenge-bot has disputed a payment
when the associated locked wallet is released
then seize the balance.

The challenge bot should at startup make a cache of wallets it has locked by the latest 1000 blocks.
Every time a relevant wallet-lock event occurs it should add it to the cache.
With the interval of (e.g.) one hour it should check if any visible time has been reached and then seize the associated balance.

Missing Payments - no pagination

Given payments wallets to be queried
when those are queried
then all payments that falls into the selection must be received
in order to not loose any payment information.

There is a bug in the current implementation that fails to download all needed payments.
It only download one page of results.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.