diff --git a/cmd/geth/config.go b/cmd/geth/config.go index 5f52f1df5442..17496c13aea1 100644 --- a/cmd/geth/config.go +++ b/cmd/geth/config.go @@ -177,6 +177,14 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) { v := ctx.Uint64(utils.OverrideVerkle.Name) cfg.Eth.OverrideVerkle = &v } + if ctx.IsSet(utils.ZeroFeeAddressesFlag.Name) { + for _, addr := range ctx.StringSlice(utils.ZeroFeeAddressesFlag.Name) { + cfg.Eth.ZeroFeeAddresses = append( + cfg.Eth.ZeroFeeAddresses, + common.HexToAddress(strings.TrimSpace(addr)), + ) + } + } backend, eth := utils.RegisterEthService(stack, &cfg.Eth) // Create gauge with geth system and build information diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 2a74c1fd4de8..6e82143e3565 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -2124,7 +2124,6 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (*core.BlockCh if ctx.IsSet(CacheFlag.Name) || ctx.IsSet(CacheGCFlag.Name) { cache.TrieDirtyLimit = ctx.Int(CacheFlag.Name) * ctx.Int(CacheGCFlag.Name) / 100 } - vmcfg := vm.Config{EnablePreimageRecording: ctx.Bool(VMEnableDebugFlag.Name)} if ctx.IsSet(ZeroFeeAddressesFlag.Name) { for _, addr := range ctx.StringSlice(ZeroFeeAddressesFlag.Name) { diff --git a/eth/backend.go b/eth/backend.go index aff23a910bcb..241516622ba2 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -192,6 +192,7 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) { var ( vmConfig = vm.Config{ EnablePreimageRecording: config.EnablePreimageRecording, + ZeroFeeAddresses: config.ZeroFeeAddresses, } cacheConfig = &core.CacheConfig{ TrieCleanLimit: config.TrieCleanCache, diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index ad664afb5bd1..9a063ff2b958 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -159,6 +159,9 @@ type Config struct { // OverrideVerkle (TODO: remove after the fork) OverrideVerkle *uint64 `toml:",omitempty"` + + // ZeroFeeAddresses is a list of addresses that are exempt from the zero fee policy. + ZeroFeeAddresses []common.Address `toml:",omitempty"` } // CreateConsensusEngine creates a consensus engine for the given chain config. diff --git a/geth-poa/genesis.json b/geth-poa/genesis.json index ffe42de68b05..b3593df16512 100644 --- a/geth-poa/genesis.json +++ b/geth-poa/genesis.json @@ -1,74 +1,32 @@ { - "config": { - "chainId": 17864, - "homesteadBlock": 0, - "eip150Block": 0, - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "berlinBlock": 0, - "londonBlock": 0, - "cancunTime": 0, - "arrowGlacierBlock": 0, - "grayGlacierBlock": 0, - "clique": { - "period": 200, - "epoch": 30000 - } - }, - "nonce": "0x0", - "timestamp": "0x18E0A4E0D22", - "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000d9cd8E5DE6d55f796D980B818D350C0746C25b970000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "gasLimit": "0x1c9c380", - "difficulty": "0x1", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "0x0000000000000000000000000000000000000000", - "alloc": { - "0xBe3dEF3973584FdcC1326634aF188f0d9772D57D": { - "balance": "10000000000000000000000000000" - }, - "0xd9cd8E5DE6d55f796D980B818D350C0746C25b97": { - "balance": "10000000000000000000000000000" - }, - "0x788EBABe5c3dD422Ef92Ca6714A69e2eabcE1Ee4": { - "balance": "10000000000000000000000000000" - }, - "0xf6ba5bca9b489de3a4ac3a57823d5d97d608feb9": { - "balance": "10000000000000000000000000000" - }, - "0x0DCaa27B9E4Db92F820189345792f8eC5Ef148F6": { - "balance": "10000000000000000000000000000" - }, - "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266": { - "balance": "10000000000000000000000000000" - }, - "0x3fab184622dc19b6109349b94811493bf2a45362": { - "balance": "10000000000000000000000000000" - }, - "0xBcA333b67fb805aB18B4Eb7aa5a0B09aB25E5ce2": { - "balance": "10000000000000000000000000000" - }, - "0xB9286CB4782E43A202BfD426AbB72c8cb34f886c": { - "balance": "10000000000000000000000000000" - }, - "0x04F713A0b687c84D4F66aCd1423712Af6F852B78": { - "balance": "10000000000000000000000000000" - }, - "0x82b941824b43F33e417be1E92273A3020a0D760c": { - "balance": "10000000000000000000000000000" - }, - "0x57508f0B0f3426758F1f3D63ad4935a7c9383620": { - "balance": "10000000000000000000000000000" - }, - "0xa51f13769d1466e0b5483cb719e89add8d615052": { - "balance": "10000000000000000000000000000" - }, - "0x9a5a8ebd13951c8500c728c1982317a503b3e8ce": { - "balance": "10000000000000000000000000000" - } + "config": { + "chainId": 13923, + "terminalTotalDifficulty": 500, + "homesteadBlock": 0, + "eip150Block": 0, + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "berlinBlock": 0, + "londonBlock": 0, + "shanghaiTime": 0, + "cancunTime": 0, + "pragueTime": 0 + }, + "alloc": { + "0xc3bc246D6B0094C8B7D054f911F2bE3b07cE8A63": { + "balance": "999999999999911111" } - } + }, + "coinbase": "0x0000000000000000000000000000000000000000", + "difficulty": "0x0", + "extraData": "", + "gasLimit": "0x2fefd8", + "nonce": "0x0000000000000042", + "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "timestamp": "0x00" +} diff --git a/go.mod b/go.mod index 7650f9606a47..830151d766c7 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/ethereum/go-ethereum go 1.22.0 -toolchain go1.23.1 - require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 github.com/Microsoft/go-winio v0.6.1