-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
Chain id being set to 9223372036854775790 #13847
Comments
Thank you for your detailed description of the issue. We will look in to this. |
AFAIK chainID cannot be zero. We should disallow it. |
@fjl I agree, I can see issues with the chainID being 0 messing with a signer's |
There are other issues too where some code might assume that 0 == unset, and default to non EIP-155 signatures, which will be one hell of a hard thing to debug :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It has EIP155 = true, with Geth 1.8.10 it succesfully mined. Please see transactions made via Custom node with EIP155=true and chainid=0 with described node, done yesterday |
What can I do? I have private blockchain with quite large blockheight. Genesis.json has chainid=0 |
System information
Geth version: Tested on
1.5.9
and1.6.0-unstable
OS & Version: Linux - Ubuntu 16.04
Commit hash : N/A
Expected behaviour
The transaction gets put into the pending transactions pool
Actual behaviour
An error is thrown about an
Invalid sender
, specificallyInvalid v,r,s
Steps to reproduce the behaviour
Start a private geth node with chain id
0
Backtrace
I opened an Ethereum exchange question here as well: http://ethereum.stackexchange.com/questions/13603/whats-wrong-with-this-golang-code-for-transaction-signing-invalid-v-r-s-error
What I believe is happening is the
chain id
is being mis-set internally to9223372036854775790
which is2^64/2
(thank you to @fjl on gitter who pointed this number out), despite being explicitly set to0
(or any other number).My understanding is that transactions are being signed with the false
chain id
(I've printed them out to confirm that the transaction chain id does change to9223372036854775790
) instead of the one I specified, and as a result the transaction'sv,r,s
values are invalid and so the transaction never gets put into the pending transactions pool.Some notes about the gist: In that gist I use a
Homestead
signer, if I use anEIP155Signer
, initialized with thechain id
, the error isinvalid chain id
, and the transaction is still signed with the incorrect chain id.Code to re-create the issue: https://gist.github.com/karysto/3c7c1ab9d3ae736e5c63a2bbe4c47ac2
The text was updated successfully, but these errors were encountered: