Content
@
https://warpcast.com/~/channel/zksync
0 reply
0 recast
0 reaction
Pierre H. β q/dau
@rektorship
https://github.com/zkSync-Community-Hub/zksync-developers/discussions/639#discussioncomment-10693912 why are zksync builds non-deterministic (both foundry and hardhat)? why does updating the smart account change the proxy bytecode? and why is there only one proxy bytecode that works for my account factory? @bountybot pays 100 USD to the person who can answer *all* these questions.
4 replies
0 recast
4 reactions
R3tardio π
@3fcc
I will make my answers brief and concise. Question 1 answer zkSync builds can be non-deterministic due to several factors such as compiler optimizations which mean different optimization levels or settings can lead to slightly different bytecode, metadata hashes are included in the bytecode and can change between compilations, and zkSync-specific factors - the zkSync compiler may introduce additional variability due to its unique optimizations for the zkEVM environment. Question 2 answer This behavior is often due to dependency changes, when the Smart Account implementation changes, it might require updates to the proxy to maintain compatibility, storage layout changes - updates to the Smart Account might alter its storage layout, necessitating changes in the proxy to correctly delegate calls, if new functions are added or existing ones modified, the proxy might need to update its forwarding logic. check below for the remaining answers.
0 reply
0 recast
1 reaction
R3tardio π
@3fcc
Question 3 answer The limitation to one proxy bytecode working for your account factory could be due to the followings, specific implementations address i.e. The proxy might be hardcoded to work with a specific implementation address used by your factory, your account factory might require a specific proxy setup that only one bytecode version satisfies, and lastly, the zkSync environment or your specific setup might have strict compatibility requirements that only one proxy version meets. Bonus* Check the specific versions of zkSync tools, Solidity, and other dependencies you're using. Review your Smart Account and proxy implementation details. Examine the account factory code to understand its specific requirements. Do lemme know if you have more questions.
2 replies
0 recast
0 reaction