Jeffrey Wilcke
024d41d0c2
core, core/state, core/vm: remove exported account getters ( #3618 )
...
Removed exported statedb object accessors, reducing the chance for nasty
bugs to creep in. It's also ugly and unnecessary to have these methods.
8 years ago
Jeffrey Wilcke
445feaeef5
core, core/state, trie: EIP158, reprice & skip empty account write
...
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>
8 years ago
Felix Lange
90fce8bfa6
core/state: rename Delete/IsDeleted to Suicide/HasSuicided
...
The delete/remove naming has caused endless confusion in the past.
8 years ago
Felix Lange
1f1ea18b54
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!
8 years ago
Péter Szilágyi
b7159818f9
core/state: track dirty state entries for each object
8 years ago
Péter Szilágyi
cb84e3f029
cmd, core, internal, light, tests: avoid hashing the code in the VM
8 years ago
Felix Lange
a59a93f476
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.
8 years ago
Gustav Simonsson
b6b17e5648
core/state, light: remove unused StateObject.initCode
8 years ago
Nick Johnson
581b320b9d
core/state: Fix memory expansion bug by not copying clean objects
8 years ago
Felix Lange
68c755a238
core/state: fix TestDump
...
Lazy "I'll just put return here instead of fixing the test" found by go vet.
9 years ago
Leif Jurvetson
b7bb2d8589
core: various typos
9 years ago
Felix Lange
1b89bd5d26
core/state, core/types use package rlp for state, receipt serialisation
9 years ago
Felix Lange
de8d5aaa92
core, core/state: move gas tracking out of core/state
...
The amount of gas available for tx execution was tracked in the
StateObject representing the coinbase account. This commit makes the gas
counter a separate type in package core, which avoids unintended
consequences of intertwining the counter with state logic.
9 years ago
Gustav Simonsson
1b1f293082
core/state, core, miner: handle missing root error from state.New
9 years ago
Felix Lange
a2d5a60418
core, core/state: batch-based state sync
9 years ago
Gustav Simonsson
bf879ef230
core/state: test formatting adhering to Go convention
9 years ago
Gustav Simonsson
004ed786b4
core/state: deleted field in StateObject Copy() and unit test
9 years ago
Felix Lange
bfbcfbe4a9
all: fix license headers one more time
...
I forgot to update one instance of "go-ethereum" in commit 3f047be5a
.
9 years ago
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".
9 years ago
Felix Lange
ea54283b30
all: update license information
9 years ago
Jeffrey Wilcke
ab16ce70fc
core, miner, tests: renamed state methods
...
* Update => SyncIntermediate
* Added SyncObjects
SyncIntermediate only updates whatever has changed, but, as a side
effect, requires much more disk space.
SyncObjects will only sync whatever is required for a block and will not
save intermediate state to disk. As drawback this requires more time
when more txs come in.
10 years ago
obscuren
aaddc99c35
core/state: fixed state tests
10 years ago
obscuren
b8124ec791
Removed old (unused) argument
10 years ago
obscuren
f468364e4d
fixed tests
10 years ago
obscuren
0330077d76
moved state and vm to core
10 years ago
obscuren
4300f2a0fa
Fixed state tests
10 years ago
obscuren
d7ab716eea
Fixed mkdnode & added some tests
10 years ago
obscuren
e620bde405
conversion state
10 years ago
obscuren
b523441361
Moved ethutil => common
10 years ago
Felix Lange
80985f97da
cmd/evm, core, ethdb, state, tests/helper: remove ReadConfig calls
10 years ago
Felix Lange
e6118f2d79
state: fix tests
10 years ago
Felix Lange
01ce066d43
state: improve TestDump
10 years ago
obscuren
fed3e6a808
Refactored ethutil.Config.Db out
10 years ago
obscuren
e2d1d832ef
added nil check
10 years ago
obscuren
1fb84d3c5f
Fixed tests
10 years ago
Taylor Gerring
2a9fc7baa9
Merge branch 'develop' of https://github.com/tgerring/go-ethereum
10 years ago
Taylor Gerring
fa59db7595
Add initial state/TestDump test
10 years ago
Taylor Gerring
bd9bd4abed
Reorg state tests
10 years ago
Taylor Gerring
3c619baec5
Add verbose comments to TestSnapshot
10 years ago
Taylor Gerring
8f3a03c0cc
Update state tests to use gocheck
10 years ago
Felix Lange
f3473312ba
all: fix rename breakage
10 years ago
obscuren
af8f5f0b69
ethstate => state
10 years ago
obscuren
03ce15df4c
ethstate.NewState => ethstate.New
10 years ago
obscuren
1e8b54abfb
Refactored state, state object and vm
...
* The State and StateObject have been moved to their own package
* The VM is moved to it's own package
10 years ago
obscuren
ed276cd7c2
Added Paranoia check for VM execution
11 years ago
zelig
79009ca074
transitional ethutil.ReadConfig fixes in ethchain tests (they still fail! FIXME :)
11 years ago
obscuren
8fcba0eb1e
fixed test
11 years ago
obscuren
3ebd7f1166
State snapshotting
11 years ago