Merged
Conversation
6 tasks
93a966b to
463cfb6
Compare
Contributor
|
References:
|
bb650b3 to
421f8f8
Compare
Contributor
Author
According to the PR description, some types such as |
7cb85b0 to
e59e269
Compare
This comment was marked as outdated.
This comment was marked as outdated.
driftluo
previously approved these changes
Dec 1, 2023
Contributor
Author
|
Wait for @sunchengzhu upgrade |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Flouse
reviewed
Dec 1, 2023
e05798d to
41e8f18
Compare
3 tasks
This comment was marked as outdated.
This comment was marked as outdated.
1 similar comment
Contributor
|
/run-ci |
This comment was marked as outdated.
This comment was marked as outdated.
CI tests run on commit:
CI test list:
Please check ci test results later. |
Flouse
reviewed
Dec 1, 2023
3 tasks
Flouse
previously approved these changes
Dec 4, 2023
driftluo
previously approved these changes
Dec 4, 2023
Flouse
reviewed
Dec 4, 2023
Co-authored-by: Flouse <[email protected]>
Flouse
approved these changes
Dec 4, 2023
Flouse
added a commit
that referenced
this pull request
Dec 4, 2023
* refactor: change many U256 type to U64 * change some safe as_u64 to low_u64 & cargo fmt * refactor the gas price and limit check * refactor prepay gas calculation * revert max gas limit * fix e2e test * Update eth_getBalance.test.js * remove useless code This PR is substitute for #1539 Some mainly changes: * Change the type of `nonce` from `U256` to `U64` according to the [EIP-2681](https://eips.ethereum.org/EIPS/eip-2681) limit the account nonce to be between `0` and `2^64-1`. * Change the type of `gas_limit` from `U256` to `U64`. According to the current gas cost of the most complex ethereum transaction is on the order of million, `U64` is enough. * Change the type of `chain_id` from `U256` to `U64` according to [metamask limit](https://gist.github.com/rekmarks/a47bd5f2525936c4b8eee31a16345553). The [`ChainId` opcode](https://eips.ethereum.org/EIPS/eip-1344) returns a 256-bit value, so it should not larger than `U256::MAX / 2 - 35`.This issue does not lead to consensus in Ethereum community, however, I think limit the max chain ID to `4503599627370476` is enough currently. Many temporary L2/L3 need a unique chain ID is the demand of variable-lenght chain ID in foreseeable future. But we do not have the demand now. If the day comes, we can change the chain ID type to `U256` even without hardfork. * Set the [`Default Max Price`](https://github.com/ethereum/go-ethereum/blob/be65b47/eth/gasprice/gasprice.go#L38) as `500` Gwei that is same as go-ethereum. Meanwhile, change the type of `gas_price` from `U256` to `U64`. --------- Co-authored-by: sunchengzhu <[email protected]> Co-authored-by: Flouse <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it?
This PR is substitute for #1539
Some mainly changes:
noncefromU256toU64according to the EIP-2681 limit the account nonce to be between0and2^64-1.gas_limitfromU256toU64. According to the current gas cost of the most complex ethereum transaction is on the order of million,U64is enough.chain_idfromU256toU64according to metamask limit. TheChainIdopcode returns a 256-bit value, so it should not larger thanU256::MAX / 2 - 35.This issue does not lead to consensus in Ethereum community, however, I think limit the max chain ID to4503599627370476is enough currently. Many temporary L2/L3 need a unique chain ID is the demand of variable-lenght chain ID in foreseeable future. But we do not have the demand now. If the day comes, we can change the chain ID type toU256even without hardfork.Default Max Priceas500Gwei that is same as go-ethereum. Meanwhile, change the type ofgas_pricefromU256toU64.What is the impact of this PR?
Breaking change
PR relation:
U256toU64#1539CI Settings
CI Usage
Tip: Check the CI you want to run below, and then comment
/run-ci.CI Switch
CI Description