aboutsummaryrefslogtreecommitdiffstats
path: root/eth
Commit message (Collapse)AuthorAgeFilesLines
* core, eth, les: fix messy code (#15367)Péter Szilágyi2017-10-252-4/+3
| | | | | | | | * core, eth, les: fix messy code * les: fixed tx status test and rlp encoding * core: add a workaround for light sync
* les, light: LES/2 protocol version (#14970)Felföldi Zsolt2017-10-244-16/+22
| | | | | | | | | | | | | | | | | | 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.
* cmd, eth: separate out FakePeer for future reusePéter Szilágyi2017-10-101-0/+160
|
* eth/fetcher: check the origin of filter tasks (#14975)Miya Chen2017-10-103-45/+56
| | | | | | * eth/fetcher: check the origin of filter task * eth/fetcher: add some details to fetcher logs
* eth: fix typo (#15252)Lio李欧2017-10-061-1/+1
|
* internal, accounts, eth: utilize vm failed flag to help gas estimationrjl4934564422017-10-021-2/+2
|
* core/bloombits, eth/filters: handle null topics (#15195)Péter Szilágyi2017-09-275-46/+26
| | | | | | | | | | When implementing the new bloombits based filter, I've accidentally broke null topics by removing the special casing of common.Hash{} filter rules, which acted as the wildcard topic until now. This PR fixes the regression, but instead of using the magic hash common.Hash{} as the null wildcard, the PR reworks the code to handle nil topics during parsing, converting a JSON null into nil []common.Hash topic.
* eth, internal/ethapi: fix spelling of 'Ethereum' (#15164)Ernesto del Toro2017-09-202-5/+5
|
* eth/downloader: track peer drops and deassign state sync tasksPéter Szilágyi2017-09-122-9/+42
|
* Merge pull request #14973 from rjl493456442/fix_downloaderPéter Szilágyi2017-09-111-0/+4
|\ | | | | eth/downloader: exit loop when there is no more available task
| * eth/downloader: exit loop when there is no more available taskrjl4934564422017-08-141-0/+4
| |
* | core, eth/downloader: commit block data using batches (#15115)Felix Lange2017-09-105-45/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | eth: disable fast sync after pivot is committedPéter Szilágyi2017-09-062-11/+12
| |
* | core/bloombits: use general filters instead of addresses and topicsZsolt Felfoldi2017-09-061-1/+18
| |
* | core/bloombits: AddBloom index parameter and fixes variable namesZsolt Felfoldi2017-09-062-2/+2
| |
* | core, eth: clean up bloom filtering, add some testsPéter Szilágyi2017-09-0610-367/+347
| |
* | core, eth: add bloombit indexer, filter based on itZsolt Felfoldi2017-09-0610-289/+534
| |
* | eth: use maxpeers from p2p layer instead of extra configPéter Szilágyi2017-09-066-27/+24
| |
* | core: make txpool operate on immutable statePéter Szilágyi2017-09-051-8/+0
| |
* | core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-223-9/+10
| |
* | core, light: send chain events using event.Feed (#14865)Miya Chen2017-08-1810-80/+247
| |
* | Merge pull request #14996 from markya0616/send_not_announcePéter Szilágyi2017-08-181-0/+1
|\ \ | |/ |/| eth: send but not announce block to peers if propagate is true
| * eth: send but not announce block to peers if propagate is truemark.lin2017-08-181-0/+1
| |
* | eth/downloader: fix race in downloadTesterPeer (#14942)Ivan Daniluk2017-08-091-7/+25
| | | | | | | | | | | | | | | | * eth/downloader: fix race in downloadTesterPeer Signed-off-by: Ivan Daniluk <ivan.daniluk@gmail.com> * eth/downloader: minor datarace fix cleanup
* | eth: fix megacheck warningsEgon Elbre2017-08-087-40/+17
| |
* | cmd, core, eth: journal local transactions to disk (#14784)Péter Szilágyi2017-07-281-2/+4
|/ | | | | | | | | | * core: reduce txpool event loop goroutines and sync structs * cmd, core, eth: journal local transactions to disk * core: journal replacement pending transactions too * core: separate transaction journal from pool
* core: remove redundant storage of transactions and receipts (#14801)Péter Szilágyi2017-07-154-222/+84
| | | | | | | | | | | | | | * core: remove redundant storage of transactions and receipts * core, eth, internal: new transaction schema usage polishes * eth: implement upgrade mechanism for db deduplication * core, eth: drop old sequential key db upgrader * eth: close last iterator on successful db upgrage * core: prefix the lookup entries to make their purpose clearer
* Merge pull request #14737 from holiman/txpool_localaccountsPéter Szilágyi2017-07-106-31/+7
|\ | | | | Txpool localaccounts
| * eth: drop leftover from previous nonce protection schemePéter Szilágyi2017-07-052-23/+0
| |
| * core, eth, les: polish txpool API around local/remote txsPéter Szilágyi2017-07-055-8/+7
| |
* | eth/downloader: Doc fixesNick Johnson2017-07-052-3/+7
| |
* | eth/downloader, les, light: Changes in response to reviewNick Johnson2017-07-033-22/+51
| |
* | eth, les: Refactor downloader peer to use structsNick Johnson2017-06-296-253/+246
| |
* | eth, les, light: Refactor downloader to use blockchain interfaceNick Johnson2017-06-284-143/+118
|/
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-276-37/+12
| | | | | | | | | With this commit, core/state's access to the underlying key/value database is mediated through an interface. Database errors are tracked in StateDB and returned by CommitTo or the new Error method. Motivation for this change: We can remove the light client's duplicated copy of core/state. The light client now supports node iteration, so tracing and storage enumeration can work with the light client (not implemented in this commit).
* eth: gracefully error if database cannot be openedPéter Szilágyi2017-06-231-1/+4
|
* eth/downloader: separate state sync from queue (#14460)Felix Lange2017-06-225-453/+654
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eth/downloader: separate state sync from queue Scheduling of state node downloads hogged the downloader queue lock when new requests were scheduled. This caused timeouts for other requests. With this change, state sync is fully independent of all other downloads and doesn't involve the queue at all. State sync is started and checked on in processContent. This is slightly awkward because processContent doesn't have a select loop. Instead, the queue is closed by an auxiliary goroutine when state sync fails. We tried several alternatives to this but settled on the current approach because it's the least amount of change overall. Handling of the pivot block has changed slightly: the queue previously prevented import of pivot block receipts before the state of the pivot block was available. In this commit, the receipt will be imported before the state. This causes an annoyance where the pivot block is committed as fast block head even when state downloads fail. Stay tuned for more updates in this area ;) * eth/downloader: remove cancelTimeout channel * eth/downloader: retry state requests on timeout * eth/downloader: improve comment * eth/downloader: mark peers idle when state sync is done * eth/downloader: move pivot block splitting to processContent This change also ensures that pivot block receipts aren't imported before the pivot block itself. * eth/downloader: limit state node retries * eth/downloader: improve state node error handling and retry check * eth/downloader: remove maxStateNodeRetries It fails the sync too much. * eth/downloader: remove last use of cancelCh in statesync.go Fixes TestDeliverHeadersHang*Fast and (hopefully) the weird cancellation behaviour at the end of fast sync. * eth/downloader: fix leak in runStateSync * eth/downloader: don't run processFullSyncContent in LightSync mode * eth/downloader: improve comments * eth/downloader: fix vet, megacheck * eth/downloader: remove unrequested tasks anyway * eth/downloader, trie: various polishes around duplicate items This commit explicitly tracks duplicate and unexpected state delieveries done against a trie Sync structure, also adding there to import info logs. The commit moves the db batch used to commit trie changes one level deeper so its flushed after every node insertion. This is needed to avoid a lot of duplicate retrievals caused by inconsistencies between Sync internals and database. A better approach is to track not-yet-written states in trie.Sync and flush on commit, but I'm focuing on correctness first now. The commit fixes a regression around pivot block fail count. The counter previously was reset to 1 if and only if a sync cycle progressed (inserted at least 1 entry to the database). The current code reset it already if a node was delivered, which is not stong enough, because unless it ends up written to disk, an attacker can just loop and attack ad infinitum. The commit also fixes a regression around state deliveries and timeouts. The old downloader tracked if a delivery is stale (none of the deliveries were requestedt), in which case it didn't mark the node idle and did not send further requests, since it signals a past timeout. The current code did mark it idle even on stale deliveries, which eventually caused two requests to be in flight at the same time, making the deliveries always stale and mass duplicating retrievals between multiple peers. * eth/downloader: fix state request leak This commit fixes the hang seen sometimes while doing the state sync. The cause of the hang was a rare combination of events: request state data from peer, peer drops and reconnects almost immediately. This caused a new download task to be assigned to the peer, overwriting the old one still waiting for a timeout, which in turned leaked the requests out, never to be retried. The fix is to ensure that a task assignment moves any pending one back into the retry queue. The commit also fixes a regression with peer dropping due to stalls. The current code considered a peer stalling if they timed out delivering 1 item. However, the downloader never requests only one, the minimum is 2 (attempt to fine tune estimated latency/bandwidth). The fix is simply to drop if a timeout is detected at 2 items. Apart from the above bugfixes, the commit contains some code polishes I made while debugging the hang. * core, eth, trie: support batched trie sync db writes * trie: rename SyncMemCache to syncMemBatch
* eth: remove les server from protocol manager (#14625)Alan Chen2017-06-152-3/+0
|
* Merge pull request #14516 from holiman/noncefixesPéter Szilágyi2017-05-301-1/+1
|\ | | | | internal/ethapi: add mutex around signing + nonce assignment
| * internal/ethapi: add mutex around signing + nonce assignmentMartin Holst Swende2017-05-301-1/+1
| | | | | | | | | | This prevents concurrent assignment of identical nonces when automatic assignment is used.
* | Merge pull request #14523 from karalabe/txpool-cli-flagsPéter Szilágyi2017-05-293-1/+11
|\ \ | | | | | | cmd, core, eth: configurable txpool parameters
| * | cmd, core, eth: configurable txpool parametersPéter Szilágyi2017-05-293-1/+11
| |/
* | Merge pull request #14537 from karalabe/setgasprice-durning-nominePéter Szilágyi2017-05-292-10/+24
|\ \ | | | | | | eth: update default gas price when not mining too
| * | eth: update default gas price when not mining tooPéter Szilágyi2017-05-292-10/+24
| |/
* / eth: don't import propagated blocks during fastsyncPéter Szilágyi2017-05-262-0/+6
|/
* cmd, core, eth, miner: remove txpool gas price limits (#14442)Péter Szilágyi2017-05-173-3/+7
|
* eth/downloader: fix a potential issue against future refactorsPéter Szilágyi2017-05-021-0/+4
|
* cmd, eth, les, mobile: make networkid uint64 everywherePéter Szilágyi2017-04-258-17/+17
|
* eth: add debug_storageRangeAtFelix Lange2017-04-252-37/+178
|
* Merge remote-tracking branch 'fjl/license-update-1.6'Péter Szilágyi2017-04-142-2/+2
|\
| * all: update license informationFelix Lange2017-04-142-2/+2
| |
* | eth: revert accidental ethash cache dir changePéter Szilágyi2017-04-141-0/+1
|/
* cmd/utils, node: remove unused solc references and improve RPC config (#14324)bas-vk2017-04-133-10/+1
| | | | | Currently http cors and websocket origins are a comma separated string in the config object. These are replaced with string arrays that are more expressive in case of a config file.
* cmd/geth: add --config file flag (#13875)Felix Lange2017-04-1211-91/+401
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * p2p/discover, p2p/discv5: add marshaling methods to Node * p2p/netutil: make Netlist decodable from TOML * common/math: encode nil HexOrDecimal256 as 0x0 * cmd/geth: add --config file flag * cmd/geth: add missing license header * eth: prettify Config again, fix tests * eth: use gasprice.Config instead of duplicating its fields * eth/gasprice: hide nil default from dumpconfig output * cmd/geth: hide genesis block in dumpconfig output * node: make tests compile * console: fix tests * cmd/geth: make TOML keys look exactly like Go struct fields * p2p: use discovery by default This makes the zero Config slightly more useful. It also fixes package node tests because Node detects reuse of the datadir through the NodeDatabase. * cmd/geth: make ethstats URL settable through config file * cmd/faucet: fix configuration * cmd/geth: dedup attach tests * eth: add comment for DefaultConfig * eth: pass downloader.SyncMode in Config This removes the FastSync, LightSync flags in favour of a more general SyncMode flag. * cmd/utils: remove jitvm flags * cmd/utils: make mutually exclusive flag error prettier It now reads: Fatal: flags --dev, --testnet can't be used at the same time * p2p: fix typo * node: add DefaultConfig, use it for geth * mobile: add missing NoDiscovery option * cmd/utils: drop MakeNode This exposed a couple of places that needed to be updated to use node.DefaultConfig. * node: fix typo * eth: make fast sync the default mode * cmd/utils: remove IPCApiFlag (unused) * node: remove default IPC path Set it in the frontends instead. * cmd/geth: add --syncmode * cmd/utils: make --ipcdisable and --ipcpath mutually exclusive * cmd/utils: don't enable WS, HTTP when setting addr * cmd/utils: fix --identity
* consensus, core, ethstats: use engine specific block beneficiary (#14318)Péter Szilágyi2017-04-122-2/+2
| | | | | | * consensus, core, ethstats: use engine specific block beneficiary * core, eth, les, miner: use explicit beneficiary during mining
* consensus/clique: Proof of Authority (#3753)Péter Szilágyi2017-04-101-0/+14
| | | | This PR is a prototype implementation of plugable consensus engines and the Clique PoA protocol ethereum/EIPs#225
* eth: accept transactions when starting CPU mining (#13882)Péter Szilágyi2017-04-105-9/+17
|
* eth: announce block after sync cycle (star topology)Péter Szilágyi2017-04-101-1/+9
|
* consensus, eth: don't CPU mine by default during remote miningPéter Szilágyi2017-04-072-11/+20
|
* Merge pull request #13870 from karalabe/miners-fixesPéter Szilágyi2017-04-073-92/+4
|\ | | | | all: clean up various error handling in core and the miner
| * consensus, core: drop all the legacy custom core error typesPéter Szilágyi2017-04-061-2/+2
| |
| * cmd/geth, eth: drop bad block reporting, its offline anywayPéter Szilágyi2017-04-062-90/+2
| |
* | cmd, les, eth, eth/gasprice: using new gas price oracle (#13853)Felföldi Zsolt2017-04-064-358/+137
|/ | | | | | | | | | | | * cmd, les, eth, eth/gasprice: using new gas price oracle * eth/gasprice: renamed source file * eth/gasprice: added security checks for gpo params * eth/gasprice: fixed naming issues * eth/gasprice: max limit, maxEmpty
* debug: convert uint64-blocknumber into rpc.Blocknumber (#13862)Martin Holst Swende2017-04-051-6/+29
| | | | | | * debug: Converted uint64-blocknumber into rpc.Blocknumber * api/debug: Fix pending block issues in DumpBlock
* core, consensus: pluggable consensus engines (#3817)Péter Szilágyi2017-04-057-89/+100
| | | | | This commit adds pluggable consensus engines to go-ethereum. In short, it introduces a generic consensus interface, and refactors the entire codebase to use this interface.
* core: refactor genesis handlingFelix Lange2017-03-236-90/+53
| | | | | | | | | | | | | | | | | | | | | | | | This commit solves several issues concerning the genesis block: * Genesis/ChainConfig loading was handled by cmd/geth code. This left library users in the cold. They could specify a JSON-encoded string and overwrite the config, but didn't get any of the additional checks performed by geth. * Decoding and writing of genesis JSON was conflated in WriteGenesisBlock. This made it a lot harder to embed the genesis block into the forthcoming config file loader. This commit changes things so there is a single Genesis type that represents genesis blocks. All uses of Write*Genesis* are changed to use the new type instead. * If the chain config supplied by the user was incompatible with the current chain (i.e. the chain had already advanced beyond a scheduled fork), it got overwritten. This is not an issue in practice because previous forks have always had the highest total difficulty. It might matter in the future though. The new code reverts the local chain to the point of the fork when upgrading configuration. The change to genesis block data removes compression library dependencies from package core.
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-2310-16/+13
| | | | | | | | | | There is no need to depend on the old context package now that the minimum Go version is 1.7. The move to "context" eliminates our weird vendoring setup. Some vendored code still uses golang.org/x/net/context and it is now vendored in the normal way. This change triggered new vet checks around context.WithTimeout which didn't fire with golang.org/x/net/context.
* core, eth, les: support resuming fast sync on heavy rollback (#3743)Péter Szilágyi2017-03-224-10/+19
|
* all: finish integrating Go ethash, delete C++ vendorPéter Szilágyi2017-03-092-106/+6
|
* cmd, eth, les, node, pow: disk caching and progress reportsPéter Szilágyi2017-03-091-11/+13
|
* all: swap out the C++ ethash to the pure Go one (mining todo)Péter Szilágyi2017-03-093-6/+8
|
* all: update light logs (and a few others) to the new modelPéter Szilágyi2017-03-032-2/+2
|
* Logger updates 3 (#3730)Péter Szilágyi2017-03-0211-150/+122
| | | | | | | | * accounts, cmd, eth, ethdb: port logs over to new system * ethdb: drop concept of cache distribution between dbs * eth: fix some log nitpicks to make them nicer
* core, eth: drop database block splitting upgraderPéter Szilágyi2017-02-282-62/+0
|
* Merge pull request #3709 from fjl/p2p-context-logPéter Szilágyi2017-02-282-2/+2
|\ | | | | p2p, p2p/discover, p2p/nat: rework logging using context keys
| * eth, les: shorten genesis block mismatch error messageFelix Lange2017-02-282-2/+2
| |
* | common, eth/downloader, log: support terminal log formattingPéter Szilágyi2017-02-282-28/+24
|/
* all: disable log message colors outside of gethFelix Lange2017-02-271-1/+1
| | | | Also tweak behaviour so colors are only enabled when stderr is a terminal.
* eth/downloader: review fixesPéter Szilágyi2017-02-272-7/+13
|
* accounts, eth/downloader: use "err" instead of "error" in logsPéter Szilágyi2017-02-271-13/+13
|
* eth/downloader: port over old logs from glog to log15Péter Szilágyi2017-02-274-125/+137
|
* common: move big integer math to common/math (#3699)Felix Lange2017-02-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common: remove CurrencyToString Move denomination values to params instead. * common: delete dead code * common: move big integer operations to common/math This commit consolidates all big integer operations into common/math and adds tests and documentation. There should be no change in semantics for BigPow, BigMin, BigMax, S256, U256, Exp and their behaviour is now locked in by tests. The BigD, BytesToBig and Bytes2Big functions don't provide additional value, all uses are replaced by new(big.Int).SetBytes(). BigToBytes is now called PaddedBigBytes, its minimum output size parameter is now specified as the number of bytes instead of bits. The single use of this function is in the EVM's MSTORE instruction. Big and String2Big are replaced by ParseBig, which is slightly stricter. It previously accepted leading zeros for hexadecimal inputs but treated decimal inputs as octal if a leading zero digit was present. ParseUint64 is used in places where String2Big was used to decode a uint64. The new functions MustParseBig and MustParseUint64 are now used in many places where parsing errors were previously ignored. * common: delete unused big integer variables * accounts/abi: replace uses of BytesToBig with use of encoding/binary * common: remove BytesToBig * common: remove Bytes2Big * common: remove BigTrue * cmd/utils: add BigFlag and use it for error-checked integer flags While here, remove environment variable processing for DirectoryFlag because we don't use it. * core: add missing error checks in genesis block parser * common: remove String2Big * cmd/evm: use utils.BigFlag * common/math: check for 256 bit overflow in ParseBig This is supposed to prevent silent overflow/truncation of values in the genesis block JSON. Without this check, a genesis block that set a balance larger than 256 bits would lead to weird behaviour in the VM. * cmd/utils: fixup import
* eth, les, swarm: fix go vet issues sufraced by log15Péter Szilágyi2017-02-231-1/+1
|
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-2312-205/+199
|
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-146-18/+20
| | | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* core, eth, internal: Added `debug_getBadBlocks()` method (#3654)Martin Holst Swende2017-02-141-0/+6
| | | | | | | | | | | | | | | | * core,eth,internal: Added `debug_getBadBlocks()` method When bad blocks are discovered, these are stored within geth. An RPC-endpoint makes them availablewithin the `debug` namespace. This feature makes it easier to discover network forks. ``` * core, api: go format + docs * core/blockchain: Documentation, fix minor nitpick * core: fix failing blockchain test
* Revert "params: core, core/vm, miner: 64bit gas instructions (#3514)"Jeffrey Wilcke2017-02-136-20/+18
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* accounts, cmd, eth, internal, miner, node: wallets and HD APIsPéter Szilágyi2017-02-131-2/+4
|
* accounts, cmd, eth, internal, mobile, node: split account backendsPéter Szilágyi2017-02-131-8/+6
|
* Merge pull request #3605 from fjl/event-feedPéter Szilágyi2017-02-032-4/+4
|\ | | | | event: add new Subscription type and related utilities
| * event: deprecate TypeMux and related typesFelix Lange2017-01-252-4/+4
| | | | | | | | | | | | | | | | | | | | | | The Subscription type is gone, all uses are replaced by *TypeMuxSubscription. This change is prep-work for the introduction of the new Subscription type in a later commit. gorename -from '"github.com/ethereum/go-ethereum/event"::Event' -to TypeMuxEvent gorename -from '"github.com/ethereum/go-ethereum/event"::muxsub' -to TypeMuxSubscription gofmt -w -r 'Subscription -> *TypeMuxSubscription' ./event/*.go find . -name '*.go' -and -not -regex '\./vendor/.*' \| xargs gofmt -w -r 'event.Subscription -> *event.TypeMuxSubscription'
* | params: core, core/vm, miner: 64bit gas instructions (#3514)Jeffrey Wilcke2017-02-026-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* | les: remove delayed les server startingZsolt Felfoldi2017-01-263-10/+2
|/
* eth/downloader: improve deliverNodeData (#3588)Felix Lange2017-01-241-72/+52
| | | | | Commit d3b751e accidentally deleted a crucial 'return' statement, leading to a crash in case of an issue with node data. This change improves the fix in PR #3591 by removing the lock entirely.
* eth/downloader: fix mutex regression causing panics on fail (#3591)Péter Szilágyi2017-01-201-1/+2
|
* Merge pull request #3579 from bas-vk/natspecPéter Szilágyi2017-01-171-3/+0
|\ | | | | cmd,eth,les,internal: remove natspec support
| * cmd,eth,les,internal: remove natspec supportBas van Kervel2017-01-171-3/+0
| |
* | cmd/geth, core: add support for recording SHA3 preimages (#3543)Nick Johnson2017-01-174-5/+13
|/
* eth: accept leading zeros for nonce parameter of submitWork (#3558)Felix Lange2017-01-131-2/+2
|
* core: remove support for Olympic networkBas van Kervel2017-01-121-1/+1
|
* all: fix ineffectual assignments and remove uses of crypto.Sha3Felix Lange2017-01-091-1/+1
| | | | | go get github.com/gordonklaus/ineffassign ineffassign .
* all: fix spelling errorsPéter Szilágyi2017-01-076-6/+6
|
* all: fix issues reported by honnef.co/go/simple/cmd/gosimpleFelix Lange2017-01-071-26/+4
|
* all: gofmt -w -sFelix Lange2017-01-068-31/+31
|
* Merge pull request #3516 from fjl/types-drop-sign-ecdsaPéter Szilágyi2017-01-064-9/+9
|\ | | | | core/types: remove redundant SignECDSA wrappers, rename to SignTx
| * core/types: remove redundant SignECDSA wrappers, rename to SignTxFelix Lange2017-01-054-9/+9
| |
* | trie: remove dependency on ethdbFelix Lange2017-01-061-5/+10
| | | | | | | | This removes the core/types -> leveldb dependency.
* | core/vm: move Log to core/typesFelix Lange2017-01-067-79/+73
|/ | | | | | | | This significantly reduces the dependency closure of ethclient, which no longer depends on core/vm as of this change. All uses of vm.Logs are replaced by []*types.Log. NewLog is gone too, the constructor simply returned a literal.
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-052-4/+4
| | | | | | | | | | | | | | | The run loop, which previously contained custom opcode executes have been removed and has been simplified to a few checks. Each operation consists of 4 elements: execution function, gas cost function, stack validation function and memory size function. The execution function implements the operation's runtime behaviour, the gas cost function implements the operation gas costs function and greatly depends on the memory and stack, the stack validation function validates the stack and makes sure that enough items can be popped off and pushed on and the memory size function calculates the memory required for the operation and returns it. This commit also allows the EVM to go unmetered. This is helpful for offline operations such as contract calls.
* cmd/utils, eth, les: bubble --fakepow flag into eth/les tooPéter Szilágyi2017-01-041-6/+8
|
* eth: fix miner start API to accept int, not hexintPéter Szilágyi2016-12-231-2/+2
|
* internal/ethapi: fix hex handling for eth_call input and eth_sendRawTransactionFelix Lange2016-12-201-2/+2
|
* rpc: remove HexNumber, replace all uses with hexutil typesFelix Lange2016-12-202-23/+25
| | | | | This change couldn't be automated because HexNumber was used for numbers of all sizes.
* eth, miner: verify PoW in the remote agent to notify submitter (#3438)Péter Szilágyi2016-12-201-1/+1
|
* eth/filters: add FindOnce for iterator-like operation (#3435)Nick Johnson2016-12-201-20/+50
| | | | | | | | | | | This commit introduces a FindOnce method for filters. FindOnce finds the next block that matches the filter and returns all matching logs from that block. If there are no further matching logs, it returns a nil slice. This method allows callers to iterate over large sets of logs progressively. The changes introduce a small inefficiency relating to mipmaps: the first time a filter is called, it acts as if all mipmaps are matched, and thus iterates several blocks near the requested start point. This is in the interest of simplicity and avoiding duplicate mipmap lookups each time FindOnce is called.
* Merge pull request #3427 from Arachnid/gzipdumpPéter Szilágyi2016-12-141-2/+17
|\ | | | | cmd/utils, eth: Add gzip support for chain dump and restore
| * cmd/utils, eth: Add gzip support for chain dump and restoreNick Johnson2016-12-141-2/+17
| |
* | Merge pull request #3413 from zsfelfoldi/light-topic4Felix Lange2016-12-133-2/+13
|\ \ | |/ |/| les, p2p/discv5: implement server pool, improve peer selection, light fetcher and topic searching
| * eth, les: defer starting LES service until ETH initial sync is finishedZsolt Felfoldi2016-12-103-2/+13
| |
* | core: bugfix state change race condition in txpool (#3412)bas-vk2016-12-114-9/+17
|/ | | | | | | | The transaction pool keeps track of the current nonce in its local pendingState. When a new block comes in the pendingState is reset. During the reset it fetches multiple times the current state through the use of the currentState callback. When a second block comes in during the reset its possible that the state changes during the reset. If that block holds transactions that are currently in the pool the local pendingState that is used to determine nonces can get out of sync.
* core, core/vm: implemented a generic environment (#3348)Jeffrey Wilcke2016-12-062-5/+9
| | | | | | | | Environment is now a struct (not an interface). This reduces a lot of tech-debt throughout the codebase where a virtual machine environment had to be implemented in order to test or run it. The new environment is suitable to be used en the json tests, core consensus and light client.
* core, core/vm, eth/filters: move Removed field into vm.LogFelix Lange2016-12-054-109/+63
| | | | | | | | | | | | This field used to be assigned by the filter system and returned through the RPC API. Now that we have a Go client that uses the underlying type, the field needs to move. It is now assigned to true when the RemovedLogs event is generated so the filter system doesn't need to care about the field at all. While here, remove the log list from ChainSideEvent. There are no users of this field right now and any potential users could subscribe to RemovedLogsEvent instead.
* eth, miner: removed unnecessary state.Copy()Martin Holst Swende2016-11-301-2/+2
| | | | | | | | * miner: removed unnecessary state.Copy() * eth: made use of new miner method without state copying * miner: More documentation about new method
* eth/filter: add support for pending logs (#3219)bas-vk2016-11-286-90/+302
|
* eth/filters: simplify query object decodingFelix Lange2016-11-281-47/+44
|
* eth: removed http doc backend apiJeffrey Wilcke2016-11-251-7/+0
|
* common/registrar: delete the old registrar codeFelix Lange2016-11-251-7/+0
| | | | | | | The registrar was broken, unmaintained and there is a much better replacement: ENS. (cherry picked from commit 6ca8f57b08d550613175260cab7633adcacbe6ab)
* core: improved bad block error reporting (#3320)Jeffrey Wilcke2016-11-231-0/+2
|
* core/types, params: EIP#155Jeffrey Wilcke2016-11-136-21/+27
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-1311-22/+24
| | | | | | | | | | | | | | | This commit implements EIP158 part 1, 2, 3 & 4 1. If an account is empty it's no longer written to the trie. An empty account is defined as (balance=0, nonce=0, storage=0, code=0). 2. Delete an empty account if it's touched 3. An empty account is redefined as either non-existent or empty. 4. Zero value calls and zero value suicides no longer consume the 25k reation costs. params: moved core/config to params Signed-off-by: Jeffrey Wilcke <jeffrey@ethereum.org>
* all: update license informationFelix Lange2016-11-095-11/+11
|
* core/types: remove header accessorsFelix Lange2016-11-092-3/+3
| | | | | | These accessors were introduced by light client changes, but the only method that is actually used is GetNumberU64. This commit replaces all uses of .GetNumberU64 with .Number.Uint64.
* p2p/discv5: added new topic discovery packageZsolt Felfoldi2016-11-091-3/+2
|
* cmd, eth: added light client and light server modeszsfelfoldi2016-11-0911-83/+193
|
* les: light client protocol and APIZsolt Felfoldi2016-11-097-25/+268
|
* eth/downloader: clear pending requests when switching trie rootPéter Szilágyi2016-11-011-9/+18
|
* eth/downloader: lower a state sync log level (users freak out)Péter Szilágyi2016-11-011-1/+1
|
* eth/downloader: reduce fast sync block requirements, fix testPéter Szilágyi2016-10-312-13/+28
|
* core/state, eth/downloader, trie: reset fast-failure on progressPéter Szilágyi2016-10-313-160/+206
|
* Godeps, vendor: convert dependency management to trash (#3198)Péter Szilágyi2016-10-294-158/+13
| | | | | | | | | | | | | | | | | | | | | | | This commit converts the dependency management from Godeps to the vendor folder, also switching the tool from godep to trash. Since the upstream tool lacks a few features proposed via a few PRs, until those PRs are merged in (if), use github.com/karalabe/trash. You can update dependencies via trash --update. All dependencies have been updated to their latest version. Parts of the build system are reworked to drop old notions of Godeps and invocation of the go vet command so that it doesn't run against the vendor folder, as that will just blow up during vetting. The conversion drops OpenCL (and hence GPU mining support) from ethash and our codebase. The short reasoning is that there's noone to maintain and having opencl libs in our deps messes up builds as go install ./... tries to build them, failing with unsatisfied link errors for the C OpenCL deps. golang.org/x/net/context is not vendored in. We expect it to be fetched by the user (i.e. using go get). To keep ci.go builds reproducible the package is "vendored" in build/_vendor.
* eth/downloader: fix a data race in a log outputPéter Szilágyi2016-10-211-1/+2
|
* cmd/geth, code, eth/downloader: tune import logs and mem statsPéter Szilágyi2016-10-211-1/+1
|
* common, core, eth/downloader: adjust import log formattingPéter Szilágyi2016-10-181-1/+1
|
* trie, core/state: improve memory usage and performance (#3135)Felix Lange2016-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * trie: store nodes as pointers This avoids memory copies when unwrapping node interface values. name old time/op new time/op delta Get 388ns ± 8% 215ns ± 2% -44.56% (p=0.000 n=15+15) GetDB 363ns ± 3% 202ns ± 2% -44.21% (p=0.000 n=15+15) UpdateBE 1.57µs ± 2% 1.29µs ± 3% -17.80% (p=0.000 n=13+15) UpdateLE 1.92µs ± 2% 1.61µs ± 2% -16.25% (p=0.000 n=14+14) HashBE 2.16µs ± 6% 2.18µs ± 6% ~ (p=0.436 n=15+15) HashLE 7.43µs ± 3% 7.21µs ± 3% -2.96% (p=0.000 n=15+13) * trie: close temporary databases in GetDB benchmark * trie: don't keep []byte from DB load around Nodes decoded from a DB load kept hashes and values as sub-slices of the DB value. This can be a problem because loading from leveldb often returns []byte with a cap that's larger than necessary, increasing memory usage. * trie: unload old cached nodes * trie, core/state: use cache unloading for account trie * trie: use explicit private flags (fixes Go 1.5 reflection issue). * trie: fixup cachegen overflow at request of nick * core/state: rename journal size constant
* eth: move "timed out DAO fork check, dropping" to debug levelFelix Lange2016-10-081-1/+1
|
* Merge pull request #3092 from fjl/state-journalJeffrey Wilcke2016-10-061-3/+3
|\ | | | | core/state: implement reverts by journaling all changes
| * core/state: implement reverts by journaling all changesFelix Lange2016-10-061-3/+3
| | | | | | | | | | | | | | | | | | | | This commit replaces the deep-copy based state revert mechanism with a linear complexity journal. This commit also hides several internal StateDB methods to limit the number of ways in which calling code can use the journal incorrectly. As usual consultation and bug fixes to the initial implementation were provided by @karalabe, @obscuren and @Arachnid. Thank you!
* | eth: monitor malicious header retrieval requestsPéter Szilágyi2016-10-052-5/+31
|/
* core, eth, trie: reuse trie journals in all our codePéter Szilágyi2016-09-282-4/+4
|
* core/state: track all accounts in canon stateFelix Lange2016-09-261-3/+3
| | | | | This change introduces a global, per-state cache that keeps account data in the canon state. Thanks to @karalabe for lots of fixes.
* cmd, eth: drop the blockchain version from cli/eth configsPéter Szilágyi2016-09-151-4/+3
|
* ethereum, ethclient: add SyncProgress API endpointPéter Szilágyi2016-09-063-48/+48
|
* core, eth, internal, miner: optimize txpool for quick opsPéter Szilágyi2016-09-026-20/+33
|
* core, eth, miner: only retain 1 tx/nonce, remove bad onesPéter Szilágyi2016-09-021-1/+1
|
* accounts/abi/bind: use ethereum interfacesFelix Lange2016-08-221-45/+47
| | | | | | | | | | | | | | | | | | | | | | | | | In this commit, contract bindings and their backend start using the Ethereum Go API interfaces offered by ethclient. This makes ethclient a suitable replacement for the old remote backend and gets us one step closer to the final stable Go API that is planned for go-ethereum 1.5. The changes in detail: * Pending state is optional for read only contract bindings. BoundContract attempts to discover the Pending* methods via an interface assertion. There are a couple of advantages to this: ContractCaller is just two methods and can be implemented on top of pretty much anything that provides Ethereum data. Since the backend interfaces are now disjoint, ContractBackend can simply be declared as a union of the reader and writer side. * Caching of HasCode is removed. The caching could go wrong in case of chain reorganisations and removing it simplifies the code a lot. We'll figure out a performant way of providing ErrNoCode before the 1.5 release. * BoundContract now ensures that the backend receives a non-nil context with every call.
* eth: don't call ValidateFieldsFelix Lange2016-08-041-3/+0
| | | | | | ValidateFields was introduced before the rlp decoder disallowed nil values. Decoding RLP will never return nil values, there is no need to check for them.
* eth/fetcher: small typo fix (#2932)Stein Dekker2016-08-231-1/+1
|
* core/vm, eth: Add support for javascript trace functionsNick Johnson2016-08-231-8/+57
|
* Merge pull request #2923 from Arachnid/tracingPéter Szilágyi2016-08-221-34/+22
|\ | | | | core: Refactor tracing to make Tracer the main interface
| * core/vm: Refactor tracing to make Tracer the main interfaceNick Johnson2016-08-221-34/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL makes several refactors: - Define a Tracer interface, implementing the `CaptureState` method - Add the VM environment as the first argument of `Tracer.CaptureState` - Rename existing functionality `StructLogger` an make it an implementation of `Tracer` - Delete `StructLogCollector` and make `StructLogger` collect the logs directly - Change all callers to use the new `StructLogger` where necessary and extract logs from that. - Deletes the apparently obsolete and likely nonfunctional 'TraceCall' from the eth API. Callers that only wish accumulated logs can use the `StructLogger` implementation straightforwardly. Callers that wish to efficiently capture VM traces and operate on them without excessive copying can now implement the `Tracer` interface to receive VM state at each step and do with it as they wish. This CL also removes the accumulation of logs from the vm.Environment; this was necessary as part of the refactor, but also simplifies it by removing a responsibility that doesn't directly belong to the Environment.
* | eth/fetcher: fix a log message formatting issuePéter Szilágyi2016-08-191-1/+1
|/
* Merge pull request #2909 from fjl/account-manager-cleanupFelix Lange2016-08-182-32/+13
|\ | | | | all: clean up tech debt left behind by the API split
| * common/compiler: simplify solc wrapperFelix Lange2016-08-172-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Support for legacy version 0.9.x is gone. The compiler version is no longer cached. Compilation results (and the version) are read directly from stdout using the --combined-json flag. As a workaround for ethereum/solidity#651, source code is written to a temporary file before compilation. Integration of solc in package ethapi and cmd/abigen is now much simpler because the compiler wrapper is no longer passed around as a pointer. Fixes #2806, accidentally
| * eth: remove dapp database remainsFelix Lange2016-08-171-22/+6
| |
| * cmd/utils, node: create account manager in package nodeFelix Lange2016-08-171-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The account manager was previously created by packge cmd/utils as part of flag processing and then passed down into eth.Ethereum through its config struct. Since we are starting to create nodes which do not have eth.Ethereum as a registered service, the code was rearranged to register the account manager as its own service. Making it a service is ugly though and it doesn't really fix the root cause: creating nodes without eth.Ethereum requires duplicating lots of code. This commit splits utils.MakeSystemNode into three functions, making creation of other node/service configurations easier. It also moves the account manager into Node so it can be used by those configurations without requiring package eth.
* | rpc: refactor subscriptions and filtersBas van Kervel2016-08-176-768/+1039
| |
* | core: ensure the canonical block is written before the canonical hash is setBas van Kervel2016-08-161-3/+6
| |
* | Merge pull request #2866 from karalabe/downloader-future-ancestorsPéter Szilágyi2016-08-161-9/+17
|\ \ | |/ |/| eth/downloader: fewer headers and futures too in ancestor lookup
| * eth/downloader: fewer headers and futures too un ancestor lookupPéter Szilágyi2016-07-261-9/+17
| |
* | Merge pull request #2868 from karalabe/downloader-abort-master-dropPéter Szilágyi2016-08-091-2/+15
|\ \ | | | | | | eth/downloader: abort sync if master drops (timeout prev)
| * | eth/downloader: abort sync if master drops (timeout prev)Péter Szilágyi2016-07-261-2/+15
| |/
* | Merge pull request #2867 from karalabe/dao-challenge-finishPéter Szilágyi2016-08-092-1/+2
|\ \ | | | | | | eth, eth/downloader: don't forward the DAO challenge header
| * | eth, eth/downloader: don't forward the DAO challenge headerPéter Szilágyi2016-07-262-1/+2
| |/
* | Merge pull request #2861 from karalabe/track-peer-heads-properlyPéter Szilágyi2016-08-096-50/+59
|\ \ | |/ |/| eth, eth/downloader: better remote head tracking
| * eth, eth/downloader: better remote head trackingPéter Szilágyi2016-07-256-50/+59
| |
* | Merge pull request #2855 from karalabe/downloader-fix-stall-dropFelix Lange2016-07-251-1/+8
|\ \ | |/ |/| eth/downloader: fix the stall checks/drops during sync
| * eth/downloader: fix the stall checks/drops during syncPéter Szilágyi2016-07-221-1/+8
| |
* | Merge pull request #2842 from fjl/downloader-remove-eth61Felix Lange2016-07-2315-1524/+119
|\ \ | |/ |/| eth, eth/downloader, eth/fetcher: delete eth/61 sync code
| * eth, eth/downloader, eth/fetcher: delete eth/61 codeFelix Lange2016-07-2215-1524/+119
| | | | | | | | | | The eth/61 protocol was disabled in #2776, this commit removes its message handlers and hash-chain sync logic.
* | Merge pull request #2833 from karalabe/fix-dao-challenge-annoyancePéter Szilágyi2016-07-221-0/+7
|\ \ | | | | | | eth: cancel DAO challenge on peer drop (annoying log)
| * | eth: cancel DAO challenge on peer drop (annoying log)Péter Szilágyi2016-07-191-0/+7
| |/
* | Merge pull request #2711 from hdiedrich/1.4.7-filter-races-cleanupFelix Lange2016-07-202-28/+54
|\ \ | | | | | | Fix #2710 Filter race: concurrent map read and map write
| * | eth: fix #2710 filter racesHenning Diedrich2016-07-042-28/+54
| | | | | | | | | | | | and locking bugs found in its wake.
* | | eth: fixed chaindb upgradezsfelfoldi2016-07-191-0/+13
| |/ |/|
* | cmd/utils, eth: display the user's current fork, minor text tweakPéter Szilágyi2016-07-161-0/+1
| |
* | cmd, core, eth, miner, params, tests: finalize the DAO forkPéter Szilágyi2016-07-151-4/+4
| |
* | accounts, core, eth: pass chain config for chain maker to test DAOPéter Szilágyi2016-07-156-7/+7
| |
* | core, eth: enforce network split post DAO hard-forkPéter Szilágyi2016-07-153-7/+134
| |
* | cmd, core, eth, params: implement flags to control dao fork blocksPéter Szilágyi2016-07-151-0/+2
| |
* | Merge pull request #2799 from zsfelfoldi/api-nonce-fix2Péter Szilágyi2016-07-121-2/+2
|\ \ | | | | | | core: added CheckNonce() to Message interface
| * | core: added CheckNonce() to Message interfacezsfelfoldi2016-07-111-2/+2
| | |
* | | eth/downloader: return invalid chain (peer drop) on import failsPéter Szilágyi2016-07-121-1/+1
|/ /
* | eth: disable eth/61 to prepare for more elaborate fork sync algosPéter Szilágyi2016-07-041-2/+2
| |
* | cmd, common, console, eth, release: drop redundant "full"sPéter Szilágyi2016-06-306-79/+79
| |
* | Merge pull request #2159 from zsfelfoldi/light-backendPéter Szilágyi2016-06-307-1747/+510
|\ \ | |/ |/| eth: separate common and full node-specific API and backend service
| * eth: separate common and full node-specific API and backend servicezsfelfoldi2016-06-167-1747/+510
| |
* | Merge pull request #2686 from obscuren/issue-2542Péter Szilágyi2016-06-141-0/+1
|\ \ | |/ |/| core/state, eth: Updated suicides objects when tracing transactions
| * core/state, eth: Updated suicides objects when tracing transactionsJeffrey Wilcke2016-06-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #2455 from zsfelfoldi/chaindbJeffrey Wilcke2016-06-1311-149/+400
|\ \ | | | | | | core: improved chain db performance by using sequential keys
| * | core: improved chainDb using sequential keyszsfelfoldi2016-06-0711-149/+400
| |/
* / eth/downloader: fix occasional fast sync critical section test failsPéter Szilágyi2016-06-131-1/+3
|/
* eth: don't accept transactions until we sync up with the networkPéter Szilágyi2016-06-063-4/+13
|
* eth/downloader: adaptive quality of service tuningPéter Szilágyi2016-06-063-48/+235
|
* eth/downloader: make fast sync resilient to critical section failsPéter Szilágyi2016-06-022-26/+109
|
* Merge pull request #2637 from karalabe/downloader-always-cancelPéter Szilágyi2016-05-312-1/+13
|\ | | | | eth/downloader: ensure cancel channel is closed post sync
| * eth/downloader: ensure cancel channel is closed post syncPéter Szilágyi2016-05-302-1/+13
| |
* | eth/downloader, trie: pull head state concurrently with chainPéter Szilágyi2016-05-272-29/+35
|/
* Merge pull request #2614 from fjl/bad-block-reportJeffrey Wilcke2016-05-262-2/+93
|\ | | | | eth: enable bad block reports
| * eth: enable bad block reportsFelix Lange2016-05-252-2/+93
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | eth/api: fixed GetCompilers when there is no error creating SolcRémy Roy2016-05-251-1/+1
|/
* Merge pull request #2564 from bas-vk/submit-txJeffrey Wilcke2016-05-232-68/+116
|\ | | | | eth: add new RPC method (personal.) SignAndSendTransaction
| * eth: add new RPC method (personal.) SignAndSendTransactionBas van Kervel2016-05-202-68/+116
| |
* | Merge pull request #2575 from bas-vk/filterJeffrey Wilcke2016-05-232-38/+234
|\ \ | | | | | | eth/filter: bugfix which can cause a nil pointer crash when parsing f…
| * | eth/filter: bugfix which can cause a nil pointer crash when parsing filter ↵Bas van Kervel2016-05-172-38/+234
| | | | | | | | | | | | arguments
* | | Merge pull request #2589 from karalabe/estimate-remove-codecheckJeffrey Wilcke2016-05-202-22/+11
|\ \ \ | | | | | | | | accounts/abi/bind, eth: rely on getCode for sanity checks, not estimate and call
| * | | accounts/abi/bind, eth: rely on getCode for sanity checks, not estimate and callPéter Szilágyi2016-05-202-22/+11
| | |/ | |/|
* | | Merge pull request #2315 from karalabe/concurrent-headers-2Jeffrey Wilcke2016-05-204-211/+643
|\ \ \ | |/ / |/| | eth/downloader: concurrent header downloads
| * | eth/downloader: fix reviewer commentsPéter Szilágyi2016-05-202-9/+32
| | |
| * | eth/downloader: stream partial skeleton filling to processorPéter Szilágyi2016-05-173-19/+55
| | |
| * | eth/downloader: implement concurrent header downloadsPéter Szilágyi2016-05-174-211/+584
| | |
* | | eth: fixed regression in eth_signTransaction fixes #2578Jeffrey Wilcke2016-05-181-1/+1
| |/ |/| | | | | | | Sign transaction returned the unsigned transaction rather than the signed one.
* | eth: skip transaction handling during fast syncPéter Szilágyi2016-05-173-14/+23
|/
* eth/downloader: bound fork ancestry and allow heavy short forksPéter Szilágyi2016-05-132-43/+201
|
* Merge pull request #2523 from fjl/shutdownPéter Szilágyi2016-05-095-32/+66
|\ | | | | core, eth, miner: improve shutdown synchronisation
| * core, eth, miner: improve shutdown synchronisationFelix Lange2016-05-095-32/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | eth: fixed tracing functions using the current header instead of parentJeffrey Wilcke2016-05-091-2/+2
|/ | | | Fixes #2525
* release, all: integrate the release service into gethPéter Szilágyi2016-05-023-25/+137
|
* Merge pull request #2493 from almindor/developFelix Lange2016-04-301-0/+11
|\ | | | | eth: add personal_importRawKey
| * eth: add personal_importRawKey for runtime private key importAles Katona2016-04-281-0/+11
| |
* | eth/filters: ignore logs that don't match filter criteria on chain reorgBas van Kervel2016-04-281-1/+1
| |
* | accounts/abi/bind, eth: add contract non-existent errorPéter Szilágyi2016-04-271-0/+15
|/
* rpc: remove NotifierContextKeyFelix Lange2016-04-163-4/+4
| | | | | | | 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.
* all: fix go vet warningsFelix Lange2016-04-159-26/+24
|
* core, core/types, eth: add and use Block.BodyFelix Lange2016-04-151-2/+2
| | | | | This fixes a few uses of unkeyed Body literals which go vet was complaining about.
* all: update license informationFelix Lange2016-04-1512-25/+105
|
* eth, rpc: make trace configs optionalPéter Szilágyi2016-04-141-8/+14
|
* eth: fix single transaction tracing (run prev mutations)Péter Szilágyi2016-04-141-41/+47
|
* eth: add chaindbProperty to debug APIFelix Lange2016-04-131-0/+18
|
* Merge pull request #2284 from fjl/accounts-addr-cachePéter Szilágyi2016-04-124-84/+43
|\ | | | | accounts: cache key addresses
| * accounts: improve API and add documentationFelix Lange2016-04-121-7/+6
| | | | | | | | | | - Sign takes common.Address, not Account - Import/Export methods work with encrypted JSON keys
| * eth: report unlock errors to RPC clientsFelix Lange2016-04-121-4/+3
| |
| * accounts: streamline APIFelix Lange2016-04-122-69/+31
| | | | | | | | | | | | - Manager.Accounts no longer returns an error. - Manager methods take Account instead of common.Address. - All uses of Account with unkeyed fields are converted.
| * accounts, crypto: move keystore to package accountsFelix Lange2016-04-122-5/+4
| | | | | | | | | | | | | | | | | | | | 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.
* | eth: gracefully fail if chain config is missingPéter Szilágyi2016-04-121-0/+4
|/
* Merge pull request #2359 from bas-vk/rpc-optional-argsJeffrey Wilcke2016-04-122-28/+41
|\ | | | | rpc: several fixes and support for optional arguments
| * rpc: various fixes/enhancementsBas van Kervel2016-04-122-28/+41
| | | | | | | | | | | | | | | | 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
* | eth: fix GPU miner chain config regressionPéter Szilágyi2016-04-111-2/+1
|/
* Merge pull request #2407 from bas-vk/rpc-notificationsJeffrey Wilcke2016-04-054-91/+271
|\ | | | | RPC pub sub
| * rpc: add pub/sub supportBas van Kervel2016-04-024-91/+271
| |
* | cmd/geth, eth: move --genesis deprecation warning to cmd/gethFelix Lange2016-04-021-4/+0
|/ | | | This prevents display of the warning for --dev and --olympic.