Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Upgrade] Go-Ethereum release v1.9.19 #1143

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
8e7bee9
params: begin v1.9.19 release cycle
karalabe Jul 27, 2020
79ce553
signer/storage: fix a badly ordered error check (#21379)
6543 Jul 28, 2020
93da0cf
cmd, core, eth, light, trie: dump clean cache periodically (#20391)
rjl493456442 Jul 28, 2020
c47052a
core: sort txs at the same gas price by received time
hendrikhofstadt Jul 22, 2020
298a19b
core: API-less transaction time sorting
karalabe Jul 28, 2020
28c5a8a
les: implement new les fetcher (#20692)
rjl493456442 Jul 28, 2020
37564ce
miner: refactor helper functions in worker.go (#21044)
robert-zaremba Jul 28, 2020
350a049
les: fix unittest (#21382)
rjl493456442 Jul 29, 2020
1976bb3
eth/downloader: remove eth62 (#21378)
renaynay Jul 29, 2020
abf2d7d
build: use -trimpath flag when building executables (#21374)
jyap808 Jul 29, 2020
9e04c5e
core/bloombits: use single channel for shutdown (#20878)
ucwong Jul 29, 2020
ff90894
core/rawdb: convert some comments to godoc convention (#21384)
meowsbits Jul 29, 2020
a00dc50
Merge pull request #21358 from hendrikhofstadt/fix/tx-sort-time
karalabe Jul 30, 2020
9c2ac6f
rpc: remove silly use of ReadVarint in subscription ID generator (#21…
fjl Jul 31, 2020
290d6bd
rpc: add SetHeader method to Client (#21392)
renaynay Aug 3, 2020
b2b14e6
signer/core: EIP-712 encoded data should not reject a Domain without …
natsukagami Aug 3, 2020
c0c0161
node: refactor package node (#21105)
renaynay Aug 3, 2020
90dedea
signer: EIP 712, parse `bytes` and `bytesX` as hex strings + correct …
natsukagami Aug 3, 2020
e24e05d
cmd/devp2p: print enode:// URL in enrdump (#21270)
adamschmideg Aug 4, 2020
b35e4fc
core: avoid modification of accountSet cache in tx_pool (#21159)
duanhao0814 Aug 4, 2020
82a9e11
ethstats: avoid concurrent write on websocket (#21404)
holiman Aug 4, 2020
8ead45c
core/vm: avoid map lookups for accessing jumpdest analysis
holiman Aug 4, 2020
1d25039
p2p/nat: limit UPNP request concurrency (#21390)
fjl Aug 5, 2020
5a88a7c
core: use errors.Is for consensus errors check (#21095)
robert-zaremba Aug 5, 2020
2de37f2
downloader: add eth65 tests (#21383)
renaynay Aug 5, 2020
4a04127
cmd/geth: fix import / export issues related to DB unavailability (#2…
renaynay Aug 6, 2020
4fde0ca
Merge pull request #21411 from holiman/fix_codelookup
karalabe Aug 6, 2020
d21303f
cmd/geth: fixes db unavailability for chain commands (#21415)
renaynay Aug 6, 2020
5d4512b
eth: use maxQueuedTxAnns for to limit the number of transactions anno…
timcooijmans Aug 6, 2020
68754f3
cmd/utils: grant snapshot cache to trie if disabled (#21416)
karalabe Aug 6, 2020
983cb25
les: update checktime even if check fails
holiman Aug 7, 2020
3bb8a4e
Merge pull request #21425 from holiman/leslock
karalabe Aug 7, 2020
4b9c0ea
eth/downloader: save the correct delivery time for state sync
karalabe Aug 7, 2020
8f24097
Merge pull request #21427 from karalabe/fix-statesync-delivery-time
karalabe Aug 7, 2020
6a53ce2
ethstats: overwrite old errors
holiman Aug 7, 2020
e401f5f
les: close all connected les-server when shutdown (#21426)
rjl493456442 Aug 7, 2020
9fea1a5
eth/downloader: set deliverytime on drops and timeouts too
holiman Aug 7, 2020
06125bf
Merge pull request #21429 from holiman/timerfix
karalabe Aug 7, 2020
48b484c
Merge pull request #21428 from holiman/ethstats_moar
karalabe Aug 7, 2020
7cee250
eth/downloader: allow all timers to exit
holiman Aug 10, 2020
cbbc54c
Merge pull request #21433 from holiman/statsync_exiter
karalabe Aug 10, 2020
9f45d6e
ethstats: split read and write lock, otherwise they'll lock up
karalabe Aug 10, 2020
4baa574
Merge pull request #21434 from karalabe/ethstats-split-rwlock
karalabe Aug 10, 2020
c28fd9c
tests: add Berlin-definition identical to YOLOv1 (#21435)
holiman Aug 10, 2020
7afdf79
params: update CHTs for v1.9.19
karalabe Aug 11, 2020
74925e5
Merge pull request #21437 from karalabe/cht-1.9.19
karalabe Aug 11, 2020
3e06419
params: release Geth v1.9.19
karalabe Aug 11, 2020
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
6 changes: 4 additions & 2 deletions build/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
Expand All @@ -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...)
Expand Down
2 changes: 1 addition & 1 deletion cmd/clef/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 14 additions & 5 deletions cmd/devp2p/enrcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"encoding/base64"
"encoding/hex"
"fmt"
"io"
"io/ioutil"
"net"
"os"
Expand Down Expand Up @@ -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 {
Expand Down
25 changes: 11 additions & 14 deletions cmd/faucet/faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,23 +235,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
}
}
Expand All @@ -268,7 +265,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)
Expand Down
2 changes: 1 addition & 1 deletion cmd/faucet/faucet.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h1 style="text-align: center;"><i class="fa fa-bath" aria-hidden="true"></i> {{
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<div class="input-group">
<input id="url" name="url" type="text" class="form-control" placeholder="Social network URL containing your Ethereum address...">
<input id="url" name="url" type="text" class="form-control" placeholder="Social network URL containing your Ethereum address..."/>
<span class="input-group-btn">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Give me Ether <i class="fa fa-caret-down" aria-hidden="true"></i></button>
<ul class="dropdown-menu dropdown-menu-right">{{range $idx, $amount := .Amounts}}
Expand Down
20 changes: 12 additions & 8 deletions cmd/geth/chaincmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ func initGenesis(ctx *cli.Context) error {
if err := json.NewDecoder(file).Decode(genesis); err != nil {
utils.Fatalf("invalid genesis file: %v", err)
}
// Open an initialise both full and light databases
stack := makeFullNode(ctx)
// Open and initialise both full and light databases
stack, _ := makeConfigNode(ctx)
defer stack.Close()

for _, name := range []string{"chaindata", "lightchaindata"} {
Expand Down Expand Up @@ -277,7 +277,8 @@ func importChain(ctx *cli.Context) error {
utils.SetupMetrics(ctx)
// Start system runtime metrics collection
go metrics.CollectProcessMetrics(3 * time.Second)
stack := makeFullNode(ctx)

stack, _ := makeConfigNode(ctx)
defer stack.Close()

chain, db := utils.MakeChain(ctx, stack, false)
Expand Down Expand Up @@ -371,7 +372,8 @@ func exportChain(ctx *cli.Context) error {
if len(ctx.Args()) < 1 {
utils.Fatalf("This command requires an argument.")
}
stack := makeFullNode(ctx)

stack, _ := makeConfigNode(ctx)
defer stack.Close()

chain, _ := utils.MakeChain(ctx, stack, true)
Expand Down Expand Up @@ -406,7 +408,8 @@ func importPreimages(ctx *cli.Context) error {
if len(ctx.Args()) < 1 {
utils.Fatalf("This command requires an argument.")
}
stack := makeFullNode(ctx)

stack, _ := makeConfigNode(ctx)
defer stack.Close()

db := utils.MakeChainDatabase(ctx, stack)
Expand All @@ -424,7 +427,8 @@ func exportPreimages(ctx *cli.Context) error {
if len(ctx.Args()) < 1 {
utils.Fatalf("This command requires an argument.")
}
stack := makeFullNode(ctx)

stack, _ := makeConfigNode(ctx)
defer stack.Close()

db := utils.MakeChainDatabase(ctx, stack)
Expand All @@ -446,7 +450,7 @@ func copyDb(ctx *cli.Context) error {
utils.Fatalf("Source ancient chain directory path argument missing")
}
// Initialize a new chain for the running node to sync into
stack := makeFullNode(ctx)
stack, _ := makeConfigNode(ctx)
defer stack.Close()

chain, chainDb := utils.MakeChain(ctx, stack, false)
Expand Down Expand Up @@ -554,7 +558,7 @@ func confirmAndRemoveDB(database string, kind string) {
}

func dump(ctx *cli.Context) error {
stack := makeFullNode(ctx)
stack, _ := makeConfigNode(ctx)
defer stack.Close()

chain, chainDb := utils.MakeChain(ctx, stack, true)
Expand Down
14 changes: 9 additions & 5 deletions cmd/geth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (

"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/internal/ethapi"
"github.com/ethereum/go-ethereum/node"
"github.com/ethereum/go-ethereum/params"
whisper "github.com/ethereum/go-ethereum/whisper/whisperv6"
Expand Down Expand Up @@ -104,6 +105,7 @@ func defaultNodeConfig() node.Config {
return cfg
}

// makeConfigNode loads geth configuration and creates a blank node instance.
func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
// Load defaults.
cfg := gethConfig{
Expand Down Expand Up @@ -144,9 +146,11 @@ func enableWhisper(ctx *cli.Context) bool {
return false
}

func makeFullNode(ctx *cli.Context) *node.Node {
// makeFullNode loads geth configuration and creates the Ethereum backend.
func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
stack, cfg := makeConfigNode(ctx)
utils.RegisterEthService(stack, &cfg.Eth)

backend := utils.RegisterEthService(stack, &cfg.Eth)

// Whisper must be explicitly enabled by specifying at least 1 whisper flag or in dev mode
shhEnabled := enableWhisper(ctx)
Expand All @@ -165,13 +169,13 @@ func makeFullNode(ctx *cli.Context) *node.Node {
}
// Configure GraphQL if requested
if ctx.GlobalIsSet(utils.GraphQLEnabledFlag.Name) {
utils.RegisterGraphQLService(stack, cfg.Node.GraphQLEndpoint(), cfg.Node.GraphQLCors, cfg.Node.GraphQLVirtualHosts, cfg.Node.HTTPTimeouts)
utils.RegisterGraphQLService(stack, backend, cfg.Node)
}
// Add the Ethereum Stats daemon if requested.
if cfg.Ethstats.URL != "" {
utils.RegisterEthStatsService(stack, cfg.Ethstats.URL)
utils.RegisterEthStatsService(stack, backend, cfg.Ethstats.URL)
}
return stack
return stack, backend
}

// dumpConfig is the dumpconfig command.
Expand Down
16 changes: 8 additions & 8 deletions cmd/geth/consolecmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/JavaScript-Cons
func localConsole(ctx *cli.Context) error {
// Create and start the node based on the CLI flags
prepare(ctx)
node := makeFullNode(ctx)
startNode(ctx, node)
defer node.Close()
stack, backend := makeFullNode(ctx)
startNode(ctx, stack, backend)
defer stack.Close()

// Attach to the newly started node and start the JavaScript console
client, err := node.Attach()
client, err := stack.Attach()
if err != nil {
utils.Fatalf("Failed to attach to the inproc geth: %v", err)
}
Expand Down Expand Up @@ -190,12 +190,12 @@ func dialRPC(endpoint string) (*rpc.Client, error) {
// everything down.
func ephemeralConsole(ctx *cli.Context) error {
// Create and start the node based on the CLI flags
node := makeFullNode(ctx)
startNode(ctx, node)
defer node.Close()
stack, backend := makeFullNode(ctx)
startNode(ctx, stack, backend)
defer stack.Close()

// Attach to the newly started node and start the JavaScript console
client, err := node.Attach()
client, err := stack.Attach()
if err != nil {
utils.Fatalf("Failed to attach to the inproc geth: %v", err)
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/geth/dao_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ func testDAOForkBlockNewChain(t *testing.T, test int, genesis string, expectBloc
} else {
// Force chain initialization
args := []string{"--port", "0", "--maxpeers", "0", "--nodiscover", "--nat", "none", "--ipcdisable", "--datadir", datadir}
geth := runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...)
geth.WaitExit()
runGeth(t, append(args, []string{"--exec", "2+2", "console"}...)...).WaitExit()
}
// Retrieve the DAO config flag from the database
path := filepath.Join(datadir, "geth", "chaindata")
Expand Down
Loading