-
Notifications
You must be signed in to change notification settings - Fork 2
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
Bring-up of state trie hash verification function #3
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: shamb0 <[email protected]>
CC @Stebalien, @vyzo |
For the first case, can you print out the state trees from both cases? I.e., the slots so I can see where the difference is? |
Ah... there aren't separate sub tests. |
But yes, this is exactly what we're looking for. One thing that's confusing me is that both FEVM and REVM agree on the state of |
But I solved the bytecode hash issue. fevm-eth-compliance-test/src/common/tester.rs Lines 384 to 410 in 53648dc
The bytecodehash as stored in the state is the hash digest, not a multihash. I.e., there's no need to wrap the hash digest in a multihahs, convert it to bytes, then take the first 32. Just take the entire digest: fevm-eth-compliance-test/src/common/tester.rs Line 390 in 53648dc
If possible, I recommend that you use the EVM's builtin constructor. |
It looks like you aren't inserting the slots from the "pre" section before running the test. |
fix: correctly compute the bytecode hash
Signed-off-by: shamb0 <[email protected]>
Signed-off-by: shamb0 <[email protected]>
Signed-off-by: shamb0 <[email protected]>
Hello @Stebalien,
https://github.com/shamb0/ref-fvm/blob/shamb0/mirror-master/fvm/src/executor/default.rs#L422 |
Here are some observation on the properties of
from the traces, looks like
|
You need to send messages from an account or placeholder, not an EVM actor. The EVM doesn't distinguish between accounts and contracts, but we do. To handle this, you likely need to check
If it's non-empty, create an EVM actor as usual. |
I'm not sure where you're getting those traces, I assume you've modified something? I'm guessing that you're setting the base-fee to 0. In which case yes, we'll charge nothing for gas.
That's a bit tricky:
Short version: For accounts (ethereum-style accounts and native accounts), always look at |
Signed-off-by: shamb0 <[email protected]>
Signed-off-by: shamb0 <[email protected]>
Looks like I'm missing some information piece, in managing place-holder address & fevm actor address. Could you please kindly review the latest integration ? |
Using the base-fee value from the test vector property. Can we use it straight or any transformation required ? |
|
What are you trying to test? The gas used by FEVM will always differ from the gas used by the EVM. |
Oops, then we can't use the state root hash to test against the Computation of state root hash, has dependency on state of contract balance. (After executing the transaction use-cases, |
fix: create an ethaccount when applicable
Bring-up of state trie hash verification function.
Observing mismatch in hash value under FEVM context.
Summary
Difference in state properties values, used for calculating state trie hash.
FEVM context
revm context
FEVM context
revm context