12 Commits

Author SHA1 Message Date
Péter Szilágyi
2425a748ff [release/1.4.18] core: add global (soft) limits on the pending transactions
(cherry picked from commit 182d9cb752ffe08fc5e40718031bc8a497311ff5)
2016-10-14 19:46:33 +03:00
Felix Lange
a79977bc20 [release/1.4.17] core: lower transaction pool max queue limit
(cherry picked from commit 16d8397e30ea0e4d07a07f5c4416b8888daf9796)
2016-10-10 15:53:01 +02:00
Péter Szilágyi
794d2eb582 [release/1.4.17] core: abstract out a sorted transaction hash map
(cherry picked from commit b4a52513915d5a39ac055fc38cafed70098eb698)
2016-10-10 10:50:02 +02:00
Péter Szilágyi
d7721def26 [release/1.4.17] core: add upper bound on the queued transctions
(cherry picked from commit a183ea29f9313cb1d00ed8f73bfbc4ae51e9cb04)
2016-10-10 10:50:02 +02:00
Péter Szilágyi
ff697e82dc [release/1.4.17] core, eth, internal, miner: optimize txpool for quick ops
(cherry picked from commit 0ef327bbee79c01a69ba59258acc6ce3a48bc288)
2016-10-10 10:42:07 +02:00
Péter Szilágyi
df64a9f5ef [release/1.4.17] core, eth, miner: only retain 1 tx/nonce, remove bad ones
(cherry picked from commit 795b70423eac7180ab85b735f64aae9d6a10449d)
2016-10-10 10:41:58 +02:00
Felix Lange
46a527d014 [release/1.4.16] core/state: implement reverts by journaling all changes
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!

(cherry picked from commit 1f1ea18b5414bea22332bb4fce53cc95b5c6a07d)
2016-10-06 16:25:17 +02:00
Felix Lange
44b912ec64 [release/1.4.6] core: add missing lock in TxPool.{GetTransaction,RemoveTx}
Fixes #2650

(cherry picked from commit fc85dd175ebeef4996e5d370a7a2f085c922196d)
2016-06-06 16:22:00 +03:00
Felix Lange
56ed6152a1 core, eth, miner: improve shutdown synchronisation
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.
2016-05-09 13:03:08 +02:00
Jeffrey Wilcke
f0cbebb19f core: added basic chain configuration
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.
2016-04-01 01:01:10 +02:00
Leif Jurvetson
b7bb2d8589 core: various typos 2016-03-15 11:08:18 -07:00
Jeffrey Wilcke
b6d88a0e9f core, core/vm, crypto: fixes for homestead
* Removed some strange code that didn't apply state reverting properly
* Refactored code setting from vm & state transition to the executioner
* Updated tests
2016-02-18 10:11:48 +01:00