Changes for Ethereum 1.8.14
cmd, eth: apply default miner recommit setting
Comments: cmd, eth: apply default miner recommit setting
Changed Files:
cmd/utils/flags.go
eth/config.go
cmd, core, miner: add --txpool.locals and priority mining
Comments:
This PR adds support for specifying local accounts via the CLI flag --txpool.locals (i.e. not requiring an RPC submission to mark something local). This allows nodes to pick up, track and journal local transactions that might have been submitted from a different remote node and arrived via devp2p.
The PR also adds support for prioritizing mining local transactions first and remote ones afterwards. It does it by simply splitting the set of pending transactions into locals and remotes and injecting the locals first, then the remotes.
Changed Files:
cmd/geth/main.go
cmd/geth/usage.go
cmd/utils/flags.go
core/tx_pool.go
miner/worker.go
cmd, eth, miner: make recommit configurable
Comments:
This PR introduces three things:
1.Miner recommit interval now is configurable through --miner.recommit flag
2.Operators can change the interval manually through miner.setRecommitInterval console API in the runtime.
3.Miner recommit interval will be adjusted by system dynamically.
Changed Files:
cmd/geth/main.go
cmd/geth/usage.go
cmd/utils/flags.go
eth/api.go
eth/backend.go
eth/config.go
eth/gen_config.go
internal/web3ext/web3ext.go
les/backend.go
miner/miner.go
miner/worker.go
miner/worker_test.go
miner: fix uncle iteration logic
Comments: Fixed uncle iteration logic in worker.go
Changed Files:
miner/worker.go
consensus/clique, light: light client snapshots on Rinkeby
Comments:
This PR extends the light client to support snapshot syncing on Rinkeby too:
1.Explicitly handle Clique chains by retrieving the epoch block, not the CHT head for a snapshot.
2.Extend Clique so snapshots can be trusted for epoch blocks too (with header), not just genesis.
3.Add the trusted checkpoint for block 2790000 on Rinkeby.
Changed Files:
consensus/clique/clique.go
consensus/clique/snapshot_test.go
light/lightchain.go
light/postprocess.go
params/config.go
vendor: update rjeczalik/notify so that it compiles on Darwin on go1.11
Comments:
update rjeczalik/notify so that it compiles on go1.11
Changed Files:
vendor/github.com/rjeczalik/notify/README.md
vendor/github.com/rjeczalik/notify/appveyor.yml
vendor/github.com/rjeczalik/notify/debug_debug.go
vendor/github.com/rjeczalik/notify/debug_nodebug.go
vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go
vendor/github.com/rjeczalik/notify/watcher_fsevents_go1.10.go
vendor/github.com/rjeczalik/notify/watcher_fsevents_go1.11.go
vendor/github.com/rjeczalik/notify/watcher_notimplemented.go
vendor/github.com/rjeczalik/notify/watcher_readdcw.go
vendor/github.com/rjeczalik/notify/watcher_stub.go
vendor/github.com/rjeczalik/notify/watcher_trigger.go
vendor/vendor.json
les: fix CHT field in nodeInfo
Comments:
This PR fixes the empty CHT field of admin.nodeInfo in light server mode
Changed Files:
les/commons.go
eth: upgradedb subcommand was dropped
Comments:
Changed Files:
eth/backend.go
swarm/network: bump bzz protocol version
Comments:
Fixed issue that getting errors after handshake due to nodes not being able to deserialise messages.
Changed Files:
swarm/network/protocol.go
swarm/network/protocol_test.go
swarm, swarm/network, swarm/pss: log error and fix logs
Comments:
This PR is logging an error in case something goes wrong with ListenAndServe, such as trying to listen to a privileged port without necessary privileges, or trying to listen to an already taken port.
It also updates a few logs so that we are a bit more consistent.
Changed Files:
swarm/network/hive.go
swarm/pss/pss.go
swarm/swarm.go
crypto/bn256: add missing license file, release wrapper in BSD-3
Comments: Fixed the issue that missed the LICENSE file while vendoring in the Cloudflare bn256 lib, changes the license of the Cloudflare/Google implementation switcher code from LGPLv3 to BSD-3.
Changed Files:
crypto/bn256/LICENSE
crypto/bn256/bn256_fast.go
crypto/bn256/bn256_fuzz.go
crypto/bn256/bn256_slow.go
crypto/bn256/cloudflare/LICENSE
Ensure from < to when tracing chain
Comments:
Ensure end block come after the start block.
Changed Files:
eth/api_tracer.go
cmd/puppeth: Accept ssh identity in the server string
Comments: allows the user to specify a different SSH identity file for each server and persist it.
Changed Files:
cmd/puppeth/ssh.go
cmd/puppeth/wizard_network.go
light: new CHTs
Comments: New CHTs for mainnet and ropsten
Changed Files:
light/postprocess.go
consensus/ethash: reduce notify test aggressiveness
Comments:
Changed Files:
consensus/ethash/sealer_test.go
travis: remove brew update and osxfuse install
Comments: Remove brew update or brew install osxfuse cause FUSE tests have been disabled on macOS
Changed Files:
.travis.yml
swarm/storage: cleanup task - remove bigger chunks than DefaultSize
Comments:
This PR is updating the swarm db cleanup cmd to remove chunks bigger than our chunk.DefaultSize, which is currently 4KB.
Changed Files:
swarm/storage/ldbstore.go
cmd/swarm: added swarm bootnodes
Comments:
this PR adds the Swarm default bootnodes on startup whenever the CLI bootstrap flag is not specified.
Geth default bootnodes will be ignored in any case, unless explicitly specified by the user on CLI.
Changed Files:
cmd/swarm/bootnodes.go
cmd/swarm/config.go
cmd/swarm/main.go
swarm/api/config.go
miner: update mining log with correct fee calculation
Comments:
change gas usage for miner fee calculation.
Changed Files:
miner/worker.go
les: fix crasher in NodeInfo when running as server
Comments:
moving the indexers, protocol creation and
NodeInfo to a new lesCommons struct which is embedded into both server
and client to fix crasher in NodeInfo when running as server
Changed Files :
les/backend.go
les/commons.go
les/handler.go
les/helper_test.go
les/server.go
build: do not require ethereum-swarm
deb when installing ethereum
Comments:
This PR is removing the hack which explicitly added ethereum-swarm as a requirement for ethereum deb package.
Changed Files:
build/ci.go
build/deb/ethereum/deb.control
crypto/bn256/google/bn256.go
crypto/bn256/google/curve.go
crypto/bn256/google/twist.go
vendor/golang.org/x/sys/cpu/cpu.go
vendor/golang.org/x/sys/cpu/cpu_arm.go
vendor/golang.org/x/sys/cpu/cpu_arm64.go
vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
vendor/golang.org/x/sys/cpu/cpu_gccgo.c
vendor/golang.org/x/sys/cpu/cpu_gccgo.go
vendor/golang.org/x/sys/cpu/cpu_mips64x.go
vendor/golang.org/x/sys/cpu/cpu_mipsx.go
vendor/golang.org/x/sys/cpu/cpu_ppc64x.go
vendor/golang.org/x/sys/cpu/cpu_s390x.go
vendor/golang.org/x/sys/cpu/cpu_x86.go
vendor/golang.org/x/sys/cpu/cpu_x86.s
vendor/vendor.json
consensus/ethash: use DAGs for remote mining, generate async
Comments:the many Keccak256 ops can have a significant performance impact if we're doing verification calls non-stop (i.e. a remote miner scenario).
A better approach for remote mining is to use the verification cache initially, but generate the mining DAG in the background and switch over to that. This ensures that remote mining suffers no performance hit, but after the warmup period (1-2 minutes for the DAG generation), it should become a lot faster.
Changed Files:
consensus/ethash/consensus.go
consensus/ethash/ethash.go
consensus/ethash/sealer.go
crypto/bn256: fix issues caused by Go 1.11
Comments:
Changed Files:
crypto/bn256/cloudflare/gfp_amd64.s
crypto/bn256/cloudflare/gfp_decl.go
miner: add gas and fee details to mining logs
Comments:
Changed Files:
miner/worker.go
miner: regenerate mining work every 3 seconds
Comments:
In a more pragmatic approach, we can run a timer within a miner to regenerate the mining block every 3 seconds. That will with a very high probability maximize mining profits, whilst keeping spurious processing down. This PR implements this algorithm.
Changed Files:
core/events.go
miner/worker.go
miner/worker_test.go
cmd/puppeth: fix nil panic on disconnected stats gathering
Comments: The puppeth network stats gathering code currently crashes if it cannot connect to a remote machine due to accessing a field before reconnection is attempted. This PR fixes the access so we only retrieve the IP address if we actually have a connection to retrieve it from.
Changed Files:
cmd/puppeth/wizard_netstats.go
light: CHT and bloom trie indexers working in light mode
Comments:
This PR enables the indexers to work in light client mode by downloading a part of these tries (the Merkle proofs of the last values of the last known section) in order to be able to add new values and recalculate subsequent hashes. It also adds CHT data to NodeInfo.
Changed Files:
core/chain_indexer.go
core/chain_indexer_test.go
eth/backend.go
eth/bloombits.go
les/backend.go
les/distributor.go
les/handler.go
les/helper_test.go
les/odr.go
les/odr_test.go
les/request_test.go
les/retrieve.go
les/server.go
light/lightchain.go
light/odr.go
light/postprocess.go
cmd/swarm, swarm: access control tries
Comments:
introduces access control functionality in Swarm.
Changed Files:
cmd/swarm/access.go
md/swarm/config.go
cmd/swarm/download.go
cmd/swarm/list.go
cmd/swarm/main.go
swarm/api/act.go
swarm/api/api.go
swarm/api/client/client.go
swarm/api/encrypt.go
swarm/api/filesystem.go
swarm/api/http/middleware.go
swarm/api/http/response.go
swarm/api/http/server.go
swarm/api/manifest.go
swarm/api/storage.go
swarm/api/uri.go
swarm/sctx/sctx.go
swarm/swarm.go
swarm/testutil/http.go
miner: streaming uncle blocks
Comments:
includes an optimization for miner to include uncle blocks to mining one as soon as possible.
Changed Files:
miner/worker.go
cmd: polish miner flags, deprecate olds, add upgrade path
Comments:
polishes the miner CLI flags to make them scoped and more consistent with the already polished flags (ethash, txpool, shh). The old flags are deprecated but should still work until we stop supporting them altogether.
Changed Files:
cmd/geth/chaincmd.go
cmd/geth/main.go
cmd/geth/usage.go
cmd/puppeth/module_node.go
cmd/utils/flags.go
backends: increase gaslimit in order to allow tests of large contracts
Comments:
Changed Files:
accounts/abi/bind/backends/simulated.go
contracts/chequebook/gencode.go
miner: move agent logic to worker
Comments:
Remove cpu agent stuff and move all logic to worker
Fix a issue that we should fire ChainEvent only when we insert a canonical block
Push full sealing work only there are some available pending transactions in the txpool
Add some unit tests
Changed Files:
core/blockchain.go
miner/agent.go
miner/miner.go
miner/worker.go
crypto: change formula for create2
Comments:
Changed Files:
core/vm/evm.go
crypto/crypto.go
swarm/network, swarm/storage: validate chunk size
Comments:
1.Adding a check for chunk size when we receive chunks at processReceivedChunks.
2.Extract default chunk size into a new package, because it is used in bmt and in storage and elsewhere.
3.Update Validators that validate the different types of chunks to check for chunk size - content addressed and MRU.
Changed Files:
swarm/bmt/bmt.go
swarm/chunk/chunk.go
swarm/network/stream/delivery.go
swarm/storage/chunker.go
swarm/storage/hasherstore.go
swarm/storage/localstore.go
swarm/storage/mru/handler.go
swarm/storage/mru/update.go
swarm/storage/pyramid.go
swarm/storage/types.go
swarm/swarm.go
cmd, consensus/ethash, eth: miner push notifications
Comments:
this PR introduces a new flag --miner.notify, which accepts a comma-separated list of URLs to push miner work packages to. It's main use case is for mining pools to be pinged by new blocks as fast as possible, without requiring to constantly poll the miner.getWork endpoint.
Changed Files:
cmd/geth/usage.go
cmd/geth/main.go
cmd/utils/flags.go
consensus/ethash/consensus.go
consensus/ethash/ethash.go
consensus/ethash/sealer.go
eth/backend.go
eth/config.go
les/backend.go
Manifest cli fix and upload defaultpath only once
Comments:
This PR enabled the full functionality for manifest add and update commands, even with encrypted uploads, and adds tests for such case.
Changed Files:
cmd/swarm/main.go
cmd/swarm/manifest.go
cmd/swarm/upload.go
swarm/api/api.go
swarm/api/client/client.go
swarm/api/http/server.go
swarm/api/manifest.go
swarm/api/http: added logging to denote request ended
Comments:
addresses a necessary log line that indicates with which status code a request was served
Changed Files:
swarm/api/http/middleware.go
swarm/api/http/response.go
swarm/api: close tar writer in GetDirectoryTar to flush and clean
Comments:
Fixed issue that tar writer in GetDirectoryTar was not closed, that prevented tar writer flush to write zero padding at the end of a response.
Changed Files:
swarm/api/api.go
cmd/swarm: remove shadow err
Comments:
Changed Files:
cmd/swarm/config.go
eth: fix tracer GC which accidentally pruned the metaroot
Comments:
Changed Files:
eth/api_tracer.go
trie/database.go
p2p/discv5: fix idx can be negative after uint convert to int(can cause crash)
Comments:
When data.Idx(topicRegister.Idx) is lower than max uint and higher than max int, it will pass index out of range checking, after the type conversion the Idx may be a negative number and it is used to be an index of array, this may cause a node crash.
Changed Files:
p2p/discv5/net.go
swarm/api/http: fixed list leaf links
Comments:
bzz-list leaf links should point to the actual bzz link, not to another bzz-list address.
Changed Files:
swarm/api/http/templates.go
swarm/bmt: ignore data longer then 4096 bytes in Hasher.Write
Comments:
This PR fixes BMT panic when data longer then 4096 bytes is passed to Hasher.Write method. Currently, we have chunks longer then 4096 bytes on the production cluster and this change will just ignore them on hashing. This PR does not add any support for larger chunks, just tries to fix the panic.
Changed Files:
swarm/bmt/bmt.go
swarm: Added lightnode flag
Comments:
Added a command-line argument and config option to enable Swarm lightnodes.
Changed Files:
cmd/swarm/config.go
cmd/swarm/main.go
swarm/api/config.go
swarm/network/protocol.go
swarm/swarm.go
all: avoid copying arrays in loops
Comments:
Avoid copying arrays of heavy structs (100 bytes and more) in loops. Found by the go-critic linter.
Changed Files:
p2p/discover/table.go
p2p/discv5/table.go
swarm/api/manifest.go
trie/node.go
trie/trie.go
swarm/api/http: http package refactoring
Comments:
addresses a much needed cleanup and refactoring of the swarm http package.
the changeset covers:
- appropriate methods have been moved into the api package
- introduces middleware-style routing
- serves the favicon upon request to /favicon.ico
- redesign&cleanup of the html responses
- consolidates all responses under response.go, templates are in templates.go
- compact responses for curl requests (!) :)
- introduction of sctx as a way to pass information between components using context objects
Changed Files:
swarm/api/api.go
swarm/api/http/error.go
swarm/api/http/error_templates.go
swarm/api/http/middleware.go
swarm/api/http/response.go
swarm/api/http/sctx.go
swarm/api/http/server.go
swarm/api/http/templates.go
swarm/sctx/sctx.go
swarm/storage/mru: HOTFIX - fix panic in Handler.update
Comments:
Operator precedence bug causing panic due to rsrc being nil
Changed Files:
swarm/storage/mru/handler.go
p2p: use safe atomic operations when changing connFlags
Comments:
making (c *conn) set really atomic.
Changed Files:
p2p/server.go
rpc: Add admin_addTrustedPeer and admin_removeTrustedPeer.
Comments:
These RPC calls are analogous to Parity's parity_addReservedPeer and
parity_removeReservedPeer.
They are useful for adjusting the trusted peer set during runtime,
without requiring restarting the server.
Changed Files:
internal/web3ext/web3ext.go
node/api.go
p2p/peer.go
p2p/server.go
WIP miner: seperate state, receipts for different mining work
Comments:
Changed Files:
miner/agent.go
miner/worker.go
cmd/puppeth: graceful shutdown on redeploys
Comments:
This PR aims to gracefully shut down puppeth nodes to prevent in-memory caches from being discarded without persisting to disk:
- Fix termination signal propagation from docker to internal node.
- Raise the shutdown timeouts to 1 minute to allow slower writes.
Changed Files:
cmd/puppeth/module_dashboard.go
cmd/puppeth/module_ethstats.go
cmd/puppeth/module_explorer.go
cmd/puppeth/module_faucet.go
cmd/puppeth/module_nginx.go
cmd/puppeth/module_node.go
cmd/puppeth/module_wallet.go
consensus/ethash: move remote agent logic to ethash internal
Comments:
the remote miner relative logics to ethash engine internally. Since this part of logics are PoW characteristic(including remote miner, hashrate submission or statistic). It can make miner package more clear.
Changed Files:
consensus/clique/clique.go
consensus/consensus.go
consensus/ethash/api.go
consensus/ethash/ethash.go
consensus/ethash/sealer.go
eth/api.go
eth/backend.go
internal/web3ext/web3ext.go
les/backend.go
miner/agent.go
miner/miner.go
miner/remote_agent.go
miner/worker.go
accounts/keystore: rename skipKeyFile to nonKeyFile to better rev…
Comments:
Refactor: rename skipKeyFile to nonKeyFile to better reveal it's purpose to avoid confusion.
Changed Files:
accounts/keystore/file_cache.go
mobile: fix missing return for CallMsg.SetTo(nil)
Comments:
Changed Files:
mobile/ethereum.go
core/vm: update benchmarks for core/vm
Comments:
Update benchmarks to use a pool of int pools.
Unless benchmarks are aborted with segmentation fault.
Changed Files:
core/vm/instructions_test.go
build: explicitly name all packages to be cross-compiled
Comments:
This PR fixes a bug where swarm is not cross-compiled, but we try to archive it into archives for various architectures.
The var that is used to select binaries for cross-compilation is decoupled from the var that selects the binaries for the geth-alltools archive.
Changed Files:
build/ci.go