-
Notifications
You must be signed in to change notification settings - Fork 136
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
feat(zk): zksolc linking #800
base: main
Are you sure you want to change the base?
Conversation
chore: identify action to deploy libs in EraVM
crates/forge/src/multi_runner.rs
Outdated
.find(|(id, _)| id.source == needle.source && id.name == needle.name) | ||
.map(|(_, evm)| (needle, zk, evm)) | ||
}) | ||
.filter(|(_, zk, evm)| zk.bytecode.is_some() && evm.bytecode.is_some()) |
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 be more of an assertion than a filter? Is it ok to keep on executing if we are missing some of the bytecodes?
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.
It would simply not be added to the dual_compiled_contracts
like it was before if it was unlinked (read as invalid bytecode)
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.
Ok, I am just worried we would filter something we should be aware it's missing (for example what happened when using zksolc previous to 1.5.7
and trying to just deserialize the eravm field to get the bytecode) and then this fails later when trying to get the bytecode and takes a bit to debug and track it is being filetred here. If this cannot happen then we are good.
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.
There are also some contracts which aren't meant to have bytecode like interfaces etc... Not sure the implications here tbh
fix(strategy): remove get_mut for `DualCompiledContracts`
fix(zk:link): use version from config refactor(zk:config): extract config -> zksolc compiler logic into function chore: lints
chore: remove accidental file re-inclusion
refactor(zk:link): avoid attempting to link fully-linked contracts
feat(script:zk): link with zksolc
What 💻
zksolc --link
CREATE
only)Why ✋
Notes 📝
There's a simple merge conflicts due to the lack of access to
DualCompiledContracts
during theMultiContractRunner
instantiation.This is a working yet incomplete implementation, as such there are a few quirks, in particular: unlinked factory deps are not supported (zksolc 1.5.9 should have some extra info that we can use), linking via
CREATE2
is not supported either yet.Currently there's an issue with trying to actually run the library, I believe due to a missing storage migration: