Commit Graph

13 Commits

Author SHA1 Message Date
Jeffrey Wilcke
dc2e34ddf3 core, core/state, trie: Hardfork EIP155, EIP161, EIP170
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>
2016-11-15 12:40:36 +01:00
Péter Szilágyi
2425a748ff [release/1.4.18] core: add global (soft) limits on the pending transactions
(cherry picked from commit 182d9cb752)
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 16d8397e30)
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 b4a5251391)
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 a183ea29f9)
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 0ef327bbee)
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 795b70423e)
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 1f1ea18b54)
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 fc85dd175e)
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