Felix Lange
3c836dd71b
core/state: optimize GetState
...
There is no need to use the reflection-based decoder to decode []byte.
2016-10-06 15:32:17 +02:00
Felix Lange
90fce8bfa6
core/state: rename Delete/IsDeleted to Suicide/HasSuicided
...
The delete/remove naming has caused endless confusion in the past.
2016-10-06 15:32:17 +02:00
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!
2016-10-06 15:32:16 +02:00
Péter Szilágyi
b7159818f9
core/state: track dirty state entries for each object
2016-10-03 10:48:01 +03:00
Péter Szilágyi
cb84e3f029
cmd, core, internal, light, tests: avoid hashing the code in the VM
2016-10-01 16:01:58 +03:00
Péter Szilágyi
710435b51b
core, eth, trie: reuse trie journals in all our code
2016-09-28 11:27:31 +03:00
Felix Lange
cd791bd855
core, trie: replace state caches with trie journal
2016-09-28 11:27:28 +03:00
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.
2016-09-26 10:09:52 +02:00
Gustav Simonsson
25ed5fedda
core/state: short-circuit balance change if zero value
2016-09-26 01:26:54 -04:00
Gustav Simonsson
b6b17e5648
core/state, light: remove unused StateObject.initCode
2016-09-19 02:16:58 -04:00
Péter Szilágyi
88b012ad3b
Merge pull request #3006 from Arachnid/patch
...
core/state: Fix memory expansion bug by not copying clean objects
2016-09-19 04:20:14 +03:00
Nick Johnson
581b320b9d
core/state: Fix memory expansion bug by not copying clean objects
2016-09-19 08:57:08 +08:00
Péter Szilágyi
b6b5ec8f75
core/types: add core type marshal methods too
2016-09-08 18:16:53 +03:00
Péter Szilágyi
b4a5251391
core: abstract out a sorted transaction hash map
2016-09-02 14:15:40 +03:00
Péter Szilágyi
a183ea29f9
core: add upper bound on the queued transctions
2016-09-02 14:15:40 +03:00
Péter Szilágyi
affffb39b3
core/types, miner: switch over to the grouped tx sets
2016-09-02 14:12:03 +03:00
Péter Szilágyi
0ef327bbee
core, eth, internal, miner: optimize txpool for quick ops
2016-09-02 14:12:03 +03:00
Péter Szilágyi
795b70423e
core, eth, miner: only retain 1 tx/nonce, remove bad ones
2016-09-02 14:12:03 +03:00
Felix Lange
704fde01e8
core/types, core/vm: improve docs, add JSON marshaling methods
...
In this commit, core/types's types learn how to encode and decode
themselves as JSON. The encoding is very similar to what the RPC API
uses. The RPC API is missing some output fields (e.g. transaction
signature values) which will be added to the API in a later commit. Some
fields that the API generates are ignored by the decoder methods here.
2016-08-04 03:55:33 +02:00
Nick Johnson
2f99720901
core/vm, eth: Add support for javascript trace functions
2016-08-23 15:06:39 +01:00
Nick Johnson
781915f183
core/vm: Refactor tracing to make Tracer the main interface
...
This CL makes several refactors:
- Define a Tracer interface, implementing the `CaptureState` method
- Add the VM environment as the first argument of
`Tracer.CaptureState`
- Rename existing functionality `StructLogger` an make it an
implementation of `Tracer`
- Delete `StructLogCollector` and make `StructLogger` collect the logs
directly
- Change all callers to use the new `StructLogger` where necessary and
extract logs from that.
- Deletes the apparently obsolete and likely nonfunctional 'TraceCall'
from the eth API.
Callers that only wish accumulated logs can use the `StructLogger`
implementation straightforwardly. Callers that wish to efficiently
capture VM traces and operate on them without excessive copying can now
implement the `Tracer` interface to receive VM state at each step and
do with it as they wish.
This CL also removes the accumulation of logs from the vm.Environment;
this was necessary as part of the refactor, but also simplifies it by
removing a responsibility that doesn't directly belong to the
Environment.
2016-08-22 09:26:15 +01:00
Felix Lange
475521dd74
Merge pull request #2909 from fjl/account-manager-cleanup
...
all: clean up tech debt left behind by the API split
2016-08-17 20:59:59 +02:00
Felix Lange
3c09c5f12d
core, miner: move Backend to miner
...
This ensures that package core doesn't depend on package accounts and
resolves an age-old TODO.
2016-08-17 17:39:04 +02:00
Felix Lange
84d11c19fd
eth: remove dapp database remains
2016-08-17 17:39:03 +02:00
Bas van Kervel
47ff813012
rpc: refactor subscriptions and filters
2016-08-17 12:59:58 +02:00
Bas van Kervel
bb8059f6aa
core: ensure the canonical block is written before the canonical hash is set
2016-08-16 15:21:22 +02:00
Felix Lange
e4736fe469
core/vm: hide ecrecover error message
...
Fixes #2825
2016-08-05 23:12:52 +02:00
Péter Szilágyi
2c2e389b77
cmd, core, eth, miner, params, tests: finalize the DAO fork
2016-07-15 16:52:55 +03:00
Péter Szilágyi
3291235711
accounts, core, eth: pass chain config for chain maker to test DAO
2016-07-15 16:52:55 +03:00
Péter Szilágyi
461cdb593b
core, params, tests: add DAO hard-fork balance moves
2016-07-15 16:52:55 +03:00
Péter Szilágyi
7f00e8c033
core, eth: enforce network split post DAO hard-fork
2016-07-15 16:52:55 +03:00
Péter Szilágyi
a87089fd2d
cmd, core, miner: add extradata validation to consensus rules
2016-07-15 16:52:55 +03:00
Péter Szilágyi
9e56811a37
core: gracefully handle missing homestead block config
2016-07-15 16:52:55 +03:00
Péter Szilágyi
6060e098c9
cmd, core, eth, params: implement flags to control dao fork blocks
2016-07-15 16:52:55 +03:00
Péter Szilágyi
1a652afe16
Merge pull request #2724 from pirapira/fix_reset_fees
...
vm: Replace some SstoreClearGas with SstoreResetGas
2016-07-15 16:24:16 +03:00
Péter Szilágyi
f970610c04
Merge pull request #2799 from zsfelfoldi/api-nonce-fix2
...
core: added CheckNonce() to Message interface
2016-07-12 16:07:15 +03:00
zsfelfoldi
00787fe781
core: added CheckNonce() to Message interface
2016-07-11 12:35:23 +02:00
Péter Szilágyi
f5a29eab5c
core: solve a remote-import/local-mine data race
2016-07-08 16:59:19 +03:00
Péter Szilágyi
1e50f5dd28
Merge pull request #2159 from zsfelfoldi/light-backend
...
eth: separate common and full node-specific API and backend service
2016-06-30 12:57:50 +03:00
Péter Szilágyi
6362a9d610
Revert "test, cmd/evm, core, core/vm: illegal code hash implementation"
...
This reverts commit 7a5b571c67
.
2016-06-29 11:44:51 +03:00
Péter Szilágyi
d55fc35df1
Revert "core: add voting and result tracking for the dao soft-fork"
...
This reverts commit c4de28938f
.
2016-06-29 11:44:40 +03:00
Péter Szilágyi
67e9d33486
Revert "core: update DAO soft-fork number, clean up the code"
...
This reverts commit ba784bdf36
.
2016-06-29 11:44:29 +03:00
Péter Szilágyi
219859f8bb
Revert "core: update the DAO soft fork proposal to the final block"
...
This reverts commit 1e3a7d4fab
.
2016-06-29 11:44:03 +03:00
Péter Szilágyi
1e3a7d4fab
core: update the DAO soft fork proposal to the final block
2016-06-24 15:24:09 +03:00
Péter Szilágyi
ba784bdf36
core: update DAO soft-fork number, clean up the code
2016-06-23 17:16:43 +03:00
Péter Szilágyi
c4de28938f
core: add voting and result tracking for the dao soft-fork
2016-06-23 16:43:35 +03:00
Jeffrey Wilcke
7a5b571c67
test, cmd/evm, core, core/vm: illegal code hash implementation
...
This implements a generic approach to enabling soft forks by allowing
anyone to put in hashes of contracts that should not be interacted from.
This will help "The DAO" in their endevour to stop any whithdrawals from
any DAO contract by convincing the mining community to accept their code
hash.
2016-06-22 11:38:25 +03:00
Yoichi Hirai
86bc7795a3
vm: Replace some SstoreClearGas with SstoreResetGas
2016-06-21 21:15:26 +02:00
Fabio Berger
a3efdb13f2
README, core, rpc: fix various typos
2016-06-21 17:38:35 +01:00
zsfelfoldi
3a97280ae8
eth: separate common and full node-specific API and backend service
2016-06-16 17:36:38 +02:00