-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
core/types: change SetCodeTx.ChainID to uint256 #30982
Conversation
Hmm. So now it's a bit inconsistent with |
Why do we use
In terms of this, it seems like encoding as |
b2d69de
to
cd0c444
Compare
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. For json, seems good to just require the element and use zero as the sentinel value for auths valid on all chains
@@ -219,7 +219,7 @@ func (s pragueSigner) SignatureValues(tx *Transaction, sig []byte) (R, S, V *big | |||
} | |||
// Check that chain ID of tx matches the signer. We also accept ID zero here, | |||
// because it indicates that the chain ID was not specified in the tx. | |||
if txdata.ChainID != 0 && new(big.Int).SetUint64(txdata.ChainID).Cmp(s.chainId) != 0 { | |||
if txdata.ChainID != nil && txdata.ChainID.CmpBig(s.chainId) != 0 { |
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.
is this correct?
should it be if txdata.ChainID.Sign() != 0 && txdata.ChainID.ToBig().Cmp(s.chainId) != 0 {
?
I think it was copied from the cancunSigner
, but it's not same with the cancunSigner
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.
after thinking about it, It is correct.
I have made a PR #31032 to update the cancunSigner to align with it
We still need to decide how to handle non-specfic `chainId` in the JSON encoding of authorizations. With `chainId` being a uint64, the previous implementation just used value zero. However, it might actually be more correct to use the value `null` for this case.
We still need to decide how to handle non-specfic
chainId
in the JSON encoding of authorizations. WithchainId
being a uint64, the previous implementation just used value zero. However, it might actually be more correct to use the valuenull
for this case.