-
Notifications
You must be signed in to change notification settings - Fork 12
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
Implement fast summarization #271
Conversation
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.
It would be nice to have another reviewer look at it before merging.
It would be good to test this on the Optimism codebase where the summaries are being used. @JuanCoRo can you confirm that this works for your needs? |
Looks good to me too! I think @anvacaru tested it on the engagement proof of interest, but I'll wait for an additional confirmation before approving and merging. |
fixes: #266
Changes:
add a new
--init-node-from
flag that takes a JSON file containing the summary of a deployment process. Takes the accounts obtained after going through the summary and inserts them in the<accounts>
cell of the initial node of the KCFG.Extract the logic that reads the JSON summary files in
foundry_summary()
to its ownread_summary()
function.Refactor
DeploymentSummary
class:SummaryEntry
class.DeploymentSummary.add_cheatcode(dict)
that would process a summary entry and create the Solidity code for the cheat codes required to update the state toDeploymentSummary.extend(SummaryEntry)
.Add
summary_to_account_cells(dict)
that goes through the summary JSON object and creates a list of<account>
cells.Minor changes:
KApply(.Map)
tomap_empty()
_write_cfg
functionNext steps:
{'balance': KVariable('ACCT_X_BAL'), 'nonce': KVariable('ACCT_X_NONCE') , ...}
instead of{'balance': 0, 'nonce': 0, 'code': '', 'storage': {}}
<accessedAccounts>
,<touchedAccounts>
(not sure actually?)<storage>
, apply them in<origStorage>
as well.