Commit Graph

36 Commits

Author SHA1 Message Date
Péter Szilágyi 649787a9bf core: fix transaction reorg issues within the tx pool 2016-01-05 11:22:59 +02:00
zsfelfoldi 975c591261 core: tx pool skip price validation for "owned" transactions 2015-12-16 03:21:17 +01:00
Gustav Simonsson 1b1f293082 core/state, core, miner: handle missing root error from state.New 2015-10-16 02:22:06 +02:00
Jeffrey Wilcke eaa4473dbd core, core/types: readd transactions after chain re-org
Added a `Difference` method to `types.Transactions` which sets the
receiver to the difference of a to b (NOTE: not a **and** b).

Transaction pool subscribes to RemovedTransactionEvent adding back to
those potential missing from the chain.

When a chain re-org occurs remove any transactions that were removed
from the canonical chain during the re-org as well as the receipts that
were generated in the process.

Closes #1746
2015-09-21 20:33:28 +02:00
Jeffrey Wilcke b60a27627b core: transaction nonce recovery fix
When the transaction state recovery kicked in it assigned the last
(incorrect) nonce to the pending state which caused transactions with
the same nonce to occur.

Added test for nonce recovery
2015-09-18 11:59:21 +02:00
Jeffrey Wilcke 33efb3381c Merge pull request #1461 from bas-vk/eth_resend
Old transaction after resend was not removed from pool
2015-08-01 16:18:54 -07:00
Bas van Kervel 7e31df3987 bugfix, pending transaction was resend with new gas price/limit but not removed from transaction pool 2015-07-28 10:42:31 +02:00
Felix Lange bfbcfbe4a9 all: fix license headers one more time
I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
2015-07-23 18:35:11 +02:00
Felix Lange 3f047be5aa all: update license headers to distiguish GPL/LGPL
All code outside of cmd/ is licensed as LGPL. The headers
now reflect this by calling the whole work "the go-ethereum library".
2015-07-22 18:51:45 +02:00
Felix Lange ea54283b30 all: update license information 2015-07-07 14:12:44 +02:00
Jeffrey Wilcke 61ca780f3b core: reduce CPU load by reducing calls to checkQueue
* Reduced maxQueue count
* Added proper deletion past maxQueue limit
* Added cheap stats method to txpool

queueCheck was called for **every** transaction instead of:
1. add all txs
2. check queue

previously

1. add txs[i]
2. check queue
3. if i < len(txs) goto 1.
2015-06-30 14:01:12 +02:00
Felix Lange 654564e164 core/types: make transactions immutable 2015-06-29 18:51:47 +02:00
obscuren bc6031e7bb core, xeth: moved nonce management burden from xeth to txpool 2015-06-09 21:01:02 +02:00
obscuren 5245bd7b20 core: added a test for missing nonces
This test showed the logic in the queue was slightly flawed sending out
transactions to its peer it couldn't even resolve itself.
2015-06-09 00:41:47 +02:00
obscuren 912cf7ba04 core: added fork test & double nonce test 2015-06-04 19:28:39 +02:00
obscuren 9dd12a64a7 core: renamed txs to pending 2015-06-04 13:16:31 +02:00
obscuren 140d883901 core: test updates 2015-06-03 22:53:33 +02:00
obscuren d09a6e5421 core, eth, miner: moved nonce management to tx pool.
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).
2015-06-03 22:43:23 +02:00
Felix Lange 08befff8f1 core: compute less transaction hashes in TxPool 2015-06-03 22:43:23 +02:00
obscuren c37389f19c core: check negative value transactions. Closes #1109 2015-05-26 20:38:26 +02:00
obscuren 88292f35db core: remove txs from queue in addition to removal of pending 2015-04-30 00:20:59 +02:00
obscuren 145e02fc54 core, miner: added value check on tx validation
* 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
2015-04-26 11:19:40 +02:00
obscuren 405720b218 xeth, core, cmd/utils: Transaction can not be over block gas limit
Transactions will be invalidated when the tx.gas_limit > block.gas_limit
2015-04-24 17:48:13 +02:00
obscuren 7138404cb0 core: only post event once per tx & fixed test 2015-04-23 11:50:11 +02:00
obscuren 498b24270a core: implemented a queued approach processing transactions
Implemented a new transaction queue. Transactions with a holes in their
nonce sequence are also not propagated over the network.

N: 0,1,2,5,6,7 = propagate 0..2 -- 5..N is kept in the tx pool
2015-04-23 11:50:11 +02:00
obscuren 6184781b49 Improved transaction pool
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
2015-04-08 20:47:32 +02:00
obscuren eb1c26746d Changed R S to big int and fixed tests 2015-04-04 21:41:24 +02:00
obscuren 0330077d76 moved state and vm to core 2015-03-23 16:59:09 +01:00
Felix Lange a59dd393e7 core: fix tests 2015-03-18 13:38:47 +01:00
obscuren b523441361 Moved ethutil => common 2015-03-16 11:27:38 +01:00
obscuren cb382fa76b Validate transactions sender before adding to pool. Closes #272 2015-01-31 17:22:17 +01:00
obscuren fed3e6a808 Refactored ethutil.Config.Db out 2015-01-07 13:17:48 +01:00
obscuren 564f02aa2b Fixed tests 2015-01-06 13:18:09 +01:00
obscuren d336e24dce Removed the need of having a backend for the tx pool 2015-01-02 12:26:55 +01:00
obscuren 6cf61039cf Added tests for valid transactions 2015-01-02 12:18:23 +01:00
obscuren 48d2a8b8ee Refactored tx pool and added extra fields to block
* chain manager sets td on block + td output w/ String
* added tx pool tests for removing/adding/validating
* tx pool now uses a set for txs instead of list.List
2015-01-02 12:09:38 +01:00