-
Notifications
You must be signed in to change notification settings - Fork 20k
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
signer/core: handle gnosis safe problem with missing chain id #26309
Conversation
@holiman code from the
Relevant PR: #24231 Perhaps I should've added a comment there. So the safe you're using is version 1.3.0, which also factors in the chainId for the transaction hash. The JSON payload is missing the chainId parameter and therefore the function produces a mismatching hash. |
But why is that missing? It is coming directly from |
I think I've misphrased that, the payload is not missing it. Our services simply do not return it because we have a separate service per chain. |
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.
SGTM
…um#26309) This PR adds a check that the safetxhash that we sign corresponds to the one that is expected by the input. If it differs, it tries again with the configured chainid.
This PR adds a check that the safetxhash that we sign corresponds to the one that is expected by the input. This PR also adds a case which is currently failing.
The current code calculates the
safeTxHash
for a certain json message differently than what is expected by the online safe tx machinery.cc @rmeissner could you please help me figure out the difference here?
json:
Resulting preimage before keccak:
Resulting hash:
But the expectation is