Skip to content
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

Change chain_id from u8 to u32 #7

Closed
tritone11 opened this issue Jan 22, 2019 · 6 comments
Closed

Change chain_id from u8 to u32 #7

tritone11 opened this issue Jan 22, 2019 · 6 comments

Comments

@tritone11
Copy link
Contributor

chain_id as u8 make this library unsuable for all chains with a chain_id higher than 255

For example, private chains with the default chain id (1337) or the Görli testnet (6284)

This should be set as a u32, as the Stureby testnet for Constantinople has a chain id of 314158 as specified in the EIP155 implementation

@synlestidae
Copy link
Owner

Thanks for bringing it to my attention.

Is there a specified upper bound on the value of CHAIN_ID? In case u32 is not future proof

@tritone11
Copy link
Contributor Author

tritone11 commented Jan 29, 2019

@synlestidae as cited here, it is defined in geth as a BigInt, so the upper bound would be architecture dependent. It could be a u64

@reuvenpo
Copy link

I want to bump this as I'm trying to use this crate and I need to use these sorts of high chain ids, so I'm bumping this thread.

Also, according to this yet-unmerged PR on rust-web3 it can be a u64.

@synlestidae
Copy link
Owner

This change should be straightforward. I've scheduled myself some time to get it released this weekend.

@reuvenpo
Copy link

Awesome! We really appreciate it! :)

@Cashmaney Cashmaney mentioned this issue Nov 21, 2019
@synlestidae
Copy link
Owner

Closing this issue thanks to @Cashmaney's changes in #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants