-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add support for non-byte chain id values #234
Comments
@conor10 Any news on this issue? We would want to use a geth dev network with chainId 1337... |
I've been looking into this one a bit. See PR #478 |
Started working on that |
Seems like |
TransactionDecoder ready: #491 |
You can change |
Next step I guess is to allow for byte array |
any news on that? it's limiting if we want to use it for non public chains ... |
Looks like this was fixed in #913, included in release 4.3. |
In the current web3j implementation, the ChainId is of type byte.
The reason for this is historical,to support EIP-155, where you place a byte value in the raw transaction object - see here.
However, further down the original EIP discussion it is mentioned that the v value when the transaction is RLP encoded shouldn't be limited to a single byte. So web3j could be enhanced to accommodate this.
This would mean enhancing the Transaction encoder so that a long value can be provided:
https://github.com/web3j/web3j/blob/master/crypto/src/main/java/org/web3j/crypto/TransactionEncoder.java#L34
The SignatureData object should not however be modified as this requires a byte value for v in transaction signing. This means that in the initial encode of the RawTransaction the chain id field should be RLP encoded, which would require modification of the current encode method.
The ChainId itself should probably become an enum wrapping the underlying long value.
The text was updated successfully, but these errors were encountered: