aboutsummaryrefslogtreecommitdiffstats
path: root/eth
Commit message (Collapse)AuthorAgeFilesLines
* eth, les: defer starting LES service until ETH initial sync is finishedZsolt Felfoldi2016-12-103-2/+13
|
* 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.
* Merge pull request #2402 from obscuren/eth-sign-fixJeffrey Wilcke2016-04-011-4/+4
|\ | | | | eth: enforce signing hashes using eth_sign instead of arbitrary data
| * eth: enforce signing hashes using eth_sign instead of arbitrary dataJeffrey Wilcke2016-04-011-4/+4
| |
* | core: transition db now also returns the required gas amountJeffrey Wilcke2016-04-011-3/+3
| | | | | | | | | | | | | | | | | | 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
* | accounts/a/b/backends, core: chain maker homestead block set to 0Jeffrey Wilcke2016-04-011-2/+1
| | | | | | | | | | | | | | 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
* | core: added basic chain configurationJeffrey Wilcke2016-04-014-25/+52
|/ | | | | | | | | 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.
* eth: fix accidental nil panic on nil errorsPéter Szilágyi2016-03-311-4/+13
|
* eth: manually convert errors to strings on the trace API (json cannot)Péter Szilágyi2016-03-311-11/+11
|
* accounts/abi/bind, cmd/abigen: Go API generator around an EVM ABIPéter Szilágyi2016-03-241-1/+1
|
* Merge pull request #2141 from obscuren/evm-initJeffrey Wilcke2016-03-242-93/+206
|\ | | | | core, core/vm, tests: changed the initialisation behaviour of the EVM
| * core, eth, cmd: temporary work around for enabling the jitJeffrey Wilcke2016-03-241-0/+9
| | | | | | | | | | This commit serves as a temporary workaround for enabling the jit until the block customisation PR is merged in.
| * eth/api: added root to the receiptsJeffrey Wilcke2016-03-241-0/+3
| |
| * eth, rpc: implemented block debugging rpc callsJeffrey Wilcke2016-03-241-87/+193
| | | | | | | | | | | | | | | | | | Implemented the following block debugging RPC calls * Block(RLP) * BlockByFile(fileName) * BlockByNumber(number) * BlockByHash(hash)
| * core: Added EVM configuration optionsJeffrey Wilcke2016-03-241-8/+3
| | | | | | | | | | The EVM is now initialised with an additional configured object that allows you to turn on debugging options.
* | eth, miner: fetch pending block/state in on go (data race)Péter Szilágyi2016-03-161-2/+4
|/
* core, eth: replace reorganiz with reorganisLeif Jurvetson2016-03-161-2/+2
|
* eth: various typosLeif Jurvetson2016-03-1611-29/+29
|
* eth/downloader: fix a throughput estimation data racePéter Szilágyi2016-03-101-2/+2
|
* cmd, eth, ethdb, node: prioritise chaindata for resources, bump cachePéter Szilágyi2016-03-092-8/+5
|
* eth: forward empty body responses to the downlaoderPéter Szilágyi2016-03-031-1/+5
|
* Merge pull request #2215 from bas-vk/estimategasPéter Szilágyi2016-03-011-34/+31
|\ | | | | core: improved check for contract creation
| * core: improved check for contract creationBas van Kervel2016-02-161-34/+31
| |
* | eth/downloader: fix premature exit before notifying all part fetchersPéter Szilágyi2016-02-291-1/+3
| |
* | eth/downloader: fix header download limitingFelix Lange2016-02-261-1/+1
| | | | | | | | Fixes #2201
* | Merge pull request #2260 from karalabe/ethash-cache-fixesPéter Szilágyi2016-02-241-3/+8
|\ \ | | | | | | Godeps, eth, tests: update ethash, used shared for testing
| * | Godeps, eth, tests: update ethash, used shared for testingPéter Szilágyi2016-02-241-3/+8
| | |
* | | Merge pull request #2251 from karalabe/increase-downlaoder-queuePéter Szilágyi2016-02-242-1/+6
|\ \ \ | | | | | | | | eth/downloader: bump the download queue size to prevent starvation
| * | | eth/downloader: bump the download queue size to prevent starvationPéter Szilágyi2016-02-232-1/+6
| |/ /
* | | Merge pull request #2242 from jimenezrick/upstream-cryptoJeffrey Wilcke2016-02-242-2/+2
|\ \ \ | |/ / |/| | Closes #2241: Use Keccak-256 from golang.org/x/crypto/sha3 and mention explicitly
| * | all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-222-2/+2
| | | | | | | | | | | | As we aren't really using the standarized SHA-3
* | | Merge pull request #2234 from obscuren/tx-rpc-fixPéter Szilágyi2016-02-231-9/+9
|\ \ \ | | | | | | | | eth: fixed homestead tx check
| * | | eth: fixed homestead tx checkJeffrey Wilcke2016-02-201-9/+9
| |/ / | | | | | | | | | | | | | | | | | | When a block is queried for retrieval we should add a check whether the block falls within the frontier rules. If we'd always use `From` retrieving transaction might fail. This PR temporarily changes everything to `FromFrontier` (safe!).
* | | Merge pull request #2220 from karalabe/fix-rollback-lockPéter Szilágyi2016-02-231-2/+28
|\ \ \ | |/ / |/| | eth/downloader: fix partial rollback and ancestor lookup
| * | eth/downloader: fix partial rollback and ancestor lookupPéter Szilágyi2016-02-191-2/+28
| |/
* / parmas, crypto, core, core/vm: homestead consensus protocol changesGustav Simonsson2016-02-181-7/+8
|/ | | | | | | | * change gas cost for contract creating txs * invalidate signature with s value greater than secp256k1 N / 2 * OOG contract creation if not enough gas to store code * new difficulty adjustment algorithm * new DELEGATECALL op code
* eth/filters: ✨ pending logs ✨Jeffrey Wilcke2016-02-134-40/+119
| | | | | | Pending logs are now filterable through the Go API. Filter API changed such that each filter type has it's own bucket and adding filter explicitly requires you specify the bucket to put it in.
* Merge pull request #2195 from obscuren/gpo-rpcPéter Szilágyi2016-02-112-15/+14
|\ | | | | eth: Added GPO to suggest default gas prices
| * eth: Added GPO to suggest default gas pricesJeffrey Wilcke2016-02-102-15/+14
| | | | | | | | | | | | | | | | | | This PR fixes a regression of the RPC where the default gas price that was being used for transaction wasn't properly using the GPO. This PR adds the GPO back to suggest gas prices rather than the hardcoded default of 10000000000000. Closes #2194
* | eth, eth/downloader, jsre: surface state sync progress through the APIPéter Szilágyi2016-02-104-35/+50
| |
* | eth, miner: move the public miner api into eth to access etherbasePéter Szilágyi2016-02-092-1/+53
| |
* | eth/downloader: raise pending state limit that prevented concurrencyPéter Szilágyi2016-02-082-3/+3
|/
* eth: sendTransaction would not report the error when tx could not be added ↵Bas van Kervel2016-02-081-1/+1
| | | | to tx pool
* Merge pull request #2106 from obscuren/out-of-bound-logsJeffrey Wilcke2016-02-064-26/+132
|\ | | | | eth/filters: added notifications for out of bound log events
| * eth/filters: added notifications for out of bound log eventsJeffrey Wilcke2016-02-054-26/+132
| | | | | | | | | | | | Out of Bound log events are events that were removed due to a fork. When logs are received the filtering mechanism should check for the `removed` field on the json structure.
* | rpc: add jsonrpc version to module request, use json typesPéter Szilágyi2016-02-041-2/+1
|/
* cmd, eth, rpc: fix some RPC issues with pending blocksPéter Szilágyi2016-02-032-106/+96
|
* Merge pull request #2156 from ppratscher/add_replay_txPéter Szilágyi2016-02-031-0/+139
|\ | | | | core/vm, rpc/api: added debug_replayTransaction RPC call
| * core/vm, rpc/api: renamed to debug.replayTransaction, migrated to new RPC, ↵Peter Pratscher2016-02-021-0/+139
| | | | | | | | | | | | | | | | integrated feedback Integrated code review suggestions Integrated last review comments
* | core, eth, rpc/api: rpc method to inspect the txpool queuePéter Szilágyi2016-02-011-0/+74
|/
* rpc: migrated the RPC insterface to a new reflection based RPC layerBas van Kervel2016-01-264-38/+99
|
* eth: changed NodeInfo Genesis and Head typesBas van Kervel2016-01-181-6/+6
|
* core, eth/downloader: ensure state presence in ancestor lookupPéter Szilágyi2016-01-044-60/+72
|
* eth/downloader: throttling tests are time-sensitive, don't run parallelPéter Szilágyi2015-12-301-3/+1
|
* common: remove old RLP implementation, Value and ExtPackageFelix Lange2015-12-181-12/+2
| | | | | In order to make this happen, kill all remaining trivial uses of common/{rlp,value}.go. The non-trivial ones have been updated earlier.
* eth/downloader: fix negative balance issue in testsFelix Lange2015-12-181-2/+5
| | | | | | | | | | The test chain generated by makeChainFork included invalid uncle headers, crashing the generator during the state commit. The headers were invalid because they used the iteration counter as the block number, even though makeChainFork uses a block with number > 0 as the parent. Fix this by introducing BlockGen.Number, which allows accessing the actual number of the block being generated.
* Merge pull request #1997 from zsfelfoldi/gasprice2Jeffrey Wilcke2015-12-171-0/+2
|\ | | | | core: tx pool skip price validation for "owned" transactions
| * core: tx pool skip price validation for "owned" transactionszsfelfoldi2015-12-161-0/+2
| |
* | eth: fix #2076, where end of hash query was interpreted number queryPéter Szilágyi2015-12-162-1/+23
|/
* core, eth, node, rpc: port the admin and debug APIPéter Szilágyi2015-12-152-15/+215
|
* rpc: new RPC implementation with pub/sub supportBas van Kervel2015-12-144-0/+1915
|
* eth: use global event mux insteadBas van Kervel2015-12-011-1/+1
|
* cmd, eth, node, rpc, xeth: use single-instance servicesPéter Szilágyi2015-11-271-2/+2
|
* cmd, common, core, eth, node, rpc, tests, whisper, xeth: use protocol stacksPéter Szilágyi2015-11-271-299/+46
|
* eth/downloader: fetch data proportionally to peer capacityPéter Szilágyi2015-11-193-246/+258
|
* Merge pull request #1923 from karalabe/cleanup-receipt-data-accessJeffrey Wilcke2015-11-192-6/+6
|\ | | | | core, eth, miner, xeth: clean up tx/receipt db accessors
| * core, eth, miner, xeth: clean up tx/receipt db accessorsPéter Szilágyi2015-11-192-6/+6
| |
* | Merge pull request #1980 from fjl/downloader-deliver-hangJeffrey Wilcke2015-11-194-311/+336
|\ \ | |/ |/| eth/downloader: don't hang for spurious deliveries
| * eth/downloader: run tests in parallelFelix Lange2015-11-191-0/+29
| |
| * eth/downloader: also drain stateCh, receiptCh in eth/61 modeFelix Lange2015-11-191-71/+77
| | | | | | | | | | | | | | | | | | State and receipt deliveries from a previous eth/62+ sync can hang if the downloader has moved on to syncing with eth/61. Fix this by also draining the eth/63 channels while waiting for eth/61 data. A nicer solution would be to take care of the channels in a central place, but that would involve a major rewrite.
| * eth: remove workaround for asynchronous processing in the downloaderFelix Lange2015-11-191-4/+0
| |
| * eth/downloader: don't hang for spurious deliveriesFelix Lange2015-11-193-236/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unexpected deliveries could block indefinitely if they arrived at the right time. The fix is to ensure that the cancellation channel is always closed when the sync ends, unblocking any deliveries. Also remove the atomic check for whether a sync is currently running because it doesn't help and can be misleading. Cancelling always seems to break the tests though. The downloader spawned d.process whenever new data arrived, making it somewhat hard to track when block processing was actually done. Fix this by running d.process in a dedicated goroutine that is tied to the lifecycle of the sync. d.process gets notified of new work by the queue instead of being invoked all the time. This removes a ton of weird workaround code, including a hairy use of atomic CAS.
* | core, eth, rpc: split out block validator and state processorJeffrey Wilcke2015-11-183-26/+19
|/ | | | | | | | | | | | This removes the burden on a single object to take care of all validation and state processing. Now instead the validation is done by the `core.BlockValidator` (`types.Validator`) that takes care of both header and uncle validation through the `ValidateBlock` method and state validation through the `ValidateState` method. The state processing is done by a new object `core.StateProcessor` (`types.Processor`) and accepts a new state as input and uses that to process the given block's transactions (and uncles for rewords) to calculate the state root for the next block (P_n + 1).
* Merge pull request #1963 from karalabe/fix-database-regressionJeffrey Wilcke2015-11-061-18/+3
|\ | | | | eth: fix error casting regression during database open
| * eth: fix error casting regression during database openPéter Szilágyi2015-11-051-18/+3
| |
* | Merge pull request #1960 from karalabe/fix-peer-ignore-listJeffrey Wilcke2015-11-042-11/+46
|\ \ | |/ |/| eth/downloader: fix dysfunctional ignore list hidden by generic set
| * eth/downloader: fix dysfunctional ignore list hidden by generic setPéter Szilágyi2015-11-042-11/+46
| |
* | Merge pull request #1934 from karalabe/polish-protocol-infosJeffrey Wilcke2015-11-046-80/+78
|\ \ | |/ |/| eth, p2p, rpc/api: polish protocol info gathering
| * eth, p2p, rpc/api: polish protocol info gatheringPéter Szilágyi2015-10-286-80/+78
| |
* | Merge pull request #1952 from obscuren/testnet-peersJeffrey Wilcke2015-10-301-1/+2
|\ \ | | | | | | eth: added new testnet peers
| * | eth: added new testnet peersJeffrey Wilcke2015-10-301-1/+2
| |/
* | Merge pull request #1949 from karalabe/update-command-usageJeffrey Wilcke2015-10-301-6/+0
|\ \ | | | | | | cmd/geth, cmd/utils, eth: group CLI flags by purpose
| * | cmd/geth, cmd/utils, eth: group CLI flags by purposePéter Szilágyi2015-10-301-6/+0
| | |
* | | Merge pull request #1946 from fjl/xeth-oomJeffrey Wilcke2015-10-301-53/+35
|\ \ \ | |/ / |/| | Fix for xeth OOM issue
| * | cmd/utils, rpc/comms: stop XEth when IPC connection endsFelix Lange2015-10-301-53/+35
| |/ | | | | | | | | | | | | | | | | | | | | There are a bunch of changes required to make this work: - in miner: allow unregistering agents, fix RemoteAgent.Stop - in eth/filters: make FilterSystem.Stop not crash - in rpc/comms: move listen loop to platform-independent code Fixes #1930. I ran the shell loop there for a few minutes and didn't see any changes in the memory profile.
* / eth: don't block sync goroutines that short circuitPéter Szilágyi2015-10-282-4/+9
|/
* Merge pull request #1919 from ethersphere/getnatspecJeffrey Wilcke2015-10-281-0/+11
|\ | | | | rpc api: eth_getNatSpec
| * rpc api: eth_getNatSpeczelig2015-10-271-0/+11
| | | | | | | | | | | | | | | | * xeth, rpc: implement eth_getNatSpec for tx confirmations * rename silly docserver -> httpclient * eth/backend: httpclient now accessible via eth.Ethereum init-d via config.DocRoot * cmd: introduce separate CLI flag for DocRoot (defaults to homedir) * common/path: delete unused assetpath func, separate HomeDir func
* | Merge pull request #1932 from fjl/gpo-defootgunizeJeffrey Wilcke2015-10-281-49/+58
|\ \ | |/ |/| eth, xeth: fix GasPriceOracle goroutine leak
| * eth, xeth: fix GasPriceOracle goroutine leakFelix Lange2015-10-281-49/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | XEth.gpo was being initialized as needed. WithState copies the XEth struct including the gpo field. If gpo was nil at the time of the copy and Call or Transact were invoked on it, an additional GPO listenLoop would be spawned. Move the lazy initialization to GasPriceOracle instead so the same GPO instance is shared among all created XEths. Fixes #1317 Might help with #1930
* | eth: time out status message exchange after 5sFelix Lange2015-10-231-9/+27
|/
* console:zelig2015-10-221-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lines with leading space are ommitted from history * exit processed even with whitespace around * all whitespace lines (not only empty ones) are ignored add 7 missing commands to admin api autocomplete registrar: methods now return proper error if reg addresses are not set. fixes #1457 rpc/console: fix personal.newAccount() regression. Now all comms accept interactive password registrar: add registrar tests for errors crypto: catch AES decryption error on presale wallet import + fix error msg format. fixes #1580 CLI: improve error message when starting a second instance of geth. fixes #1564 cli/accounts: unlock multiple accounts. fixes #1785 * make unlocking multiple accounts work with inline <() fd * passwdfile now correctly read only once * improve logs * fix CLI help text for unlocking fix regression with docRoot / admin API * docRoot/jspath passed to rpc/api ParseApis, which passes onto adminApi * docRoot field for JS console in order to pass when RPC is (re)started * improve flag desc for jspath common/docserver: catch http errors from response fix rpc/api tests common/natspec: fix end to end test (skipped because takes 8s) registrar: fix major regression: * deploy registrars on frontier * register HashsReg and UrlHint in GlobalRegistrar. * set all 3 contract addresses in code * zero out addresses first in tests
* core, eth, trie: fix data races and merge/review issuesPéter Szilágyi2015-10-2115-397/+681
|
* eth: clean out light node notions from ethPéter Szilágyi2015-10-197-68/+34
|
* core, eth: roll back uncertain headers in failed fast syncsPéter Szilágyi2015-10-194-12/+131
|
* eth/downloader: concurrent receipt and state processingPéter Szilágyi2015-10-194-72/+158
|
* core, eth, trie: direct state trie synchronizationPéter Szilágyi2015-10-198-459/+779
|
* core, eth: receipt chain reconstructionPéter Szilágyi2015-10-196-141/+205
|
* core: differentiate receipt concensus and storage decodingPéter Szilágyi2015-10-191-1/+1
|
* eth/downloader: add fast and light sync strategiesPéter Szilágyi2015-10-199-798/+1427
|
* core: support inserting pure header chainsPéter Szilágyi2015-10-193-18/+5
|
* cmd, eth: support switching client modes of operationPéter Szilágyi2015-10-196-32/+100
|
* Merge pull request #1899 from obscuren/mipmap-bloomJeffrey Wilcke2015-10-174-53/+447
|\ | | | | core, eth/filters, miner, xeth: Optimised log filtering
| * core, eth/filters, miner, xeth: Optimised log filteringJeffrey Wilcke2015-10-174-63/+368
| | | | | | | | | | | | | | Log filtering is now using a MIPmap like approach where addresses of logs are added to a mapped bloom bin. The current levels for the MIP are in ranges of 1.000.000, 500.000, 100.000, 50.000, 1.000. Logs are therefor filtered in batches of 1.000.
| * eth/filters: added benchmarkJeffrey Wilcke2015-10-162-7/+96
| |
* | Merge pull request #1869 from Gustav-Simonsson/gpu_minerJeffrey Wilcke2015-10-163-12/+157
|\ \ | | | | | | all: Add GPU mining, disabled by default
| * | all: Add GPU mining, disabled by defaultGustav Simonsson2015-10-073-12/+157
| | |
* | | core/state, core, miner: handle missing root error from state.NewGustav Simonsson2015-10-163-4/+7
| |/ |/|
* | core, eth, event, miner, xeth: fix event post / subscription racePéter Szilágyi2015-10-123-27/+36
| |
* | cmd, core, eth: added official testnetJeffrey Wilcke2015-10-091-1/+17
| |
* | Merge pull request #1756 from obscuren/core-refactorJeffrey Wilcke2015-10-059-137/+486
|\ \ | |/ |/| core, core/vm: refactor
| * cmd/geth, cmd/utils, core, rpc: renamed to blockchainJeffrey Wilcke2015-10-049-144/+149
| | | | | | | | | | | | * Renamed ChainManager to BlockChain * Checkpointing is no longer required and never really properly worked when the state was corrupted.
| * cmd/evm, core/vm, test: refactored VM and coreJeffrey Wilcke2015-10-042-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * core/vm: byte code VM moved to jump table instead of switch * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * Byte code VM now shares the same code as the JITVM * Renamed Context to Contract * Changed initialiser of state transition & unexported methods * Removed the Execution object and refactor `Call`, `CallCode` & `Create` in to their own functions instead of being methods. * Removed the hard dep on the state for the VM. The VM now depends on a Database interface returned by the environment. In the process the core now depends less on the statedb by usage of the env * Moved `Log` from package `core/state` to package `core/vm`.
| * core, event/filter, xeth: refactored filter systemJeffrey Wilcke2015-10-032-0/+344
| | | | | | | | | | | | | | Moved the filtering system from `event` to `eth/filters` package and removed the `core.Filter` object. The `filters.Filter` object now requires a `common.Database` rather than a `eth.Backend` and invokes the `core.GetBlockByX` directly rather than thru a "manager".
* | eth/downloader: match capabilities when querying idle peersPéter Szilágyi2015-10-023-8/+53
|/
* eth/downloader: always send termination wakes, clean leftoverPéter Szilágyi2015-09-231-20/+36
|
* core, core/types: readd transactions after chain re-orgJeffrey Wilcke2015-09-221-1/+1
| | | | | | | | | | | | | | Added a `Difference` method to `types.Transactions` which sets the receiver to the difference of a to b (NOTE: not a **and** b). Transaction pool subscribes to RemovedTransactionEvent adding back to those potential missing from the chain. When a chain re-org occurs remove any transactions that were removed from the canonical chain during the re-org as well as the receipts that were generated in the process. Closes #1746
* Merge pull request #1810 from karalabe/pure-header-verifications-2Jeffrey Wilcke2015-09-171-1/+1
|\ | | | | core, eth, miner: use pure header validation
| * core, eth, miner: use pure header validationPéter Szilágyi2015-09-161-1/+1
| |
* | Merge pull request #1801 from fjl/ethdbJeffrey Wilcke2015-09-162-43/+13
|\ \ | | | | | | all: move common.Database to ethdb and add NewBatch
| * | ethdb: remove FlushFelix Lange2015-09-151-33/+2
| | |