mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
Fix Goerli Params and Genesis (#25)
* params: fix goerli aura params * params: remove period and epoch from aura config * core: fix goerli genesis * cmd/utils: fix goerli flags
This commit is contained in:
parent
65ae9c91b6
commit
1f6086d09b
5 changed files with 27 additions and 20 deletions
|
|
@ -714,6 +714,8 @@ func setBootstrapNodesV5(ctx *cli.Context, cfg *p2p.Config) {
|
||||||
}
|
}
|
||||||
case ctx.GlobalBool(RinkebyFlag.Name):
|
case ctx.GlobalBool(RinkebyFlag.Name):
|
||||||
urls = params.RinkebyBootnodes
|
urls = params.RinkebyBootnodes
|
||||||
|
case ctx.GlobalBool(GoerliFlag.Name):
|
||||||
|
urls = params.GoerliBootnodes
|
||||||
case cfg.BootstrapNodesV5 != nil:
|
case cfg.BootstrapNodesV5 != nil:
|
||||||
return // already set, don't apply defaults.
|
return // already set, don't apply defaults.
|
||||||
}
|
}
|
||||||
|
|
@ -981,7 +983,6 @@ func SetNodeConfig(ctx *cli.Context, cfg *node.Config) {
|
||||||
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "testnet")
|
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "testnet")
|
||||||
case ctx.GlobalBool(RinkebyFlag.Name):
|
case ctx.GlobalBool(RinkebyFlag.Name):
|
||||||
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "rinkeby")
|
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "rinkeby")
|
||||||
// setting Goerli default datadir
|
|
||||||
case ctx.GlobalBool(GoerliFlag.Name):
|
case ctx.GlobalBool(GoerliFlag.Name):
|
||||||
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "goerli")
|
cfg.DataDir = filepath.Join(node.DefaultDataDir(), "goerli")
|
||||||
}
|
}
|
||||||
|
|
@ -1124,7 +1125,7 @@ func SetShhConfig(ctx *cli.Context, stack *node.Node, cfg *whisper.Config) {
|
||||||
// SetEthConfig applies eth-related command line flags to the config.
|
// SetEthConfig applies eth-related command line flags to the config.
|
||||||
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
|
func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *eth.Config) {
|
||||||
// Avoid conflicting network flags
|
// Avoid conflicting network flags
|
||||||
checkExclusive(ctx, DeveloperFlag, TestnetFlag, RinkebyFlag)
|
checkExclusive(ctx, DeveloperFlag, TestnetFlag, RinkebyFlag, GoerliFlag)
|
||||||
checkExclusive(ctx, LightServFlag, SyncModeFlag, "light")
|
checkExclusive(ctx, LightServFlag, SyncModeFlag, "light")
|
||||||
|
|
||||||
ks := stack.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore)
|
ks := stack.AccountManager().Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore)
|
||||||
|
|
|
||||||
|
|
@ -333,14 +333,14 @@ func DefaultRinkebyGenesisBlock() *Genesis {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Need alloc data
|
//Need alloc data
|
||||||
// DefaultGoerliGenesisBlock returns the Rinkeby network genesis block.
|
// DefaultGoerliGenesisBlock returns the Goerli network genesis block.
|
||||||
func DefaultGoerliGenesisBlock() *Genesis {
|
func DefaultGoerliGenesisBlock() *Genesis {
|
||||||
return &Genesis{
|
return &Genesis{
|
||||||
Config: params.GoerliChainConfig,
|
Config: params.GoerliChainConfig,
|
||||||
Timestamp: 1492009146,
|
Timestamp: 0,
|
||||||
ExtraData: hexutil.MustDecode("0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
|
ExtraData: hexutil.MustDecode("0x"),
|
||||||
GasLimit: 4700000,
|
GasLimit: 6000000,
|
||||||
Difficulty: big.NewInt(1),
|
Difficulty: big.NewInt(131072),
|
||||||
Alloc: decodePrealloc(goerliAllocData),
|
Alloc: decodePrealloc(goerliAllocData),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -50,6 +50,15 @@ func RinkebyGenesis() string {
|
||||||
return string(enc)
|
return string(enc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GoerliGenesis returns the JSON spec to use for the Goerli test network
|
||||||
|
func GoerliGenesis() string {
|
||||||
|
enc, err := json.Marshal(core.DefaultGoerliGenesisBlock())
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
return string(enc)
|
||||||
|
}
|
||||||
|
|
||||||
// FoundationBootnodes returns the enode URLs of the P2P bootstrap nodes operated
|
// FoundationBootnodes returns the enode URLs of the P2P bootstrap nodes operated
|
||||||
// by the foundation running the V5 discovery protocol.
|
// by the foundation running the V5 discovery protocol.
|
||||||
func FoundationBootnodes() *Enodes {
|
func FoundationBootnodes() *Enodes {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ package params
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -28,7 +27,7 @@ var (
|
||||||
MainnetGenesisHash = common.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3")
|
MainnetGenesisHash = common.HexToHash("0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3")
|
||||||
TestnetGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d")
|
TestnetGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d")
|
||||||
RinkebyGenesisHash = common.HexToHash("0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177")
|
RinkebyGenesisHash = common.HexToHash("0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177")
|
||||||
GoerliGenesisHash = common.HexToHash("0X0000000000000000000000000000000000000000000000000000000000000000")
|
GoerliGenesisHash = common.HexToHash("0x4a982649dec9992d0c83d195a81670bfcbe769436a900bab113371a25d7ad4ab")
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -83,20 +82,19 @@ var (
|
||||||
// GoerliChainConfig contains the chain parameters to run a node on the Goerli test network.
|
// GoerliChainConfig contains the chain parameters to run a node on the Goerli test network.
|
||||||
GoerliChainConfig = &ChainConfig{
|
GoerliChainConfig = &ChainConfig{
|
||||||
ChainID: big.NewInt(6382),
|
ChainID: big.NewInt(6382),
|
||||||
HomesteadBlock: big.NewInt(2),
|
HomesteadBlock: big.NewInt(0),
|
||||||
DAOForkBlock: nil,
|
DAOForkBlock: nil,
|
||||||
DAOForkSupport: true,
|
DAOForkSupport: false,
|
||||||
EIP150Block: big.NewInt(2),
|
// EIP150Block: big.NewInt(0),
|
||||||
EIP150Hash: common.HexToHash("0X0000000000000000000000000000000000000000000000000000000000000000"),
|
// EIP150Hash: common.HexToHash("0X0000000000000000000000000000000000000000000000000000000000000000"),
|
||||||
EIP155Block: big.NewInt(3),
|
EIP155Block: big.NewInt(0),
|
||||||
EIP158Block: big.NewInt(3),
|
EIP158Block: big.NewInt(0),
|
||||||
ByzantiumBlock: big.NewInt(1035301),
|
ByzantiumBlock: big.NewInt(0),
|
||||||
ConstantinopleBlock: nil,
|
ConstantinopleBlock: nil,
|
||||||
Aura: &AuraConfig{
|
Aura: &AuraConfig{
|
||||||
Period: 4,
|
|
||||||
Epoch: 30000,
|
|
||||||
Authorities: []common.Address{
|
Authorities: []common.Address{
|
||||||
common.HexToAddress("0x540a9fe3d2381016dec8ffba7235c6fb00b0f942"),
|
common.HexToAddress("0x0082a7bf6aaadab094061747872243059c3c6a07"),
|
||||||
|
common.HexToAddress("0x00faa37564140c1a5e96095f05466b9f73441e44"),
|
||||||
},
|
},
|
||||||
Difficulty: big.NewInt(131072),
|
Difficulty: big.NewInt(131072),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue