-
Notifications
You must be signed in to change notification settings - Fork 2
Support other matterlabs variables #43
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds the `--dev` argument to the `substrate-node` to allow the chain to keep advancing as time goes own. We have found that if this option is not added then the chain won't advance forward.
Fix an issue where kitchensink won't advance
…to feature/better-input-parser
Merged
activecoder10
approved these changes
Jul 18, 2025
Contributor
activecoder10
left a comment
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.
LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Notes
deserialization error: invalid value: string "0x2d79dd80ff729c000"#34Summary
This PR supports all of the variables supported by matterlabs (e.g.,
$COINBASE) which we discussed in #39 which required some of the reworked async runtime APIs in order to make it easier to implement.Description
Some of the variables present in the matterlabs tests format require the context of the chain. For example, we can encounter a string of
$BLOCK_HASHin the input's calldata which we need to resolve into the actual block hash and then use that as an argument to the function being called.Before this PR, our calldata resolution logic was completely stateless and has no way to access the state of the chain that the arguments are being resolved to run on. With this PR, we changed that so that the resolver function takes in an additional
&impl EthereumNodewhich it can use to get the chain state that it needs to perform the resolution.This PR extends the
EthereumNodetrait to allow it to fetch more information from the node's RPC. The set of methods added reflect what is needed by the matterlabs resolver and not a full set of methods that I think that we need. The new trait currently looks like the following:Concerns
I have a concern that this has made the differential testing harder and has added a lot more variables into the mix.
For example, say we execute the same input that uses the block number as a variable on kitchensink and on geth, but the two nodes have different block numbers at the moment (could be because of the minor difference between when both nodes were started, or for a myriad of other reasons). In this case, the state diff is going to be different between both kitchensink and geth.
We need a way to pin the state in order to ensure that the resolution happens correctly.
Say that we have a test case that looks like the following:
{ "instance": "Main", "method": "main", "calldata": ["$BLOCK_NUMBER"], "expect": ["$BLOCK_NUMBER"] }Since the calldata block number and the expect block number get resolved at two different points of time they will be different, even though the format is trying to convey that they should be the same.
Therefore, we need some kind of mechanism to pin the state in one way or another in order to ensure that the same
Inputstate variables all resolve to the same thing.This PR does not address the two concerns mentioned above. I imagine that the second one will be easier to solve through some kind of state variable caching that's persisted for the same input, but don't have a design or implementation of that.