forked from erigontech/erigon
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removing some magic numbers for block gas and some misleading comments
- Loading branch information
Showing
13 changed files
with
28 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
package utils | ||
|
||
const ( | ||
preForkId7BlockGasLimit = 30_000_000 | ||
forkId7BlockGasLimit = 18446744073709551615 // 0xffffffffffffffff | ||
forkId8BlockGasLimit = 1125899906842624 // 0x4000000000000 | ||
PreForkId7BlockGasLimit = 30_000_000 | ||
ForkId7BlockGasLimit = 18446744073709551615 // 0xffffffffffffffff | ||
ForkId8BlockGasLimit = 1125899906842624 // 0x4000000000000 | ||
) | ||
|
||
func GetExecutionGasLimit(forkId uint64) uint64 { | ||
if forkId >= 8 { | ||
return forkId8BlockGasLimit | ||
func GetBlockGasLimitForFork(forkId uint64) uint64 { | ||
if forkId >= 7 { | ||
// the gas limit for fork 8 was actually used for fork 7 and above after a re-hash | ||
return ForkId8BlockGasLimit | ||
} | ||
|
||
// [hack] the rpc returns forkid8 value, but forkid7 is used in execution | ||
if forkId == 7 { | ||
return forkId8BlockGasLimit | ||
// return forkId7BlockGasLimit | ||
} | ||
|
||
return preForkId7BlockGasLimit | ||
return PreForkId7BlockGasLimit | ||
} |
This file contains 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