Commit Graph

1092 Commits

Author SHA1 Message Date
amalraj.manigmail.com 32729b9f28 remove TODO related to review 2019-02-25 16:30:54 +08:00
amalraj.manigmail.com a8f7b2ca33 update newly added methods 2019-02-12 22:08:42 +08:00
amalraj.manigmail.com c2b98220eb Merge remote-tracking branch 'remotes/origin/master' into geth-upgrade-1.8.18-latest
# Conflicts:
#	.travis.yml
#	cmd/geth/consolecmd_test.go
#	vendor/github.com/rjeczalik/notify/watcher_readdcw.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_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/vendor.json
2019-02-10 20:31:51 +08:00
amalraj.manigmail.com 73667e7942 merge 1.8.18 with quorum/master
refactor raft & istanbul based on upstream changes
fix unit test cases
2019-02-08 17:29:01 +08:00
amalraj.manigmail.com 4dbd95947d Merge branch 'goeth-1.8.18' into geth-upgrade-1.8.18
# Conflicts:
#	.github/CONTRIBUTING.md
#	.travis.yml
#	core/blockchain.go
#	core/vm/evm.go
#	core/vm/logger_test.go
#	eth/handler_test.go
#	eth/tracers/tracer_test.go
#	internal/ethapi/api.go
#	internal/web3ext/web3ext.go
#	p2p/discover/node.go
#	p2p/server.go
#	swarm/network/simulations/discovery/discovery_test.go
2019-01-29 19:08:50 +08:00
amalraj.manigmail.com bc529a509d Merge branch 'goeth-1.8.18' into geth-upgrade-1.8.18
# Conflicts:
#	.github/CONTRIBUTING.md
#	.travis.yml
#	core/blockchain.go
#	core/vm/evm.go
#	core/vm/logger_test.go
#	eth/handler_test.go
#	eth/tracers/tracer_test.go
#	internal/ethapi/api.go
#	internal/web3ext/web3ext.go
#	p2p/discover/node.go
#	p2p/server.go
#	swarm/network/simulations/discovery/discovery_test.go
2019-01-29 19:08:14 +08:00
amalraj.manigmail.com 8e30fc202a Merge remote-tracking branch 'remotes/origin/master' into geth-upgrade-1.8.18
# Conflicts:
#	consensus/ethash/consensus.go
#	eth/bloombits.go
#	params/protocol_params.go
2019-01-25 22:29:22 +08:00
amalraj.manigmail.com 2914b3c99d Merge remote-tracking branch 'remotes/origin/master' into geth-upgrade-1.8.18
# Conflicts:
#	consensus/ethash/consensus.go
#	eth/bloombits.go
#	params/protocol_params.go
2019-01-25 22:24:03 +08:00
Peter Fox 126d051943 Added comment to explain the change 2019-01-07 10:00:50 +00:00
Peter Fox 569719975f Allow processing of sync content whilst it is being downloaded when
using a bounded sync
2019-01-03 10:00:07 +00:00
Samer Falah 004dd53a68
Merge pull request #598 from jbhurat/miner-setcoinbase
Prevent deadlock when miner.setEtherbase is called for Istanbul consensus
2018-12-13 15:19:45 -05:00
Jitendra Bhurat aea11d53a8 calling unlock using defer, preventing deadlock when miner.setEtherbase() returns an error 2018-12-13 12:31:50 -05:00
Jitendra Bhurat 7803a2f7ef Setting the private state to public state if contract address is not present in the private state 2018-12-06 11:02:12 -05:00
Samer Falah d4db92f69e
Merge pull request #570 from jbhurat/missing-logs-events
Adding private log blooms to DB in addition to public log bloom
2018-12-02 20:08:30 -05:00
amalraj.manigmail.com 519337a9d0 Merge remote-tracking branch 'quorum/master' into geth-upgrade-1.8.16 2018-11-29 16:57:27 +08:00
mr_franklin 4fecc7a3b1 eth: fix minor grammar issue in comment (#18091) 2018-11-13 11:57:46 +02:00
Corey Lin a5dc087845 core/vm, eth/tracers: use pointer receiver for GetRefund (#18018) 2018-11-08 13:07:15 +01:00
Corey Lin 212bf266c5 eth, p2p: fix comment typos (#18014) 2018-11-08 12:25:14 +01:00
Felix Lange 0bcff8f525
eth/downloader: speed up tests by generating chain only once (#17916)
* core: speed up GenerateChain

Use a mock implementation of ChainReader instead of creating
and destroying a BlockChain object for each generated block.

* eth/downloader: speed up tests by generating chain only once

This change reworks the downloader tests so they share a common test
blockchain instead of generating a chain in every test. The tests are
roughly twice as fast now.
2018-11-07 15:07:43 +01:00
SatpalSandhu61 470f34a784 Revert fix for eth_estimateGas due to side-effect where attempt to purely read private state doesn't work correctly. 2018-11-07 13:51:05 +00:00
Wenbiao Zheng b35165555d eth/downloader: remove the expired id directly (#17963) 2018-11-07 15:30:19 +02:00
Martin Holst Swende eea3ae42a3 core, eth/downloader: fix validation flaw, fix downloader printout flaw (#17974) 2018-11-07 14:47:11 +02:00
Martin Holst Swende dc6648bb58 downloader: measure successfull deliveries, not failed (#17983)
* downloader: measure successfull deliveries, not failed

* downloader: fix typos
2018-11-07 14:18:07 +02:00
Jitendra Bhurat ea0c1ffd45 Adding private log blooms to DB in addition to public log bloom 2018-10-24 14:44:11 -04:00
SatpalSandhu61 97dfe51a56 Remove logging used for investigation. 2018-10-24 11:59:40 +01:00
Wenbiao Zheng 6810933640 eth/downloader: SetBlocksIdle is not used (#17962)
__
 <(o )___
  ( ._> /
   `---'
2018-10-24 01:27:49 +02:00
Martin Holst Swende 4c0883e20d core/vm: adds refund as part of the json standard trace (#17910)
This adds the global accumulated refund counter to the standard
json output as a numeric json value. Previously this was not very
interesting since it was not used much, but with the new sstore
gas changes the value is a lot more interesting from a consensus
investigation perspective.
2018-10-23 16:28:18 +02:00
Wenbiao Zheng 3088c122d8 eth/downloader: fix comment typos (#17956) 2018-10-23 13:21:16 +02:00
SatpalSandhu61 e6dd33d71b Adding fix for eth_estimateGas - ensure private state is initialised before creating EVM. 2018-10-23 09:03:34 +01:00
amalraj.manigmail.com 662ee40ede fix go test cases 2018-10-10 11:28:19 +08:00
Péter Szilágyi 6ee3b26f44
eth/downloader: fix invalid hash chain error due to head mini reorg 2018-10-05 10:45:02 +03:00
Martin Holst Swende 89a32451ae core/vm: faster create/create2 (#17806)
* core/vm/runtim: benchmark create/create2

* core/vm: do less hashing in CREATE2

* core/vm: avoid storing jumpdest analysis for initcode

* core/vm: avoid unneccesary lookups, remove unused fields

* core/vm: go formatting tests

* core/vm: save jumpdest analysis locally

* core/vm: use common.Hash instead of nil, fix review comments

* core/vm: removed type destinations

* core/vm: correct check for empty hash

* eth: more elegant api_tracer

* core/vm: address review concerns
2018-10-04 18:15:37 +03:00
Liang Ma ff6e0351ab eth: fixed the minor typo inside the comments (#17830) 2018-10-04 12:35:24 +03:00
amalraj.manigmail.com 2c4081d89f Merge remote-tracking branch 'remotes/goeth/release/1.8' into geth-upgrade-1.8.15_new
fix compilation issues on programs impcted by this merge
2018-10-04 16:21:20 +08:00
amalraj.manigmail.com 47571689ee Merge remote-tracking branch 'remotes/goeth/release/1.8' into geth-upgrade-1.8.15_new
# Conflicts:
#	.travis.yml
#	README.md
#	cmd/utils/flags.go
#	consensus/consensus.go
#	consensus/ethash/consensus.go
#	consensus/ethash/ethash.go
#	core/blockchain.go
#	core/genesis_test.go
#	core/state/state_object.go
#	core/state_processor.go
#	core/vm/errors.go
#	core/vm/evm.go
#	core/vm/gas_table.go
#	core/vm/instructions_test.go
#	core/vm/interface.go
#	eth/api_tracer.go
#	eth/backend.go
#	eth/config.go
#	eth/filters/filter.go
#	les/backend.go
#	les/helper_test.go
#	miner/worker.go
#	params/config.go
#	params/version.go
2018-10-04 16:19:02 +08:00
Ryan Schneider b69942befe core, internal/ethapi: add and use LRU cache for receipts (#17610) 2018-09-29 22:53:31 +02:00
ledgerwatch 3d782bc727 eth: broadcast blocks to at least 4 peers (#17725) 2018-09-29 22:17:06 +02:00
Wenbiao Zheng 024b22c30e eth/downloader: use intermediate variable for better readability (#17510) 2018-09-29 22:13:39 +02:00
HackyMiner 107f556b2d internal/ethapi: add eth_chainId method (#17617)
This implements EIP-695.
2018-09-29 22:07:02 +02:00
amalraj.manigmail.com f82809d9a2 backend: fix chainId to chainID after merge 2018-09-27 23:23:10 +08:00
amalraj.manigmail.com 72270b10c7 Merge remote-tracking branch 'remotes/origin/master' into geth-upgrade-1.8.12
# Conflicts:
#	.travis.yml
#	README.md
#	cmd/geth/genesis_test.go
#	core/genesis.go
#	core/genesis_test.go
#	core/state_processor.go
#	eth/config.go
#	eth/downloader/downloader_test.go
#	eth/protocol_test.go
#	params/config.go
2018-09-27 18:55:55 +08:00
vsmk98 912809810a added Raft BoundedFullSync functions which were overwritten as a part upstream merge 2018-09-27 07:27:37 +00:00
Felix Lange 30cd5c1854
all: new p2p node representation (#17643)
Package p2p/enode provides a generalized representation of p2p nodes
which can contain arbitrary information in key/value pairs. It is also
the new home for the node database. The "v4" identity scheme is also
moved here from p2p/enr to remove the dependency on Ethereum crypto from
that package.

Record signature handling is changed significantly. The identity scheme
registry is removed and acceptable schemes must be passed to any method
that needs identity. This means records must now be validated explicitly
after decoding.

The enode API is designed to make signature handling easy and safe: most
APIs around the codebase work with enode.Node, which is a wrapper around
a valid record. Going from enr.Record to enode.Node requires a valid
signature.

* p2p/discover: port to p2p/enode

This ports the discovery code to the new node representation in
p2p/enode. The wire protocol is unchanged, this can be considered a
refactoring change. The Kademlia table can now deal with nodes using an
arbitrary identity scheme. This requires a few incompatible API changes:

  - Table.Lookup is not available anymore. It used to take a public key
    as argument because v4 protocol requires one. Its replacement is
    LookupRandom.
  - Table.Resolve takes *enode.Node instead of NodeID. This is also for
    v4 protocol compatibility because nodes cannot be looked up by ID
    alone.
  - Types Node and NodeID are gone. Further commits in the series will be
    fixes all over the the codebase to deal with those removals.

* p2p: port to p2p/enode and discovery changes

This adapts package p2p to the changes in p2p/discover. All uses of
discover.Node and discover.NodeID are replaced by their equivalents from
p2p/enode.

New API is added to retrieve the enode.Node instance of a peer. The
behavior of Server.Self with discovery disabled is improved. It now
tries much harder to report a working IP address, falling back to
127.0.0.1 if no suitable address can be determined through other means.
These changes were needed for tests of other packages later in the
series.

* p2p/simulations, p2p/testing: port to p2p/enode

No surprises here, mostly replacements of discover.Node, discover.NodeID
with their new equivalents. The 'interesting' API changes are:

 - testing.ProtocolSession tracks complete nodes, not just their IDs.
 - adapters.NodeConfig has a new method to create a complete node.

These changes were needed to make swarm tests work.

Note that the NodeID change makes the code incompatible with old
simulation snapshots.

* whisper/whisperv5, whisper/whisperv6: port to p2p/enode

This port was easy because whisper uses []byte for node IDs and
URL strings in the API.

* eth: port to p2p/enode

Again, easy to port because eth uses strings for node IDs and doesn't
care about node information in any way.

* les: port to p2p/enode

Apart from replacing discover.NodeID with enode.ID, most changes are in
the server pool code. It now deals with complete nodes instead
of (Pubkey, IP, Port) triples. The database format is unchanged for now,
but we should probably change it to use the node database later.

* node: port to p2p/enode

This change simply replaces discover.Node and discover.NodeID with their
new equivalents.

* swarm/network: port to p2p/enode

Swarm has its own node address representation, BzzAddr, containing both
an overlay address (the hash of a secp256k1 public key) and an underlay
address (enode:// URL).

There are no changes to the BzzAddr format in this commit, but certain
operations such as creating a BzzAddr from a node ID are now impossible
because node IDs aren't public keys anymore.

Most swarm-related changes in the series remove uses of
NewAddrFromNodeID, replacing it with NewAddr which takes a complete node
as argument. ToOverlayAddr is removed because we can just use the node
ID directly.
2018-09-25 00:59:00 +02:00
gary rong 457e930f27 eth, miner: prefer locally generated uncles vs remote ones (#17715)
* core, eth: fix dependency cycle

* eth, miner: perfer to locally generated uncle
2018-09-21 00:11:55 +03:00
gary rong ba0a8b7887 core, eth: fix dependency cycle (#17720) 2018-09-20 20:02:15 +03:00
gary rong d6254f827b all: protect self-mined block during reorg (#17656) 2018-09-20 15:09:30 +03:00
Guillaume Ballet da29332c5f core/vm: add switches to select evm+ewasm interpreters (#17687)
Interpreter initialization is left to the PRs implementing them.
Options for external interpreters are passed after a colon in the
`--vm.ewasm` and `--vm.evm` switches.
2018-09-20 10:44:35 +03:00
HackyMiner 6975c72981 all: fix various comment typos (#17591)
* swarm: fixed comment typo
* eth: fixed comment typo
* cmd/puppeth: fixed comment typo
2018-09-19 18:10:40 +02:00
Péter Szilágyi faa69bea1c
core, eth: fix goimports for Go 1.11 2018-09-19 11:47:09 +03:00
Emil 86a03f97d3 all: simplify s[:] to s where s is a slice (#17673) 2018-09-14 22:07:13 +02:00