Remove Ropsten and Rinkeby test networks
This commit is contained in:
parent
0ccdec2985
commit
a399c04346
|
@ -20,8 +20,7 @@ jobs:
|
|||
cache:
|
||||
directories:
|
||||
- ".ethereumtest/Mainnet"
|
||||
- ".ethereumtest/Rinkeby"
|
||||
- ".ethereumtest/Ropsten"
|
||||
- ".ethereumtest/Goerli"
|
||||
- ".ethereumtest/StatusChain"
|
||||
env:
|
||||
matrix:
|
||||
|
|
|
@ -257,7 +257,7 @@ func makeNodeConfig() (*params.NodeConfig, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
nodeConfig, err := params.NewNodeConfigWithDefaults(path.Join(workDir, ".ethereum"), uint64(params.RopstenNetworkID))
|
||||
nodeConfig, err := params.NewNodeConfigWithDefaults(path.Join(workDir, ".ethereum"), uint64(params.GoerliNetworkID))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -52,10 +52,10 @@ var (
|
|||
dataDir = flag.String("dir", getDefaultDataDir(), "Directory used by node to store data")
|
||||
networkID = flag.Int(
|
||||
"network-id",
|
||||
params.RopstenNetworkID,
|
||||
params.GoerliNetworkID,
|
||||
fmt.Sprintf(
|
||||
"A network ID: %d (Mainnet), %d (Ropsten), %d (Rinkeby), %d (Goerli)",
|
||||
params.MainNetworkID, params.RopstenNetworkID, params.RinkebyNetworkID, params.GoerliNetworkID,
|
||||
"A network ID: %d (Mainnet), %d (Goerli)",
|
||||
params.MainNetworkID, params.GoerliNetworkID,
|
||||
),
|
||||
)
|
||||
listenAddr = flag.String("addr", "", "address to bind listener to")
|
||||
|
|
|
@ -64,10 +64,10 @@ var (
|
|||
dataDir = flag.String("dir", getDefaultDataDir(), "Directory used by node to store data")
|
||||
networkID = flag.Int(
|
||||
"network-id",
|
||||
params.RopstenNetworkID,
|
||||
params.GoerliNetworkID,
|
||||
fmt.Sprintf(
|
||||
"A network ID: %d (Mainnet), %d (Ropsten), %d (Rinkeby), %d (Goerli)",
|
||||
params.MainNetworkID, params.RopstenNetworkID, params.RinkebyNetworkID, params.GoerliNetworkID,
|
||||
"A network ID: %d (Mainnet), %d (Goerli)",
|
||||
params.MainNetworkID, params.GoerliNetworkID,
|
||||
),
|
||||
)
|
||||
listenAddr = flag.String("addr", "", "address to bind listener to")
|
||||
|
|
|
@ -55,10 +55,10 @@ var (
|
|||
mailserver = flag.Bool("mailserver", false, "Enable Mail Server with default configuration")
|
||||
networkID = flag.Int(
|
||||
"network-id",
|
||||
params.RopstenNetworkID,
|
||||
params.GoerliNetworkID,
|
||||
fmt.Sprintf(
|
||||
"A network ID: %d (Mainnet), %d (Ropsten), %d (Rinkeby), %d (Goerli)",
|
||||
params.MainNetworkID, params.RopstenNetworkID, params.RinkebyNetworkID, params.GoerliNetworkID,
|
||||
"A network ID: %d (Mainnet), %d (Goerli)",
|
||||
params.MainNetworkID, params.GoerliNetworkID,
|
||||
),
|
||||
)
|
||||
fleet = flag.String(
|
||||
|
|
|
@ -10,8 +10,6 @@ var errorNotAvailableOnChainID = errors.New("not available for chainID")
|
|||
|
||||
var contractAddressByChainID = map[uint64]common.Address{
|
||||
1: common.HexToAddress("0x08A8fDBddc160A7d5b957256b903dCAb1aE512C5"), // mainnet
|
||||
3: common.HexToAddress("0x08A8fDBddc160A7d5b957256b903dCAb1aE512C5"), // ropsten
|
||||
4: common.HexToAddress("0x08A8fDBddc160A7d5b957256b903dCAb1aE512C5"), // rinkeby
|
||||
5: common.HexToAddress("0x08A8fDBddc160A7d5b957256b903dCAb1aE512C5"), // goerli
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ var errorNotAvailableOnChainID = errors.New("not available for chainID")
|
|||
|
||||
var contractAddressByChainID = map[uint64]common.Address{
|
||||
1: common.HexToAddress("0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"), // mainnet
|
||||
3: common.HexToAddress("0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"), // ropsten
|
||||
5: common.HexToAddress("0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"), // goerli
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ var errorNotAvailableOnChainID = errors.New("not available for chainID")
|
|||
|
||||
var contractAddressByChainID = map[uint64]common.Address{
|
||||
1: common.HexToAddress("0x744d70fdbe2ba4cf95131626614a1763df805b9e"), // mainnet
|
||||
3: common.HexToAddress("0xc55cf4b03948d7ebc8b9e8bad92643703811d162"), // ropsten
|
||||
5: common.HexToAddress("0x3d6afaa395c31fcd391fe3d562e75fe9e8ec7e6a"), // goerli
|
||||
}
|
||||
|
||||
|
|
|
@ -10,19 +10,16 @@ var errorNotAvailableOnChainID = errors.New("not available for chainID")
|
|||
|
||||
var stickerTypeByChainID = map[uint64]common.Address{
|
||||
1: common.HexToAddress("0x0577215622f43a39f4bc9640806dfea9b10d2a36"), // mainnet
|
||||
3: common.HexToAddress("0x8cc272396be7583c65bee82cd7b743c69a87287d"), // ropsten
|
||||
5: common.HexToAddress("0x07f7CB0C0a4ab3e0999AfE8b3997Da34880f05d0"), // goerli testnet
|
||||
}
|
||||
|
||||
var stickerMarketByChainID = map[uint64]common.Address{
|
||||
1: common.HexToAddress("0x12824271339304d3a9f7e096e62a2a7e73b4a7e7"), // mainnet
|
||||
3: common.HexToAddress("0x6CC7274aF9cE9572d22DFD8545Fb8c9C9Bcb48AD"), // ropsten
|
||||
5: common.HexToAddress("0xf1E149A7DF70D5Ff1E265daAa738d785D3274717"), // goerli testnet
|
||||
}
|
||||
|
||||
var stickerPackByChainID = map[uint64]common.Address{
|
||||
1: common.HexToAddress("0x110101156e8F0743948B2A61aFcf3994A8Fb172e"), // mainnet
|
||||
3: common.HexToAddress("0xf852198d0385c4b871e0b91804ecd47c6ba97351"), // ropsten
|
||||
5: common.HexToAddress("0x8D3fD2EA24bD53a8Bd2b1026727db8bbe9A8C8Af"), // goerli testnet
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ func TestParseNodesToNodeID(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestNewGethNodeConfig(t *testing.T) {
|
||||
config, err := params.NewNodeConfig("", params.RopstenNetworkID)
|
||||
config, err := params.NewNodeConfig("", params.GoerliNetworkID)
|
||||
require.NoError(t, err)
|
||||
config.HTTPEnabled = true
|
||||
config.HTTPVirtualHosts = []string{"my.domain.com"}
|
||||
|
|
|
@ -1106,10 +1106,6 @@ func getUpstreamURL(networkID uint64) string {
|
|||
switch networkID {
|
||||
case MainNetworkID:
|
||||
return MainnetEthereumNetworkURL
|
||||
case RopstenNetworkID:
|
||||
return RopstenEthereumNetworkURL
|
||||
case RinkebyNetworkID:
|
||||
return RinkebyEthereumNetworkURL
|
||||
case GoerliNetworkID:
|
||||
return GoerliEthereumNetworkURL
|
||||
}
|
||||
|
@ -1158,14 +1154,12 @@ func (c *NodeConfig) AddAPIModule(m string) {
|
|||
}
|
||||
|
||||
// LesTopic returns discovery v5 topic derived from genesis of the provided network.
|
||||
// 1 - mainnet, 3 - ropsten, 4 - rinkeby
|
||||
// 1 - mainnet, 5 - goerli
|
||||
func LesTopic(netid int) string {
|
||||
switch netid {
|
||||
case 1:
|
||||
return LESDiscoveryIdentifier + types.Bytes2Hex(params.MainnetGenesisHash.Bytes()[:8])
|
||||
case 3:
|
||||
return LESDiscoveryIdentifier + types.Bytes2Hex(params.RopstenGenesisHash.Bytes()[:8])
|
||||
case 4:
|
||||
case 5:
|
||||
return LESDiscoveryIdentifier + types.Bytes2Hex(params.RinkebyGenesisHash.Bytes()[:8])
|
||||
default:
|
||||
return ""
|
||||
|
|
|
@ -19,7 +19,7 @@ import (
|
|||
func TestNewNodeConfigWithDefaults(t *testing.T) {
|
||||
c, err := params.NewNodeConfigWithDefaults(
|
||||
"/some/data/path",
|
||||
params.RopstenNetworkID,
|
||||
params.GoerliNetworkID,
|
||||
params.WithFleet(params.FleetProd),
|
||||
params.WithLES(),
|
||||
params.WithMailserver(),
|
||||
|
@ -88,7 +88,7 @@ func TestConfigWriteRead(t *testing.T) {
|
|||
require.Nil(t, err)
|
||||
defer os.RemoveAll(tmpDir) // nolint: errcheck
|
||||
|
||||
nodeConfig, err := utils.MakeTestNodeConfigWithDataDir("", tmpDir, params.RopstenNetworkID)
|
||||
nodeConfig, err := utils.MakeTestNodeConfigWithDataDir("", tmpDir, params.GoerliNetworkID)
|
||||
require.Nil(t, err, "cannot create new config object")
|
||||
|
||||
err = nodeConfig.Save()
|
||||
|
@ -97,7 +97,7 @@ func TestConfigWriteRead(t *testing.T) {
|
|||
loadedConfigData, err := ioutil.ReadFile(filepath.Join(nodeConfig.DataDir, "config.json"))
|
||||
require.Nil(t, err, "cannot read configuration from disk")
|
||||
loadedConfig := string(loadedConfigData)
|
||||
require.Contains(t, loadedConfig, fmt.Sprintf(`"NetworkId": %d`, params.RopstenNetworkID))
|
||||
require.Contains(t, loadedConfig, fmt.Sprintf(`"NetworkId": %d`, params.GoerliNetworkID))
|
||||
require.Contains(t, loadedConfig, fmt.Sprintf(`"DataDir": "%s"`, tmpDir))
|
||||
require.Contains(t, loadedConfig, fmt.Sprintf(`"BackupDisabledDataDir": "%s"`, tmpDir))
|
||||
}
|
||||
|
|
|
@ -39,14 +39,6 @@ const (
|
|||
// allow us avoid syncing node.
|
||||
MainnetEthereumNetworkURL = "https://mainnet.infura.io/nKmXgiFgc2KqtoQ8BCGJ"
|
||||
|
||||
// RopstenEthereumNetworkURL is URL where the upstream ethereum network is loaded to
|
||||
// allow us avoid syncing node.
|
||||
RopstenEthereumNetworkURL = "https://ropsten.infura.io/nKmXgiFgc2KqtoQ8BCGJ"
|
||||
|
||||
// RinkebyEthereumNetworkURL is URL where the upstream ethereum network is loaded to
|
||||
// allow us avoid syncing node.
|
||||
RinkebyEthereumNetworkURL = "https://rinkeby.infura.io/nKmXgiFgc2KqtoQ8BCGJ"
|
||||
|
||||
// GoerliEthereumNetworkURL is an open RPC endpoint to Goerli network
|
||||
// Other RPC endpoints are available here: http://goerli.blockscout.com/
|
||||
GoerliEthereumNetworkURL = "http://goerli.blockscout.com/"
|
||||
|
@ -54,12 +46,6 @@ const (
|
|||
// MainNetworkID is id of the main network
|
||||
MainNetworkID = 1
|
||||
|
||||
// RopstenNetworkID is id of a test network (on PoW)
|
||||
RopstenNetworkID = 3
|
||||
|
||||
// RinkebyNetworkID is id of a test network (on PoA)
|
||||
RinkebyNetworkID = 4
|
||||
|
||||
// GoerliNetworkID is id of goerli test network (PoA)
|
||||
GoerliNetworkID = 5
|
||||
|
||||
|
|
|
@ -27,32 +27,6 @@ var initNetworks = []params.Network{
|
|||
Layer: 1,
|
||||
Enabled: true,
|
||||
},
|
||||
{
|
||||
ChainID: 3,
|
||||
ChainName: "Ropsten",
|
||||
RPCURL: "https://ropsten.infura.io/nKmXgiFgc2KqtoQ8BCGJ",
|
||||
BlockExplorerURL: "https://ropsten.etherscan.io/",
|
||||
IconURL: "",
|
||||
NativeCurrencyName: "Ether",
|
||||
NativeCurrencySymbol: "ETH",
|
||||
NativeCurrencyDecimals: 18,
|
||||
IsTest: true,
|
||||
Layer: 1,
|
||||
Enabled: false,
|
||||
},
|
||||
{
|
||||
ChainID: 4,
|
||||
ChainName: "Rinkeby",
|
||||
RPCURL: "https://rinkeby.infura.io/nKmXgiFgc2KqtoQ8BCGJ",
|
||||
BlockExplorerURL: "https://rinkeby.etherscan.io/",
|
||||
IconURL: "",
|
||||
NativeCurrencyName: "Ether",
|
||||
NativeCurrencySymbol: "ETH",
|
||||
NativeCurrencyDecimals: 18,
|
||||
IsTest: true,
|
||||
Layer: 1,
|
||||
Enabled: false,
|
||||
},
|
||||
{
|
||||
ChainID: 5,
|
||||
ChainName: "Goerli",
|
||||
|
|
2
t/doc.go
2
t/doc.go
|
@ -1,5 +1,5 @@
|
|||
// Package t and its sub-packages are intended to support the testing
|
||||
// of status-go. It supports Ropsten, Rinkeby, and StatusChain for tests.
|
||||
// of status-go. It supports Goerli and StatusChain for tests.
|
||||
package t
|
||||
|
||||
//go:generate go-bindata -pkg t -o ./bindata.go ./config
|
||||
|
|
|
@ -50,8 +50,6 @@ var (
|
|||
// TestNetworkNames network ID to name mapping
|
||||
TestNetworkNames = map[int]string{
|
||||
params.MainNetworkID: "Mainnet",
|
||||
params.RopstenNetworkID: "Ropsten",
|
||||
params.RinkebyNetworkID: "Rinkeby",
|
||||
params.StatusChainNetworkID: "StatusChain",
|
||||
params.GoerliNetworkID: "Goerli",
|
||||
}
|
||||
|
@ -128,10 +126,6 @@ func GetRemoteURLFromNetworkID(id int) (url string, err error) {
|
|||
switch id {
|
||||
case params.MainNetworkID:
|
||||
url = params.MainnetEthereumNetworkURL
|
||||
case params.RinkebyNetworkID:
|
||||
url = params.RinkebyEthereumNetworkURL
|
||||
case params.RopstenNetworkID:
|
||||
url = params.RopstenEthereumNetworkURL
|
||||
case params.GoerliNetworkID:
|
||||
url = params.GoerliEthereumNetworkURL
|
||||
default:
|
||||
|
@ -146,10 +140,6 @@ func GetHeadHashFromNetworkID(id int) string {
|
|||
switch id {
|
||||
case params.MainNetworkID:
|
||||
return "0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3"
|
||||
case params.RinkebyNetworkID:
|
||||
return "0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177"
|
||||
case params.RopstenNetworkID:
|
||||
return "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d"
|
||||
case params.StatusChainNetworkID:
|
||||
return "0xe9d8920a99dc66a9557a87d51f9d14a34ec50aae04298e0f142187427d3c832e"
|
||||
case params.GoerliNetworkID:
|
||||
|
@ -175,10 +165,6 @@ func GetNetworkID() int {
|
|||
switch strings.ToLower(*networkSelected) {
|
||||
case fmt.Sprintf("%d", params.MainNetworkID), "mainnet":
|
||||
return params.MainNetworkID
|
||||
case fmt.Sprintf("%d", params.RinkebyNetworkID), "rinkeby":
|
||||
return params.RinkebyNetworkID
|
||||
case fmt.Sprintf("%d", params.RopstenNetworkID), "ropsten", "testnet":
|
||||
return params.RopstenNetworkID
|
||||
case fmt.Sprintf("%d", params.StatusChainNetworkID), "statuschain":
|
||||
return params.StatusChainNetworkID
|
||||
case fmt.Sprintf("%d", params.GoerliNetworkID), "goerli":
|
||||
|
|
Loading…
Reference in New Issue