aboutsummaryrefslogtreecommitdiffstats
path: root/core/tx_pool.go
Commit message (Collapse)AuthorAgeFilesLines
* remove dexon/crypto/sha3 pkg.Jhih-Ming Huang2019-05-061-3/+3
|
* app: new app test flow (#244)bojie2019-04-091-0/+8
|
* core: vm: flatten governanceWei-Ning Huang2019-04-091-2/+2
|
* core: Fixed gas price (#205)Jimmy Hu2019-04-091-1/+43
| | | | | | | | | | * core/vm: update abi * core/vm: add MinGasPrice to gov * params: Add MinGasPrice to Config * dex: SuggestPrice from Governance * test: add minGasPrice to genesis.json * core: check underpriced tx * dex: verify with gas price
* app: remove pending block logic (#149)bojie2019-04-091-54/+23
|
* core/types: SigCache with a limited size (#98)Jimmy Hu2019-04-091-1/+0
| | | | | | * core/types: SigCache with a limited size * minor tweaks
* core, dex, internal: block proposer syncing (first iteration) (#96)Sonic2019-04-091-53/+0
| | | | | | | | | | | | | | | | | | | | | | * dex, internal: block proposer syncing (first iteration) * core: find block from db if not in memory This fix handles stopping proposing and then restarting * core: no need to reorg when reset Dexon will not fork. This commit also fix when a block confirm but its parent is not in db yet, during restarting proposing. * dex: always accept NewBlockMsg, NewBlockHashesMsg We need to accept NewBlockMsg, NewBlockHashesMsg to sync current block with other peers in block proposer mode when syncing lattice data. It's a waste when the node is synced and start proposing. Todo: control msg processing on/off more granular, accept NewBlockMsg, NewBlockHashesMsg when syncing, but stop when synced.
* cache: prune cache correctly (#88)bojie2019-04-091-2/+1
|
* core: various changes on tps tuning (#46)Wei-Ning Huang2019-04-091-1/+1
|
* core: increase tx pool sizeWei-Ning Huang2019-04-091-4/+4
|
* core: add global signature cache and improve concurrency (#42)Wei-Ning Huang2019-04-091-1/+1
| | | | | From the go trace result, the bottleneck hides in the lock of StoreTxCache. To improve this, we update the cache in a batched fassion.
* app: add cache to reuse same tx address which has already recovered (#26)BJ42019-04-091-0/+2
|
* core: refactor validator and fix light node sync (#25)Wei-Ning Huang2019-04-091-2/+33
| | | | | | | | Remove custom Dexon validator by adding a new `ValidateWitnessData` method into the validator interface. This allow us to properly detect know blocks. This also allow other gdex "light" client to sync compaction chain. Also, setup a standalone RPC node for handling RPC reqeusts.
* core: tx_pool: remove transactions on BlockConfirmed eventWei-Ning Huang2019-04-091-28/+28
|
* app: correct dexon application logicBojie Wu2019-04-091-4/+0
|
* dex: implement dexon application interfaceBojie Wu2019-04-091-0/+4
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-04-091-8/+8
|
* core: sanitize more TxPoolConfig fields (#17210)Jordan Krage2018-12-201-0/+20
| | | | | | * core: sanitize more TxPoolConfig fields * core: fix TestTransactionPendingMinimumAllowance
* core: fix comment typo (#18144)mr_franklin2018-11-211-1/+1
|
* core: fix a typo (#17733)Wuxiang2018-09-211-2/+2
|
* core, eth, trie: use common/prque (#17508)Wenbiao Zheng2018-09-031-3/+3
|
* cmd, core, miner: add --txpool.locals and priority miningPéter Szilágyi2018-08-221-4/+35
|
* core: fixed typo in addresssByHeartbeat (#17243)Antoine Rondelet2018-07-251-5/+5
|
* core: fix txpool guarantee comment (#17214)Osuke2018-07-241-1/+1
| | | | | | * fixed-typo * core: fix txpool guarantee comment
* core: reduce nesting in transaction pool code (#16980)Wenbiao Zheng2018-06-141-5/+3
|
* core: change comment to match code more closely (#16963)John C. Vernaleo2018-06-131-1/+1
|
* Merge pull request #16882 from karalabe/streaming-ecrecoverPéter Szilágyi2018-06-051-0/+1
|\ | | | | core: concurrent background transaction sender ecrecover
| * core: concurrent background transaction sender ecrecoverPéter Szilágyi2018-06-051-0/+1
| |
* | params: fix golint warnings (#16853)kiel barry2018-06-051-1/+1
|/ | | params: fix golint warnings
* core: fix transaction event asynchronicityPéter Szilágyi2018-05-301-1/+1
|
* core: use a wrapped map to remove contention in `TxPool.Get`. (#16670)Ryan Schneider2018-05-231-34/+96
| | | | | | * core: use a wrapped `map` and `sync.RWMutex` for `TxPool.all` to remove contention in `TxPool.Get`. * core: Remove redundant `txLookup.Find` and improve comments on txLookup methods.
* core, eth: minor txpool event cleanupsPéter Szilágyi2018-05-181-14/+14
|
* all: collate new transaction events togetherrjl4934564422018-05-181-11/+21
|
* core: ensure local transactions aren't discarded as underpricedCrispin Flowerday2018-05-021-1/+1
| | | | | This fixes an issue where local transactions are discarded as underpriced when the pool and queue are full.
* build: enable goimports and varcheck linters (#16446)thomasmodeneis2018-04-181-2/+0
|
* core: txpool stable underprice drop order, perf fixesPéter Szilágyi2018-04-121-10/+13
|
* core: update txpool tests for the removal fixPéter Szilágyi2018-03-071-4/+2
|
* core: should enqueue the invalids tx anywaycui2018-03-071-5/+6
| | | | even the pending is empty we shoud enqueue the invalid txs
* metrics: pull library and introduce ResettingTimer and InfluxDB reporter ↵Anton Evangelatov2018-02-231-10/+10
| | | | | | | | | | | | | | | | | | | | (#15910) * go-metrics: fork library and introduce ResettingTimer and InfluxDB reporter. * vendor: change nonsense/go-metrics to ethersphere/go-metrics * go-metrics: add tests. move ResettingTimer logic from reporter to type. * all, metrics: pull in metrics package in go-ethereum * metrics/test: make sure metrics are enabled for tests * metrics: apply gosimple rules * metrics/exp, internal/debug: init expvar endpoint when starting pprof server * internal/debug: tiny comment formatting fix
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-031-4/+7
|
* core: silence txpool reorg warning (annoying on import) (#15725)Péter Szilágyi2017-12-211-1/+1
|
* core: fix typos (#15720)Kurkó Mihály2017-12-211-3/+3
|
* core: fix panic when stat-ing a tx from a queue-only account (#15714)Péter Szilágyi2017-12-201-1/+1
|
* all: gofmt -w -s (#15419)ferhat elmas2017-11-081-2/+2
|
* core, eth, les: fix messy code (#15367)Péter Szilágyi2017-10-251-75/+44
| | | | | | | | * core, eth, les: fix messy code * les: fixed tx status test and rlp encoding * core: add a workaround for light sync
* les, light: LES/2 protocol version (#14970)Felföldi Zsolt2017-10-241-21/+85
| | | | | | | | | | | | | | | | | | This PR implements the new LES protocol version extensions: * new and more efficient Merkle proofs reply format (when replying to a multiple Merkle proofs request, we just send a single set of trie nodes containing all necessary nodes) * BBT (BloomBitsTrie) works similarly to the existing CHT and contains the bloombits search data to speed up log searches * GetTxStatusMsg returns the inclusion position or the pending/queued/unknown state of a transaction referenced by hash * an optional signature of new block data (number/hash/td) can be included in AnnounceMsg to provide an option for "very light clients" (mobile/embedded devices) to skip expensive Ethash check and accept multiple signatures of somewhat trusted servers (still a lot better than trusting a single server completely and retrieving everything through RPC). The new client mode is not implemented in this PR, just the protocol extension.
* core: fire tx event on replace, expand testsPéter Szilágyi2017-10-201-0/+5
|
* core: use blocks and avoid deep reorgs in txpoolPéter Szilágyi2017-09-061-37/+47
|
* core: make txpool operate on immutable statePéter Szilágyi2017-09-051-89/+114
|
* core, light: send chain events using event.Feed (#14865)Miya Chen2017-08-181-35/+66
|
* core: fix txpool journal and test racesPéter Szilágyi2017-08-081-3/+16
|
* cmd, core, eth: journal local transactions to disk (#14784)Péter Szilágyi2017-07-281-50/+102
| | | | | | | | | | * core: reduce txpool event loop goroutines and sync structs * cmd, core, eth: journal local transactions to disk * core: journal replacement pending transactions too * core: separate transaction journal from pool
* core: test locals support in txpool queue limits, fixPéter Szilágyi2017-07-061-7/+7
| | | | | | | | | | The commit reworks the transaction pool queue limitation tests to cater for testing local accounts, also testing the nolocal flag. In addition, it also fixes a panic if local transactions exceeded the global queue allowance (no accounts left to drop from) and also fixes queue eviction to operate on all accounts, not just the one being updated.
* core: handle nolocals during add, exepmt locals from expirationPéter Szilágyi2017-07-051-4/+9
|
* cmd, core: add --txpool.nolocals to disable local price exemptionsPéter Szilágyi2017-07-051-2/+4
|
* core, eth, les: polish txpool API around local/remote txsPéter Szilágyi2017-07-051-71/+86
|
* core: Prevent local tx:s from being discardedMartin Holst Swende2017-07-011-7/+12
|
* core: Change local-handling to use sender-account instead of tx hashesMartin Holst Swende2017-07-011-53/+42
|
* core: ensure transactions correctly drop on pool limitingPéter Szilágyi2017-06-231-40/+78
|
* core: add testcase for txpoolMartin Holst Swende2017-06-231-0/+13
|
* core: only reorg changed account, not allPéter Szilágyi2017-06-011-14/+28
|
* core: don't uselessly recheck transactions on dumpPéter Szilágyi2017-06-011-19/+8
|
* core: check for gas limit exceeding txs too on new blockPéter Szilágyi2017-05-301-4/+8
|
* cmd, core, eth: configurable txpool parametersPéter Szilágyi2017-05-291-28/+73
|
* core: fix minor accidental typos and comment errorsPéter Szilágyi2017-05-251-2/+2
|
* 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