amalraj.manigmail.com
7c548e0f74
Merge remote-tracking branch 'remotes/geth/release/1.8' into merge-193
...
changes related to merge conflicts
2018-07-24 16:15:38 +08:00
amalraj.manigmail.com
c3c479d2aa
Merge remote-tracking branch 'remotes/geth/release/1.8' into merge-193
...
# Conflicts:
# .github/CODEOWNERS
# .travis.yml
# README.md
# VERSION
# accounts/abi/argument.go
# accounts/abi/bind/backends/simulated.go
# accounts/abi/bind/bind_test.go
# accounts/abi/event_test.go
# accounts/abi/numbers.go
# accounts/abi/numbers_test.go
# accounts/abi/reflect.go
# accounts/accounts.go
# accounts/keystore/keystore.go
# accounts/keystore/keystore_wallet.go
# accounts/usbwallet/internal/trezor/trezor.go
# accounts/usbwallet/ledger.go
# accounts/usbwallet/wallet.go
# appveyor.yml
# build/ci.go
# build/goimports.sh
# cmd/ethkey/generate.go
# cmd/ethkey/inspect.go
# cmd/ethkey/main.go
# cmd/ethkey/message.go
# cmd/ethkey/utils.go
# cmd/faucet/faucet.go
# cmd/geth/chaincmd.go
# cmd/geth/config.go
# cmd/geth/main.go
# cmd/geth/misccmd.go
# cmd/geth/usage.go
# cmd/p2psim/main.go
# cmd/puppeth/genesis.go
# cmd/puppeth/module_dashboard.go
# cmd/puppeth/wizard_faucet.go
# cmd/puppeth/wizard_genesis.go
# cmd/puppeth/wizard_netstats.go
# cmd/puppeth/wizard_node.go
# cmd/puppeth/wizard_wallet.go
# cmd/swarm/config.go
# cmd/swarm/config_test.go
# cmd/swarm/db.go
# cmd/swarm/hash.go
# cmd/swarm/main.go
# cmd/swarm/manifest.go
# cmd/swarm/run_test.go
# cmd/swarm/upload.go
# cmd/swarm/upload_test.go
# cmd/utils/flags.go
# cmd/wnode/main.go
# common/bytes.go
# common/compiler/solidity.go
# common/hexutil/hexutil.go
# common/math/big.go
# common/math/integer.go
# common/mclock/mclock.go
# common/types.go
# common/types_template.go
# consensus/clique/clique.go
# consensus/consensus.go
# consensus/ethash/algorithm.go
# consensus/ethash/consensus.go
# consensus/ethash/ethash.go
# containers/vagrant/Vagrantfile
# contracts/ens/ens_test.go
# core/asm/compiler.go
# core/asm/lexer.go
# core/block_validator.go
# core/blockchain.go
# core/blockchain_test.go
# core/chain_makers.go
# core/database_util.go
# core/database_util_test.go
# core/events.go
# core/genesis.go
# core/genesis_alloc.go
# core/genesis_test.go
# core/headerchain.go
# core/rawdb/accessors_chain.go
# core/rawdb/accessors_indexes.go
# core/rawdb/accessors_metadata.go
# core/rawdb/schema.go
# core/state/state_test.go
# core/state/statedb.go
# core/state/sync.go
# core/state_processor.go
# core/state_transition.go
# core/tx_journal.go
# core/tx_list.go
# core/tx_pool.go
# core/tx_pool_test.go
# core/types.go
# core/types/block.go
# core/types/block_test.go
# core/types/gen_receipt_json.go
# core/types/log.go
# core/types/receipt.go
# core/types/transaction.go
# core/types/transaction_signing.go
# core/types/transaction_signing_test.go
# core/types/transaction_test.go
# core/vm/errors.go
# core/vm/evm.go
# core/vm/gas.go
# core/vm/gas_table.go
# core/vm/instructions.go
# core/vm/instructions_test.go
# core/vm/interface.go
# core/vm/interpreter.go
# core/vm/intpool.go
# core/vm/jump_table.go
# core/vm/logger.go
# core/vm/logger_test.go
# core/vm/memory_table.go
# core/vm/opcodes.go
# core/vm/runtime/env.go
# core/vm/runtime/runtime.go
# crypto/crypto.go
# crypto/crypto_test.go
# eth/api.go
# eth/api_backend.go
# eth/api_tracer.go
# eth/backend.go
# eth/config.go
# eth/downloader/downloader.go
# eth/downloader/queue.go
# eth/downloader/statesync.go
# eth/filters/filter.go
# eth/filters/filter_system.go
# eth/filters/filter_system_test.go
# eth/gen_config.go
# eth/handler.go
# eth/handler_test.go
# eth/helper_test.go
# eth/protocol.go
# eth/sync.go
# eth/tracers/internal/tracers/4byte_tracer.js
# eth/tracers/internal/tracers/assets.go
# eth/tracers/tracer_test.go
# eth/tracers/tracers_test.go
# ethclient/ethclient.go
# ethdb/database.go
# ethdb/interface.go
# ethdb/memory_database.go
# ethstats/ethstats.go
# event/feed.go
# internal/ethapi/api.go
# internal/ethapi/backend.go
# internal/guide/guide_test.go
# internal/web3ext/web3ext.go
# les/api_backend.go
# les/backend.go
# les/fetcher.go
# les/handler.go
# les/helper_test.go
# les/odr_requests.go
# les/odr_test.go
# les/retrieve.go
# les/server.go
# les/serverpool.go
# light/lightchain.go
# light/odr_test.go
# light/postprocess.go
# light/txpool.go
# log/README.md
# log/doc.go
# log/format.go
# log/handler.go
# log/logger.go
# log/root.go
# metrics/exp/exp.go
# metrics/influxdb/influxdb.go
# metrics/metrics.go
# metrics/resetting_timer.go
# metrics/resetting_timer_test.go
# metrics/timer_test.go
# miner/worker.go
# mobile/accounts.go
# mobile/ethereum.go
# mobile/geth.go
# node/config.go
# node/doc.go
# p2p/discover/database.go
# p2p/discover/database_test.go
# p2p/discover/table.go
# p2p/discover/table_test.go
# p2p/discover/udp.go
# p2p/discover/udp_test.go
# p2p/discv5/udp.go
# p2p/enr/enr.go
# p2p/enr/enr_test.go
# p2p/enr/entries.go
# p2p/protocols/protocol.go
# p2p/protocols/protocol_test.go
# p2p/rlpx_test.go
# p2p/server.go
# p2p/simulations/adapters/docker.go
# p2p/simulations/adapters/exec.go
# p2p/simulations/adapters/inproc.go
# p2p/simulations/adapters/types.go
# p2p/simulations/http.go
# p2p/simulations/http_test.go
# p2p/simulations/mocker.go
# p2p/simulations/network.go
# p2p/simulations/network_test.go
# p2p/testing/protocolsession.go
# params/bootnodes.go
# params/config.go
# params/denomination.go
# params/gas_table.go
# params/protocol_params.go
# params/version.go
# rpc/http.go
# rpc/json.go
# rpc/utils.go
# signer/core/api.go
# swarm/api/api.go
# swarm/api/api_test.go
# swarm/api/client/client.go
# swarm/api/client/client_test.go
# swarm/api/config.go
# swarm/api/config_test.go
# swarm/api/filesystem.go
# swarm/api/filesystem_test.go
# swarm/api/http/error.go
# swarm/api/http/error_templates.go
# swarm/api/http/error_test.go
# swarm/api/http/roundtripper.go
# swarm/api/http/server.go
# swarm/api/http/server_test.go
# swarm/api/http/templates.go
# swarm/api/manifest.go
# swarm/api/manifest_test.go
# swarm/api/storage.go
# swarm/api/storage_test.go
# swarm/api/uri.go
# swarm/api/uri_test.go
# swarm/fuse/fuse_dir.go
# swarm/fuse/fuse_file.go
# swarm/fuse/swarmfs.go
# swarm/fuse/swarmfs_test.go
# swarm/fuse/swarmfs_unix.go
# swarm/fuse/swarmfs_util.go
# swarm/metrics/flags.go
# swarm/network/depo.go
# swarm/network/forwarding.go
# swarm/network/hive.go
# swarm/network/kademlia/address.go
# swarm/network/kademlia/kaddb.go
# swarm/network/kademlia/kademlia.go
# swarm/network/kademlia/kademlia_test.go
# swarm/network/messages.go
# swarm/network/protocol.go
# swarm/network/syncdb.go
# swarm/network/syncdb_test.go
# swarm/network/syncer.go
# swarm/services/swap/swap.go
# swarm/services/swap/swap/swap.go
# swarm/storage/chunker.go
# swarm/storage/chunker_test.go
# swarm/storage/common_test.go
# swarm/storage/database.go
# swarm/storage/dbstore.go
# swarm/storage/dbstore_test.go
# swarm/storage/dpa.go
# swarm/storage/dpa_test.go
# swarm/storage/localstore.go
# swarm/storage/memstore.go
# swarm/storage/netstore.go
# swarm/storage/pyramid.go
# swarm/storage/swarmhasher.go
# swarm/storage/types.go
# swarm/swarm.go
# swarm/swarm_test.go
# swarm/testutil/http.go
# tests/block_test_util.go
# tests/difficulty_test.go
# tests/init.go
# tests/state_test_util.go
# tests/transaction_test.go
# tests/util.go
# tests/vm_test_util.go
# trie/database.go
# trie/encoding.go
# trie/hasher.go
# trie/iterator.go
# trie/proof.go
# trie/proof_test.go
# trie/secure_trie.go
# trie/sync.go
# trie/sync_test.go
# trie/trie.go
# vendor/github.com/docker/docker/pkg/reexec/command_linux.go
# vendor/github.com/docker/docker/pkg/reexec/command_unix.go
# vendor/github.com/docker/docker/pkg/reexec/command_unsupported.go
# vendor/github.com/docker/docker/pkg/reexec/command_windows.go
# vendor/github.com/docker/docker/pkg/reexec/reexec.go
# vendor/github.com/eapache/channels/.gitignore
# vendor/github.com/eapache/queue/.gitignore
# vendor/github.com/naoina/toml/encode.go
# vendor/github.com/naoina/toml/parse.go
# vendor/github.com/naoina/toml/parse.peg
# vendor/github.com/naoina/toml/parse.peg.go
# vendor/github.com/rcrowley/go-metrics/.gitignore
# vendor/github.com/rcrowley/go-metrics/.travis.yml
# vendor/github.com/rcrowley/go-metrics/README.md
# vendor/github.com/rcrowley/go-metrics/counter.go
# vendor/github.com/rcrowley/go-metrics/debug.go
# vendor/github.com/rcrowley/go-metrics/ewma.go
# vendor/github.com/rcrowley/go-metrics/exp/exp.go
# vendor/github.com/rcrowley/go-metrics/gauge.go
# vendor/github.com/rcrowley/go-metrics/gauge_float64.go
# vendor/github.com/rcrowley/go-metrics/graphite.go
# vendor/github.com/rcrowley/go-metrics/healthcheck.go
# vendor/github.com/rcrowley/go-metrics/histogram.go
# vendor/github.com/rcrowley/go-metrics/json.go
# vendor/github.com/rcrowley/go-metrics/log.go
# vendor/github.com/rcrowley/go-metrics/meter.go
# vendor/github.com/rcrowley/go-metrics/metrics.go
# vendor/github.com/rcrowley/go-metrics/opentsdb.go
# vendor/github.com/rcrowley/go-metrics/registry.go
# vendor/github.com/rcrowley/go-metrics/runtime.go
# vendor/github.com/rcrowley/go-metrics/sample.go
# vendor/github.com/rcrowley/go-metrics/syslog.go
# vendor/github.com/rcrowley/go-metrics/timer.go
# vendor/github.com/rcrowley/go-metrics/writer.go
# vendor/github.com/syndtr/goleveldb/leveldb/db.go
# vendor/golang.org/x/sys/unix/mksysnum_linux.pl
# vendor/golang.org/x/sys/unix/types_linux.go
# vendor/vendor.json
# whisper/shhclient/client.go
# whisper/whisperv5/api.go
# whisper/whisperv5/peer_test.go
# whisper/whisperv5/whisper.go
# whisper/whisperv6/api.go
# whisper/whisperv6/peer_test.go
# whisper/whisperv6/whisper.go
2018-07-24 16:11:05 +08:00
Felföldi Zsolt
51df1c1f20
les: add announcement safety check to light fetcher ( #17034 )
2018-07-04 13:40:20 +03:00
gary rong
4895665670
les: handle conn/disc/reg logic in the eventloop ( #16981 )
...
* les: handle conn/disc/reg logic in the eventloop
* les: try to dial before start eventloop
* les: handle disconnect logic more safely
* les: grammar fix
2018-06-25 11:52:24 +03:00
Felföldi Zsolt
25982375a8
les: fix retriever logic ( #16776 )
...
This PR fixes a retriever logic bug. When a peer had a soft timeout
and then a response arrived, it always assumed it was the same peer
even though it could have been a later requested one that did not time
out at all yet. In this case the logic went to an illegal state and
deadlocked, causing a goroutine leak.
Fixes #16243 and replaces #16359 .
Thanks to @riceke for finding the bug in the logic.
2018-06-12 15:58:47 +02:00
Felföldi Zsolt
049f5b3572
core, eth, les: more efficient hash-based header chain retrieval ( #16946 )
2018-06-12 16:52:54 +03:00
Felföldi Zsolt
546d42179e
les: pass server pool to protocol manager ( #16947 )
2018-06-12 14:00:52 +03:00
Felföldi Zsolt
a5237a27ea
les: add Skip overflow check to GetBlockHeadersMsg handler ( #16891 )
2018-06-05 10:23:00 +03:00
Qvintvs
a67eccbcd8
debug tests
2018-06-01 12:51:35 +08:00
Qvintvs
622e98ad51
debug merge attempt
2018-05-31 14:21:16 +08:00
Qvintvs
4b44bea1d7
Merge attempt
2018-05-31 14:16:44 +08:00
kiel barry
0fe47e98c4
trie: fixes to comply with golint ( #16771 )
2018-05-21 23:41:31 +03:00
Péter Szilágyi
49719e21bc
core, eth: minor txpool event cleanups
2018-05-18 12:08:24 +03:00
rjl493456442
a2e43d28d0
all: collate new transaction events together
2018-05-18 11:46:44 +03:00
gary rong
7beccb29be
all: get rid of error when creating memory database ( #16716 )
...
* all: get rid of error when create mdb
* core: clean up variables definition
* all: inline mdb definition
2018-05-09 15:24:25 +03:00
Péter Szilágyi
6cf0ab38bd
core/rawdb: separate raw database access to own package ( #16666 )
2018-05-07 14:35:06 +03:00
GagziW
7c02933275
les: changed if-else blocks to conform with golint ( #16658 )
2018-05-03 11:35:06 +03:00
thomasmodeneis
ba1030b6b8
build: enable goimports and varcheck linters ( #16446 )
2018-04-18 00:53:50 +02:00
cpusoft
e7cc5b4160
les: add ps.lock.Unlock() before return ( #16360 )
2018-04-11 11:02:33 +03:00
Andrey Petrov
2e9c8fd4fb
eth, les: allow exceeding maxPeers for trusted peers ( #16189 )
...
Fixes #3326 , #14472
2018-02-27 12:52:59 +02:00
Anton Evangelatov
ae9f97221a
metrics: pull library and introduce ResettingTimer and InfluxDB reporter ( #15910 )
...
* go-metrics: fork library and introduce ResettingTimer and InfluxDB reporter.
* vendor: change nonsense/go-metrics to ethersphere/go-metrics
* go-metrics: add tests. move ResettingTimer logic from reporter to type.
* all, metrics: pull in metrics package in go-ethereum
* metrics/test: make sure metrics are enabled for tests
* metrics: apply gosimple rules
* metrics/exp, internal/debug: init expvar endpoint when starting pprof server
* internal/debug: tiny comment formatting fix
2018-02-23 11:56:08 +02:00
Péter Szilágyi
5cf1d35470
eth, les, light: filter on logs only, derive receipts on demand
2018-02-22 19:12:43 +02:00
Felföldi Zsolt
1bdde620da
les: fix light fetcher database race ( #16103 )
...
* les: fix light fetcher database race
* les: lightFetcher comments
2018-02-19 10:41:30 +02:00
Péter Szilágyi
dfc5842a89
les: add missing lock around peer access
2018-02-14 21:09:20 +02:00
Felix Lange
a5c0bbb4f4
all: update license information ( #16089 )
2018-02-14 13:49:11 +01:00
Péter Szilágyi
7a0019c63b
les, light: fix CHT trie retrievals ( #16039 )
...
* les, light: fix CHT trie retrievals
* les, light: minor polishes, test remote CHT retrievals
* les, light: deterministic nodeset rlp, bloombits test skeleton
* les: add an event emission to the les bloombits test
* les: drop dead tester code
2018-02-11 14:57:46 +02:00
Felföldi Zsolt
2f849ade82
les: fix server panic when discovery disabled ( #16055 )
2018-02-10 14:33:52 +02:00
Péter Szilágyi
55599ee95d
core, trie: intermediate mempool between trie and database ( #15857 )
...
This commit reduces database I/O by not writing every state trie to disk.
2018-02-05 17:40:32 +01:00
Felföldi Zsolt
c3f238dd53
les: limit LES peer count and improve peer configuration logic ( #16010 )
...
* les: limit number of LES connections
* eth, cmd/utils: light vs max peer configuration logic
2018-02-05 15:41:53 +02:00
Péter Szilágyi
566d5c0777
core, eth, les, light: get rid of redundant methods
2018-01-30 18:42:00 +02:00
Felföldi Zsolt
23bca0f374
les: fix TxStatusMsg RLP coding ( #15974 )
2018-01-26 19:30:45 +02:00
Felföldi Zsolt
92580d69d3
p2p, p2p/discover, p2p/discv5: implement UDP port sharing ( #15200 )
...
This commit affects p2p/discv5 "topic discovery" by running it on
the same UDP port where the old discovery works. This is realized
by giving an "unhandled" packet channel to the old v4 discovery
packet handler where all invalid packets are sent. These packets
are then processed by v5. v5 packets are always invalid when
interpreted by v4 and vice versa. This is ensured by adding one
to the first byte of the packet hash in v5 packets.
DiscoveryV5Bootnodes is also changed to point to new bootnodes
that are implementing the changed packet format with modified
hash. Existing and new v5 bootnodes are both running on different
ports ATM.
2018-01-22 13:38:34 +01:00
Felföldi Zsolt
83d1657444
les: fix les/1 CHT compatibility issue ( #15692 )
2018-01-09 11:41:59 +01:00
Péter Szilágyi
6f69cdd109
all: switch gas limits from big.Int to uint64
2018-01-03 14:45:35 +02:00
Furkan KAMACI
b8caba9709
various: remove redundant parentheses ( #15793 )
2018-01-03 14:14:47 +02:00
Péter Szilágyi
f7ca03ae87
eth, les, light: expose chain config in les node info too ( #15732 )
2017-12-28 14:18:34 +01:00
gary rong
5f8888e116
accounts, consensus, core, eth: make chain maker consensus agnostic ( #15497 )
...
* accounts, consensus, core, eth: make chain maker consensus agnostic
* consensus, core: move CalcDifficulty to Engine interface
* consensus: add docs for calcDifficulty function
* consensus, core: minor comment fixups
2017-12-22 14:37:50 +02:00
gary rong
f14047dae5
cmd, consensus, eth: split ethash related config to it own ( #15520 )
...
* cmd, consensus, eth: split ethash related config to it own
* eth, consensus: minor polish
* eth, consenus, console: compress pow testing config field to single one
* consensus, eth: document pow mode
2017-11-24 16:10:27 +02:00
rjl493456442
41ef34ae40
les: use modified default txpool config to avoid creating journal file
2017-11-21 22:13:57 +08:00
ferhat elmas
86f6568f66
build: enable unconvert linter ( #15456 )
...
* build: enable unconvert linter
- fixes #15453
- update code base for failing cases
* cmd/puppeth: replace syscall.Stdin with os.Stdin.Fd() for unconvert linter
2017-11-10 19:06:45 +02:00
b00ris
7ace023981
les: fix channel assignment data race ( #15441 )
2017-11-09 10:43:37 +01:00
Evgeny Danilenko
0914d4e0d2
les: fix misuse of WaitGroup ( #15365 )
2017-11-09 10:34:35 +01:00
ferhat elmas
9619a61024
all: gofmt -w -s ( #15419 )
2017-11-08 11:45:52 +01:00
Patrick Mylund Nielsen
3d91976f08
Geth 1.7.2 rebase and addition of Istanbul BFT ( #207 )
2017-10-31 18:24:11 -04:00
Felföldi Zsolt
8d434f6a6f
les, core/bloombits: post-LES/2 fixes ( #15391 )
...
* les: fix topic ID
* core/bloombits: fix interface conversion
2017-10-27 17:18:53 +03:00
Péter Szilágyi
0095531a58
core, eth, les: fix messy code ( #15367 )
...
* core, eth, les: fix messy code
* les: fixed tx status test and rlp encoding
* core: add a workaround for light sync
2017-10-25 12:18:44 +03:00
Felföldi Zsolt
ca376ead88
les, light: LES/2 protocol version ( #14970 )
...
This PR implements the new LES protocol version extensions:
* new and more efficient Merkle proofs reply format (when replying to
a multiple Merkle proofs request, we just send a single set of trie
nodes containing all necessary nodes)
* BBT (BloomBitsTrie) works similarly to the existing CHT and contains
the bloombits search data to speed up log searches
* GetTxStatusMsg returns the inclusion position or the
pending/queued/unknown state of a transaction referenced by hash
* an optional signature of new block data (number/hash/td) can be
included in AnnounceMsg to provide an option for "very light
clients" (mobile/embedded devices) to skip expensive Ethash check
and accept multiple signatures of somewhat trusted servers (still a
lot better than trusting a single server completely and retrieving
everything through RPC). The new client mode is not implemented in
this PR, just the protocol extension.
2017-10-24 15:19:09 +02:00
Felix Lange
10181b57a9
core, eth/downloader: commit block data using batches ( #15115 )
...
* ethdb: add Putter interface and Has method
* ethdb: improve docs and add IdealBatchSize
* ethdb: remove memory batch lock
Batches are not safe for concurrent use.
* core: use ethdb.Putter for Write* functions
This covers the easy cases.
* core/state: simplify StateSync
* trie: optimize local node check
* ethdb: add ValueSize to Batch
* core: optimize HasHeader check
This avoids one random database read get the block number. For many uses
of HasHeader, the expectation is that it's actually there. Using Has
avoids a load + decode of the value.
* core: write fast sync block data in batches
Collect writes into batches up to the ideal size instead of issuing many
small, concurrent writes.
* eth/downloader: commit larger state batches
Collect nodes into a batch up to the ideal size instead of committing
whenever a node is received.
* core: optimize HasBlock check
This avoids a random database read to get the number.
* core: use numberCache in HasHeader
numberCache has higher capacity, increasing the odds of finding the
header without a database lookup.
* core: write imported block data using a batch
Restore batch writes of state and add blocks, tx entries, receipts to
the same batch. The change also simplifies the miner.
This commit also removes posting of logs when a forked block is imported.
* core: fix DB write error handling
* ethdb: use RLock for Has
* core: fix HasBlock comment
2017-09-09 19:03:07 +03:00
Péter Szilágyi
f585f9eee8
core, eth: clean up bloom filtering, add some tests
2017-09-06 11:14:19 +03:00
Zsolt Felfoldi
4ea4d2dc34
core, eth: add bloombit indexer, filter based on it
2017-09-06 11:13:13 +03:00