aboutsummaryrefslogtreecommitdiffstats
path: root/miner
Commit message (Collapse)AuthorAgeFilesLines
* Rebrand as tangerine-network/go-tangerineWei-Ning Huang2019-09-177-61/+61
|
* app: remove pending block logic (#149)bojie2019-06-121-1/+1
|
* miner: fix testWei-Ning Huang2019-06-121-1/+1
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-127-61/+61
|
* all: simplify timestamps to uint64 (#19372)Martin Holst Swende2019-04-081-3/+3
| | | | | | | | | | | | | | * all: simplify timestamps to uint64 * tests: update definitions * clef, faucet, mobile: leftover uint64 fixups * ethash: fix tests * graphql: update schema for timestamp * ethash: remove unused variable
* core, internal, eth, miner, les: Take VM config from BlockChain (#17955)Paweł Bylica2018-12-061-2/+1
| | | | | | | | | | | Until this commit, when sending an RPC request that called `NewEVM`, a blank `vm.Config` would be taken so as to set some options, based on the default configuration. If some extra configuration switches were passed to the blockchain, those would be ignored. This PR adds a function to get the config from the blockchain, and this is what is now used for RPC calls. Some subsequent changes need to be made, see https://github.com/ethereum/go-ethereum/pull/17955#pullrequestreview-182237244 for the details of the discussion.
* miner: fix miner stress test (#18039)gary rong2018-11-072-30/+16
|
* miner: remove intermediate conversion to int in tests (#17853)Felix Lange2018-10-081-2/+2
| | | This fixes the tests on 32bit platforms.
* all: fix various comment typos (#17748)Liang ZOU2018-09-251-1/+1
|
* eth, miner: prefer locally generated uncles vs remote ones (#17715)gary rong2018-09-213-26/+52
| | | | | | * core, eth: fix dependency cycle * eth, miner: perfer to locally generated uncle
* all: protect self-mined block during reorg (#17656)gary rong2018-09-201-1/+1
|
* consensus/clique, core: chain maker clique + error testsPéter Szilágyi2018-09-111-0/+1
|
* miner: keep the timestamp for resubmitted mining block (#17547)gary rong2018-08-291-10/+13
|
* Merge pull request #17540 from karalabe/miner-uncle-fixPéter Szilágyi2018-08-292-51/+63
|\ | | | | miner: track uncles more aggressively
| * miner: track uncles more aggressivelyPéter Szilágyi2018-08-292-51/+63
| |
* | cmd, core, eth, miner, params: configurable gas floor and ceilPéter Szilágyi2018-08-295-5/+14
|/
* consensus, miner: stale block mining support (#17506)gary rong2018-08-281-67/+49
| | | | | | | | | | * consensus, miner: stale block supporting * consensus, miner: refactor seal signature * cmd, consensus, eth: add miner noverify flag * cmd, consensus, miner: polish
* Merge pull request #17494 from karalabe/mined-block-uncle-checkPéter Szilágyi2018-08-233-14/+36
|\ | | | | miner: differentiate between uncle and lost block
| * miner: differentiate between uncle and lost blockPéter Szilágyi2018-08-233-14/+36
| |
* | miner: fix state commit, track old work packages too (#17490)gary rong2018-08-231-23/+52
|/ | | | | | | | | | * miner: commit state which is relative with sealing result * consensus, core, miner, mobile: introduce sealHash interface * miner: evict pending task with threshold * miner: go fmt
* miner: add two stress tests based on clique and ethashPéter Szilágyi2018-08-232-0/+414
|
* cmd, core, miner: add --txpool.locals and priority miningPéter Szilágyi2018-08-221-4/+19
|
* cmd, eth, miner: make recommit configurable (#17444)gary rong2018-08-223-42/+276
| | | | | | | | | | | | * 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
* miner: fix uncle iteration logic (#17469)gary rong2018-08-211-2/+2
|
* miner: update mining log with correct fee calculationPéter Szilágyi2018-08-171-2/+2
|
* miner: add gas and fee details to mining logsPéter Szilágyi2018-08-161-2/+10
|
* miner: regenerate mining work every 3 seconds (#17413)gary rong2018-08-162-130/+267
| | | | | | * miner: regenerate mining work every 3 seconds * miner: polish
* miner: streaming uncle blocks (#17320)gary rong2018-08-152-50/+125
| | | | | | * miner: stream uncle block * miner: polish
* miner: move agent logic to worker (#17351)gary rong2018-08-144-471/+642
| | | | | | | | * miner: move agent logic to worker * miner: polish * core: persist block before reorg
* miner: seperate state, receipts for different mining work (#17323)gary rong2018-08-062-64/+67
|
* consensus/ethash: move remote agent logic to ethash internal (#15853)gary rong2018-08-034-302/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* miner: fix state locking while writing to chain (issue #16933) (#17173)ledgerwatch2018-07-311-0/+2
|
* all: switch out defunct set library to different one (#16873)Ralph Caraveo III2018-07-161-10/+10
| | | | | | * keystore, ethash, eth, miner, rpc, whisperv6: tech debt with now defunct set. * whisperv5: swap out gopkg.in/fatih/set.v0 with supported set
* params: fix golint warnings (#16853)kiel barry2018-06-051-1/+1
| | | params: fix golint warnings
* miner: not call commitNewWork if it's a side block (#16751)Mark2018-06-051-10/+0
|
* core, eth: minor txpool event cleanupsPéter Szilágyi2018-05-181-8/+8
|
* all: collate new transaction events togetherrjl4934564422018-05-181-18/+27
|
* miner: remove contention on currentMu for pending data retrievals (#16497)Ryan Schneider2018-04-161-18/+33
|
* miner: remove duplicated code (#15968)stompesi2018-03-161-2/+1
|
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-1/+1
| | | This commit reduces database I/O by not writing every state trie to disk.
* miner: avoid unnecessary work (#15883)Jim McDonald2018-01-151-0/+5
|
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-031-2/+1
|
* all: fix code comment typos (#15547)Ricardo Domingos2017-11-241-1/+1
| | | | | | | | | | | | * console: fix typo in comment * contracts/release: fix typo in comment * core: fix typo in comment * eth: fix typo in comment * miner: fix typo in comment
* cmd, consensus, core, miner: instatx clique for --dev (#15323)Péter Szilágyi2017-10-241-0/+5
| | | | | | | | * cmd, consensus, core, miner: instatx clique for --dev * cmd, consensus, clique: support configurable --dev block times * cmd, core: allow --dev to use persistent storage too
* miner: fix typoterasum2017-10-121-1/+1
|
* miner: make starting of CPU agent more reliable (#15148)Mark2017-09-191-11/+12
|
* core: only fire one chain head per batch (#15123)Péter Szilágyi2017-09-111-45/+30
| | | | | | * core: only fire one chain head per batch * miner: announce chan events synchronously
* core, eth/downloader: commit block data using batches (#15115)Felix Lange2017-09-101-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/types, miner: avoid tx sender miscaching (#14773)Mark2017-09-081-2/+2
|
* core, eth: add bloombit indexer, filter based on itZsolt Felfoldi2017-09-061-2/+0
|
* core: make txpool operate on immutable statePéter Szilágyi2017-09-051-7/+14
|
* core, light: send chain events using event.Feed (#14865)Miya Chen2017-08-181-13/+55
|
* miner: fix megacheck warningsEgon Elbre2017-08-072-13/+5
|
* core: remove redundant storage of transactions and receipts (#14801)Péter Szilágyi2017-07-151-3/+1
| | | | | | | | | | | | | | * 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
* 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).
* consensus, core/*, params: metropolis preparation refactorJeffrey Wilcke2017-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This commit is a preparation for the upcoming metropolis hardfork. It prepares the state, core and vm packages such that integration with metropolis becomes less of a hassle. * Difficulty calculation requires header instead of individual parameters * statedb.StartRecord renamed to statedb.Prepare and added Finalise method required by metropolis, which removes unwanted accounts from the state (i.e. selfdestruct) * State keeps record of destructed objects (in addition to dirty objects) * core/vm pre-compiles may now return errors * core/vm pre-compiles gas check now take the full byte slice as argument instead of just the size * core/vm now keeps several hard-fork instruction tables instead of a single instruction table and removes the need for hard-fork checks in the instructions * core/vm contains a empty restruction function which is added in preparation of metropolis write-only mode operations * Adds the bn256 curve * Adds and sets the metropolis chain config block parameters (2^64-1)
* cmd, core, eth, miner: remove txpool gas price limits (#14442)Péter Szilágyi2017-05-172-72/+9
|
* consensus, core, ethstats: use engine specific block beneficiary (#14318)Péter Szilágyi2017-04-121-6/+6
| | | | | | * consensus, core, ethstats: use engine specific block beneficiary * core, eth, les, miner: use explicit beneficiary during mining
* consensus, core: drop all the legacy custom core error typesPéter Szilágyi2017-04-061-12/+12
|
* miner: don't verify our own blocks, trust the enginePéter Szilágyi2017-04-061-10/+0
|
* core, consensus: pluggable consensus engines (#3817)Péter Szilágyi2017-04-055-108/+96
| | | | | 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: finish integrating Go ethash, delete C++ vendorPéter Szilágyi2017-03-091-1/+3
|
* all: swap out the C++ ethash to the pure Go one (mining todo)Péter Szilágyi2017-03-093-7/+6
|
* common: move big integer math to common/math (#3699)Felix Lange2017-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-235-38/+35
|
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-141-1/+1
| | | | | | | | | | | | | | | | | 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
* Revert "params: core, core/vm, miner: 64bit gas instructions (#3514)"Jeffrey Wilcke2017-02-131-1/+1
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* accounts, cmd, eth, internal, miner, node: wallets and HD APIsPéter Szilágyi2017-02-131-2/+5
|
* Merge pull request #3605 from fjl/event-feedPéter Szilágyi2017-02-031-1/+1
|\ | | | | event: add new Subscription type and related utilities
| * event: deprecate TypeMux and related typesFelix Lange2017-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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-021-1/+1
|/ | | | | | | | | | | | | | | | 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
* eth: accept leading zeros for nonce parameter of submitWork (#3558)Felix Lange2017-01-132-2/+4
|
* all: fix spelling errorsPéter Szilágyi2017-01-071-1/+1
|
* logger, pow/dagger, pow/ezp: delete dead codeFelix Lange2017-01-071-2/+0
|
* all: fix issues reported by honnef.co/go/simple/cmd/gosimpleFelix Lange2017-01-071-1/+1
|
* all: gofmt -w -sFelix Lange2017-01-061-1/+1
|
* core/vm: move Log to core/typesFelix Lange2017-01-061-6/+6
| | | | | | | | 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-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, miner: verify PoW in the remote agent to notify submitter (#3438)Péter Szilágyi2016-12-201-12/+21
|
* miner: rename pending to unconformed, add bounds and ops testsPéter Szilágyi2016-12-133-30/+117
|
* miner: clean up unconfirmed mined block trackingPéter Szilágyi2016-12-132-74/+130
|
* miner: fix data race on setting etherbase/extradataPéter Szilágyi2016-12-132-10/+12
|
* miner: fix a race between remote agent start/loopPéter Szilágyi2016-12-131-11/+14
|
* core: bugfix state change race condition in txpool (#3412)bas-vk2016-12-111-1/+8
| | | | | | | | 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.
* eth, miner: removed unnecessary state.Copy()Martin Holst Swende2016-11-302-0/+24
| | | | | | | | * 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-281-2/+17
|
* miner: remove dead code, add gas price getterPéter Szilágyi2016-11-241-3/+4
|
* core/types, params: EIP#155Jeffrey Wilcke2016-11-131-3/+16
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-132-14/+7
| | | | | | | | | | | | | | | 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>
* miner: copy pending state before handing it to callers (#3162)Nick Johnson2016-10-191-1/+1
| | | The pending state was not copied while not mining, leading to a data race.
* 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!
* core, eth, trie: reuse trie journals in all our codePéter Szilágyi2016-09-281-1/+1
|
* miner: set tx index logsBas van Kervel2016-09-121-1/+2
|
* Merge pull request #2949 from elliots/fix/#2948Péter Szilágyi2016-09-021-12/+4
|\ | | | | miner: Prevent attempts to close nil quit channel in agent (fixes #2948)
| * miner: Move CpuAgent channel creation from Start() to initialization (fixes ↵☃ Elliot Shepherd2016-08-251-12/+4
| | | | | | | | | | | | #2948) Also remove the now un-needed mutex locking in Start() and Stop()
* | core/types, miner: switch over to the grouped tx setsPéter Szilágyi2016-09-021-87/+40
| |
* | core, eth, internal, miner: optimize txpool for quick opsPéter Szilágyi2016-09-021-4/+3
| |
* | core, eth, miner: only retain 1 tx/nonce, remove bad onesPéter Szilágyi2016-09-021-5/+5
|/
* core, miner: move Backend to minerFelix Lange2016-08-172-7/+24
| | | | | This ensures that package core doesn't depend on package accounts and resolves an age-old TODO.
* cmd, core, eth, miner, params, tests: finalize the DAO forkPéter Szilágyi2016-07-151-1/+1
|
* core, params, tests: add DAO hard-fork balance movesPéter Szilágyi2016-07-151-0/+4
|
* cmd, core, miner: add extradata validation to consensus rulesPéter Szilágyi2016-07-151-2/+8
|
* cmd/geth, miner, params: special extradata for DAO fork startPéter Szilágyi2016-07-151-1/+9
|
* core: improved chainDb using sequential keyszsfelfoldi2016-06-071-2/+2
|
* miner: fixed pending state by not shutting down update loopJeffrey Wilcke2016-05-101-4/+0
|
* core, eth, miner: improve shutdown synchronisationFelix Lange2016-05-091-34/+28
| | | | | | | | | | | | | | | | | | | | 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.
* all: fix go vet warningsFelix Lange2016-04-151-5/+5
|
* accounts: streamline APIFelix Lange2016-04-121-1/+1
| | | | | | - Manager.Accounts no longer returns an error. - Manager methods take Account instead of common.Address. - All uses of Account with unkeyed fields are converted.
* core, miner: remove Frontier canaryPéter Szilágyi2016-04-041-12/+8
|
* cmd/utils, miner: A/B testing JIT VM. Disabled for minersJeffrey Wilcke2016-04-011-1/+9
| | | | | | | | | | This PR introduces a 10% probability that you'll run the client with the JIT enabled testing the new client and helps us potentially catch errors when reported. This feature is **disabled** for miners (disabling the JIT completely). The JIT can however be force for miners if they enable both --jitvm and --forcejit.
* core: added basic chain configurationJeffrey Wilcke2016-04-012-6/+11
| | | | | | | | | 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.
* Merge pull request #2141 from obscuren/evm-initJeffrey Wilcke2016-03-241-1/+1
|\ | | | | core, core/vm, tests: changed the initialisation behaviour of the EVM
| * core: Added EVM configuration optionsJeffrey Wilcke2016-03-241-1/+1
| | | | | | | | | | 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-162-15/+6
|/
* core, miner: add PendingStateEvent to track non-log updatesPéter Szilágyi2016-02-291-2/+9
|
* core, core/vm, crypto: fixes for homesteadJeffrey Wilcke2016-02-181-1/+2
| | | | | | * Removed some strange code that didn't apply state reverting properly * Refactored code setting from vm & state transition to the executioner * Updated tests
* eth/filters: ✨ pending logs ✨Jeffrey Wilcke2016-02-131-8/+15
| | | | | | 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.
* eth, miner: move the public miner api into eth to access etherbasePéter Szilágyi2016-02-091-75/+0
|
* miner: register newly created remote agent in the APIPéter Szilágyi2016-02-031-1/+4
|
* Merge pull request #2143 from karalabe/fix-transaction-sort-2Jeffrey Wilcke2016-01-281-5/+4
|\ | | | | core, core/types, miner: fix transaction nonce-price combo sort
| * core, core/types, miner: fix transaction nonce-price combo sortPéter Szilágyi2016-01-221-5/+4
| |
* | rpc: migrated the RPC insterface to a new reflection based RPC layerBas van Kervel2016-01-261-1/+1
|/
* rpc: new RPC implementation with pub/sub supportBas van Kervel2015-12-142-0/+73
|
* miner: bugfix were blockhash in receipts and logs is left emptyBas van Kervel2015-11-191-0/+11
|
* core, eth, miner, xeth: clean up tx/receipt db accessorsPéter Szilágyi2015-11-191-3/+3
|
* core, eth, rpc: split out block validator and state processorJeffrey Wilcke2015-11-181-10/+11
| | | | | | | | | | | | 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).
* miner: synchronise start / stopJeffrey Wilcke2015-10-311-5/+12
| | | | | | This PR fixes an issue where the remote worker was stopped twice and not properly handled. This adds a synchronised running check to the start and stop methods preventing closing of a channel more than once.
* cmd/utils, rpc/comms: stop XEth when IPC connection endsFelix Lange2015-10-303-20/+32
| | | | | | | | | | | 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.
* Merge pull request #1889 from karalabe/fast-sync-rebaseJeffrey Wilcke2015-10-221-1/+1
|\ | | | | eth/63 fast synchronization algorithm
| * core, eth: receipt chain reconstructionPéter Szilágyi2015-10-191-1/+1
| |
* | core, core/state: move gas tracking out of core/stateFelix Lange2015-10-171-13/+12
|/ | | | | | | The amount of gas available for tx execution was tracked in the StateObject representing the coinbase account. This commit makes the gas counter a separate type in package core, which avoids unintended consequences of intertwining the counter with state logic.
* Merge pull request #1899 from obscuren/mipmap-bloomJeffrey Wilcke2015-10-171-0/+2
|\ | | | | core, eth/filters, miner, xeth: Optimised log filtering
| * core, eth/filters, miner, xeth: Optimised log filteringJeffrey Wilcke2015-10-171-0/+2
| | | | | | | | | | | | | | 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.
* | Merge pull request #1869 from Gustav-Simonsson/gpu_minerJeffrey Wilcke2015-10-161-1/+1
|\ \ | | | | | | all: Add GPU mining, disabled by default
| * | all: Add GPU mining, disabled by defaultGustav Simonsson2015-10-071-1/+1
| | |
* | | core/state, core, miner: handle missing root error from state.NewGustav Simonsson2015-10-161-3/+12
| |/ |/|
* | core, eth, event, miner, xeth: fix event post / subscription racePéter Szilágyi2015-10-122-8/+13
| |
* | cmd/geth, cmd/utils, core, rpc: renamed to blockchainJeffrey Wilcke2015-10-041-2/+2
| | | | | | | | | | | | * 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-041-1/+2
|/ | | | | | | | | | | | | | | | | * 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, core/state: batch-based state syncFelix Lange2015-09-231-3/+2
|
* 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
| |
* | all: move common.Database to package ethdbFelix Lange2015-09-152-3/+5
|/
* core: split out TD from database and all internalsPéter Szilágyi2015-09-111-3/+1
|
* put unlock after lockBas van Kervel2015-09-081-5/+3
|
* agent/miner Prevent the CpuAgent to be started multiple timesBas van Kervel2015-09-081-2/+12
|
* fix block time issueChristoph Jentzsch2015-09-031-1/+1
| | | | | | | currently, under normal circumstances, you always set the timestamp to previous.Time() + 1. credits to https://www.reddit.com/r/ethereum/comments/3jcs5r/code_avg_block_time_vs_difficulty_adjustment/cuoi4op style
* Improve error string and remove unneeded else clauseGustav Simonsson2015-08-281-2/+1
|
* rpc: return error code for eth_getWork when no work readyGustav Simonsson2015-08-261-3/+5
|
* Add tests for uncle timestamps and refactor timestamp typeGustav Simonsson2015-08-251-5/+5
|
* core, miner: write miner receiptsJeffrey Wilcke2015-08-191-2/+5
|
* core, eth, trie, xeth: merged state, chain, extra databases in oneJeffrey Wilcke2015-08-081-5/+5
|
* Merge pull request #1595 from obscuren/extra-dataJeffrey Wilcke2015-08-071-1/+8
|\ | | | | cmd/geth, eth: added canonical extra data
| * miner, rpc: added length check for extra dataJeffrey Wilcke2015-08-071-1/+8
| |
* | miner, rpc: added submit hashrate for remote agentsJeffrey Wilcke2015-08-062-4/+44
|/
* miner, core: sort txs by price, nonceJeffrey Wilcke2015-08-051-1/+34
|
* Merge pull request #1588 from obscuren/diff-bombJeffrey Wilcke2015-08-051-1/+1
|\ | | | | core, miner: added difficulty bomb
| * core, miner: added difficulty bombJeffrey Wilcke2015-08-051-1/+1
| |
* | miner: fixed worker race conditionJeffrey Wilcke2015-08-051-43/+44
|/
* all: fix license headers one more timeFelix Lange2015-07-244-4/+4
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-234-16/+16
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* miner: fix current work data racePéter Szilágyi2015-07-201-2/+3
|
* miner: moved state syncJeffrey Wilcke2015-07-161-1/+1
| | | | Moved the state sync so it only syncs the state when the block mining yield a possitive result
* miner: smart miningJeffrey Wilcke2015-07-163-105/+149
| | | | | | | | | Work is now handled and carried over multiple sessions. Previously one session only was assumed, potentially resulting in invalid (outdated) work * Larger work / result queue * Full validation option
* Merge pull request #1441 from obscuren/logs-return-fixJeffrey Wilcke2015-07-091-0/+1
|\ | | | | miner, xeth: fire log event during mining. Fix return raw tx
| * miner, xeth: fire log event during mining. Fix return raw txJeffrey Wilcke2015-07-081-0/+1
| |
* | Use uint64 on ts in chain_manager, block_processorGustav Simonsson2015-07-081-1/+1
|/
* all: add some godoc synopsis commentsFelix Lange2015-07-071-0/+1
|
* all: update license informationFelix Lange2015-07-074-0/+64
|
* eth,miner,rpc: set coinbaseJeffrey Wilcke2015-07-072-0/+11
|
* core, miner: removed vm errors from consensus err checkingJeffrey Wilcke2015-07-061-7/+7
| | | | | Removed VM errors from the consensus errors. They now used for output only.
* core, miner, tests: added test, implemented bad block reportingJeffrey Wilcke2015-07-051-2/+0
|
* core, miner, tests: renamed state methodsJeffrey Wilcke2015-07-041-1/+1
| | | | | | | | | | | | * Update => SyncIntermediate * Added SyncObjects SyncIntermediate only updates whatever has changed, but, as a side effect, requires much more disk space. SyncObjects will only sync whatever is required for a block and will not save intermediate state to disk. As drawback this requires more time when more txs come in.
* core, eth, miner, xeth: receipt storage fixJeffrey Wilcke2015-07-041-1/+1
| | | | | * Added GetReceiptsFromBlock, GetReceipt, PutReceipts * Added ContractAddress to receipt. See #1042
* miner: ignore future errorsJeffrey Wilcke2015-07-031-1/+1
|
* core, miner: miner header validation, transaction & receipt writingJeffrey Wilcke2015-07-031-5/+30
| | | | | | | | * Miners do now verify their own header, not their state. * Changed old putTx and putReceipts to be exported * Moved writing of transactions and receipts out of the block processer in to the chain manager. Closes #1386 * Miner post ChainHeadEvent & ChainEvent. Closes #1388
* Use uint64 for block header timestampGustav Simonsson2015-06-301-3/+3
|
* core, miner: added queued write to WriteBlockJeffrey Wilcke2015-06-301-1/+1
| | | | | | | | This fixes an issue with the lru cache not being available when calling WriteBlock. WriteBlock previously always assumed to be called from the InsertChain where the lru cache was always created prior to calling WriteBlock. When being called from the worker this could lead in to a nil pointer exception being thrown and causing database corruption.
* Merge branch 'miner-broadcast' into core-optimisations-2Jeffrey Wilcke2015-06-301-23/+34
|\ | | | | | | | | | | Conflicts: core/chain_manager.go miner/worker.go
| * core, miner: implemented canaryJeffrey Wilcke2015-06-291-0/+6
| |
| * core, miner: added write block method & changed mining propagationJeffrey Wilcke2015-06-291-28/+28
| |
| * miner: broadcast block before insertion/validationJeffrey Wilcke2015-06-291-1/+6
| |
* | miner: update root only when miningJeffrey Wilcke2015-06-301-4/+6
| |
* | core/types: make blocks immutableFelix Lange2015-06-303-105/+89
|/
* core, miner, xeth: renamed gas methodsobscuren2015-06-211-1/+1
| | | | | | * BuyGas => SubGas * RefundGas => AddGas * SetGasPool => SetGasLimit
* core, miner: tx pool drops txs below ask priceobscuren2015-06-152-3/+6
|
* miner: update gas used after tx proc for pending blockobscuren2015-06-101-1/+2
|
* crash fix: skip deep log if self.chain is not caught upJason Carver2015-06-091-1/+1
| | | | @see trace https://gist.github.com/eupraxic/87fdfefe702c51d5944d
* core, eth, miner: moved nonce management to tx pool.obscuren2015-06-041-4/+0
| | | | | | | | Removed the managed tx state from the chain manager to the transaction pool where it's much easier to keep track of nonces (and manage them). The transaction pool now also uses the queue and pending txs differently where queued txs are now moved over to the pending queue (i.e. txs ready for processing and propagation).
* build server fixobscuren2015-05-281-0/+4
|
* miner: Added 5 blocks wait in prep for #1067obscuren2015-05-271-4/+5
|
* core, miner: fixed miner time issue and removed future blocksobscuren2015-05-271-3/+4
| | | | | | | * Miner should no longer generate blocks with a time stamp less or equal than it's parent. * Future blocks are no longer processed and queued directly. Closes #1118
* deep-mining-log: need ring buffer to be one bigger for all-blocks-mined caseJason Carver2015-05-271-1/+1
|
* deep-mining-log: only track non-stale blocksJason Carver2015-05-271-2/+2
| | | | if you track stale blocks, then you quickly overflow your ring buffer in the local network case where you're mining every block and generating a lot of stales.
* do not export ring buffer structJason Carver2015-05-241-4/+4
|
* do not export constant for when to log a deep block you minedJason Carver2015-05-241-4/+4
|
* Log locally mined blocks, after they are 5-deep in the chainJason Carver2015-05-231-0/+59
| | | | | | | | | | | This helps determine which blocks are unlikely to end up as uncles * Store the 5 most recent locally mined block numbers * On every imported block, check if the 5-deep block num is in that store * Also confirm that the block is signed with miner's coinbase Why not just check the coinbase? This log is useful if you're running multiple miners and want to know if *this* miner is performing well.
* miner: moved break INSIDE the switch ...obscuren2015-05-221-4/+5
|
* miner: on downloader.Done/Fail stop immediately. Ignore pending evsobscuren2015-05-221-0/+2
|
* miner: one-shot update loopobscuren2015-05-211-0/+6
|
* fix solc tests unskipzelig2015-05-201-0/+1
|
* Merge pull request #1022 from obscuren/parallel_nonce_checksJeffrey Wilcke2015-05-191-1/+7
|\ | | | | Parallelise nonce checks
| * miner: stale block notificationobscuren2015-05-191-1/+7
| |
* | fixed issue when miner is not stopping af stop commandBas van Kervel2015-05-181-0/+6
| |
* | fixed race condition in minerBas van Kervel2015-05-181-12/+7
|/
* eth/downloader: moved start eventobscuren2015-05-161-0/+1
| | | | Start event has moved because it could possibly could stall the miner
* Adjust miner coinbase and not just miner worker coinbaseVitalik Buterin2015-05-161-0/+1
|
* miner: mutex locks on cpu agent. Closes #1007obscuren2015-05-161-16/+23
|
* miner: properly check for mining operation on Registerobscuren2015-05-161-1/+1
|
* core, miner: fork resolving and restart miner after sync opobscuren2015-05-161-0/+1
| | | | Fork resolving fixes #940
* eth, eth/downloader, miner: use download events to check miner startobscuren2015-05-151-13/+55
|
* Merge pull request #969 from Gustav-Simonsson/ethash_improve_hashrate_update2Jeffrey Wilcke2015-05-142-8/+3
|\ | | | | Make read of ethash hashrate atomic and update ethash godep
| * Make read of ethash hashrate atomic and update ethash godepGustav Simonsson2015-05-142-8/+3
| |
* | Combined two loopsVitalik Buterin2015-05-141-3/+1
| |
* | Created separate family and ancestors environment objectsVitalik Buterin2015-05-141-2/+10
|/
* Update key store to new spec but keep address field for nowGustav Simonsson2015-05-121-1/+1
| | | | * Also fix address types post-rebase
* miner, cmd/geth: miner will not ignored owned account transactionsobscuren2015-05-121-25/+31
| | | | Miner does not ignore low gas txs from accounts that are owned.
* cmd/geth, miner, backend, xeth: Fixed miner threads to be settableobscuren2015-05-113-29/+33
| | | | | Miner threads are now settable through the admin interface (closes #897) and specify 0 CPU worker threads when eth_getWork is called (closes #916)
* Return 32-byte hashes from GetWorkTaylor Gerring2015-05-111-2/+2
| | | | Ensures that the Get Work results are a consistent length. Closes #917
* miner: added log message for mining operation. #912obscuren2015-05-111-0/+4
|
* core: optimise pending transaction processingobscuren2015-05-111-85/+101
|
* core, eth, miner: improved tx removal & fatal error on db sync errobscuren2015-05-111-7/+35
| | | | | | | | * core: Added GasPriceChange event * eth: When one of the DB flush methods error a fatal error log message is given. Hopefully this will prevent corrupted databases from occuring. * miner: remove transactions with low gas price. Closes #906, #903
* miner, tests: fixed block testobscuren2015-05-091-0/+5
|
* miner: start/stop mutex locked. Closes #887obscuren2015-05-091-0/+9
|
* miner: moved gasprice to non-methodobscuren2015-05-091-9/+12
|
* miner, cmd/geth: settable gas price from flags and consoleobscuren2015-05-092-0/+32
| | | | | * --gasprice "<num>" flag * admin.miner.setGasPrice( <num> )
* Integrate new ethash API and change geth makedag cmdGustav Simonsson2015-05-052-8/+1
|
* core: return the index of the block that failed when inserting a chainobscuren2015-04-291-1/+1
|
* core, miner: added value check on tx validationobscuren2015-04-261-1/+1
| | | | | | * Changed CalcGasLimit to no longer need current block * Added a gas * price + value on tx validation * Transactions in the pool are now re-validated once every X
* miner: show error message for gas limit per accountobscuren2015-04-231-2/+2
|
* xeth, miner: updated some loggingobscuren2015-04-231-2/+1
|
* miner: use 32bit atomic operationsFelix Lange2015-04-221-11/+12
| | | | 64bit atomic operations are not available on all 32bit platforms.
* miner: ignore a tx's transactor after a gas limit has been returnedobscuren2015-04-211-3/+19
| | | | | | | | | When worker encounters a gas limit error, subsequent txs should be ignored from that particular account. This will prevent: 1. Nonce errors been thrown all around 2. The "Known tx" error. Closes #719 3. Repeated contract address. Closes #731
* miner: go fmtobscuren2015-04-201-8/+7
|
* Switched getWork third output from difficulty to targetVitalik Buterin2015-04-201-1/+8
|
* miner: fixed remote miner current workobscuren2015-04-201-1/+2
|
* miner: removed default timer & update dag when threads > 0obscuren2015-04-202-16/+8
|
* add extra space to miner iconFabian Vogelsteller2015-04-171-1/+1
|
* miner: start a newly registered agent if the miner is running. Closes #681obscuren2015-04-152-3/+9
|
* miner: moved bad uncle logging to ridiculous log level. Closes #720obscuren2015-04-151-2/+5
|
* miner: don't break loop when encountering gas limit reach errobscuren2015-04-141-8/+7
| | | | | Processing transactions should continue when a transaction throws a gas limit reached error. Other transactions may actually succeed.
* Improved transaction poolobscuren2015-04-091-1/+1
| | | | | | | | | | The transaction pool will now some easily be able to pre determine the validity of a transaction by checking the following: * Account existst * gas limit higher than the instrinsic gas * enough funds to pay upfront costs * nonce check
* Changed how logs are being recordedobscuren2015-04-081-0/+2
| | | | | | | Logs are now recorded per transactions instead of tossing them out after each transaction. This should also fix an issue with `eth_getFilterLogs` (#629) Also now implemented are the `transactionHash, blockHash, transactionIndex, logIndex` on logs. Closes #654.
* fixed stop of minerobscuren2015-04-081-14/+12
|
* Updated loggingobscuren2015-04-071-6/+11
|
* Fixed pending statesobscuren2015-04-072-20/+64
|
* Block header changed & console miner controlobscuren2015-04-062-4/+10
| | | | | | * miner control moved to `admin.miner` * miner option to set extra data * block extra now bytes
* removed hash rate from info log. Added hashrate js funcobscuren2015-04-051-1/+1
|
* Updated loggingobscuren2015-04-053-13/+18
|
* Make sure we're not mining on an invalid TSobscuren2015-04-041-0/+3
|