[ZK Stack] - Cannot execute Seaport 1.6 fulfillment txs due to incorrect calldatasize/offset #744
-
Team or ProjectReservoir Module Affected
Rust Version1.82.0 Operating System
Issue DescriptionHello, We are trying to port Seaport 1.6 to zkEVM chains. We've compiled and deployed the contracts to Abstract testnet and zkSync successfully. However, our txs are failing whenever we try to actually fulfill Seaport orders. Here is the failed tx Upon further investigation, the tx is failing when Seaport attempts an external call to the Conduit deployed at 0x21c61ff1bd7caad963e191d2c6ac8fd808916473. We believe that incorrect
The wrong calldata seems to be being passed to the Conduit, since it starts with empty bytes. We would expect the function selector to be Importantly, here is the call immediately preceding the above call, to the Keccak256 system contract at 0x0000000000000000000000000000000000008010.
The wrong calldata is a superset of the Keccak256 calldata, with
I've attached the full calltrace for reference. The only changes we've made so far are updating the contracts to derive correct zkSync create2 addresses. Expected BehaviorHere is a successful call to We expect the calldata for the external call to the Conduit to begin with a function selector of Current BehaviorThe call to the Conduit (which handles token transfers on behalf of Seaport) is reverting, leading to an Repository Link (if applicable)Additional DetailsPrior Research
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
It appears that the issue you're encountering with the Seaport 1.6 implementation on zkEVM chains might be related to differences in how calldata is handled between zkEVM and Ethereum's EVM. This could be affecting the Here are a few steps you might consider to troubleshoot and potentially resolve this issue:
For more detailed discussions and support from other developers, you can visit the ZKsync developers discussions on Github. If these steps do not resolve the issue, it may be beneficial to reach out directly to the ZKsync support or development team for more targeted assistance. Your feedback helps us serve you better. If this fully addresses your question, please give it a thumbs up. If it doesn't, please give it a thumbs down. This will inform the community and team so we can improve our support. |
Beta Was this translation helpful? Give feedback.
-
Have you tried debugging the transaction with era-test-node? It might give you more details about the issue. Looks like the repo you shared is private, could you share it? |
Beta Was this translation helpful? Give feedback.
-
Hey! It's hard to say what exactly goes wrong here, because the contract is pretty complex and relies heavily on the assembly. One thought I have may be the msize-related differences. Could it be that some of the allocations are optimized away which affects the calculations for the offsets? It might make sense to try deploying & running the contract without any optimizations to see if the problem persists. If it does, we may try to look into it, but ideally we would need a minimal reproducible example, since trying to learn a big & complex codebase may be too time-consuming to realistically help here. |
Beta Was this translation helpful? Give feedback.
Hey! It's hard to say what exactly goes wrong here, because the contract is pretty complex and relies heavily on the assembly.
As Antonio pointed out, the repository you linked seems to be private, so I looked at the verified code on the Abstract testnet instead.
One thought I have may be the msize-related differences. Could it be that some of the allocations are optimized away which affects the calculations for the offsets?
It might make sense to try deploying & running the contract without any optimizations to see if the problem persists. If it does, we may try to look into it, but ideally we would need a minimal reproducible example, since trying to learn a big & complex codebase may b…