aboutsummaryrefslogtreecommitdiffstats
path: root/core/tx_pool.go
Commit message (Collapse)AuthorAgeFilesLines
* core: typos and comments improvechanghong2017-05-251-10/+12
| | | | | | | | 1. fix typos 2. methods recevier of struct should be same 3. comments improve (cherry picked from commit 1ba979539582a00b7fd1a7c8a37a6852e59eac0d)
* cmd, core, eth, miner: remove txpool gas price limits (#14442)Péter Szilágyi2017-05-171-74/+195
|
* Merge pull request #3723 from karalabe/logger-updates-2Péter Szilágyi2017-02-281-55/+40
|\ | | | | Logger updates
| * all: next batch of log polishes to contextual versionsPéter Szilágyi2017-02-281-55/+40
| |
* | all: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-281-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/math: optimize PaddedBigBytes, use it more name old time/op new time/op delta PaddedBigBytes-8 71.1ns ± 5% 46.1ns ± 1% -35.15% (p=0.000 n=20+19) name old alloc/op new alloc/op delta PaddedBigBytes-8 48.0B ± 0% 32.0B ± 0% -33.33% (p=0.000 n=20+20) * all: unify big.Int zero checks Various checks were in use. This commit replaces them all with Int.Sign, which is cheaper and less code. eg templates: func before(x *big.Int) bool { return x.BitLen() == 0 } func after(x *big.Int) bool { return x.Sign() == 0 } func before(x *big.Int) bool { return x.BitLen() > 0 } func after(x *big.Int) bool { return x.Sign() != 0 } func before(x *big.Int) int { return x.Cmp(common.Big0) } func after(x *big.Int) int { return x.Sign() } * common/math, crypto/secp256k1: make ReadBits public in package math
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-30/+29
|
* logger: remove Core verbosity level (#3659)Felix Lange2017-02-151-7/+7
|
* 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'
* all: fix spelling errorsPéter Szilágyi2017-01-071-1/+1
|
* all: gofmt -w -sFelix Lange2017-01-061-1/+1
|
* core, light: allow zero cost txs from inexistent accounts tooPéter Szilágyi2016-12-161-16/+8
|
* core: init pending state in tx pool on creationBas van Kervel2016-12-131-10/+4
|
* core: bugfix state change race condition in txpool (#3412)bas-vk2016-12-111-29/+36
| | | | | | | | The transaction pool keeps track of the current nonce in its local pendingState. When a new block comes in the pendingState is reset. During the reset it fetches multiple times the current state through the use of the currentState callback. When a second block comes in during the reset its possible that the state changes during the reset. If that block holds transactions that are currently in the pool the local pendingState that is used to determine nonces can get out of sync.
* core/types, params: EIP#155Jeffrey Wilcke2016-11-131-7/+11
|
* 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>
* core: metrics collection for transaction events (#3157)Martin Holst Swende2016-11-011-0/+30
| | | | | | | | | | | | | | | | * core: Add metrics collection for transaction events; replace/discard for pending and future queues, as well as invalid transactions * core: change namespace for txpool metrics * core: define more metrics (not yet used) * core: implement more tx metrics for when transactions are dropped * core: minor formatting tweeks (will squash later) * core: remove superfluous meter, fix missing pending nofunds * core, metrics: switch txpool meters to counters
* core: add global (soft) limits on the pending transactionsPéter Szilágyi2016-10-141-5/+60
|
* core: lower transaction pool max queue limitFelix Lange2016-10-101-1/+1
|
* core/state: implement reverts by journaling all changesFelix Lange2016-10-061-1/+1
| | | | | | | | | | 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: abstract out a sorted transaction hash mapPéter Szilágyi2016-09-021-7/+9
|
* core: add upper bound on the queued transctionsPéter Szilágyi2016-09-021-9/+99
|
* core, eth, internal, miner: optimize txpool for quick opsPéter Szilágyi2016-09-021-288/+215
|
* core, eth, miner: only retain 1 tx/nonce, remove bad onesPéter Szilágyi2016-09-021-124/+158
|
* core: add missing lock in TxPool.{GetTransaction,RemoveTx}Felix Lange2016-06-031-1/+10
| | | | Fixes #2650
* core, eth, miner: improve shutdown synchronisationFelix Lange2016-05-091-4/+7
| | | | | | | | | | | | | | | | | | | | 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.
* core: added basic chain configurationJeffrey Wilcke2016-04-011-3/+4
| | | | | | | | | 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.
* core: various typosLeif Jurvetson2016-03-161-3/+3
|
* core, core/vm, crypto: fixes for homesteadJeffrey Wilcke2016-02-181-0/+617
* Removed some strange code that didn't apply state reverting properly * Refactored code setting from vm & state transition to the executioner * Updated tests