-
Notifications
You must be signed in to change notification settings - Fork 686
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
Tool for testing runtime parameter changes against mainnet traffic #7735
Comments
progress update on this:
|
#8033 will help with this effort as a positive side-effect :) |
Once again it appears we would love to have such a tool already implemented... Thus in this comment, I outline the required work to finish the tool. The existing code is not fit to be merged but can certainly guide a proper implementation through all the corner cases to consider. Below are three possible ways to tackle the issue, with the third one being my personal recommendation. The ideal solution
Quick and dirty solutionWe can also try to clean up the hacky solution a bit. This involves more coding work and requires a deeper understanding of how gas is and has been charged. The main pain points are:
If we can make it work, this solution would work directly on a normal archival node's DB which we can get from a snapshot. But we effectively add tech-debt to our code base. Incremental solutionWe can also consider making this tool tailored to specific parameters that we care about. For example, to impact of increasing the 3 parameters for I think this solution could still be considered tech-debt. But it would be much smaller in scope. And it would at least be a small step toward the ideal solution, if we ever wanted to move forward with that. ConclusionI think finishing a very dumb MVP according to the "incremental solution" description is possible in a few days. This could be done just for our needs today and serve as a basis for future additions. (Or if it turns out to be too hacky, we don't even have to merge it and use it as one-off.) If the tool proves to be useful, we can consider spending more time to make it general-purpose. The more time passes, the more valuable that would be since the archival nodes will also contain more and more profile V3 data. |
When we change gas parameter values, this generally has the potential to break existing contracts. Checking how many contracts are affected is a bit tricky.
In principle, it could just be done by replaying old traffic on a new binary with the changes implemented. But this is not quite as straight forward, as any change to the parameter is a protocol change and is thus incompatible with blocks of an older protocol version. We would have to disabled some checks to make this work. Then we could maybe reuse some counting logic from
with_ext_cost_counter
that we already use in the estimator.Another way of doing it would be to read execution results and gas profiles from the DB. This should also be much faster as transactions are not replayed. Implementing such a tool requires some effort as well, but overall seems like a good idea. So far, we have been implementing similar functionalities in scrips, such as this code to evaluate the effect of increasing TTN cost.
Some related discussion on this topic: #7733
The text was updated successfully, but these errors were encountered: