Merge branch 'ethereum:master' into portal

This commit is contained in:
Chen Kai 2024-01-03 09:59:56 +08:00 committed by GitHub
commit 7499f1196c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 13 deletions

View file

@ -123,12 +123,13 @@ var (
// wily, yakkety, zesty, artful, cosmic, disco, eoan, groovy, hirsuite, impish, // wily, yakkety, zesty, artful, cosmic, disco, eoan, groovy, hirsuite, impish,
// kinetic // kinetic
debDistroGoBoots = map[string]string{ debDistroGoBoots = map[string]string{
"trusty": "golang-1.11", // EOL: 04/2024 "trusty": "golang-1.11", // 14.04, EOL: 04/2024
"xenial": "golang-go", // EOL: 04/2026 "xenial": "golang-go", // 16.04, EOL: 04/2026
"bionic": "golang-go", // EOL: 04/2028 "bionic": "golang-go", // 18.04, EOL: 04/2028
"focal": "golang-go", // EOL: 04/2030 "focal": "golang-go", // 20.04, EOL: 04/2030
"jammy": "golang-go", // EOL: 04/2032 "jammy": "golang-go", // 22.04, EOL: 04/2032
"lunar": "golang-go", // EOL: 01/2024 "lunar": "golang-go", // 23.04, EOL: 01/2024
"mantic": "golang-go", // 23.10, EOL: 07/2024
} }
debGoBootPaths = map[string]string{ debGoBootPaths = map[string]string{
@ -285,7 +286,7 @@ func doTest(cmdline []string) {
coverage = flag.Bool("coverage", false, "Whether to record code coverage") coverage = flag.Bool("coverage", false, "Whether to record code coverage")
verbose = flag.Bool("v", false, "Whether to log verbosely") verbose = flag.Bool("v", false, "Whether to log verbosely")
race = flag.Bool("race", false, "Execute the race detector") race = flag.Bool("race", false, "Execute the race detector")
short = flag.Bool("short", false, "Pass the 'short'-flag to go test") short = flag.Bool("short", false, "Pass the 'short'-flag to go test")
cachedir = flag.String("cachedir", "./build/cache", "directory for caching downloads") cachedir = flag.String("cachedir", "./build/cache", "directory for caching downloads")
) )
flag.CommandLine.Parse(cmdline) flag.CommandLine.Parse(cmdline)

View file

@ -214,7 +214,7 @@ exitcode:3 OK
The chain configuration to be used for a transition is specified via the The chain configuration to be used for a transition is specified via the
`--state.fork` CLI flag. A list of possible values and configurations can be `--state.fork` CLI flag. A list of possible values and configurations can be
found in [`tests/init.go`](tests/init.go). found in [`tests/init.go`](../../tests/init.go).
#### Examples #### Examples
##### Basic usage ##### Basic usage

View file

@ -197,7 +197,7 @@ var (
gasStaticCallEIP2929 = makeCallVariantGasCallEIP2929(gasStaticCall) gasStaticCallEIP2929 = makeCallVariantGasCallEIP2929(gasStaticCall)
gasCallCodeEIP2929 = makeCallVariantGasCallEIP2929(gasCallCode) gasCallCodeEIP2929 = makeCallVariantGasCallEIP2929(gasCallCode)
gasSelfdestructEIP2929 = makeSelfdestructGasFn(true) gasSelfdestructEIP2929 = makeSelfdestructGasFn(true)
// gasSelfdestructEIP3529 implements the changes in EIP-2539 (no refunds) // gasSelfdestructEIP3529 implements the changes in EIP-3529 (no refunds)
gasSelfdestructEIP3529 = makeSelfdestructGasFn(false) gasSelfdestructEIP3529 = makeSelfdestructGasFn(false)
// gasSStoreEIP2929 implements gas cost for SSTORE according to EIP-2929 // gasSStoreEIP2929 implements gas cost for SSTORE according to EIP-2929
@ -214,12 +214,12 @@ var (
// see gasSStoreEIP2200(...) in core/vm/gas_table.go for more info about how EIP 2200 is specified // see gasSStoreEIP2200(...) in core/vm/gas_table.go for more info about how EIP 2200 is specified
gasSStoreEIP2929 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP2200) gasSStoreEIP2929 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP2200)
// gasSStoreEIP2539 implements gas cost for SSTORE according to EIP-2539 // gasSStoreEIP3529 implements gas cost for SSTORE according to EIP-3529
// Replace `SSTORE_CLEARS_SCHEDULE` with `SSTORE_RESET_GAS + ACCESS_LIST_STORAGE_KEY_COST` (4,800) // Replace `SSTORE_CLEARS_SCHEDULE` with `SSTORE_RESET_GAS + ACCESS_LIST_STORAGE_KEY_COST` (4,800)
gasSStoreEIP3529 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP3529) gasSStoreEIP3529 = makeGasSStoreFunc(params.SstoreClearsScheduleRefundEIP3529)
) )
// makeSelfdestructGasFn can create the selfdestruct dynamic gas function for EIP-2929 and EIP-2539 // makeSelfdestructGasFn can create the selfdestruct dynamic gas function for EIP-2929 and EIP-3529
func makeSelfdestructGasFn(refundsEnabled bool) gasFunc { func makeSelfdestructGasFn(refundsEnabled bool) gasFunc {
gasFunc := func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) { gasFunc := func(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySize uint64) (uint64, error) {
var ( var (

View file

@ -10,8 +10,7 @@ import (
var root atomic.Value var root atomic.Value
func init() { func init() {
defaultLogger := &logger{slog.New(DiscardHandler())} root.Store(&logger{slog.New(DiscardHandler())})
SetDefault(defaultLogger)
} }
// SetDefault sets the default global logger // SetDefault sets the default global logger