aboutsummaryrefslogtreecommitdiffstats
path: root/eth/api.go
Commit message (Collapse)AuthorAgeFilesLines
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-121-11/+11
|
* cmd, core, eth, light, trie: add trie read caching layerPéter Szilágyi2018-11-151-3/+3
|
* internal/ethapi: add eth_chainId method (#17617)HackyMiner2018-09-301-0/+9
| | | This implements EIP-695.
* cmd, eth: clean up miner startup API, drop noop config fieldPéter Szilágyi2018-08-231-36/+11
|
* cmd, eth, miner: make recommit configurable (#17444)gary rong2018-08-221-0/+6
| | | | | | | | | | | | * cmd, eth, miner: make recommit configurable * cmd, eth, les, miner: polish a bit * miner: filter duplicate sealing work * cmd: remove uncessary conversion * miner: avoid microptimization in favor of cleaner code
* consensus/ethash: move remote agent logic to ethash internal (#15853)gary rong2018-08-031-41/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | * consensus/ethash: start remote ggoroutine to handle remote mining * consensus/ethash: expose remote miner api * consensus/ethash: expose submitHashrate api * miner, ethash: push empty block to sealer without waiting execution * consensus, internal: add getHashrate API for ethash * consensus: add three method for consensus interface * miner: expose consensus engine running status to miner * eth, miner: specify etherbase when miner created * miner: commit new work when consensus engine is started * consensus, miner: fix some logics * all: delete useless interfaces * consensus: polish a bit
* eth: conform better to the golint standards (#16783)williambannas2018-06-141-2/+2
| | | | | | * eth: made changes to conform better to the golint standards * eth: fix comment nit
* core: improve getBadBlocks to return full block rlp (#16902)Martin Holst Swende2018-06-111-2/+27
| | | | | | | | * core: improve getBadBlocks to return full block rlp * core, eth, ethapi: changes to getBadBlocks formatting * ethapi: address review concerns
* core/rawdb: separate raw database access to own package (#16666)Péter Szilágyi2018-05-071-2/+6
|
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-2/+2
| | | This commit reduces database I/O by not writing every state trie to disk.
* cmd, core, eth/tracers: support fancier js tracing (#15516)Péter Szilágyi2017-12-211-250/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * cmd, core, eth/tracers: support fancier js tracing * eth, internal/web3ext: rework trace API, concurrency, chain tracing * eth/tracers: add three more JavaScript tracers * eth/tracers, vendor: swap ottovm to duktape for tracing * core, eth, internal: finalize call tracer and needed extras * eth, tests: prestate tracer, call test suite, rewinding * vendor: fix windows builds for tracer js engine * vendor: temporary duktape fix * eth/tracers: fix up 4byte and evmdis tracer * vendor: pull in latest duktape with my upstream fixes * eth: fix some review comments * eth: rename rewind to reexec to make it more obvious * core/vm: terminate tracing using defers
* eth: make tracing API errors more user friendly (#15589)Michael Ruminer2017-12-101-2/+12
|
* eth: return rlp-decoded values from debug_storageRangeAt (#15476)Benoit Verkindt2017-12-061-4/+8
| | | Fixes #15196
* eth, internal: Implement getModifiedAccountsBy(Hash|Number) using trie diffs ↵Nick Johnson2017-11-201-0/+83
| | | | | | | | | | | | (#15512) * eth, internal: Implement using trie diffs * eth, internal: Changes in response to review * eth: More fixes to getModifiedAccountsBy* * eth: minor polishes on error capitalization
* internal, accounts, eth: utilize vm failed flag to help gas estimationrjl4934564422017-10-021-2/+2
|
* eth, internal/ethapi: fix spelling of 'Ethereum' (#15164)Ernesto del Toro2017-09-201-4/+4
|
* core, eth/downloader: commit block data using batches (#15115)Felix Lange2017-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-221-2/+3
|
* eth: fix megacheck warningsEgon Elbre2017-08-081-20/+0
|
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-271-1/+1
| | | | | | | | | 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: update default gas price when not mining tooPéter Szilágyi2017-05-291-1/+9
|
* cmd, core, eth, miner: remove txpool gas price limits (#14442)Péter Szilágyi2017-05-171-1/+3
|
* eth: add debug_storageRangeAtFelix Lange2017-04-251-37/+90
|
* consensus, core, ethstats: use engine specific block beneficiary (#14318)Péter Szilágyi2017-04-121-1/+1
| | | | | | * consensus, core, ethstats: use engine specific block beneficiary * core, eth, les, miner: use explicit beneficiary during mining
* eth: accept transactions when starting CPU mining (#13882)Péter Szilágyi2017-04-101-2/+2
|
* consensus, eth: don't CPU mine by default during remote miningPéter Szilágyi2017-04-071-10/+17
|
* 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-051-41/+52
| | | | | 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.
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-231-1/+1
| | | | | | | | | | 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.
* all: finish integrating Go ethash, delete C++ vendorPéter Szilágyi2017-03-091-22/+3
|
* Logger updates 3 (#3730)Péter Szilágyi2017-03-021-7/+6
| | | | | | | | * 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
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-3/+2
|
* 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
* cmd/geth, core: add support for recording SHA3 preimages (#3543)Nick Johnson2017-01-171-0/+6
|
* eth: accept leading zeros for nonce parameter of submitWork (#3558)Felix Lange2017-01-131-2/+2
|
* all: fix spelling errorsPéter Szilágyi2017-01-071-1/+1
|
* core/vm: improved EVM run loop & instruction calling (#3378)Jeffrey Wilcke2017-01-051-2/+2
| | | | | | | | | | | | | | | 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.
* eth: fix miner start API to accept int, not hexintPéter Szilágyi2016-12-231-2/+2
|
* rpc: remove HexNumber, replace all uses with hexutil typesFelix Lange2016-12-201-17/+15
| | | | | 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
|
* cmd/utils, eth: Add gzip support for chain dump and restoreNick Johnson2016-12-141-2/+17
|
* core, core/vm: implemented a generic environment (#3348)Jeffrey Wilcke2016-12-061-3/+5
| | | | | | | | 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/types, params: EIP#155Jeffrey Wilcke2016-11-131-9/+3
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-2/+3
| | | | | | | | | | | | | | | 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>
* Godeps, vendor: convert dependency management to trash (#3198)Péter Szilágyi2016-10-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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.
* core, eth, trie: reuse trie journals in all our codePéter Szilágyi2016-09-281-3/+3
|
* 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.
* core/vm, eth: Add support for javascript trace functionsNick Johnson2016-08-231-8/+57
|
* 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.
* core: added CheckNonce() to Message interfacezsfelfoldi2016-07-111-2/+2
|
* cmd, common, console, eth, release: drop redundant "full"sPéter Szilágyi2016-06-301-39/+39
|
* Merge pull request #2159 from zsfelfoldi/light-backendPéter Szilágyi2016-06-301-1533/+74
|\ | | | | eth: separate common and full node-specific API and backend service
| * eth: separate common and full node-specific API and backend servicezsfelfoldi2016-06-161-1533/+74
| |
* | 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
* | core: improved chainDb using sequential keyszsfelfoldi2016-06-071-13/+13
|/
* 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-231-67/+113
|\ | | | | eth: add new RPC method (personal.) SignAndSendTransaction
| * eth: add new RPC method (personal.) SignAndSendTransactionBas van Kervel2016-05-201-67/+113
| |
* | accounts/abi/bind, eth: rely on getCode for sanity checks, not estimate and callPéter Szilágyi2016-05-201-15/+0
|/
* 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: 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-021-14/+16
|
* 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
| |
* | accounts/abi/bind, eth: add contract non-existent errorPéter Szilágyi2016-04-271-0/+15
|/
* rpc: remove NotifierContextKeyFelix Lange2016-04-161-2/+2
| | | | | | | 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: update license informationFelix Lange2016-04-151-7/+7
|
* 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
|
* 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-121-64/+26
| | | | | | - Manager.Accounts no longer returns an error. - Manager methods take Account instead of common.Address. - All uses of Account with unkeyed fields are converted.
* rpc: various fixes/enhancementsBas van Kervel2016-04-121-25/+35
| | | | | | | | 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
* rpc: add pub/sub supportBas van Kervel2016-04-021-61/+145
|
* 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
* | core: added basic chain configurationJeffrey Wilcke2016-04-011-10/+14
|/ | | | | | | | | 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-241-93/+197
|\ | | | | core, core/vm, tests: changed the initialisation behaviour of the EVM
| * 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
|/
* eth: various typosLeif Jurvetson2016-03-161-10/+10
|
* 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: 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!).
* | 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
* Merge pull request #2195 from obscuren/gpo-rpcPéter Szilágyi2016-02-111-14/+13
|\ | | | | eth: Added GPO to suggest default gas prices
| * eth: Added GPO to suggest default gas pricesJeffrey Wilcke2016-02-101-14/+13
| | | | | | | | | | | | | | | | | | 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-101-13/+19
| |
* | eth, miner: move the public miner api into eth to access etherbasePéter Szilágyi2016-02-091-0/+52
|/
* eth: sendTransaction would not report the error when tx could not be added ↵Bas van Kervel2016-02-081-1/+1
| | | | to tx pool
* 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-031-104/+94
|
* 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-261-24/+73
|
* core: tx pool skip price validation for "owned" transactionszsfelfoldi2015-12-161-0/+2
|
* core, eth, node, rpc: port the admin and debug APIPéter Szilágyi2015-12-151-15/+202
|
* rpc: new RPC implementation with pub/sub supportBas van Kervel2015-12-141-0/+1216