diff --git a/build/ci.go b/build/ci.go index f64a83ffb1..13c6e7bae3 100644 --- a/build/ci.go +++ b/build/ci.go @@ -215,9 +215,9 @@ func doInstall(cmdline []string) { var minor int fmt.Sscanf(strings.TrimPrefix(runtime.Version(), "go1."), "%d", &minor) - if minor < 11 { + if minor < 13 { log.Println("You have Go version", runtime.Version()) - log.Println("go-ethereum requires at least Go version 1.11 and cannot") + log.Println("go-ethereum requires at least Go version 1.13 and cannot") log.Println("be compiled with an earlier version. Please upgrade your Go installation.") os.Exit(1) } @@ -233,6 +233,7 @@ func doInstall(cmdline []string) { if runtime.GOARCH == "arm64" { goinstall.Args = append(goinstall.Args, "-p", "1") } + goinstall.Args = append(goinstall.Args, "-trimpath") goinstall.Args = append(goinstall.Args, "-v") goinstall.Args = append(goinstall.Args, packages...) build.MustRun(goinstall) @@ -241,6 +242,7 @@ func doInstall(cmdline []string) { // Seems we are cross compiling, work around forbidden GOBIN goinstall := goToolArch(*arch, *cc, "install", buildFlags(env)...) + goinstall.Args = append(goinstall.Args, "-trimpath") goinstall.Args = append(goinstall.Args, "-v") goinstall.Args = append(goinstall.Args, []string{"-buildmode", "archive"}...) goinstall.Args = append(goinstall.Args, packages...) diff --git a/cmd/clef/docs/setup.md b/cmd/clef/docs/setup.md index d66a0d9502..6cc7a4120d 100644 --- a/cmd/clef/docs/setup.md +++ b/cmd/clef/docs/setup.md @@ -94,7 +94,7 @@ with minimal requirements. On the `client` qube, we need to create a listener which will receive the request from the Dapp, and proxy it. -[qubes-client.py](qubes/client/qubes-client.py): +[qubes-client.py](qubes/qubes-client.py): ```python diff --git a/cmd/clef/main.go b/cmd/clef/main.go index 7679daa744..c57e9ecddd 100644 --- a/cmd/clef/main.go +++ b/cmd/clef/main.go @@ -790,7 +790,7 @@ func startPluginManager(c *cli.Context) (*plugin.PluginManager, *plugin.Settings if err != nil { return nil, nil, err } - if err := pm.Start(nil); err != nil { + if err := pm.Start(); err != nil { return nil, nil, err } return pm, pluginConf, nil diff --git a/cmd/devp2p/enrcmd.go b/cmd/devp2p/enrcmd.go index 15d77dd011..48ede616ee 100644 --- a/cmd/devp2p/enrcmd.go +++ b/cmd/devp2p/enrcmd.go @@ -21,6 +21,7 @@ import ( "encoding/base64" "encoding/hex" "fmt" + "io" "io/ioutil" "net" "os" @@ -69,22 +70,30 @@ func enrdump(ctx *cli.Context) error { if err != nil { return fmt.Errorf("INVALID: %v", err) } - fmt.Print(dumpRecord(r)) + dumpRecord(os.Stdout, r) return nil } // dumpRecord creates a human-readable description of the given node record. -func dumpRecord(r *enr.Record) string { - out := new(bytes.Buffer) - if n, err := enode.New(enode.ValidSchemes, r); err != nil { +func dumpRecord(out io.Writer, r *enr.Record) { + n, err := enode.New(enode.ValidSchemes, r) + if err != nil { fmt.Fprintf(out, "INVALID: %v\n", err) } else { fmt.Fprintf(out, "Node ID: %v\n", n.ID()) + dumpNodeURL(out, n) } kv := r.AppendElements(nil)[1:] fmt.Fprintf(out, "Record has sequence number %d and %d key/value pairs.\n", r.Seq(), len(kv)/2) fmt.Fprint(out, dumpRecordKV(kv, 2)) - return out.String() +} + +func dumpNodeURL(out io.Writer, n *enode.Node) { + var key enode.Secp256k1 + if n.Load(&key) != nil { + return // no secp256k1 public key + } + fmt.Fprintf(out, "URLv4: %s\n", n.URLv4()) } func dumpRecordKV(kv []interface{}, indent int) string { diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go index 0bfb07a8cf..781e6e3026 100644 --- a/cmd/faucet/faucet.go +++ b/cmd/faucet/faucet.go @@ -237,23 +237,20 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u if err != nil { return nil, err } + // Assemble the Ethereum light client protocol - if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) { - cfg := eth.DefaultConfig - cfg.SyncMode = downloader.LightSync - cfg.NetworkId = network - cfg.Genesis = genesis - return les.New(ctx, &cfg) - }); err != nil { - return nil, err + cfg := eth.DefaultConfig + cfg.SyncMode = downloader.LightSync + cfg.NetworkId = network + cfg.Genesis = genesis + lesBackend, err := les.New(stack, &cfg) + if err != nil { + return nil, fmt.Errorf("Failed to register the Ethereum service: %w", err) } + // Assemble the ethstats monitoring and reporting service' if stats != "" { - if err := stack.Register(func(ctx *node.ServiceContext) (node.Service, error) { - var serv *les.LightEthereum - ctx.Service(&serv) - return ethstats.New(stats, nil, serv) - }); err != nil { + if err := ethstats.New(stack, lesBackend.ApiBackend, lesBackend.Engine(), stats); err != nil { return nil, err } } @@ -270,7 +267,7 @@ func newFaucet(genesis *core.Genesis, port int, enodes []*discv5.Node, network u // Attach to the client and retrieve and interesting metadatas api, err := stack.Attach() if err != nil { - stack.Stop() + stack.Close() return nil, err } client := ethclient.NewClient(api) diff --git a/cmd/faucet/faucet.html b/cmd/faucet/faucet.html index 314b19e123..ba14333186 100644 --- a/cmd/faucet/faucet.html +++ b/cmd/faucet/faucet.html @@ -49,7 +49,7 @@

{{
- +