config: expose bootstrap cluster config, closes #139

This commit is contained in:
Victor Farazdagi 2017-05-11 16:20:27 +03:00
parent e54f5831a3
commit 9a7caa6b58
15 changed files with 536 additions and 63 deletions

View File

@ -413,8 +413,13 @@ func (m *NodeManager) onNodeStarted() {
// PopulateStaticPeers connects current node with our publicly available LES/SHH/Swarm cluster
func (m *NodeManager) PopulateStaticPeers() {
for _, enode := range params.TestnetBootnodes {
enodes, err := m.node.config.LoadBootClusterNodes()
if err != nil {
Fatalf("can not load boot nodes: %v", err)
}
for _, enode := range enodes {
m.AddPeer(enode) // nolint: errcheck
log.Info("bootnode added", "enode", enode)
}
}

View File

@ -1,51 +0,0 @@
package params
// MainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the main Ethereum network.
var MainnetBootnodes = []string{}
// TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the Ropsten test network.
var TestnetBootnodes = []string{
"enode://bc4a130219ae94c2a66e3ec3377c2a460e006d56b877d5e8edb0d0f8064cf400f117a53a5389f552c9e1a122b9a07eeaa41e7ed885268ee825b6a788188fb52e@51.15.55.219:30379",
//"enode://bc4a130219ae94c2a66e3ec3377c2a460e006d56b877d5e8edb0d0f8064cf400f117a53a5389f552c9e1a122b9a07eeaa41e7ed885268ee825b6a788188fb52e@51.15.55.219:30399",
"enode://fbddff478e18292dc32b90f139bf773a08da89ffe29208e4de0091f6c589e60fccfaf16d4f4a76be49f57782c061ec8ea97078601c6f367feabda740f5ce8246@51.15.55.219:30303",
"enode://df20352d07924ffe93e67ee7e81105d7b250f7932ff4e0351da2cfa17282e53f765895c32cda36b70dfb98def0b472b29d79321737035641bf3bcf595dcc1041@51.15.35.110:30379",
//"enode://df20352d07924ffe93e67ee7e81105d7b250f7932ff4e0351da2cfa17282e53f765895c32cda36b70dfb98def0b472b29d79321737035641bf3bcf595dcc1041@51.15.35.110:30399",
"enode://4e5ee0487a4d8349ab9a9925b00eed0f976d98972c5a22f43fd50d1424897757032c36f273b434a4d3e013a2544eca74a9d1a0419f9f07f7bb43182a73df3690@51.15.35.110:30303",
"enode://2cbcc7b3d067581072066143e0fade0d007e80ecc8f86eb475200c3da3a6d81dd4e1e7051fc3dfaee337f110ceec61594a901b09e36eb367629ddff6e1dfd955@51.15.34.3:30379",
//"enode://2cbcc7b3d067581072066143e0fade0d007e80ecc8f86eb475200c3da3a6d81dd4e1e7051fc3dfaee337f110ceec61594a901b09e36eb367629ddff6e1dfd955@51.15.34.3:30399",
"enode://18efd9afb60443e00fed602cc0df526cd1d8543d2f6037df9380eb973d30b5fd04ac9f221053f82034581051bfd6e54356a99af2255f1a674d71d17440a6c95b@51.15.34.3:30303",
"enode://cdb95f3d866472a74195342979ffea4ed7f9b68cd1e8c6f9a25b3197c221f01bc076ccba760341d8b69bb6bfbc9bf4fdeabd0caa99ee0bf4e79917fa1f42423c@51.15.56.154:30379",
//"enode://cdb95f3d866472a74195342979ffea4ed7f9b68cd1e8c6f9a25b3197c221f01bc076ccba760341d8b69bb6bfbc9bf4fdeabd0caa99ee0bf4e79917fa1f42423c@51.15.56.154:30399",
"enode://5b99c0cb372299fd3f2d94612a682990722eb7c3a252dacefc8270eb7f172fc699c1ddfad826fbfc979270538e8d89bd6919703eb9ef526eac0a45e9fb455123@51.15.56.154:30303",
"enode://5ce8e96d9589671767a7b1c6b9a34bcf532587387eb062de712a9f716a66f05f412126121ce4d97330bc5dc7a4938ff1ecc22306b0b8b97a7f748c6f5f59c620@51.15.60.23:30379",
//"enode://5ce8e96d9589671767a7b1c6b9a34bcf532587387eb062de712a9f716a66f05f412126121ce4d97330bc5dc7a4938ff1ecc22306b0b8b97a7f748c6f5f59c620@51.15.60.23:30399",
"enode://0e1d4d0fcfe888bf8a478b0fd89760a47733a5c04cd47de353295a6eb8dde8f54821b31196527d0c5c73a7024dc9ff34127692d237840fc09c312b3a19cd28fe@51.15.60.23:30303",
"enode://6853f434735e540f0fcd85ffebcaa75280d1171ca9a205e8c41d87428d71b07ad14ab266236b64268467ccc462679edc888f76326418d18d7bcfe8d1159391aa@51.15.61.194:30379",
//"enode://6853f434735e540f0fcd85ffebcaa75280d1171ca9a205e8c41d87428d71b07ad14ab266236b64268467ccc462679edc888f76326418d18d7bcfe8d1159391aa@51.15.61.194:30399",
"enode://1fa2dfe6b925ca753496ea197c973b66ef889ef4de2bf52acd5b8665c0cc2e8b95fbd192e764f10735f589297f1ae533f350f004e403063e8d4ad979aae44c12@51.15.61.194:30303",
"enode://a8f1dae49f665c566734e002f89c1feb9b01e3ed09bdea6199aa6093f25085c4777fd553d2d1d14457286c24aaa48eaf6db99315e0caf62d97ea8bce801ae7c1@51.15.35.2:30379",
//"enode://a8f1dae49f665c566734e002f89c1feb9b01e3ed09bdea6199aa6093f25085c4777fd553d2d1d14457286c24aaa48eaf6db99315e0caf62d97ea8bce801ae7c1@51.15.35.2:30399",
"enode://44b91c043bcd96bc5279524f1bfe32df0670374135435ebacb29ba5d0e18192623e63ead711c9c363afdf2500fac423116ac28bdd2d700bd70e096326f95c63f@51.15.35.2:30303",
"enode://64278f1e4224a5ff4608da54b7b045ae0b875a332c57e6f9b4cbb3e9ac1e56a1d5b91ff2def2662c767146b3f7f08924c15f66d41352a18ebe71832c35f6a0cf@51.15.54.229:30379",
//"enode://64278f1e4224a5ff4608da54b7b045ae0b875a332c57e6f9b4cbb3e9ac1e56a1d5b91ff2def2662c767146b3f7f08924c15f66d41352a18ebe71832c35f6a0cf@51.15.54.229:30399",
"enode://fb7622d3a50dc603f5c76919dd99c4112e5925cb891a67086b9dce581166fbdad361fd0bfb7ff128ab8f5e24e209e0b923668fbddb7e8b99edb82c1e3d782a80@51.15.54.229:30303",
"enode://e1fcf9e7a47ab43a546d1c1633c511d98d13646bbf5c82d74ff98a1c88e54567b0be6574e977164e1b4c997ef8e79b19f1e12e85a6230c746dd74206fe37cfa0@51.15.35.70:30379",
//"enode://e1fcf9e7a47ab43a546d1c1633c511d98d13646bbf5c82d74ff98a1c88e54567b0be6574e977164e1b4c997ef8e79b19f1e12e85a6230c746dd74206fe37cfa0@51.15.35.70:30399",
"enode://14c2960f57f6d63ed541cf64226aafbc7a21c40c6e4935a2e58fd2466fa7d06ec32082734c64d32f7c4692f4b90f26d019f472ba55cdda6d624ef4d7d8441285@51.15.35.70:30303",
"enode://a8512bcaae1245fda71d400291dd22937d89947b6fc31283945557abe1281c5a9325ffc11e363cfed6362e4d2d9b941c5b325270662ba43ac8c424168e6567a6@51.15.39.57:30379",
//"enode://a8512bcaae1245fda71d400291dd22937d89947b6fc31283945557abe1281c5a9325ffc11e363cfed6362e4d2d9b941c5b325270662ba43ac8c424168e6567a6@51.15.39.57:30399",
"enode://02cfa2b02b5431bfdc1bad0f575de8ea151029fe9a9c689074793d704d1b428255bd111bf578f0b4fcaa18267da7c335db9557e1012434f4a8ab2c25f4b3da4d@51.15.39.57:30303",
}
// DiscoveryV5Bootnodes are the enode URLs of the P2P bootstrap nodes for the
// experimental RLPx v5 topic-discovery network.
var DiscoveryV5Bootnodes = []string{}

View File

@ -14,6 +14,7 @@ import (
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/log"
"github.com/status-im/status-go/static"
)
// default node configuration options
@ -40,7 +41,7 @@ var (
// LightEthConfig holds LES-related configuration
// Status nodes are always lightweight clients (due to mobile platform constraints)
type LightEthConfig struct {
// Enabled flag specifies whether protocol is enabled
// Enabled flag specifies whether protocol is enabled
Enabled bool
// Genesis is JSON to seed the chain database with
@ -61,7 +62,7 @@ type FirebaseConfig struct {
// WhisperConfig holds SHH-related configuration
type WhisperConfig struct {
// Enabled flag specifies whether protocol is enabled
// Enabled flag specifies whether protocol is enabled
Enabled bool
// IdentityFile path to private key, that will be loaded as identity into Whisper
@ -104,10 +105,25 @@ type WhisperConfig struct {
// SwarmConfig holds Swarm-related configuration
type SwarmConfig struct {
// Enabled flag specifies whether protocol is enabled
// Enabled flag specifies whether protocol is enabled
Enabled bool
}
// BootCluster holds configuration for supporting boot cluster, which is a temporary
// means for mobile devices to get connected to Ethereum network (UDP-based discovery
// may not be available, so we need means to discover the network manually).
type BootClusterConfig struct {
// Enabled flag specifies whether feature is enabled
Enabled bool
// ConfigFile is a path to JSON file containing array of boot nodes
// See `static/bootcluster/*.json` for cluster configurations provided
// out of box. You can pass absolute path, and if file at that path can be
// loaded, it will be used. Otherwise, file is supposed to be relative to
// `static/bootcluster` folder.
ConfigFile string
}
// NodeConfig stores configuration options for a node
type NodeConfig struct {
// TestNet flag whether given configuration describes a test or mainnet
@ -183,6 +199,9 @@ type NodeConfig struct {
// LogToStderr defines whether logged info should also be output to os.Stderr
LogToStderr bool
// BootClusterConfig extra configuration for supporting cluster
BootClusterConfig *BootClusterConfig `json:"BootClusterConfig,"`
// LightEthConfig extra configuration for LES
LightEthConfig *LightEthConfig `json:"LightEthConfig,"`
@ -215,6 +234,9 @@ func NewNodeConfig(dataDir string, networkID uint64) (*NodeConfig, error) {
Enabled: true,
DatabaseCache: DatabaseCache,
},
BootClusterConfig: &BootClusterConfig{
ConfigFile: BootClusterConfigFile,
},
WhisperConfig: &WhisperConfig{
Enabled: true,
Port: WhisperPort,
@ -336,6 +358,29 @@ func (c *NodeConfig) Save() error {
return nil
}
// LoadBootClusterNodes loads boot nodes from a config file provided in BootClusterConfig
func (c *NodeConfig) LoadBootClusterNodes() ([]string, error) {
var bootnodes []string
var configData []byte
var err error
filename := c.BootClusterConfig.ConfigFile
if _, err = os.Stat(filename); os.IsNotExist(err) { // load from static resources
configData, err = static.Asset("bootcluster/" + filename)
} else {
configData, err = ioutil.ReadFile(filename)
}
if err != nil {
return nil, err
}
// parse JSON
if err := json.Unmarshal([]byte(configData), &bootnodes); err != nil {
return nil, err
}
return bootnodes, nil
}
// String dumps config object as nicely indented JSON
func (c *NodeConfig) String() string {
data, _ := json.MarshalIndent(c, "", " ")
@ -354,6 +399,12 @@ func (c *SwarmConfig) String() string {
return string(data)
}
// String dumps config object as nicely indented JSON
func (c *BootClusterConfig) String() string {
data, _ := json.MarshalIndent(c, "", " ")
return string(data)
}
// ReadPasswordFile reads and returns content of the password file
func (c *WhisperConfig) ReadPasswordFile() ([]byte, error) {
if len(c.PasswordFile) <= 0 {

View File

@ -5,6 +5,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"reflect"
"strings"
"testing"
@ -285,8 +286,6 @@ var loadConfigTestCases = []struct {
"WSEnabled": false
}`,
func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) {
//nodeConfig.LightEthConfig.Genesis = nodeConfig.LightEthConfig.Genesis[:125]
//fmt.Println(nodeConfig)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
@ -297,6 +296,258 @@ var loadConfigTestCases = []struct {
}
},
},
{
`default boot cluster (Ropsten Dev)`,
`{
"NetworkId": 311,
"DataDir": "$TMPDIR"
}`,
func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if nodeConfig.BootClusterConfig.ConfigFile != params.BootClusterConfigFile {
t.Fatalf("unexpected BootClusterConfigFile, expected: %v, got: %v",
params.BootClusterConfigFile, nodeConfig.BootClusterConfig.ConfigFile)
}
enodes, err := nodeConfig.LoadBootClusterNodes()
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedEnodes := []string{
"enode://bc4a130219ae94c2a66e3ec3377c2a460e006d56b877d5e8edb0d0f8064cf400f117a53a5389f552c9e1a122b9a07eeaa41e7ed885268ee825b6a788188fb52e@51.15.55.219:30379",
"enode://fbddff478e18292dc32b90f139bf773a08da89ffe29208e4de0091f6c589e60fccfaf16d4f4a76be49f57782c061ec8ea97078601c6f367feabda740f5ce8246@51.15.55.219:30303",
"enode://df20352d07924ffe93e67ee7e81105d7b250f7932ff4e0351da2cfa17282e53f765895c32cda36b70dfb98def0b472b29d79321737035641bf3bcf595dcc1041@51.15.35.110:30379",
"enode://4e5ee0487a4d8349ab9a9925b00eed0f976d98972c5a22f43fd50d1424897757032c36f273b434a4d3e013a2544eca74a9d1a0419f9f07f7bb43182a73df3690@51.15.35.110:30303",
"enode://2cbcc7b3d067581072066143e0fade0d007e80ecc8f86eb475200c3da3a6d81dd4e1e7051fc3dfaee337f110ceec61594a901b09e36eb367629ddff6e1dfd955@51.15.34.3:30379",
"enode://18efd9afb60443e00fed602cc0df526cd1d8543d2f6037df9380eb973d30b5fd04ac9f221053f82034581051bfd6e54356a99af2255f1a674d71d17440a6c95b@51.15.34.3:30303",
"enode://cdb95f3d866472a74195342979ffea4ed7f9b68cd1e8c6f9a25b3197c221f01bc076ccba760341d8b69bb6bfbc9bf4fdeabd0caa99ee0bf4e79917fa1f42423c@51.15.56.154:30379",
"enode://5b99c0cb372299fd3f2d94612a682990722eb7c3a252dacefc8270eb7f172fc699c1ddfad826fbfc979270538e8d89bd6919703eb9ef526eac0a45e9fb455123@51.15.56.154:30303",
"enode://5ce8e96d9589671767a7b1c6b9a34bcf532587387eb062de712a9f716a66f05f412126121ce4d97330bc5dc7a4938ff1ecc22306b0b8b97a7f748c6f5f59c620@51.15.60.23:30379",
"enode://0e1d4d0fcfe888bf8a478b0fd89760a47733a5c04cd47de353295a6eb8dde8f54821b31196527d0c5c73a7024dc9ff34127692d237840fc09c312b3a19cd28fe@51.15.60.23:30303",
}
if len(enodes) != len(expectedEnodes) {
t.Fatalf("wrong number of enodes, expected: %d, got: %d", len(expectedEnodes), len(enodes))
}
if !reflect.DeepEqual(enodes, expectedEnodes) {
t.Fatalf("wrong list of enodes, expected: \n%v,\n\ngot:\n%v", expectedEnodes, enodes)
}
},
},
{
`select boot cluster (Ropsten Prod)`,
`{
"NetworkId": 311,
"DataDir": "$TMPDIR",
"BootClusterConfig": {
"ConfigFile": "ropsten.prod.json"
}
}`,
func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedConfigFile := "ropsten.prod.json"
if nodeConfig.BootClusterConfig.ConfigFile != expectedConfigFile {
t.Fatalf("unexpected BootClusterConfigFile, expected: %v, got: %v",
expectedConfigFile, nodeConfig.BootClusterConfig.ConfigFile)
}
enodes, err := nodeConfig.LoadBootClusterNodes()
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedEnodes := []string{
"enode://6853f434735e540f0fcd85ffebcaa75280d1171ca9a205e8c41d87428d71b07ad14ab266236b64268467ccc462679edc888f76326418d18d7bcfe8d1159391aa@51.15.61.194:30379",
"enode://1fa2dfe6b925ca753496ea197c973b66ef889ef4de2bf52acd5b8665c0cc2e8b95fbd192e764f10735f589297f1ae533f350f004e403063e8d4ad979aae44c12@51.15.61.194:30303",
"enode://a8f1dae49f665c566734e002f89c1feb9b01e3ed09bdea6199aa6093f25085c4777fd553d2d1d14457286c24aaa48eaf6db99315e0caf62d97ea8bce801ae7c1@51.15.35.2:30379",
"enode://44b91c043bcd96bc5279524f1bfe32df0670374135435ebacb29ba5d0e18192623e63ead711c9c363afdf2500fac423116ac28bdd2d700bd70e096326f95c63f@51.15.35.2:30303",
"enode://64278f1e4224a5ff4608da54b7b045ae0b875a332c57e6f9b4cbb3e9ac1e56a1d5b91ff2def2662c767146b3f7f08924c15f66d41352a18ebe71832c35f6a0cf@51.15.54.229:30379",
"enode://fb7622d3a50dc603f5c76919dd99c4112e5925cb891a67086b9dce581166fbdad361fd0bfb7ff128ab8f5e24e209e0b923668fbddb7e8b99edb82c1e3d782a80@51.15.54.229:30303",
"enode://e1fcf9e7a47ab43a546d1c1633c511d98d13646bbf5c82d74ff98a1c88e54567b0be6574e977164e1b4c997ef8e79b19f1e12e85a6230c746dd74206fe37cfa0@51.15.35.70:30379",
"enode://14c2960f57f6d63ed541cf64226aafbc7a21c40c6e4935a2e58fd2466fa7d06ec32082734c64d32f7c4692f4b90f26d019f472ba55cdda6d624ef4d7d8441285@51.15.35.70:30303",
"enode://a8512bcaae1245fda71d400291dd22937d89947b6fc31283945557abe1281c5a9325ffc11e363cfed6362e4d2d9b941c5b325270662ba43ac8c424168e6567a6@51.15.39.57:30379",
"enode://02cfa2b02b5431bfdc1bad0f575de8ea151029fe9a9c689074793d704d1b428255bd111bf578f0b4fcaa18267da7c335db9557e1012434f4a8ab2c25f4b3da4d@51.15.39.57:30303",
}
if len(enodes) != len(expectedEnodes) {
t.Fatalf("wrong number of enodes, expected: %d, got: %d", len(expectedEnodes), len(enodes))
}
if !reflect.DeepEqual(enodes, expectedEnodes) {
t.Fatalf("wrong list of enodes, expected: \n%v,\n\ngot:\n%v", expectedEnodes, enodes)
}
},
},
{
`select boot cluster (Rinkeby Dev)`,
`{
"NetworkId": 311,
"DataDir": "$TMPDIR",
"BootClusterConfig": {
"ConfigFile": "rinkeby.dev.json"
}
}`,
func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedConfigFile := "rinkeby.dev.json"
if nodeConfig.BootClusterConfig.ConfigFile != expectedConfigFile {
t.Fatalf("unexpected BootClusterConfigFile, expected: %v, got: %v",
expectedConfigFile, nodeConfig.BootClusterConfig.ConfigFile)
}
enodes, err := nodeConfig.LoadBootClusterNodes()
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedEnodes := []string{}
if len(enodes) != len(expectedEnodes) {
t.Fatalf("wrong number of enodes, expected: %d, got: %d", len(expectedEnodes), len(enodes))
}
if !reflect.DeepEqual(enodes, expectedEnodes) {
t.Fatalf("wrong list of enodes, expected: \n%v,\n\ngot:\n%v", expectedEnodes, enodes)
}
},
},
{
`select boot cluster (Rinkeby Prod)`,
`{
"NetworkId": 311,
"DataDir": "$TMPDIR",
"BootClusterConfig": {
"ConfigFile": "rinkeby.prod.json"
}
}`,
func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedConfigFile := "rinkeby.prod.json"
if nodeConfig.BootClusterConfig.ConfigFile != expectedConfigFile {
t.Fatalf("unexpected BootClusterConfigFile, expected: %v, got: %v",
expectedConfigFile, nodeConfig.BootClusterConfig.ConfigFile)
}
enodes, err := nodeConfig.LoadBootClusterNodes()
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedEnodes := []string{}
if len(enodes) != len(expectedEnodes) {
t.Fatalf("wrong number of enodes, expected: %d, got: %d", len(expectedEnodes), len(enodes))
}
if !reflect.DeepEqual(enodes, expectedEnodes) {
t.Fatalf("wrong list of enodes, expected: \n%v,\n\ngot:\n%v", expectedEnodes, enodes)
}
},
},
{
`select boot cluster (Homestead Dev)`,
`{
"NetworkId": 311,
"DataDir": "$TMPDIR",
"BootClusterConfig": {
"ConfigFile": "homestead.dev.json"
}
}`,
func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedConfigFile := "homestead.dev.json"
if nodeConfig.BootClusterConfig.ConfigFile != expectedConfigFile {
t.Fatalf("unexpected BootClusterConfigFile, expected: %v, got: %v",
expectedConfigFile, nodeConfig.BootClusterConfig.ConfigFile)
}
enodes, err := nodeConfig.LoadBootClusterNodes()
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedEnodes := []string{}
if len(enodes) != len(expectedEnodes) {
t.Fatalf("wrong number of enodes, expected: %d, got: %d", len(expectedEnodes), len(enodes))
}
if !reflect.DeepEqual(enodes, expectedEnodes) {
t.Fatalf("wrong list of enodes, expected: \n%v,\n\ngot:\n%v", expectedEnodes, enodes)
}
},
},
{
`select boot cluster (Homestead Prod)`,
`{
"NetworkId": 311,
"DataDir": "$TMPDIR",
"BootClusterConfig": {
"ConfigFile": "homestead.prod.json"
}
}`,
func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedConfigFile := "homestead.prod.json"
if nodeConfig.BootClusterConfig.ConfigFile != expectedConfigFile {
t.Fatalf("unexpected BootClusterConfigFile, expected: %v, got: %v",
expectedConfigFile, nodeConfig.BootClusterConfig.ConfigFile)
}
enodes, err := nodeConfig.LoadBootClusterNodes()
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedEnodes := []string{}
if len(enodes) != len(expectedEnodes) {
t.Fatalf("wrong number of enodes, expected: %d, got: %d", len(expectedEnodes), len(enodes))
}
if !reflect.DeepEqual(enodes, expectedEnodes) {
t.Fatalf("wrong list of enodes, expected: \n%v,\n\ngot:\n%v", expectedEnodes, enodes)
}
},
},
{
`select boot cluster (custom JSON, via absolute path)`,
`{
"NetworkId": 311,
"DataDir": "$TMPDIR",
"BootClusterConfig": {
"ConfigFile": "$TMPDIR/bootstrap-cluster.json"
}
}`,
func(t *testing.T, dataDir string, nodeConfig *params.NodeConfig, err error) {
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedConfigFile := filepath.Join(dataDir, "bootstrap-cluster.json")
if nodeConfig.BootClusterConfig.ConfigFile != expectedConfigFile {
t.Fatalf("unexpected BootClusterConfigFile, expected: %v, got: %v",
expectedConfigFile, nodeConfig.BootClusterConfig.ConfigFile)
}
enodes, err := nodeConfig.LoadBootClusterNodes()
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
expectedEnodes := []string{
"enode://foobar@41.41.41.41:30300",
"enode://foobaz@42.42.42.42:30302",
}
if len(enodes) != len(expectedEnodes) {
t.Fatalf("wrong number of enodes, expected: %d, got: %d", len(expectedEnodes), len(enodes))
}
if !reflect.DeepEqual(enodes, expectedEnodes) {
t.Fatalf("wrong list of enodes, expected: \n%v,\n\ngot:\n%v", expectedEnodes, enodes)
}
},
},
}
func TestLoadNodeConfig(t *testing.T) {
@ -306,6 +557,13 @@ func TestLoadNodeConfig(t *testing.T) {
}
defer os.RemoveAll(tmpDir) // nolint: errcheck
// create sample Bootstrap Cluster Config
bootstrapConfig := []byte(`["enode://foobar@41.41.41.41:30300", "enode://foobaz@42.42.42.42:30302"]`)
if err = ioutil.WriteFile(filepath.Join(tmpDir, "bootstrap-cluster.json"), bootstrapConfig, os.ModePerm); err != nil {
t.Fatal(err)
}
t.Log(tmpDir)
for _, testCase := range loadConfigTestCases {
t.Log("test: " + testCase.name)
testCase.configJSON = strings.Replace(testCase.configJSON, "$TMPDIR", tmpDir, -1)

View File

@ -74,4 +74,7 @@ const (
// TestNetworkID is id of a test network
TestNetworkID = 3
// BootClusterConfigFile is default config file containing boot node list (as JSON array)
BootClusterConfigFile = "ropsten.dev.json"
)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,6 +2,13 @@
// sources:
// scripts/README.md
// scripts/web3.js
// bootcluster/homestead.dev.json
// bootcluster/homestead.prod.json
// bootcluster/rinkeby.dev.json
// bootcluster/rinkeby.prod.json
// bootcluster/ropsten.dev.json
// bootcluster/ropsten.prod.json
// config/linter_exclude_list.txt
// config/test-data.json
// keys/firebaseauthkey
// keys/test-account1.pk
@ -90,7 +97,7 @@ func scriptsReadmeMd() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "scripts/README.md", size: 133, mode: os.FileMode(420), modTime: time.Unix(1494718006, 0)}
info := bindataFileInfo{name: "scripts/README.md", size: 133, mode: os.FileMode(420), modTime: time.Unix(1494793924, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -110,7 +117,147 @@ func scriptsWeb3Js() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "scripts/web3.js", size: 496165, mode: os.FileMode(420), modTime: time.Unix(1494718354, 0)}
info := bindataFileInfo{name: "scripts/web3.js", size: 496165, mode: os.FileMode(420), modTime: time.Unix(1494794103, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _bootclusterHomesteadDevJson = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8a\x8e\x05\x04\x00\x00\xff\xff\x29\xbb\x4c\x0d\x02\x00\x00\x00")
func bootclusterHomesteadDevJsonBytes() ([]byte, error) {
return bindataRead(
_bootclusterHomesteadDevJson,
"bootcluster/homestead.dev.json",
)
}
func bootclusterHomesteadDevJson() (*asset, error) {
bytes, err := bootclusterHomesteadDevJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "bootcluster/homestead.dev.json", size: 2, mode: os.FileMode(420), modTime: time.Unix(1494793949, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _bootclusterHomesteadProdJson = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8a\x8e\x05\x04\x00\x00\xff\xff\x29\xbb\x4c\x0d\x02\x00\x00\x00")
func bootclusterHomesteadProdJsonBytes() ([]byte, error) {
return bindataRead(
_bootclusterHomesteadProdJson,
"bootcluster/homestead.prod.json",
)
}
func bootclusterHomesteadProdJson() (*asset, error) {
bytes, err := bootclusterHomesteadProdJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "bootcluster/homestead.prod.json", size: 2, mode: os.FileMode(420), modTime: time.Unix(1494793949, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _bootclusterRinkebyDevJson = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8a\x8e\x05\x04\x00\x00\xff\xff\x29\xbb\x4c\x0d\x02\x00\x00\x00")
func bootclusterRinkebyDevJsonBytes() ([]byte, error) {
return bindataRead(
_bootclusterRinkebyDevJson,
"bootcluster/rinkeby.dev.json",
)
}
func bootclusterRinkebyDevJson() (*asset, error) {
bytes, err := bootclusterRinkebyDevJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "bootcluster/rinkeby.dev.json", size: 2, mode: os.FileMode(420), modTime: time.Unix(1494793949, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _bootclusterRinkebyProdJson = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x8a\x8e\x05\x04\x00\x00\xff\xff\x29\xbb\x4c\x0d\x02\x00\x00\x00")
func bootclusterRinkebyProdJsonBytes() ([]byte, error) {
return bindataRead(
_bootclusterRinkebyProdJson,
"bootcluster/rinkeby.prod.json",
)
}
func bootclusterRinkebyProdJson() (*asset, error) {
bytes, err := bootclusterRinkebyProdJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "bootcluster/rinkeby.prod.json", size: 2, mode: os.FileMode(420), modTime: time.Unix(1494793949, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _bootclusterRopstenDevJson = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x6c\x93\x39\xaa\x26\x46\xb2\x46\x7d\xad\x42\x94\x2d\xae\x62\x1e\x64\xbd\x7d\x3c\xda\x88\x8c\xc1\xec\xde\xbf\xd7\xfc\xd0\x05\x42\xb7\x16\x90\x70\xf2\xc4\x77\xfe\xff\xb7\xdf\x7f\xff\xb1\xff\xfe\xcf\xec\x5f\x7f\xfe\xf9\x5a\x0a\x19\x08\xb3\x36\xa5\xa9\xcc\x96\xb7\x99\xdd\x9b\x4a\x0c\x16\xc0\x46\xed\x85\xfb\xe8\xc6\xce\x83\x81\x0b\x30\xe9\x13\x80\x43\xf4\x52\x2e\xe5\xc8\x53\xa5\xce\xc5\x42\xa2\x97\x05\xbe\x5b\x25\xb8\xbe\x13\xa1\x64\xb1\x1b\xa4\xcf\xca\x23\x30\xe2\x9e\xd2\xfe\x9f\xe2\x17\xea\x97\xea\x17\x61\xfe\xc5\xc0\x9e\x3f\xfe\xf8\x3b\xe0\xbd\x99\x3b\xf1\x58\x0c\x4a\x9a\x66\x7a\x09\x87\x9c\xef\xdc\xb9\x20\xa6\x22\xef\x96\x92\x20\x56\x66\x01\x12\xcf\x5a\x23\xd7\xe0\xba\xaf\x0e\x6d\xe4\xa4\xdc\xde\x4a\x9e\xba\x07\x35\x18\x6e\xc7\x56\x3a\x78\x18\x60\xdb\xb1\xf9\x6d\xbd\x29\x17\x38\xed\x0d\x12\xfb\x06\x08\xfc\xe3\x8f\xdf\xfe\x4e\x38\x47\xc0\x4a\x03\x9e\x24\x77\x9b\xbc\xe6\xbb\xbe\x81\x08\x3a\xfe\x48\xe1\x3c\x99\xee\x64\x81\x15\xa7\xa8\xaf\xd0\x29\x68\x95\xcf\x4d\x23\xb5\x99\x7a\x8a\xed\x39\xcc\xbd\x8c\xd9\x83\x27\x4e\x8f\x72\x3e\x8f\xd1\xd9\x81\xd5\x04\xdf\xf1\xeb\xd3\xd4\xe9\x46\x10\xfc\x1f\x21\xeb\x17\x22\xfc\x4a\xa1\xac\xee\x82\x84\x97\x4c\xb0\x64\xbd\xac\x4c\xd2\x07\xb0\x3b\x70\xe9\x36\x19\xe9\xd4\x5a\x44\x27\x7c\xa3\x30\x28\x24\x91\xee\xea\xc0\xd4\x6c\x47\xce\x4f\x58\x4a\x86\x17\x90\x8b\x54\x64\xbb\x5c\x2a\x07\x0b\x04\xf3\xf2\xc0\xcf\xdf\x13\xc6\xa0\x72\x9e\x63\x4b\xf8\x06\xf8\x4d\x21\xf5\xeb\xf6\xc7\x03\xe6\x1a\x08\x4e\x60\x86\xc2\x0b\x57\xb3\x30\x00\xbe\x01\xdb\x1d\x17\xb6\x4f\x5c\x09\xa0\x79\x8a\xcb\x26\x70\x46\x16\xd7\x41\xf1\x9a\xe7\x6a\x97\xd9\x0f\x11\x7a\xb7\x0d\x35\xa5\x12\xf0\x41\x2e\xdb\x3e\x36\x37\xca\xcf\xaa\x6c\x71\x6e\x52\xf5\x27\xa1\x7c\xf1\xaf\x04\x62\xec\x4d\xd6\x3d\x03\xf9\x40\xc1\xed\x18\x50\x37\xcc\x29\x59\x0f\x4e\xa8\xf0\xd0\x19\xb0\xcf\x25\x07\xec\x4b\xe7\x61\x78\x7a\x03\x52\x9d\x47\x84\xa0\x7c\x41\xc0\xf2\xf9\xa4\xe2\xbb\xb1\x55\x61\xb5\xca\xac\x23\x52\x3d\x2c\x73\x19\xc7\x41\x17\x81\xb2\x4e\x7d\xff\xc0\xfb\xa6\xaf\xe7\xa5\x1e\x4f\x98\x89\x53\xb9\x60\x2a\x0b\xa5\x7f\xba\x28\xd9\xf1\xcb\x67\xd1\x83\x1b\x6d\x97\x45\xfa\x18\xd3\x9b\x08\x0f\xf0\x35\xb8\x75\xbf\x72\x03\x16\x9c\x78\x96\xef\xd9\xbb\xd7\xf9\x4e\x6e\x3e\x4d\x40\x57\x65\xee\xc2\x3b\x59\xcf\x44\xbf\xc2\x13\x12\xe2\xfe\xd9\x88\x7d\xa1\xca\xaf\x04\xea\xcb\x6c\xe8\xc7\x4e\x94\x79\xc3\x47\x93\x62\x48\x65\x41\x99\xe0\x44\xfb\xbc\x3f\x9b\xa2\xa9\xde\xeb\x20\x87\x7d\x7e\xe8\x74\x6d\x99\x8d\x33\x57\x13\x64\xf7\xae\xd3\x93\x1c\x94\x63\x63\x22\xdf\x58\x62\x3a\xf0\xbe\xdc\xcf\x41\xb6\x1a\x4a\x74\xf3\x9e\xa8\x22\xf1\x37\xc0\x6f\x0a\x3f\xb5\x6f\xda\xa4\x46\x9a\xa3\x9b\x97\x3f\x6c\x7b\x59\x2c\x9f\xdc\x98\x34\x9c\xc3\xf7\x81\xd1\xac\x23\x55\x9e\xa3\x95\xd9\x81\x9e\x20\x21\x19\x12\xf6\xca\xa4\x33\xc3\x6b\x9d\xf6\x92\xe4\xb8\xc3\xed\x26\x62\xb0\x07\x2f\x5e\x7a\xf9\xb9\x7c\x6e\xa1\xa7\xd9\x46\x3f\x1b\x31\xf8\xa2\x5f\x4e\x10\x16\x47\x06\xae\x6f\x23\xe2\x5d\x94\x78\x3c\xb8\x89\x74\x83\x12\x77\xe6\xd2\x06\xe9\x11\x9f\x65\x65\x4a\x2d\xdb\x17\x33\x1b\xa7\x12\x84\x8f\x11\xd3\x94\x7c\xa0\xb5\x9d\xcb\x81\x64\x3a\xef\x58\x90\xdc\x92\x86\xd8\x43\xe0\x1a\xb2\x19\xe9\x71\x61\xf6\x50\xdc\xfe\x93\x0f\xf8\xc7\x6f\xff\xfa\x6f\x00\x00\x00\xff\xff\xf6\xfd\x99\x14\x4a\x06\x00\x00")
func bootclusterRopstenDevJsonBytes() ([]byte, error) {
return bindataRead(
_bootclusterRopstenDevJson,
"bootcluster/ropsten.dev.json",
)
}
func bootclusterRopstenDevJson() (*asset, error) {
bytes, err := bootclusterRopstenDevJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "bootcluster/ropsten.dev.json", size: 1610, mode: os.FileMode(420), modTime: time.Unix(1494793949, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _bootclusterRopstenProdJson = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x6c\xd4\x3b\xae\x1e\xc6\x0d\x05\xe0\x5e\xab\x30\x54\x1b\xd7\xc3\x37\xe9\x2a\xfb\x08\x52\xf0\x59\x26\xfb\xef\x82\x1f\x88\x11\x43\xd2\x0a\xe6\x9b\xc3\x43\xfe\xf3\xdb\x6f\xbf\x7d\xdf\x7f\xff\x67\xf6\xcf\x3f\xfe\x50\x17\x3a\x26\x36\x92\x15\x7e\xf7\xae\xc7\xe5\x6e\xab\x33\x4d\xd0\xdf\x00\x18\x74\x46\xe2\x93\xf5\x66\x18\x37\x46\x1f\x83\x7a\x96\x03\x9c\x85\xaa\x48\x5a\xca\xa8\xce\x6a\xdd\xcd\x8a\x6a\xb1\xd3\xee\x7e\xa6\x84\xca\xe0\x03\x3e\x56\x7d\xeb\x03\x20\x41\x01\x99\xff\x10\xf8\x02\xf9\x52\xf8\x82\xe0\x3f\xe9\x91\xc5\xf7\xdf\xff\x0e\x84\x4b\x9c\x5b\xad\x40\xe9\x34\x21\x0e\xdd\x84\xb0\x0e\xa3\x52\xdd\x73\x8f\x3d\x9e\xc5\x3a\xc1\xec\x91\x72\x55\xe9\xd7\x8d\xeb\x15\x72\x35\x10\xb8\xa6\x7c\xf0\x8c\xe4\xc4\x03\xc3\x0e\x72\x85\xe8\x48\xde\xbd\xc7\xcb\x8f\x9e\xd2\xfa\x70\x4e\x58\x64\x2e\x73\x03\xfe\x04\x7c\xf4\xfd\xf7\x6f\x7f\x17\xa6\x1f\x4c\x2e\xc7\x7d\x9e\x15\x55\x23\xde\xf7\xf0\x3c\x1a\x6e\x2b\xea\xc1\xd2\xce\x8b\x9a\x4d\x85\x88\x4c\x7d\x41\x87\xf2\x5c\x9a\xcd\xec\x46\x84\x06\x07\x06\x98\xc5\xd0\xb5\x91\x33\x93\x7d\xf3\x74\x2a\x82\x40\xf6\x75\x9e\xe2\x84\x6d\x7a\xf5\xfa\x83\x5c\x6b\xf8\x9f\x90\xe4\x0b\x7f\x15\x20\x73\x05\xf4\x63\xaa\x9e\xd0\x6a\x41\x0b\x41\x3e\xa8\x5b\xc2\xb9\xa7\xf6\xc8\x18\x48\x98\x64\x2b\xbb\x30\x2a\x65\xde\x82\x43\xa0\x22\xad\xd2\xe6\x18\x40\x47\x93\x52\xde\x7c\xe8\xef\xb2\x19\x09\x40\xb3\xd1\x6b\x06\xc7\xde\xab\xb1\xb7\x2f\x3e\x13\xbf\x90\x56\xba\x1f\x78\x3f\xc5\xa7\x8c\xe6\x07\xcb\x88\x9c\x72\xc7\xfa\x7c\x52\xb8\xac\x1e\x4b\xee\x2b\x37\x49\x22\x6c\xb1\xd5\x8b\xe2\xae\xa2\x8d\x6c\x58\xd1\x84\x91\x0a\xb8\xc3\xd9\xfb\xf4\xb0\x4d\x0d\x58\x8b\xce\xee\x79\x20\x37\xc8\xa9\xce\xe7\x83\x98\xe0\x5b\x6b\xe0\x84\x4d\x72\x9a\xaf\xff\xf2\x09\x7f\x21\xc6\xaf\x02\xbc\x32\x45\x1c\x4a\x79\xd3\xfa\xe8\xa4\x4d\x03\x62\x26\xa2\x19\x00\x57\x3e\xdd\x2c\x0f\x48\xb5\xe7\x5a\x31\xbd\xe2\x00\xaa\x57\x93\x43\x0a\x37\xaf\xae\xec\x0e\xd0\xb3\xfc\x64\x91\x17\x5f\xec\xab\x40\x52\xf5\xab\x99\xb2\x4f\x5f\x63\xa7\x1c\x1b\x96\xc6\x1c\xd3\xdf\x4f\xc0\x9f\x22\x5c\xb8\xbe\x58\x4b\xb6\x2c\xa6\x14\xd6\x81\x06\x25\x6a\x01\x98\xf0\x01\x52\xd6\xaa\x93\x76\x1c\xe3\xbb\xf0\x84\x76\x5f\x61\x51\xab\x57\xab\x62\xbc\x61\x06\xca\x0b\xc5\x1d\x61\x7b\xbe\x16\x05\x71\xb0\x80\xeb\x92\x8a\xf4\xda\x58\x67\x8c\xf1\xe9\x2d\x59\x5f\xbe\xff\x8f\xd8\xde\x2f\x77\x98\x1b\x43\xdf\x89\x9d\x8e\xd2\x8e\x30\xf4\x29\x23\x6a\xe6\x55\x5b\x22\x34\xbf\xd6\xe5\x20\x49\x5c\xf1\x1b\x64\xd5\x4b\x9b\xa7\xdb\x84\xcf\xd1\x88\x5b\x79\x08\xcf\x9a\x35\xf0\xb8\xe2\x1d\xea\x3c\x88\x63\xc3\x4a\x91\x9e\x49\x1d\x45\xfe\x5c\x04\x1b\x67\x06\x74\xf9\xd1\xf7\x8b\x15\x16\xc0\xcf\xc5\x5b\x40\x96\x9b\x34\x18\x7e\x0f\x03\x66\x10\x83\x6c\x3c\x82\xad\xf4\x9a\x00\x9d\x82\x45\xc4\xb2\x16\xd0\xa1\x25\x83\x50\xee\x1a\x60\x49\xa9\x6f\x47\x49\x71\x79\x70\xa2\x82\xa1\xa5\x08\x05\xed\xa9\x62\x25\x53\xb6\x37\x23\x83\xfa\xaa\xa8\xa5\xfe\x05\x8c\x2f\xb1\x5f\x05\xf8\xb0\x2f\xb1\x1e\x96\x30\x41\xdd\x34\x54\xce\x27\x50\x99\xf5\x4d\x10\x78\x18\xb7\x91\xd1\xea\xf1\x8c\x2d\x68\xec\xf1\x40\x31\x3a\x8a\xd4\x00\x40\x9d\x98\xdf\x2b\xbe\xce\x04\x47\xb5\x49\x6b\x22\x99\x0a\x11\x5b\x78\x80\x4c\x7c\x9c\x9e\x85\x8d\x72\x5c\x34\xc9\xf3\xa3\xef\xd1\xf7\x6f\xff\xfa\x6f\x00\x00\x00\xff\xff\x0f\xef\x89\x1f\x48\x06\x00\x00")
func bootclusterRopstenProdJsonBytes() ([]byte, error) {
return bindataRead(
_bootclusterRopstenProdJson,
"bootcluster/ropsten.prod.json",
)
}
func bootclusterRopstenProdJson() (*asset, error) {
bytes, err := bootclusterRopstenProdJsonBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "bootcluster/ropsten.prod.json", size: 1608, mode: os.FileMode(420), modTime: time.Unix(1494793949, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _configLinter_exclude_listTxt = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xa4\x95\xcf\x6e\xe2\x30\x10\xc6\xef\xfb\x14\x16\xa7\xdd\x0b\xef\x80\x82\xb4\xda\x55\x85\x22\x82\x7a\x9f\xc6\x93\xc4\x92\xe3\x89\xc6\x13\x5a\xde\xbe\xa2\xd0\xf2\x2f\x0e\x19\xb8\xf2\xfd\xf8\x7d\xf6\x38\x4e\x4a\x6a\x5b\x0c\x62\x28\x18\xfc\xe8\x88\x05\xad\xa9\xfa\x50\x8a\xa3\x60\x32\x46\x10\x5c\x94\x25\xf5\x41\x4c\x6c\xa8\xf7\xd6\xbc\xa1\xa1\xca\x48\x83\xa6\x22\x6e\xcd\xec\x12\x9a\xcf\xe7\x33\xf3\xbb\x26\xef\x82\xfc\xf9\x35\xc1\x9e\x35\xce\xdb\x49\x15\x17\xa4\xa2\x67\x8d\x25\x6d\x91\xef\x74\x5c\x51\x0a\xff\x0b\xd5\x2e\xa4\xb4\x87\x50\x67\xa3\x3e\xb9\xca\x63\xaa\x99\x32\xb5\x9d\x47\xc1\x0d\x43\x88\x70\xf8\x2d\x35\xe6\x01\xf4\xb9\xa6\xa8\xa8\x8a\x9a\xae\xa5\x8b\x25\xb0\x9d\xb0\xa9\x01\xf2\xa9\x9e\xe4\x96\x86\x50\x45\xd3\x5f\x0c\xc8\xfb\xa7\x9c\x42\xe5\xea\x54\xc9\x15\xa5\xf0\x17\x02\x2c\x2b\xb2\x98\x52\x9f\x00\x95\x95\xba\x71\xe9\x31\x57\xdd\xd7\xd8\xb7\x38\x66\x3d\x23\x74\x5e\x94\xac\x01\x17\x96\x20\x30\xe2\x3e\xa7\x1e\x98\xc5\x3a\xcf\x0a\xe4\x2d\xf2\xbd\xa1\x9c\xc0\x47\xce\x71\x42\xcd\x0d\xa9\xe8\xf9\x17\x9c\xfc\x07\xe7\x53\xf6\x9f\x5c\xe1\xcc\x81\x63\xf2\x50\x0f\xa1\xe6\x7d\x03\x3e\xb9\xba\xaf\x4c\xb3\x32\xea\x7a\x0f\x82\x85\x80\xb8\x32\x47\xe4\xe4\x3d\x1f\x42\x15\x4d\x0b\x6b\xf7\xff\x49\xd9\xbf\x63\x85\x71\x45\xe2\xaa\xdd\xd8\x7d\x39\x23\x14\xde\x0d\xbb\xba\x46\xde\x60\x94\xc2\xd5\x01\x92\xc3\xbe\x05\x15\x2d\xaf\xc8\xae\xda\x1d\x3f\xbb\x39\xc4\xf8\x4e\x6c\x53\x4d\xc3\xf0\x65\xdb\x67\x00\x00\x00\xff\xff\xf3\x09\x13\xa2\xd2\x08\x00\x00")
func configLinter_exclude_listTxtBytes() ([]byte, error) {
return bindataRead(
_configLinter_exclude_listTxt,
"config/linter_exclude_list.txt",
)
}
func configLinter_exclude_listTxt() (*asset, error) {
bytes, err := configLinter_exclude_listTxtBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "config/linter_exclude_list.txt", size: 2258, mode: os.FileMode(420), modTime: time.Unix(1494793924, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -150,7 +297,7 @@ func keysFirebaseauthkey() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "keys/firebaseauthkey", size: 153, mode: os.FileMode(420), modTime: time.Unix(1494717778, 0)}
info := bindataFileInfo{name: "keys/firebaseauthkey", size: 153, mode: os.FileMode(420), modTime: time.Unix(1494793924, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -210,7 +357,7 @@ func keysWnodekey() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "keys/wnodekey", size: 65, mode: os.FileMode(420), modTime: time.Unix(1494717778, 0)}
info := bindataFileInfo{name: "keys/wnodekey", size: 65, mode: os.FileMode(420), modTime: time.Unix(1494793924, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -230,7 +377,7 @@ func keysWnodepassword() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "keys/wnodepassword", size: 9, mode: os.FileMode(420), modTime: time.Unix(1494717778, 0)}
info := bindataFileInfo{name: "keys/wnodepassword", size: 9, mode: os.FileMode(420), modTime: time.Unix(1494793924, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
@ -289,6 +436,13 @@ func AssetNames() []string {
var _bindata = map[string]func() (*asset, error){
"scripts/README.md": scriptsReadmeMd,
"scripts/web3.js": scriptsWeb3Js,
"bootcluster/homestead.dev.json": bootclusterHomesteadDevJson,
"bootcluster/homestead.prod.json": bootclusterHomesteadProdJson,
"bootcluster/rinkeby.dev.json": bootclusterRinkebyDevJson,
"bootcluster/rinkeby.prod.json": bootclusterRinkebyProdJson,
"bootcluster/ropsten.dev.json": bootclusterRopstenDevJson,
"bootcluster/ropsten.prod.json": bootclusterRopstenProdJson,
"config/linter_exclude_list.txt": configLinter_exclude_listTxt,
"config/test-data.json": configTestDataJson,
"keys/firebaseauthkey": keysFirebaseauthkey,
"keys/test-account1.pk": keysTestAccount1Pk,
@ -337,7 +491,16 @@ type bintree struct {
Children map[string]*bintree
}
var _bintree = &bintree{nil, map[string]*bintree{
"bootcluster": &bintree{nil, map[string]*bintree{
"homestead.dev.json": &bintree{bootclusterHomesteadDevJson, map[string]*bintree{}},
"homestead.prod.json": &bintree{bootclusterHomesteadProdJson, map[string]*bintree{}},
"rinkeby.dev.json": &bintree{bootclusterRinkebyDevJson, map[string]*bintree{}},
"rinkeby.prod.json": &bintree{bootclusterRinkebyProdJson, map[string]*bintree{}},
"ropsten.dev.json": &bintree{bootclusterRopstenDevJson, map[string]*bintree{}},
"ropsten.prod.json": &bintree{bootclusterRopstenProdJson, map[string]*bintree{}},
}},
"config": &bintree{nil, map[string]*bintree{
"linter_exclude_list.txt": &bintree{configLinter_exclude_listTxt, map[string]*bintree{}},
"test-data.json": &bintree{configTestDataJson, map[string]*bintree{}},
}},
"keys": &bintree{nil, map[string]*bintree{

View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1 @@
[]

View File

@ -0,0 +1,16 @@
[
"enode://bc4a130219ae94c2a66e3ec3377c2a460e006d56b877d5e8edb0d0f8064cf400f117a53a5389f552c9e1a122b9a07eeaa41e7ed885268ee825b6a788188fb52e@51.15.55.219:30379",
"enode://fbddff478e18292dc32b90f139bf773a08da89ffe29208e4de0091f6c589e60fccfaf16d4f4a76be49f57782c061ec8ea97078601c6f367feabda740f5ce8246@51.15.55.219:30303",
"enode://df20352d07924ffe93e67ee7e81105d7b250f7932ff4e0351da2cfa17282e53f765895c32cda36b70dfb98def0b472b29d79321737035641bf3bcf595dcc1041@51.15.35.110:30379",
"enode://4e5ee0487a4d8349ab9a9925b00eed0f976d98972c5a22f43fd50d1424897757032c36f273b434a4d3e013a2544eca74a9d1a0419f9f07f7bb43182a73df3690@51.15.35.110:30303",
"enode://2cbcc7b3d067581072066143e0fade0d007e80ecc8f86eb475200c3da3a6d81dd4e1e7051fc3dfaee337f110ceec61594a901b09e36eb367629ddff6e1dfd955@51.15.34.3:30379",
"enode://18efd9afb60443e00fed602cc0df526cd1d8543d2f6037df9380eb973d30b5fd04ac9f221053f82034581051bfd6e54356a99af2255f1a674d71d17440a6c95b@51.15.34.3:30303",
"enode://cdb95f3d866472a74195342979ffea4ed7f9b68cd1e8c6f9a25b3197c221f01bc076ccba760341d8b69bb6bfbc9bf4fdeabd0caa99ee0bf4e79917fa1f42423c@51.15.56.154:30379",
"enode://5b99c0cb372299fd3f2d94612a682990722eb7c3a252dacefc8270eb7f172fc699c1ddfad826fbfc979270538e8d89bd6919703eb9ef526eac0a45e9fb455123@51.15.56.154:30303",
"enode://5ce8e96d9589671767a7b1c6b9a34bcf532587387eb062de712a9f716a66f05f412126121ce4d97330bc5dc7a4938ff1ecc22306b0b8b97a7f748c6f5f59c620@51.15.60.23:30379",
"enode://0e1d4d0fcfe888bf8a478b0fd89760a47733a5c04cd47de353295a6eb8dde8f54821b31196527d0c5c73a7024dc9ff34127692d237840fc09c312b3a19cd28fe@51.15.60.23:30303"
]

View File

@ -0,0 +1,16 @@
[
"enode://6853f434735e540f0fcd85ffebcaa75280d1171ca9a205e8c41d87428d71b07ad14ab266236b64268467ccc462679edc888f76326418d18d7bcfe8d1159391aa@51.15.61.194:30379",
"enode://1fa2dfe6b925ca753496ea197c973b66ef889ef4de2bf52acd5b8665c0cc2e8b95fbd192e764f10735f589297f1ae533f350f004e403063e8d4ad979aae44c12@51.15.61.194:30303",
"enode://a8f1dae49f665c566734e002f89c1feb9b01e3ed09bdea6199aa6093f25085c4777fd553d2d1d14457286c24aaa48eaf6db99315e0caf62d97ea8bce801ae7c1@51.15.35.2:30379",
"enode://44b91c043bcd96bc5279524f1bfe32df0670374135435ebacb29ba5d0e18192623e63ead711c9c363afdf2500fac423116ac28bdd2d700bd70e096326f95c63f@51.15.35.2:30303",
"enode://64278f1e4224a5ff4608da54b7b045ae0b875a332c57e6f9b4cbb3e9ac1e56a1d5b91ff2def2662c767146b3f7f08924c15f66d41352a18ebe71832c35f6a0cf@51.15.54.229:30379",
"enode://fb7622d3a50dc603f5c76919dd99c4112e5925cb891a67086b9dce581166fbdad361fd0bfb7ff128ab8f5e24e209e0b923668fbddb7e8b99edb82c1e3d782a80@51.15.54.229:30303",
"enode://e1fcf9e7a47ab43a546d1c1633c511d98d13646bbf5c82d74ff98a1c88e54567b0be6574e977164e1b4c997ef8e79b19f1e12e85a6230c746dd74206fe37cfa0@51.15.35.70:30379",
"enode://14c2960f57f6d63ed541cf64226aafbc7a21c40c6e4935a2e58fd2466fa7d06ec32082734c64d32f7c4692f4b90f26d019f472ba55cdda6d624ef4d7d8441285@51.15.35.70:30303",
"enode://a8512bcaae1245fda71d400291dd22937d89947b6fc31283945557abe1281c5a9325ffc11e363cfed6362e4d2d9b941c5b325270662ba43ac8c424168e6567a6@51.15.39.57:30379",
"enode://02cfa2b02b5431bfdc1bad0f575de8ea151029fe9a9c689074793d704d1b428255bd111bf578f0b4fcaa18267da7c335db9557e1012434f4a8ab2c25f4b3da4d@51.15.39.57:30303"
]

View File

@ -1,4 +1,4 @@
// Package static embeds static (JS, HTML) resources right into the binaries
package static
//go:generate go-bindata -pkg static -o bindata.go scripts/ config/ keys/
//go:generate go-bindata -pkg static -o bindata.go scripts/ bootcluster/ config/ keys/