Commit Graph

726 Commits

Author SHA1 Message Date
Felix Lange
dc2b23c869 [release/1.4.13] core/state: track all accounts in canon state
This change introduces a global, per-state cache that keeps account data
in the canon state. Thanks to @karalabe for lots of fixes.

(cherry picked from commit a59a93f476434f2805c8fd3e10bf1b2f579b078f)
2016-09-26 10:31:18 +02:00
Bas van Kervel
c4ed34f008 [release/1.4.11] core: ensure the canonical block is written before the canonical hash is set
(cherry picked from commit bb8059f6aa86d1052d7c2dd75a6985982cb278f4)

Conflicts:
	core/blockchain.go
	core/database_util.go
	core/headerchain.go
	eth/filters/filter.go
2016-08-18 15:25:16 +02:00
Péter Szilágyi
c4e4baf668 [release/1.4.11] eth/downloader: fewer headers and futures too un ancestor lookup
(cherry picked from commit d68865f3b1b93e2463f7e3381e39fbbd137df825)
2016-08-18 15:01:49 +02:00
Péter Szilágyi
86493f9103 [release/1.4.11] eth/downloader: abort sync if master drops (timeout prev)
(cherry picked from commit 8f0a4a25f82f48005e6252a90c008bdc76219cc3)
2016-08-18 15:01:46 +02:00
Péter Szilágyi
6c672a55c0 [release/1.4.11] eth, eth/downloader: don't forward the DAO challenge header
(cherry picked from commit 071af57bcf516d92a0b56c5bb119d9576d32b5cb)
2016-08-18 15:01:43 +02:00
Péter Szilágyi
48709d5340 [release/1.4.11] eth, eth/downloader: better remote head tracking
(cherry picked from commit 1dd272080dfb49a07a87c46e18d8aeaa0fd41a08)

Conflicts:
	eth/handler.go
	eth/sync.go
2016-08-18 15:01:39 +02:00
Felix Lange
65da8f601f [release/1.4.11] eth, eth/downloader, eth/fetcher: delete eth/61 code
The eth/61 protocol was disabled in #2776, this commit removes its
message handlers and hash-chain sync logic.

(cherry picked from commit 016007bd25f2b5e597c2ac2f7256c4e73574f70e)

Conflicts:
	eth/handler.go
	eth/handler_test.go
2016-08-18 15:01:34 +02:00
Péter Szilágyi
9eb2873a9c [release/1.4.11] eth/downloader: fix the stall checks/drops during sync
(cherry picked from commit c7c82f1b44e07ad0906dde563cce46ea87b6fc83)
2016-08-18 15:01:15 +02:00
Péter Szilágyi
08a7cd74da [release/1.4.11] eth: cancel DAO challenge on peer drop (annoying log)
(cherry picked from commit 91f18ffd47d766b1493016da6802befbf9739709)
2016-08-18 15:01:05 +02:00
Henning Diedrich
35d479b6d3 [release/1.4.11] eth: fix #2710 filter races
and locking bugs found in its wake.

(cherry picked from commit 51f8ce26cf6dbc20ddc548af305739db981fdd41)
2016-08-18 15:00:48 +02:00
Péter Szilágyi
1d6b65cd84 [release/1.4.10] cmd/utils, eth: display the user's current fork, minor text tweak
(cherry picked from commit 993b41216092fa6dc20d3755afe322cd1376b398)
2016-07-16 14:30:09 +03:00
Péter Szilágyi
1b2941cd56 [release/1.4.10] cmd, core, eth, miner, params, tests: finalize the DAO fork
(cherry picked from commit 2c2e389b778b490fcaf14d9cc45a750647ca5c68)
2016-07-16 14:30:07 +03:00
Péter Szilágyi
b8c0883770 [release/1.4.10] accounts, core, eth: pass chain config for chain maker to test DAO
(cherry picked from commit 3291235711082759cd7b70253c02150a80d57011)
2016-07-16 14:30:05 +03:00
Péter Szilágyi
8c20fe17bd [release/1.4.10] core, eth: enforce network split post DAO hard-fork
(cherry picked from commit 7f00e8c0331bf13739e749bab88bf9006ca02f96)
2016-07-16 14:30:00 +03:00
Péter Szilágyi
3dd46bc884 [release/1.4.10] cmd, core, eth, params: implement flags to control dao fork blocks
(cherry picked from commit 6060e098c929792f455d7f580ed91e914d28cf3b)
2016-07-16 14:29:52 +03:00
Péter Szilágyi
d0668838b9 [release/1.4.10] eth/downloader: return invalid chain (peer drop) on import fails
(cherry picked from commit a691aa2a13a97588208246b5e7bc70c2e3f15780)
2016-07-16 14:29:43 +03:00
Péter Szilágyi
98095efe88 [release/1.4.10] eth: disable eth/61 to prepare for more elaborate fork sync algos
(cherry picked from commit ddfef211258f027b748dbff6f71b8609bf898c11)
2016-07-16 14:29:32 +03:00
Jeffrey Wilcke
f7fdfa4eac [release/1.4.7] core/state, eth: Updated suicides objects when tracing transactions
Consensus rules dictate that objects can only be removed during the
finalisation of the transaction (i.e. after all calls have finished).
Thus calling a suicided contract twice from the same transaction:
A->B(S)->ret(A)->B(S) results in 2 suicides. Calling the suicided
object twice from two transactions: A->B(S), A->B, results in only one
suicide and a call to an empty object.

Our current debug tracing functionality replays all transaction that
were executed prior to the targetted transaction in order to provide
the user with an accurate trace.

As a side effect to calling StateDB.IntermediateRoot it also deletes any
suicides objects. Our tracing code never calls this function because it
isn't interested in the intermediate root. Becasue of this it caused a
bug in the tracing code where transactions that were send to priviously
deleted objects resulted in two suicides rather than one suicide and a
call to an empty object.

Fixes #2542

(cherry picked from commit bb3651abc865c6f6babec0d357afa85f5a539d83)
2016-06-14 17:12:05 +03:00
Péter Szilágyi
0405f728c6 [release/1.4.7] eth/downloader: fix occasional fast sync critical section test fails
(cherry picked from commit 783289068a63b3accbc6d69cb0ecc0f2c39c5f54)
2016-06-14 17:12:03 +03:00
Péter Szilágyi
ecb8e23e88 [release/1.4.6] eth: don't accept transactions until we sync up with the network
(cherry picked from commit 32559ccad1e0519ce1decc4b90df021fe215a811)
2016-06-06 16:22:08 +03:00
Péter Szilágyi
058c5fe960 [release/1.4.6] eth/downloader: adaptive quality of service tuning
(cherry picked from commit 88f174a014c1f2f99fa6d6a8054ada28a0b43504)
2016-06-06 16:22:05 +03:00
Péter Szilágyi
a29bdf547c [release/1.4.6] eth/downloader: make fast sync resilient to critical section fails
(cherry picked from commit 61ee9f299deb2bace8aa37778d248822793dd5ce)
2016-06-06 16:22:03 +03:00
Péter Szilágyi
cd134178f7 [release/1.4.6] eth/downloader: ensure cancel channel is closed post sync
(cherry picked from commit 4496a44f68246bf128bb822c3f3a98f38adfdbdd)
2016-06-06 16:21:51 +03:00
Péter Szilágyi
4918c820c6 [release/1.4.6] eth/downloader, trie: pull head state concurrently with chain
(cherry picked from commit 4f1d92b3329572d75a20b9f9e1cccdf74aa7c79f)
2016-06-06 16:21:49 +03:00
Felix Lange
9ccb70da7b [release/1.4.6] eth: enable bad block reports
We used to have reporting of bad blocks, but it was disabled
before the Frontier release. We need it back because users
are usually unable to provide the full RLP data of a bad
block when it occurs.

A shortcoming of this particular implementation is that the
origin peer is not tracked for blocks received during eth/63
sync. No origin peer info is still better than no report at
all though.

(cherry picked from commit ca18202eb9a94de1d4b51c1572fa74edfa2773bf)
2016-06-06 16:21:34 +03:00
Rémy Roy
7a4073a758 [release/1.4.6] eth/api: fixed GetCompilers when there is no error creating Solc
(cherry picked from commit f86ea9aad5b14051d5d311591148387b2e6da725)
2016-06-06 16:21:27 +03:00
Péter Szilágyi
170036289b [release/1.4.6] eth/downloader: fix reviewer comments
(cherry picked from commit 8906b2fe0934c67ebb1db5d4d77acdf1a7e988f0)
2016-06-06 16:21:04 +03:00
Péter Szilágyi
8ebbd9b7c7 [release/1.4.6] eth/downloader: stream partial skeleton filling to processor
(cherry picked from commit e86619e75d1bd1209818ab4df2fac52e3c43b5e1)
2016-06-06 16:21:01 +03:00
Péter Szilágyi
7df36e5ec1 [release/1.4.6] eth/downloader: implement concurrent header downloads
(cherry picked from commit b40dc8a1daf4bd1f293cf322274b470ad91517fb)
2016-06-06 16:20:58 +03:00
Péter Szilágyi
1776c717bf [release 1.4.5] accounts/abi/bind, eth: rely on getCode for sanity checks, not estimate and call
(cherry picked from commit 1580ec180414bce1e37acc614bc2445f778efb75)
2016-05-24 09:33:15 +02:00
Jeffrey Wilcke
0f6e3e873a [release 1.4.5] eth: fixed regression in eth_signTransaction fixes #2578
Sign transaction returned the unsigned transaction rather than the
signed one.

(cherry picked from commit 4b1a7d3868e796ee70f62985379e59f933a2aca0)
2016-05-24 09:33:10 +02:00
Bas van Kervel
7a7a5acc9f [release 1.4.5] eth/filter: bugfix which can cause a nil pointer crash when parsing filter arguments
(cherry picked from commit 67cd4ee8d26e9ebe2714faaca856e73512236834)
2016-05-24 09:33:05 +02:00
Bas van Kervel
b950a2977c [release/1.4.5] eth: add new RPC method (personal.) SignAndSendTransaction
(cherry picked from commit 64a6c2c1b6c81fddccc7d3d728b7a05c5814124b)

Conflicts:
	cmd/geth/js.go
	internal/web3ext/web3ext.go
2016-05-24 09:32:45 +02:00
Péter Szilágyi
4c6953606e [release/1.4.4] eth: skip transaction handling during fast sync
(cherry picked from commit d87f7a1e817cbecbb62c012ed3811ceba933ae3a)
2016-05-17 14:59:12 +02:00
Péter Szilágyi
efcfa2209b [release/1.4.4] eth/downloader: bound fork ancestry and allow heavy short forks 2016-05-12 17:32:06 +02:00
Péter Szilágyi
756b62988c Merge pull request #2523 from fjl/shutdown
core, eth, miner: improve shutdown synchronisation
2016-05-09 15:59:41 +03:00
Felix Lange
56ed6152a1 core, eth, miner: improve shutdown synchronisation
Shutting down geth prints hundreds of annoying error messages in some
cases. The errors appear because the Stop method of eth.ProtocolManager,
miner.Miner and core.TxPool is asynchronous. Left over peer sessions
generate events which are processed after Stop even though the database
has already been closed.

The fix is to make Stop synchronous using sync.WaitGroup.

For eth.ProtocolManager, in order to make use of WaitGroup safe, we need
a way to stop new peer sessions from being added while waiting on the
WaitGroup. The eth protocol Run function now selects on a signaling
channel and adds to the WaitGroup only if ProtocolManager is not
shutting down.

For miner.worker and core.TxPool the number of goroutines is static,
WaitGroup can be used in the usual way without additional
synchronisation.
2016-05-09 13:03:08 +02:00
Jeffrey Wilcke
7d59c5c58d eth: fixed tracing functions using the current header instead of parent
Fixes #2525
2016-05-09 10:24:31 +02:00
Péter Szilágyi
586eddfd09 release, all: integrate the release service into geth 2016-05-02 16:20:21 +03:00
Felix Lange
1c20313a6a Merge pull request #2493 from almindor/develop
eth: add personal_importRawKey
2016-04-29 23:09:37 +02:00
Ales Katona
572da73d4d eth: add personal_importRawKey for runtime private key import 2016-04-28 09:11:40 -06:00
Bas van Kervel
48cc36ce83 eth/filters: ignore logs that don't match filter criteria on chain reorg 2016-04-28 12:33:42 +02:00
Péter Szilágyi
cdcbb2f160 accounts/abi/bind, eth: add contract non-existent error 2016-04-27 17:15:23 +03:00
Felix Lange
a40e61b4ac rpc: remove NotifierContextKey
Context keys must have a unique type in order to prevent
any unintented clashes. The code used int(1) as key.

Fix it by implementing the pattern recommended by package context.
2016-04-15 18:10:52 +02:00
Felix Lange
6fdd0893c3 all: fix go vet warnings 2016-04-15 11:17:27 +02:00
Felix Lange
24cdac41f3 core, core/types, eth: add and use Block.Body
This fixes a few uses of unkeyed Body literals which go vet was
complaining about.
2016-04-15 10:57:37 +02:00
Felix Lange
d04a2e7557 all: update license information 2016-04-15 09:48:05 +02:00
Péter Szilágyi
53016c1225 eth, rpc: make trace configs optional 2016-04-14 15:10:29 +03:00
Péter Szilágyi
bbc77f488e eth: fix single transaction tracing (run prev mutations) 2016-04-14 14:29:47 +03:00
Felix Lange
bcd8aeefdd eth: add chaindbProperty to debug API 2016-04-13 12:08:07 +02:00