-
Notifications
You must be signed in to change notification settings - Fork 5
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
Evaluator #120
base: main
Are you sure you want to change the base?
Conversation
@@ -29,6 +30,7 @@ pub struct Encoder<InstructionsType> { | |||
ssa_tracker: SSATracker, | |||
output: Vec<SMTStatement>, | |||
interpreter: InstructionsType, |
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.
We probably want to change this name now.
@@ -99,14 +99,14 @@ impl Instructions for EVMInstructions { | |||
"calldatasize" => single_return(evm_context::calldatasize(ssa).into()), | |||
"calldatacopy" => panic!("Builtin {} not implemented", builtin.name), // TODO | |||
"codesize" => single_return(evm_context::codesize(ssa).into()), | |||
"codecopy" => panic!("Builtin {} not implemented", builtin.name), // TODO | |||
"codecopy" => vec![], //panic!("Builtin {} not implemented", builtin.name), // TODO |
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.
Shouldn't this and extcodecopy
havoc memory?
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, this is just to prevent the system from crashing on my example.
This now uses the evaluator to determine if some branches cannot be reached at all (and then it does not encode them). This is a trace of the encoded opcodes filtered to mstore, datacopy, create, sload, sstore and call, executed on two transactions: First a call to "setUp()" and then "proveA()" (i.e. calldata is set accordingly). You can see that it does not encode any of the panics in the abi decoder and properly re-retrieves the address of the contract under test from storage:
|
Got this working now without the hack:
|
718e6f7
to
97486c6
Compare
7859944
to
13f6b19
Compare
No description provided.