Commit Graph

7487 Commits

Author SHA1 Message Date
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
ef9265d0d7 Merge pull request #3140 from karalabe/release/1.4
Geth 1.4.18: Note 7
2016-10-15 11:38:21 +02:00
ac0c5dd77f [release/1.4.18] cmd/geth, VERSION: bump version to 1.4.18 2016-10-15 11:02:58 +02:00
9fa42b1e02 [release/1.4.18] core: fixed import reporter
(cherry picked from commit ca419f3cd8)
2016-10-15 11:02:53 +02:00
0718ebbbce [release/1.4.18] eth: move "timed out DAO fork check, dropping" to debug level
(cherry picked from commit 82b14a05f2)
2016-10-15 11:02:49 +02:00
843073d453 [release/1.4.18] core: print import stats more often
If geth is busy importing 2048 heavy blocks it can take a while before
it prints anything. This change ensures that a message gets printed
every 8s.

(cherry picked from commit e66b158f0b)
2016-10-15 11:02:43 +02:00
33a6e52aef [release/1.4.18] params: set reprice block number to 2463000
(cherry picked from commit f2be249385)
2016-10-15 11:00:55 +03:00
18c8ded42c [release/1.4.18] trie: fix regression that linked all downloaded nodes together
The trie sync code links subtries using pointers into node structs.
Since commit 40cdcf1183 nodes are no longer copied when unpacking from
an interface value, causing all nodes to get linked up as the sync
progresses. Fix it by breaking the pointer chain with an explicit copy.

(cherry picked from commit 2cd7a0395d)
2016-10-15 11:00:53 +03:00
00ba748707 [release/1.4.18] core, core/vm: added gas price variance table
This implements 1b & 1c of EIP150 by adding a new GasTable which must be
returned from the RuleSet config method. This table is used to determine
the gas prices for the current epoch.

Please note that when the CreateBySuicide gas price is set it is assumed
that we're in the new epoch phase.

In addition this PR will serve as temporary basis while refactorisation
in being done in the EVM64 PR, which will substentially overhaul the gas
price code.

(cherry picked from commit 64af2aafda)
2016-10-14 19:46:38 +03:00
8d81eb9999 [release/1.4.18] trie, core/state: improve memory usage and performance (#3135)
* trie: store nodes as pointers

This avoids memory copies when unwrapping node interface values.

name      old time/op  new time/op  delta
Get        388ns ± 8%   215ns ± 2%  -44.56%  (p=0.000 n=15+15)
GetDB      363ns ± 3%   202ns ± 2%  -44.21%  (p=0.000 n=15+15)
UpdateBE  1.57µs ± 2%  1.29µs ± 3%  -17.80%  (p=0.000 n=13+15)
UpdateLE  1.92µs ± 2%  1.61µs ± 2%  -16.25%  (p=0.000 n=14+14)
HashBE    2.16µs ± 6%  2.18µs ± 6%     ~     (p=0.436 n=15+15)
HashLE    7.43µs ± 3%  7.21µs ± 3%   -2.96%  (p=0.000 n=15+13)

* trie: close temporary databases in GetDB benchmark

* trie: don't keep []byte from DB load around

Nodes decoded from a DB load kept hashes and values as sub-slices of
the DB value. This can be a problem because loading from leveldb often
returns []byte with a cap that's larger than necessary, increasing
memory usage.

* trie: unload old cached nodes

* trie, core/state: use cache unloading for account trie

* trie: use explicit private flags (fixes Go 1.5 reflection issue).

* trie: fixup cachegen overflow at request of nick

* core/state: rename journal size constant

(cherry picked from commit 40cdcf1183)
2016-10-14 19:46:36 +03:00
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
facfe40528 [release/1.4.18] metrics, internal/debug: Add --pprofaddr flag, expose metrics via gexp
(cherry picked from commit 9e9bfc4e26)
2016-10-14 19:46:30 +03:00
5a6008e004 Merge pull request #3116 from fjl/release/1.4
Backport TxPool limits to release/1.4
v1.4.17
2016-10-10 16:19:05 +02:00
abaa56fea5 [release/1.4.17] cmd/geth, VERSION: bump version to 1.4.17 2016-10-10 16:17:17 +02:00
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
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
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
ddcf02b119 [release/1.4.17] core/types, miner: switch over to the grouped tx sets
(cherry picked from commit affffb39b3)
2016-10-10 10:49:58 +02:00
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
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
4fced0972d [release/1.4.16] cmd/geth, VERSION: bumped version to 1.4.16 v1.4.16 2016-10-06 16:25:17 +02:00
18971d9cb4 [release/1.4.16] core/state: optimize GetState
There is no need to use the reflection-based decoder to decode []byte.

(cherry picked from commit 3c836dd71b)
2016-10-06 16:25:17 +02:00
74d5251b70 [release/1.4.16] core/state: rename Delete/IsDeleted to Suicide/HasSuicided
The delete/remove naming has caused endless confusion in the past.

(cherry picked from commit 90fce8bfa6)
2016-10-06 16:25:17 +02:00
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
e97b30169b [release/1.4.16] tests: update test files from github.com/ethereum/tests @ 45bc1d21d3c1
Two new tests are skipped because they're buggy. Making some newer
random state tests work required implementing the 'compressed return
value encoding'.

(cherry picked from commit 1b7b2ba216)
2016-10-06 16:25:17 +02:00
438efdab28 [release/1.4.16] cmd/utils: disable jitvm A/B test 2016-10-06 16:25:17 +02:00
f7e6fb7d1c [release/1.4.16] eth: monitor malicious header retrieval requests
(cherry picked from commit e482b5694f)
2016-10-06 16:25:17 +02:00
718881bd35 [release/1.4.16] internal/build: fix git tag env variable for AppVeyor
(cherry picked from commit 82e09c17a9)
2016-10-06 16:25:17 +02:00
d1bb89d46d [release/1.4.16] crypto/sha3: update from golang.org/x/crypto/sha3 a 80b25ed4
This pulls in the assembly implementation of keccakf1600 for amd64.

(cherry picked from commit 54ea317375)
2016-10-06 16:25:17 +02:00
1639f1174e Merge pull request #3074 from karalabe/release/1.4
Geth 1.4.15 "Come at me bro"
2016-10-03 11:40:05 +03:00
d9ed63ec38 [release/1.4.15] VERSION, cmd/geth: bumped version 1.4.15 2016-10-03 11:36:06 +03:00
ee58202f2f [release/1.4.15] internal/build: use less edgy command to get the branch name
(cherry picked from commit b4b5921dd0)
2016-10-03 11:36:03 +03:00
9315bc9c3c [release/1.4.15] build: improve debian packaging
This commit tweaks the debian packaging tool:

* All build environment metadata can now be overriden on the command
  line. This allows testing the CI build behaviour locally.
* -unstable packages now actually contain the binaries (oops)
* packages use Go 1.7 to build
* archiving is skipped for PR builds

(cherry picked from commit 4f7627972e)
2016-10-03 11:35:57 +03:00
945bcb8293 [release/1.4.15] core/state: track dirty state entries for each object
(cherry picked from commit b7159818f9)
2016-10-03 11:24:07 +03:00
f1949f4d99 [release/1.4.15] cmd, core, internal, light, tests: avoid hashing the code in the VM
(cherry picked from commit cb84e3f029)
2016-10-03 11:24:04 +03:00
968ab8aa4f [release/1.4.15] trie: fix delete bug for values contained in fullNode
Delete crashed if a fullNode contained a valueNode directly. This bug is
very unlikely to occur with SecureTrie, but can happen with regular
tries. This commit also introduces a randomised test which triggers all
trie operations, which should prevent such bugs in the future.

Credit for finding this bug goes to Github user @rjl493456442.

(cherry picked from commit c3a77d6268)
2016-10-03 11:23:56 +03:00
f88bca7ba9 Merge pull request #3055 from karalabe/release/1.4
Geth 1.4.14: What else should we rewrite?
v1.4.14
2016-09-28 13:40:44 +03:00
d4608ae0d2 [release/1.4.14] VERSION, cmd/geth: bumped version 1.4.14 2016-09-28 13:32:14 +03:00
f50c2a5c70 [release/1.4.14] core, eth, trie: reuse trie journals in all our code
(cherry picked from commit 710435b51b)
2016-09-28 13:32:12 +03:00
ddadf402fc [release/1.4.14] core, trie: replace state caches with trie journal
(cherry picked from commit cd791bd855)
2016-09-28 13:32:10 +03:00
7c17a6704c [release/1.4.14] build: limit test concurrency
TravisCI and AppVeyor run the tests in very slow VMs.
Some of our tests can't cope with that. Running less tests
in parallel should make them somewhat less flakey.

(cherry picked from commit b0a6b979a3)
2016-09-28 13:32:08 +03:00
25205d64d7 [release/1.4.14] cmd/utils: don't check for stderr redirect on windows
The redirect check did not work on Go 1.6 and below because Stat
returned an error for stdout and stderr. In Go 1.7 Stat works on stdout
but doesn't return anything meaningful, causing cmd/geth test failures
because the message is printed to stderr only. Fix it by printing to
stdout only.

(cherry picked from commit b04219fdbb)
2016-09-28 13:32:06 +03:00
03b2f56485 [release/1.4.14] appveyor.yml: don't install Go and MinGW, they're already there (#2813)
(cherry picked from commit e11489eb5f)
2016-09-28 13:31:55 +03:00
7a5843de31 Merge pull request #3038 from fjl/release/1.4
[release/1.4.13] core/state: track all accounts in canon state
2016-09-26 12:36:53 +03:00
0cc6397195 [release/1.4.13] node: fix go vet issue 2016-09-26 10:49:40 +02:00
dc2b23c869 [release/1.4.13] core/state: track all accounts in canon state
This change introduces a global, per-state cache that keeps account data
in the canon state. Thanks to @karalabe for lots of fixes.

(cherry picked from commit a59a93f476)
2016-09-26 10:31:18 +02:00
6999f1da6b Merge pull request #3036 from karalabe/release/1.4
Geth 1.4.13
2016-09-26 08:55:23 +03:00
95bfedd599 [release 1.4.12] VERSION, cmd/geth: bumped version 1.4.13 2016-09-26 08:50:13 +03:00
42e4e18667 [release 1.4.12] core: short-circuit balance change if zero value
(cherry picked from commit 25ed5fedda)
2016-09-26 08:49:59 +03:00
9bdbaf459a Merge pull request #3008 from karalabe/release/1.4
G
2016-09-19 04:32:32 +03:00