-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Remove codeContractAddress from Enforcer, Verifier, implement EVMCode #137
Conversation
Codecov Report
@@ Coverage Diff @@
## master #137 +/- ##
=========================================
- Coverage 96.86% 93.7% -3.16%
=========================================
Files 7 7
Lines 1306 1303 -3
Branches 223 224 +1
=========================================
- Hits 1265 1221 -44
- Misses 16 57 +41
Partials 25 25
Continue to review full report at Codecov.
|
This includes a few changes to the original PR. Notably: - remove fragLength - fix that out of bounds code reads return zero(es) Also: - fix CODECOPY opcode as driveby (out of bounds reads are ZERO) and not an error
* Import first part of #137 This includes a few changes to the original PR. Notably: - remove fragLength - fix that out of bounds code reads return zero(es) Also: - fix CODECOPY opcode as driveby (out of bounds reads are ZERO) and not an error * pos >= self.length !
@@ -32,6 +16,81 @@ module.exports = class Merkelizer extends AbstractMerkleTree { | |||
return res; | |||
} | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next partial PR I would say. We can extend AbstractMerkleTree
and get a own class for a general 'word-sized'-merkle tree. So we can re-use this for calldata
and so on 🙂
The `FragmentTree` does not follow orignal code hashing. A fragment leaf consists of `value`, `slot` and `byteLength`. `byteLength` is the orignal length of any given bytes.
#117
Changes:
0xfe
if not known.CODECOPY
codeContractAddress
codeContractAddress
submitProof
will require codes with proofs. At most 2 Merkle proofs are need. 1 for the opcode at current pc. 1 for the data as inPUSH
or for another opcode as inJUMP
.run
, revert if encounter unknown code.