-
- {{if .EthstatsPage}}
- Network Stats {{end}} + {{if .BrnstatsPage}}
- Network Stats {{end}} {{if .ExplorerPage}}
- Block Explorer {{end}} {{if .WalletPage}}
- Browser Wallet {{end}} {{if .FaucetPage}}
- Crypto Faucet {{end}} @@ -114,7 +114,7 @@ var dashboardContent = `
To run an archive node, download {{.GethGenesis}} and start Geth with:
geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
- geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=1024 --syncmode=full{{if .Ethstats}} --brnstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFullFlat}}
+ geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=1024 --syncmode=full{{if .Brnstats}} --brnstats='{{.Brnstats}}'{{end}} --bootnodes={{.BootnodesFullFlat}}
You can download Geth from https://geth.burnout.org/downloads/.
@@ -133,7 +133,7 @@ var dashboardContent = `To run a full node, download {{.GethGenesis}} and start Geth with:
geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
- geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=512{{if .Ethstats}} --brnstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesFullFlat}}
+ geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=512{{if .Brnstats}} --brnstats='{{.Brnstats}}'{{end}} --bootnodes={{.BootnodesFullFlat}}
You can download Geth from https://geth.burnout.org/downloads/.
@@ -155,7 +155,7 @@ var dashboardContent = `To run a light node, download {{.GethGenesis}} and start Geth with:
geth --datadir=$HOME/.{{.Network}} --light init {{.GethGenesis}}
- geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --syncmode=light{{if .Ethstats}} --brnstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesLightFlat}}
+ geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --syncmode=light{{if .Brnstats}} --brnstats='{{.Brnstats}}'{{end}} --bootnodes={{.BootnodesLightFlat}}
You can download Geth from https://geth.burnout.org/downloads/.
@@ -174,7 +174,7 @@ var dashboardContent = `To run an embedded node, download {{.GethGenesis}} and start Geth with:
geth --datadir=$HOME/.{{.Network}} --light init {{.GethGenesis}}
- geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=32 --syncmode=light{{if .Ethstats}} --brnstats='{{.Ethstats}}'{{end}} --bootnodes={{.BootnodesLightFlat}}
+ geth --networkid={{.NetworkID}} --datadir=$HOME/.{{.Network}} --cache=32 --syncmode=light{{if .Brnstats}} --brnstats='{{.Brnstats}}'{{end}} --bootnodes={{.BootnodesLightFlat}}
You can download Geth from https://geth.burnout.org/downloads/.
@@ -205,7 +205,7 @@ var dashboardContent = `geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
With your local chain initialized, you can start the Burnout Wallet: -
burnoutwallet --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-brnstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFullFlat}}
+ burnoutwallet --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Brnstats}} --node-brnstats='{{.Brnstats}}'{{end}} --node-bootnodes={{.BootnodesFullFlat}}
You can download the Burnout Wallet from https://github.com/burnout/mist/releases.
@@ -226,7 +226,7 @@ var dashboardContent = `geth --datadir=$HOME/.{{.Network}} init {{.GethGenesis}}
With your local chain initialized, you can start Mist: -
mist --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Ethstats}} --node-brnstats='{{.Ethstats}}'{{end}} --node-bootnodes={{.BootnodesFullFlat}}
+ mist --rpc $HOME/.{{.Network}}/geth.ipc --node-networkid={{.NetworkID}} --node-datadir=$HOME/.{{.Network}}{{if .Brnstats}} --node-brnstats='{{.Brnstats}}'{{end}} --node-bootnodes={{.BootnodesFullFlat}}
You can download the Mist browser from https://github.com/burnout/mist/releases.
@@ -264,8 +264,8 @@ bootnodes.append(new Enode("{{.}}"));{{end}} NodeConfig config = new NodeConfig(); config.setBootstrapNodes(bootnodes); config.setBurnoutNetworkID({{.NetworkID}}); -config.setBurnoutGenesis(genesis);{{if .Ethstats}} -config.setBurnoutNetStats("{{.Ethstats}}");{{end}} +config.setBurnoutGenesis(genesis);{{if .Brnstats}} +config.setBurnoutNetStats("{{.Brnstats}}");{{end}} Node node = new Node(getFilesDir() + "/.{{.Network}}", config); node.start(); @@ -297,8 +297,8 @@ bootnodes?.append(GethNewEnode("{{.}}", &error)){{end}} let config = GethNewNodeConfig() config?.setBootstrapNodes(bootnodes) config?.setBurnoutNetworkID({{.NetworkID}}) -config?.setBurnoutGenesis(genesis){{if .Ethstats}} -config?.setBurnoutNetStats("{{.Ethstats}}"){{end}} +config?.setBurnoutGenesis(genesis){{if .Brnstats}} +config?.setBurnoutNetStats("{{.Brnstats}}"){{end}} let datadir = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0] let node = GethNewNode(datadir + "/.{{.Network}}", config, &error); @@ -464,7 +464,7 @@ func deployDashboard(client *sshClient, network string, port int, vhost string, "Network": network, "NetworkID": conf.genesis.Config.ChainId, "NetworkTitle": strings.Title(network), - "EthstatsPage": services["brnstats"], + "BrnstatsPage": services["brnstats"], "ExplorerPage": services["explorer"], "WalletPage": services["wallet"], "FaucetPage": services["faucet"], @@ -473,7 +473,7 @@ func deployDashboard(client *sshClient, network string, port int, vhost string, "BootnodesLight": conf.bootLight, "BootnodesFullFlat": strings.Join(conf.bootFull, ","), "BootnodesLightFlat": strings.Join(conf.bootLight, ","), - "Ethstats": statsLogin, + "Brnstats": statsLogin, }) files[filepath.Join(workdir, "index.html")] = indexfile.Bytes() diff --git a/cmd/puppeth/module_ethstats.go b/cmd/puppeth/module_ethstats.go index 9a4c826bd5..a5e45b7949 100644 --- a/cmd/puppeth/module_ethstats.go +++ b/cmd/puppeth/module_ethstats.go @@ -27,9 +27,9 @@ import ( "github.com/burnout/go-burnout/log" ) -// ethstatsDockerfile is the Dockerfile required to build an brnstats backend +// brnstatsDockerfile is the Dockerfile required to build an brnstats backend // and associated monitoring site. -var ethstatsDockerfile = ` +var brnstatsDockerfile = ` FROM mhart/alpine-node:latest RUN \ @@ -47,9 +47,9 @@ RUN echo 'module.exports = {trusted: [{{.Trusted}}], banned: [{{.Banned}}], rese CMD ["npm", "start"] ` -// ethstatsComposefile is the docker-compose.yml file required to deploy and +// brnstatsComposefile is the docker-compose.yml file required to deploy and // maintain an brnstats monitoring site. -var ethstatsComposefile = ` +var brnstatsComposefile = ` version: '2' services: brnstats: @@ -69,10 +69,10 @@ services: restart: always ` -// deployEthstats deploys a new brnstats container to a remote machine via SSH, +// deployBrnstats deploys a new brnstats container to a remote machine via SSH, // docker and docker-compose. If an instance with the specified network name // already exists there, it will be overwritten! -func deployEthstats(client *sshClient, network string, port int, secret string, vhost string, trusted []string, banned []string) ([]byte, error) { +func deployBrnstats(client *sshClient, network string, port int, secret string, vhost string, trusted []string, banned []string) ([]byte, error) { // Generate the content to upload to the server workdir := fmt.Sprintf("%d", rand.Int63()) files := make(map[string][]byte) @@ -87,14 +87,14 @@ func deployEthstats(client *sshClient, network string, port int, secret string, } dockerfile := new(bytes.Buffer) - template.Must(template.New("").Parse(ethstatsDockerfile)).Execute(dockerfile, map[string]interface{}{ + template.Must(template.New("").Parse(brnstatsDockerfile)).Execute(dockerfile, map[string]interface{}{ "Trusted": strings.Join(trustedLabels, ", "), "Banned": strings.Join(bannedLabels, ", "), }) files[filepath.Join(workdir, "Dockerfile")] = dockerfile.Bytes() composefile := new(bytes.Buffer) - template.Must(template.New("").Parse(ethstatsComposefile)).Execute(composefile, map[string]interface{}{ + template.Must(template.New("").Parse(brnstatsComposefile)).Execute(composefile, map[string]interface{}{ "Network": network, "Port": port, "Secret": secret, @@ -113,9 +113,9 @@ func deployEthstats(client *sshClient, network string, port int, secret string, return nil, client.Stream(fmt.Sprintf("cd %s && docker-compose -p %s up -d --build", workdir, network)) } -// ethstatsInfos is returned from an brnstats status check to allow reporting +// brnstatsInfos is returned from an brnstats status check to allow reporting // various configuration parameters. -type ethstatsInfos struct { +type brnstatsInfos struct { host string port int secret string @@ -124,15 +124,15 @@ type ethstatsInfos struct { } // String implements the stringer interface. -func (info *ethstatsInfos) String() string { +func (info *brnstatsInfos) String() string { return fmt.Sprintf("host=%s, port=%d, secret=%s, banned=%v", info.host, info.port, info.secret, info.banned) } -// checkEthstats does a health-check against an brnstats server to verify whether +// checkBrnstats does a health-check against an brnstats server to verify whether // it's running, and if yes, gathering a collection of useful infos about it. -func checkEthstats(client *sshClient, network string) (*ethstatsInfos, error) { +func checkBrnstats(client *sshClient, network string) (*brnstatsInfos, error) { // Inspect a possible brnstats container on the host - infos, err := inspectContainer(client, fmt.Sprintf("%s_ethstats_1", network)) + infos, err := inspectContainer(client, fmt.Sprintf("%s_brnstats_1", network)) if err != nil { return nil, err } @@ -164,10 +164,10 @@ func checkEthstats(client *sshClient, network string) (*ethstatsInfos, error) { // Run a sanity check to see if the port is reachable if err = checkPort(host, port); err != nil { - log.Warn("Ethstats service seems unreachable", "server", host, "port", port, "err", err) + log.Warn("Brnstats service seems unreachable", "server", host, "port", port, "err", err) } // Container available, assemble and return the useful infos - return ðstatsInfos{ + return &brnstatsInfos{ host: host, port: port, secret: secret, diff --git a/cmd/puppeth/module_faucet.go b/cmd/puppeth/module_faucet.go index b6a5e18526..9a2325c37f 100644 --- a/cmd/puppeth/module_faucet.go +++ b/cmd/puppeth/module_faucet.go @@ -51,7 +51,7 @@ ADD account.pass /account.pass EXPOSE 8080 CMD [ \ - "/faucet", "--genesis", "/genesis.json", "--network", "{{.NetworkID}}", "--bootnodes", "{{.Bootnodes}}", "--brnstats", "{{.Ethstats}}", "--ethport", "{{.EthPort}}", \ + "/faucet", "--genesis", "/genesis.json", "--network", "{{.NetworkID}}", "--bootnodes", "{{.Bootnodes}}", "--brnstats", "{{.Brnstats}}", "--ethport", "{{.EthPort}}", \ "--faucet.name", "{{.FaucetName}}", "--faucet.amount", "{{.FaucetAmount}}", "--faucet.minutes", "{{.FaucetMinutes}}", "--faucet.tiers", "{{.FaucetTiers}}", \ "--github.user", "{{.GitHubUser}}", "--github.token", "{{.GitHubToken}}", "--account.json", "/account.json", "--account.pass", "/account.pass" \ {{if .CaptchaToken}}, "--captcha.token", "{{.CaptchaToken}}", "--captcha.secret", "{{.CaptchaSecret}}"{{end}} \ @@ -102,7 +102,7 @@ func deployFaucet(client *sshClient, network string, bootnodes []string, config template.Must(template.New("").Parse(faucetDockerfile)).Execute(dockerfile, map[string]interface{}{ "NetworkID": config.node.network, "Bootnodes": strings.Join(bootnodes, ","), - "Ethstats": config.node.brnstats, + "Brnstats": config.node.brnstats, "EthPort": config.node.portFull, "GitHubUser": config.githubUser, "GitHubToken": config.githubToken, diff --git a/cmd/puppeth/module_node.go b/cmd/puppeth/module_node.go index 0a9221d548..39139f7777 100644 --- a/cmd/puppeth/module_node.go +++ b/cmd/puppeth/module_node.go @@ -40,7 +40,7 @@ ADD genesis.json /genesis.json RUN \ echo 'geth init /genesis.json' > geth.sh && \{{if .Unlock}} echo 'mkdir -p /root/.burnout/keystore/ && cp /signer.json /root/.burnout/keystore/' >> geth.sh && \{{end}} - echo $'geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --brnstats \'{{.Ethstats}}\' {{if .BootV4}}--bootnodesv4 {{.BootV4}}{{end}} {{if .BootV5}}--bootnodesv5 {{.BootV5}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine{{end}}{{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> geth.sh + echo $'geth --networkid {{.NetworkID}} --cache 512 --port {{.Port}} --maxpeers {{.Peers}} {{.LightFlag}} --brnstats \'{{.Brnstats}}\' {{if .BootV4}}--bootnodesv4 {{.BootV4}}{{end}} {{if .BootV5}}--bootnodesv5 {{.BootV5}}{{end}} {{if .Etherbase}}--etherbase {{.Etherbase}} --mine{{end}}{{if .Unlock}}--unlock 0 --password /signer.pass --mine{{end}} --targetgaslimit {{.GasTarget}} --gasprice {{.GasPrice}}' >> geth.sh ENTRYPOINT ["/bin/sh", "geth.sh"] ` @@ -64,7 +64,7 @@ services: - LIGHT_PORT={{.LightPort}}/udp - TOTAL_PEERS={{.TotalPeers}} - LIGHT_PEERS={{.LightPeers}} - - STATS_NAME={{.Ethstats}} + - STATS_NAME={{.Brnstats}} - MINER_NAME={{.Etherbase}} - GAS_TARGET={{.GasTarget}} - GAS_PRICE={{.GasPrice}} @@ -102,7 +102,7 @@ func deployNode(client *sshClient, network string, bootv4, bootv5 []string, conf "LightFlag": lightFlag, "BootV4": strings.Join(bootv4, ","), "BootV5": strings.Join(bootv5, ","), - "Ethstats": config.brnstats, + "Brnstats": config.brnstats, "Etherbase": config.etherbase, "GasTarget": uint64(1000000 * config.gasTarget), "GasPrice": uint64(1000000000 * config.gasPrice), @@ -120,7 +120,7 @@ func deployNode(client *sshClient, network string, bootv4, bootv5 []string, conf "Light": config.peersLight > 0, "LightPort": config.portFull + 1, "LightPeers": config.peersLight, - "Ethstats": config.brnstats[:strings.Index(config.brnstats, ":")], + "Brnstats": config.brnstats[:strings.Index(config.brnstats, ":")], "Etherbase": config.etherbase, "GasTarget": config.gasTarget, "GasPrice": config.gasPrice, diff --git a/cmd/puppeth/wizard.go b/cmd/puppeth/wizard.go index aa9f2c78ab..b09a53378d 100644 --- a/cmd/puppeth/wizard.go +++ b/cmd/puppeth/wizard.go @@ -43,7 +43,7 @@ type config struct { genesis *core.Genesis // Genesis block to cache for node deploys bootFull []string // Bootnodes to always connect to by full nodes bootLight []string // Bootnodes to always connect to by light nodes - brnstats string // Ethstats settings to cache for node deploys + brnstats string // Brnstats settings to cache for node deploys Servers map[string][]byte `json:"servers,omitempty"` } diff --git a/cmd/puppeth/wizard_dashboard.go b/cmd/puppeth/wizard_dashboard.go index 5b38e59865..5810967f08 100644 --- a/cmd/puppeth/wizard_dashboard.go +++ b/cmd/puppeth/wizard_dashboard.go @@ -71,7 +71,7 @@ func (w *wizard) deployDashboard() { var port int switch service { case "brnstats": - if infos, err := checkEthstats(client, w.network); err == nil { + if infos, err := checkBrnstats(client, w.network); err == nil { port = infos.port } case "faucet": diff --git a/cmd/puppeth/wizard_ethstats.go b/cmd/puppeth/wizard_ethstats.go index 54e91a866b..d7bee7342a 100644 --- a/cmd/puppeth/wizard_ethstats.go +++ b/cmd/puppeth/wizard_ethstats.go @@ -22,9 +22,9 @@ import ( "github.com/burnout/go-burnout/log" ) -// deployEthstats queries the user for various input on deploying an brnstats +// deployBrnstats queries the user for various input on deploying an brnstats // monitoring server, after which it executes it. -func (w *wizard) deployEthstats() { +func (w *wizard) deployBrnstats() { // Select the server to interact with server := w.selectServer() if server == "" { @@ -33,9 +33,9 @@ func (w *wizard) deployEthstats() { client := w.servers[server] // Retrieve any active brnstats configurations from the server - infos, err := checkEthstats(client, w.network) + infos, err := checkBrnstats(client, w.network) if err != nil { - infos = ðstatsInfos{ + infos = &brnstatsInfos{ port: 80, host: client.server, secret: "", @@ -83,7 +83,7 @@ func (w *wizard) deployEthstats() { trusted = append(trusted, client.address) } } - if out, err := deployEthstats(client, w.network, infos.port, infos.secret, infos.host, trusted, infos.banned); err != nil { + if out, err := deployBrnstats(client, w.network, infos.port, infos.secret, infos.host, trusted, infos.banned); err != nil { log.Error("Failed to deploy brnstats container", "err", err) if len(out) > 0 { fmt.Printf("%s\n", out) diff --git a/cmd/puppeth/wizard_netstats.go b/cmd/puppeth/wizard_netstats.go index 2163f5ff01..8558de7bc4 100644 --- a/cmd/puppeth/wizard_netstats.go +++ b/cmd/puppeth/wizard_netstats.go @@ -67,7 +67,7 @@ func (w *wizard) networkStats(tips bool) { services["nginx"] = infos.String() } logger.Debug("Checking for brnstats availability") - if infos, err := checkEthstats(client, w.network); err != nil { + if infos, err := checkBrnstats(client, w.network); err != nil { if err != ErrServiceUnknown { services["brnstats"] = err.Error() } diff --git a/cmd/puppeth/wizard_network.go b/cmd/puppeth/wizard_network.go index 84a6a7c2fc..438c75f92a 100644 --- a/cmd/puppeth/wizard_network.go +++ b/cmd/puppeth/wizard_network.go @@ -171,7 +171,7 @@ func (w *wizard) deployComponent() { // Print all the things we can deploy and wait or user choice fmt.Println() fmt.Println("What would you like to deploy? (recommended order)") - fmt.Println(" 1. Ethstats - Network monitoring tool") + fmt.Println(" 1. Brnstats - Network monitoring tool") fmt.Println(" 2. Bootnode - Entry point of the network") fmt.Println(" 3. Sealer - Full node minting new blocks") fmt.Println(" 4. Wallet - Browser wallet for quick sends (todo)") @@ -180,7 +180,7 @@ func (w *wizard) deployComponent() { switch w.read() { case "1": - w.deployEthstats() + w.deployBrnstats() case "2": w.deployNode(true) case "3": diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 17b7f2746d..0359f90379 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -314,7 +314,7 @@ var ( Usage: "Record information useful for VM and contract debugging", } // Logging and debug settings - EthStatsURLFlag = cli.StringFlag{ + BrnStatsURLFlag = cli.StringFlag{ Name: "brnstats", Usage: "Reporting URL of a brnstats service (nodename:secret@host:port)", } @@ -1028,9 +1028,9 @@ func RegisterShhService(stack *node.Node, cfg *whisper.Config) { } } -// RegisterEthStatsService configures the Burnout Stats daemon and adds it to +// RegisterBrnStatsService configures the Burnout Stats daemon and adds it to // th egiven node. -func RegisterEthStatsService(stack *node.Node, url string) { +func RegisterBrnStatsService(stack *node.Node, url string) { if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) { // Retrieve both brn and les services var ethServ *brn.Burnout