Commit Graph

788 Commits

Author SHA1 Message Date
Felix Lange 60cd5bf939 Merge pull request #2842 from fjl/downloader-remove-eth61
eth, eth/downloader, eth/fetcher: delete eth/61 sync code
2016-07-22 23:23:30 +02:00
Péter Szilágyi c7c82f1b44 eth/downloader: fix the stall checks/drops during sync 2016-07-22 17:55:46 +03:00
Felix Lange 016007bd25 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.
2016-07-22 13:17:19 +02:00
Péter Szilágyi c646d287f8 Merge pull request #2833 from karalabe/fix-dao-challenge-annoyance
eth: cancel DAO challenge on peer drop (annoying log)
2016-07-22 11:57:43 +03:00
Felix Lange 74ec95e7f6 Merge pull request #2711 from hdiedrich/1.4.7-filter-races-cleanup
Fix #2710 Filter race: concurrent map read and map write
2016-07-19 23:14:08 +02:00
zsfelfoldi 56efed71b5 eth: fixed chaindb upgrade 2016-07-19 14:32:38 +02:00
Péter Szilágyi 91f18ffd47 eth: cancel DAO challenge on peer drop (annoying log) 2016-07-19 12:00:09 +03:00
Péter Szilágyi 993b412160 cmd/utils, eth: display the user's current fork, minor text tweak 2016-07-16 12:38:37 +03:00
Péter Szilágyi 2c2e389b77 cmd, core, eth, miner, params, tests: finalize the DAO fork 2016-07-15 16:52:55 +03:00
Péter Szilágyi 3291235711 accounts, core, eth: pass chain config for chain maker to test DAO 2016-07-15 16:52:55 +03:00
Péter Szilágyi 7f00e8c033 core, eth: enforce network split post DAO hard-fork 2016-07-15 16:52:55 +03:00
Péter Szilágyi 6060e098c9 cmd, core, eth, params: implement flags to control dao fork blocks 2016-07-15 16:52:55 +03:00
Péter Szilágyi f970610c04 Merge pull request #2799 from zsfelfoldi/api-nonce-fix2
core: added CheckNonce() to Message interface
2016-07-12 16:07:15 +03:00
Péter Szilágyi a691aa2a13 eth/downloader: return invalid chain (peer drop) on import fails 2016-07-11 19:00:49 +03:00
zsfelfoldi 00787fe781 core: added CheckNonce() to Message interface 2016-07-11 12:35:23 +02:00
Henning Diedrich 51f8ce26cf eth: fix #2710 filter races
and locking bugs found in its wake.
2016-07-04 17:38:35 +02:00
Péter Szilágyi ddfef21125 eth: disable eth/61 to prepare for more elaborate fork sync algos 2016-07-04 12:03:19 +03:00
Péter Szilágyi 96dc42d99c cmd, common, console, eth, release: drop redundant "full"s 2016-06-30 13:03:26 +03:00
Péter Szilágyi 1e50f5dd28 Merge pull request #2159 from zsfelfoldi/light-backend
eth: separate common and full node-specific API and backend service
2016-06-30 12:57:50 +03:00
zsfelfoldi 3a97280ae8 eth: separate common and full node-specific API and backend service 2016-06-16 17:36:38 +02:00
Péter Szilágyi 22ef7370e7 Merge pull request #2686 from obscuren/issue-2542
core/state, eth: Updated suicides objects when tracing transactions
2016-06-14 16:54:46 +03:00
Jeffrey Wilcke a38be3eb48 Merge pull request #2455 from zsfelfoldi/chaindb
core: improved chain db performance by using sequential keys
2016-06-13 15:16:09 +02:00
Péter Szilágyi 783289068a eth/downloader: fix occasional fast sync critical section test fails 2016-06-13 13:04:19 +03:00
Jeffrey Wilcke bb3651abc8 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
2016-06-13 11:57:42 +02:00
zsfelfoldi f9917c8c7b core: improved chainDb using sequential keys 2016-06-07 16:38:56 +02:00
Péter Szilágyi 32559ccad1 eth: don't accept transactions until we sync up with the network 2016-06-06 14:45:38 +03:00
Péter Szilágyi 88f174a014 eth/downloader: adaptive quality of service tuning 2016-06-06 14:20:57 +03:00
Péter Szilágyi 61ee9f299d eth/downloader: make fast sync resilient to critical section fails 2016-06-02 12:37:14 +03:00
Péter Szilágyi 16a23ff740 Merge pull request #2637 from karalabe/downloader-always-cancel
eth/downloader: ensure cancel channel is closed post sync
2016-05-31 14:48:52 +03:00
Péter Szilágyi 4496a44f68 eth/downloader: ensure cancel channel is closed post sync 2016-05-30 12:01:50 +03:00
Péter Szilágyi 4f1d92b332 eth/downloader, trie: pull head state concurrently with chain 2016-05-27 14:26:00 +03:00
Jeffrey Wilcke a7434fd008 Merge pull request #2614 from fjl/bad-block-report
eth: enable bad block reports
2016-05-25 22:40:28 +02:00
Felix Lange ca18202eb9 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.
2016-05-25 02:02:51 +02:00
Rémy Roy f86ea9aad5 eth/api: fixed GetCompilers when there is no error creating Solc 2016-05-24 16:44:33 -04:00
Jeffrey Wilcke 7f515b0e88 Merge pull request #2564 from bas-vk/submit-tx
eth: add new RPC method (personal.) SignAndSendTransaction
2016-05-23 14:17:46 +02:00
Jeffrey Wilcke 262d92834a Merge pull request #2575 from bas-vk/filter
eth/filter: bugfix which can cause a nil pointer crash when parsing f…
2016-05-23 12:54:35 +02:00
Bas van Kervel 64a6c2c1b6 eth: add new RPC method (personal.) SignAndSendTransaction 2016-05-20 15:54:18 +02:00
Jeffrey Wilcke 847aaffbb8 Merge pull request #2589 from karalabe/estimate-remove-codecheck
accounts/abi/bind, eth: rely on getCode for sanity checks, not estimate and call
2016-05-20 15:13:29 +02:00
Jeffrey Wilcke a8472e0fdb Merge pull request #2315 from karalabe/concurrent-headers-2
eth/downloader: concurrent header downloads
2016-05-20 14:25:28 +02:00
Péter Szilágyi 1580ec1804 accounts/abi/bind, eth: rely on getCode for sanity checks, not estimate and call 2016-05-20 12:29:28 +03:00
Péter Szilágyi 8906b2fe09 eth/downloader: fix reviewer comments 2016-05-20 10:56:01 +03:00
Jeffrey Wilcke 4b1a7d3868 eth: fixed regression in eth_signTransaction fixes #2578
Sign transaction returned the unsigned transaction rather than the
signed one.
2016-05-18 17:25:34 +02:00
Bas van Kervel 67cd4ee8d2 eth/filter: bugfix which can cause a nil pointer crash when parsing filter arguments 2016-05-17 16:17:54 +02:00
Péter Szilágyi d87f7a1e81 eth: skip transaction handling during fast sync 2016-05-17 14:17:20 +03:00
Péter Szilágyi e86619e75d eth/downloader: stream partial skeleton filling to processor 2016-05-17 10:03:34 +03:00
Péter Szilágyi b40dc8a1da eth/downloader: implement concurrent header downloads 2016-05-17 10:03:34 +03:00
Péter Szilágyi 39ce85cf5d eth/downloader: bound fork ancestry and allow heavy short forks 2016-05-13 12:12:13 +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
Péter Szilágyi 1e9b504ee7 Merge pull request #2284 from fjl/accounts-addr-cache
accounts: cache key addresses
2016-04-12 17:51:09 +03:00
Felix Lange 46df50be18 accounts: improve API and add documentation
- Sign takes common.Address, not Account
- Import/Export methods work with encrypted JSON keys
2016-04-12 15:59:18 +02:00
Felix Lange 549f1add29 eth: report unlock errors to RPC clients 2016-04-12 15:59:12 +02:00
Felix Lange 46e8940b19 accounts: streamline API
- Manager.Accounts no longer returns an error.
- Manager methods take Account instead of common.Address.
- All uses of Account with unkeyed fields are converted.
2016-04-12 15:58:01 +02:00
Felix Lange 85e6c40c00 accounts, crypto: move keystore to package accounts
The account management API was originally implemented as a thin layer
around crypto.KeyStore, on the grounds that several kinds of key stores
would be implemented later on. It turns out that this won't happen so
KeyStore is a superflous abstraction.

In this commit crypto.KeyStore and everything related to it moves to
package accounts and is unexported.
2016-04-12 15:56:49 +02:00
Péter Szilágyi aceaaa5178 eth: gracefully fail if chain config is missing 2016-04-12 16:48:43 +03:00
Jeffrey Wilcke 8627680e24 Merge pull request #2359 from bas-vk/rpc-optional-args
rpc: several fixes and support for optional arguments
2016-04-12 14:03:21 +02:00
Bas van Kervel aa9fff3e68 rpc: various fixes/enhancements
rpc: be less restrictive on the request id
rpc: improved documentation
console: upgrade web3.js to version 0.16.0
rpc: cache http connections
rpc: rename wsDomains parameter to wsOrigins
2016-04-12 11:02:39 +02:00
Péter Szilágyi bf1f620343 eth: fix GPU miner chain config regression 2016-04-11 17:31:00 +03:00
Jeffrey Wilcke ed92f116f7 Merge pull request #2407 from bas-vk/rpc-notifications
RPC pub sub
2016-04-05 09:43:32 +02:00
Felix Lange cf842b3fe5 cmd/geth, eth: move --genesis deprecation warning to cmd/geth
This prevents display of the warning for --dev and --olympic.
2016-04-01 21:59:35 +02:00
Bas van Kervel f7328c5ecb rpc: add pub/sub support 2016-04-01 18:26:35 +02:00
Jeffrey Wilcke be44651523 Merge pull request #2402 from obscuren/eth-sign-fix
eth: enforce signing hashes using eth_sign instead of arbitrary data
2016-04-01 13:42:48 +02:00
Jeffrey Wilcke 1f3596c25a core: transition db now also returns the required gas amount
Exposes some core methods to transition and compute new state
information and adds an additional return value to the transition db
method to fetch required gas for that particular message (excluding gas
refunds from any SSTORE[X] = 0 and SUICIDE.

Fixes #2395
2016-04-01 01:01:10 +02:00
Jeffrey Wilcke 9055c16efa accounts/a/b/backends, core: chain maker homestead block set to 0
The chain maker and the simulated backend now run with a homestead phase
beginning at block 0 (i.e. there's no frontier).

This commit also fixes up #2388
2016-04-01 01:01:10 +02:00
Jeffrey Wilcke f0cbebb19f core: added basic chain configuration
Added chain configuration options and write out during genesis database
insertion. If no "config" was found, nothing is written to the database.

Configurations are written on a per genesis base. This means
that any chain (which is identified by it's genesis hash) can have their
own chain settings.
2016-04-01 01:01:10 +02:00
Jeffrey Wilcke 916fe11241 eth: enforce signing hashes using eth_sign instead of arbitrary data 2016-04-01 00:43:14 +02:00
Péter Szilágyi 4326061e35 eth: fix accidental nil panic on nil errors 2016-03-31 18:26:25 +03:00
Péter Szilágyi 6c670eff01 eth: manually convert errors to strings on the trace API (json cannot) 2016-03-31 17:41:26 +03:00
Péter Szilágyi 72826bb5ad accounts/abi/bind, cmd/abigen: Go API generator around an EVM ABI 2016-03-24 14:15:18 +02:00
Jeffrey Wilcke 75c86f8646 Merge pull request #2141 from obscuren/evm-init
core, core/vm, tests: changed the initialisation behaviour of the EVM
2016-03-23 23:20:51 +01:00
Jeffrey Wilcke 0cfa21fc7f core, eth, cmd: temporary work around for enabling the jit
This commit serves as a temporary workaround for enabling the jit until
the block customisation PR is merged in.
2016-03-23 23:02:44 +01:00
Jeffrey Wilcke 5f92606be2 eth/api: added root to the receipts 2016-03-23 23:02:44 +01:00
Jeffrey Wilcke 3601320ccd eth, rpc: implemented block debugging rpc calls
Implemented the following block debugging RPC calls

* Block(RLP)
* BlockByFile(fileName)
* BlockByNumber(number)
* BlockByHash(hash)
2016-03-23 23:02:44 +01:00
Jeffrey Wilcke 14013372ae core: Added EVM configuration options
The EVM is now initialised with an additional configured object that
allows you to turn on debugging options.
2016-03-23 23:02:42 +01:00
Péter Szilágyi 0228fb57cd eth, miner: fetch pending block/state in on go (data race) 2016-03-16 11:23:26 +02:00
Leif Jurvetson 434e4b31d8 core, eth: replace reorganiz with reorganis 2016-03-15 12:03:17 -07:00
Leif Jurvetson bbbe2360d0 eth: various typos 2016-03-15 11:27:49 -07:00
Péter Szilágyi e3f2b541f2 eth/downloader: fix a throughput estimation data race 2016-03-10 12:58:46 +02:00
Péter Szilágyi e90958cd29 cmd, eth, ethdb, node: prioritise chaindata for resources, bump cache 2016-03-09 10:33:39 +02:00
Péter Szilágyi ae4982a365 eth: forward empty body responses to the downlaoder 2016-03-03 13:06:23 +02:00
Péter Szilágyi f30b809f00 Merge pull request #2215 from bas-vk/estimategas
core: improved check for contract creation
2016-03-01 10:59:12 +02:00
Péter Szilágyi 64ee5763ee eth/downloader: fix premature exit before notifying all part fetchers 2016-02-29 14:22:28 +02:00
Felix Lange 26e72b2ccd eth/downloader: fix header download limiting
Fixes #2201
2016-02-26 15:24:51 +01:00
Péter Szilágyi a6903ad6a5 Merge pull request #2260 from karalabe/ethash-cache-fixes
Godeps, eth, tests: update ethash, used shared for testing
2016-02-24 17:58:12 +02:00
Péter Szilágyi 66b148dd8f Merge pull request #2251 from karalabe/increase-downlaoder-queue
eth/downloader: bump the download queue size to prevent starvation
2016-02-24 15:55:21 +02:00
Jeffrey Wilcke 483feb0d3f Merge pull request #2242 from jimenezrick/upstream-crypto
Closes #2241: Use Keccak-256 from golang.org/x/crypto/sha3 and mention explicitly
2016-02-24 12:57:57 +01:00
Péter Szilágyi 0a5ee08e2b Godeps, eth, tests: update ethash, used shared for testing 2016-02-24 13:29:47 +02:00