Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

2.6.0: Propose replay attack protection hardfork at 2000000, ref #44 #62

Merged
merged 8 commits into from
Feb 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.4
2.6.0
4 changes: 2 additions & 2 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ var (
}
TestnetFlag = cli.BoolFlag{
Name: "testnet",
Usage: "Ropsten network: pre-configured proof-of-work test network",
Usage: "PoW network: pre-configured proof-of-work test network",
}
RinkebyFlag = cli.BoolFlag{
Name: "rinkeby",
Usage: "Rinkeby network: pre-configured proof-of-authority test network",
Usage: "PoA network: pre-configured proof-of-authority test network",
}
DeveloperFlag = cli.BoolFlag{
Name: "dev",
Expand Down
18 changes: 11 additions & 7 deletions core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ func GenesisBlockForTesting(db ethdb.Database, addr common.Address, balance *big
func DefaultGenesisBlock() *Genesis {
return &Genesis{
Config: params.MainnetChainConfig,
Timestamp: 0,
Nonce: 66,
ExtraData: hexutil.MustDecode("0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"),
GasLimit: 5000,
Expand All @@ -332,25 +333,27 @@ func MusicoinGenesisBlock() *Genesis {
}
}

// DefaultTestnetGenesisBlock returns the Ropsten network genesis block.
// DefaultTestnetGenesisBlock returns the PoW network genesis block.
func DefaultTestnetGenesisBlock() *Genesis {
return &Genesis{
Config: params.TestnetChainConfig,
Nonce: 66,
Timestamp: 0,
Nonce: 23,
ExtraData: hexutil.MustDecode("0x3535353535353535353535353535353535353535353535353535353535353535"),
GasLimit: 16777216,
Difficulty: big.NewInt(1048576),
Alloc: decodePrealloc(testnetAllocData),
}
}

// DefaultRinkebyGenesisBlock returns the Rinkeby network genesis block.
// DefaultRinkebyGenesisBlock returns the PoA network genesis block.
func DefaultRinkebyGenesisBlock() *Genesis {
return &Genesis{
Config: params.RinkebyChainConfig,
Timestamp: 1492009146,
Timestamp: 0,
Nonce: 23,
ExtraData: hexutil.MustDecode("0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
GasLimit: 4700000,
GasLimit: 16777216,
Difficulty: big.NewInt(1),
Alloc: decodePrealloc(rinkebyAllocData),
}
Expand All @@ -366,9 +369,10 @@ func DeveloperGenesisBlock(period uint64, faucet common.Address) *Genesis {
// Assemble and return the genesis with the precompiles and faucet pre-funded
return &Genesis{
Config: &config,
Nonce: 23,
ExtraData: append(append(make([]byte, 32), faucet[:]...), make([]byte, 65)...),
GasLimit: 6283185,
Difficulty: big.NewInt(1),
GasLimit: 16777216,
Difficulty: big.NewInt(131072),
Alloc: map[common.Address]GenesisAccount{
common.BytesToAddress([]byte{1}): {Balance: big.NewInt(1)}, // ECRecover
common.BytesToAddress([]byte{2}): {Balance: big.NewInt(1)}, // SHA256
Expand Down
4 changes: 2 additions & 2 deletions params/bootnodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ var MainnetBootnodes = []string{
}

// TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the
// Ropsten test network.
// PoW test network.
var TestnetBootnodes = []string{
"enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303", // US-TX
"enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303", // IE
}

// RinkebyBootnodes are the enode URLs of the P2P bootstrap nodes running on the
// Rinkeby test network.
// PoA test network.
var RinkebyBootnodes = []string{
"enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303", // IE
"enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30303", // INFURA
Expand Down
58 changes: 29 additions & 29 deletions params/config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2016 The Go-Ethereum Authors
// This file is part of the Go-Ethereum library.
//
// Copyright 2017 The Go-Musicoin Authors
// Copyright 2017-2018 The Go-Musicoin Authors
// This file is part of the Go-Musicoin library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -32,50 +32,50 @@ var (
)

var (
// MainnetChainConfig is the chain parameters to run a node on the main network.
// MainnetChainConfig is the chain parameters to run a node on the main Musicoin network.
MainnetChainConfig = &ChainConfig{
ChainId: big.NewInt(7762959),
HomesteadBlock: big.NewInt(1150000),
UBIForkBlock: big.NewInt(1200001),
DAOForkBlock: big.NewInt(36028797018963967),
DAOForkBlock: nil,
DAOForkSupport: false,
EIP150Block: big.NewInt(36028797018963967),
EIP150Block: big.NewInt(2000000),
EIP150Hash: common.HexToHash("0x"),
EIP155Block: big.NewInt(36028797018963967),
EIP158Block: big.NewInt(36028797018963967),
ByzantiumBlock: big.NewInt(36028797018963967),
EIP155Block: big.NewInt(2000000),
EIP158Block: big.NewInt(2000000),
ByzantiumBlock: big.NewInt(2000000),

Ethash: new(EthashConfig),
}

// TestnetChainConfig contains the chain parameters to run a node on the Ropsten test network.
// TestnetChainConfig contains the chain parameters to run a node on the PoW test network.
TestnetChainConfig = &ChainConfig{
ChainId: big.NewInt(7762955),
HomesteadBlock: big.NewInt(0),
UBIForkBlock: big.NewInt(0),
DAOForkBlock: big.NewInt(36028797018963967),
HomesteadBlock: big.NewInt(23),
UBIForkBlock: big.NewInt(23),
DAOForkBlock: nil,
DAOForkSupport: false,
EIP150Block: big.NewInt(0),
EIP150Hash: common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"),
EIP155Block: big.NewInt(10),
EIP158Block: big.NewInt(10),
ByzantiumBlock: big.NewInt(1700000),
EIP150Block: big.NewInt(42),
EIP150Hash: common.HexToHash("0x"),
EIP155Block: big.NewInt(42),
EIP158Block: big.NewInt(42),
ByzantiumBlock: big.NewInt(42),

Ethash: new(EthashConfig),
}

// RinkebyChainConfig contains the chain parameters to run a node on the Rinkeby test network.
// RinkebyChainConfig contains the chain parameters to run a node on the PoA test network.
RinkebyChainConfig = &ChainConfig{
ChainId: big.NewInt(4),
HomesteadBlock: big.NewInt(1),
UBIForkBlock: big.NewInt(0),
ChainId: big.NewInt(7762954),
HomesteadBlock: big.NewInt(23),
UBIForkBlock: big.NewInt(23),
DAOForkBlock: nil,
DAOForkSupport: true,
EIP150Block: big.NewInt(2),
EIP150Hash: common.HexToHash("0x9b095b36c15eaf13044373aef8ee0bd3a382a5abb92e402afa44b8249c3a90e9"),
EIP155Block: big.NewInt(3),
EIP158Block: big.NewInt(3),
ByzantiumBlock: big.NewInt(1035301),
DAOForkSupport: false,
EIP150Block: big.NewInt(42),
EIP150Hash: common.HexToHash("0x"),
EIP155Block: big.NewInt(42),
EIP158Block: big.NewInt(42),
ByzantiumBlock: big.NewInt(42),

Clique: &CliqueConfig{
Period: 15,
Expand Down Expand Up @@ -159,7 +159,7 @@ func (c *ChainConfig) String() string {
default:
engine = "unknown"
}
return fmt.Sprintf("{ChainID: %v Homestead: %v MCIP3-UBI: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Engine: %v}",
return fmt.Sprintf("{ChainID: %v Homestead: %v MCIP-3 UBI: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Engine: %v}",
c.ChainId,
c.HomesteadBlock,
c.UBIForkBlock,
Expand All @@ -178,7 +178,7 @@ func (c *ChainConfig) IsHomestead(num *big.Int) bool {
return isForked(c.HomesteadBlock, num)
}

// IsUBIFork returns whether num is either equal to the MCIP3-UBI block or greater.
// IsUBIFork returns whether num is either equal to the MCIP-3 block or greater.
func (c *ChainConfig) IsUBIFork(num *big.Int) bool {
return isForked(c.UBIForkBlock, num)
}
Expand Down Expand Up @@ -244,7 +244,7 @@ func (c *ChainConfig) checkCompatible(newcfg *ChainConfig, head *big.Int) *Confi
return newCompatError("Homestead fork block", c.HomesteadBlock, newcfg.HomesteadBlock)
}
if isForkIncompatible(c.UBIForkBlock, newcfg.UBIForkBlock, head) {
return newCompatError("MCIP3-UBI fork block", c.UBIForkBlock, newcfg.UBIForkBlock)
return newCompatError("MCIP-3 UBI fork block", c.UBIForkBlock, newcfg.UBIForkBlock)
}
if isForkIncompatible(c.DAOForkBlock, newcfg.DAOForkBlock, head) {
return newCompatError("DAO fork block", c.DAOForkBlock, newcfg.DAOForkBlock)
Expand Down
4 changes: 2 additions & 2 deletions params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

const (
VersionMajor = 2 // Major version component of the current release
VersionMinor = 5 // Minor version component of the current release
VersionPatch = 4 // Patch version component of the current release
VersionMinor = 6 // Minor version component of the current release
VersionPatch = 0 // Patch version component of the current release
VersionMeta = "beta" // Version metadata to append to the version string
)

Expand Down