Skip to content
This repository has been archived by the owner on Dec 5, 2021. It is now read-only.

Adds fraud prover code #19

Merged
merged 7 commits into from
May 28, 2021
Merged

Adds fraud prover code #19

merged 7 commits into from
May 28, 2021

Conversation

CAPtheorem
Copy link

Adds the fraud-prover service

CAUTION - the fraud prover does not currently work - it's able to detect fraud, but currently unable to correctly _initializeFraudVerification, so that and all downstream steps fail.

Specifically, the fraud prover triggers a revert at VM Exception while processing transaction: revert Pre-state root global index must equal to the transaction root global index in OVM_FraudVerifier.sol line 134:

require (
            _preStateRootBatchHeader.prevTotalElements + _preStateRootProof.index + 1 == _transactionBatchHeader.prevTotalElements + _transactionProof.index,
            "Pre-state root global index must equal to the transaction root global index."
        );

This issue may be related to (1) injecting fraud via the Batch_submitter, and more generally, (2) fraud proving and correction in the setting of batch submissions, rather than unitary test submissions.

ToDo: The fraud prover currently is brittle, in the sense that it fails silently for many error conditions and e.g. empty returns. There are also many issues relating to indexing of various data structures, especially for batch transactions.

@codecov-commenter
Copy link

codecov-commenter commented May 27, 2021

Codecov Report

Merging #19 (d77f794) into develop (679ee38) will not change coverage.
The diff coverage is n/a.

❗ Current head d77f794 differs from pull request most recent head 164ced8. Consider uploading reports for the commit 164ced8 to get more accurate results
Impacted file tree graph

@@           Coverage Diff            @@
##           develop      #19   +/-   ##
========================================
  Coverage    82.21%   82.21%           
========================================
  Files           48       48           
  Lines         1895     1895           
  Branches       303      303           
========================================
  Hits          1558     1558           
  Misses         337      337           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 679ee38...164ced8. Read the comment docs.

@InoMurko
Copy link

Great work, but can we add some CI integration and enable continuous testing?

@CAPtheorem CAPtheorem merged commit 23a7681 into develop May 28, 2021
InoMurko pushed a commit that referenced this pull request Jul 12, 2021
InoMurko pushed a commit that referenced this pull request Jul 18, 2021
Removed unrelated files and added .env
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants