Commit Graph

63 Commits

Author SHA1 Message Date
obscuren bc6031e7bb core, xeth: moved nonce management burden from xeth to txpool 2015-06-09 21:01:02 +02:00
Felix Lange 73c355591f core, eth: document that result of GetTransactions is modifiable 2015-06-09 17:07:10 +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 dcdb4554d7 core: documented changes in tx pool 2015-06-04 16:19:22 +02:00
obscuren cf5ad266f6 core: only change the nonce if the account nonce is lower 2015-06-04 15:44:42 +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 5721c43585 core: update documentation comments for TxPool 2015-06-03 22:43:23 +02:00
Felix Lange ca31d71107 core: remove unused code from TxPool 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
Jeffrey Wilcke 8610314918 Merge pull request #1167 from Gustav-Simonsson/check_ec_recover_err
Add missing err checks on From()
2015-06-03 10:29:47 -07:00
Gustav Simonsson 147a699c65 Add missing err checks on From() (skip RPC for now) 2015-06-01 22:12:03 +02:00
Gustav Simonsson 32e1b104f8 Add EC signature validations before call to libsecp256k1 2015-06-01 21:06:52 +02:00
obscuren c37389f19c core: check negative value transactions. Closes #1109 2015-05-26 20:38:26 +02:00
obscuren 3c6c891680 core: optimise pending transaction processing 2015-05-11 11:39:33 +02:00
obscuren dcfecebe1f core: get transaction by hash from transaction pool 2015-05-07 18:22:57 +02:00
obscuren 92f998c7ef core: use removeTx instead of delete 2015-05-06 18:30:55 +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 7f14fbd579 core: pending txs now re-validated once every second 2015-04-23 11:50:12 +02:00
obscuren fba40e18d9 core: added accessor for queued transactions 2015-04-23 11:50:12 +02:00
obscuren d3be1a2719 eth: moved mined, tx events to protocol-hnd and improved tx propagation
Transactions are now propagated to peers from which we have not yet
received the transaction. This will significantly reduce the chatter on
the network.

Moved new mined block handler to the protocol handler and moved
transaction handling to protocol handler.
2015-04-23 11:50:12 +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 093d6d5074 core: removed nonce resetting from the block processor.
All nonce error handling has been moved to the worker
2015-04-21 11:27:12 +02:00
obscuren 6e2f78ebdd Default log to stderr 2015-04-08 22:18:16 +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 f08e9cbe42 ignore invalid txs right after being added if they prove incorrect 2015-04-08 18:08:21 +02:00
obscuren a953f3ec97 Sync managed accounts to the network 2015-04-08 13:07:21 +02:00
obscuren 09147a50ed Improved tx pool to ignore invalid transactions
Transaction pool will attempt to ignore invalid transactions it had
previously encountered.
2015-04-08 00:31:23 +02:00
Felix Lange a59dd393e7 core: fix tests 2015-03-18 13:38:47 +01:00
Felix Lange 17c5ba2b6b core: actually convert transaction pool 2015-03-17 12:16:21 +01:00
Felix Lange b95387a0dc core: convert transaction pool to common.{Address,Hash} 2015-03-17 11:59:26 +01:00
obscuren b523441361 Moved ethutil => common 2015-03-16 11:27:38 +01:00
Matthew Wampler-Doty de9f79133f Introducing ethash 2015-03-02 22:29:34 -05:00
Ethan Buchman 5a827417d9 Merge branch 'develop' of https://github.com/ethereum/go-ethereum into develop 2015-02-26 17:54:57 -05:00
obscuren ea9a549bbd Removed exported fields from state object and added proper set/getters 2015-02-20 14:19:34 +01:00
obscuren fa4cbad315 Optimisations and fixed a couple of DDOS issues in the miner 2015-02-19 22:33:22 +01:00
Ethan Buchman 2ba65f4fba Merge branch 'develop' of https://github.com/ethereum/go-ethereum into develop 2015-02-17 19:25:18 -05:00
obscuren cb382fa76b Validate transactions sender before adding to pool. Closes #272 2015-01-31 17:22:17 +01:00
Ethan Buchman 2da367a2be fix unchecked slice index on tx.From() 2015-01-26 10:57:23 -08:00
obscuren 60d9611c23 Fixed tests where txs weren't properly removed 2015-01-07 01:21:45 +01:00
obscuren 6abf8ef78f Merge 2015-01-05 17:10:42 +01:00
obscuren 16f417f5af Fixed bug where logging could crash client during tx adding 2015-01-02 22:19:58 +01:00
obscuren d336e24dce Removed the need of having a backend for the tx pool 2015-01-02 12:26:55 +01:00
obscuren ae2c90cc28 Removed value check from tx validation 2015-01-02 12:24:36 +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