-
Notifications
You must be signed in to change notification settings - Fork 133
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
Add dependency on blockchain-k-plugin so KEVM can run with Mantis #149
Conversation
4a8b068
to
4e9a689
Compare
d45eaf4
to
51e087d
Compare
@dwightguth initial review:
I will need more time to read the K code in detail. |
@ehildenb I fixed the issue with the lines in the Makefile, but I think that the submodule should be left where it is, because unlike the submodules under .build, the plugin isn't really a dependency, it's actually part of the code of the project, but it lives in a submodule simply because that code is shared with another project. |
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.
Needs more documentation. I think we need to meet in person and discuss the overall architecture to make sure I understand everything.
evm-node.md
Outdated
requires N <Int 0 orBool N >=Int 256 | ||
|
||
syntax EthereumSimulation ::= runVM(iscreate: Bool, to: Int, from: Int, code: String, args: String, value: Int, gasprice: Int, gas: Int, beneficiary: Int, difficulty: Int, number: Int, gaslimit: Int, timestamp: Int, unused: String) | ||
|
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.
I've never seen this syntax for K. Is it some sort of record syntax?
Just it just enable the line below (matching on a subset of arguments?)
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.
yes
@@ -0,0 +1,149 @@ | |||
```{.k .node} |
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.
This file needs to be documented properly (or at least at all).
evm-node.md
Outdated
|
||
syntax String ::= contractBytes(WordStack) [function] | ||
// ----------------------------------------------------- | ||
rule contractBytes(WS) => #unparseByteStack(WS) |
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.
contractBytes == #unparseByteStack
? Is the indirection for some compatibility layer?
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.
yes
evm-node.md
Outdated
syntax Int ::= #getBalance(Int) [function, hook(MANTIS.getBalance)] | ||
| #getNonce(Int) [function, hook(MANTIS.getNonce)] | ||
syntax Bool ::= #isCodeEmpty(Int) [function, hook(MANTIS.isCodeEmpty)] | ||
| #accountExists(Int) [function, hook(MANTIS.accountExists)] |
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.
I'm not a huge fan of the hooks being MANTIS.*
, because they shouldn't be Mantis specific, should they?
Makefile
Outdated
DLLEXT=cmxs | ||
OCAMLC=opt -O3 | ||
LIBFLAG=-shared | ||
endif |
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.
Can this be indented (perhaps with spaces if not tabs)? Looks strange.
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.
fixed
Jenkins: test this please |
Jenkins: test this please |
1 similar comment
Jenkins: test this please |
Jenkins: test this please |
@ehildenb please re-review. |
This PR should make all the Mantis ethereum-tests tests pass.
Fixes #146