aboutsummaryrefslogtreecommitdiffstats
path: root/core/state/state_object.go
Commit message (Collapse)AuthorAgeFilesLines
* core: fix typo in comment codehadv2018-06-051-1/+1
|
* core/state: cache missing storage entries (#16584)Felix Lange2018-04-271-4/+1
|
* core/state: avoid linear overhead on journal dirty listingPéter Szilágyi2018-03-281-3/+3
|
* core/state: rework dirty handling to avoid quadratic overheadMartin Holst Swende2018-03-281-38/+13
|
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-061-3/+2
| | | This commit reduces database I/O by not writing every state trie to disk.
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-271-22/+34
| | | | | | | | | With this commit, core/state's access to the underlying key/value database is mediated through an interface. Database errors are tracked in StateDB and returned by CommitTo or the new Error method. Motivation for this change: We can remove the light client's duplicated copy of core/state. The light client now supports node iteration, so tracing and storage enumeration can work with the light client (not implemented in this commit).
* eth: add debug_storageRangeAtFelix Lange2017-04-251-2/+7
|
* core/state: make TestSnapshotRandom work again (#3816)gary rong2017-04-051-2/+3
| | | | | | In `touch` operation, only `touched` filed has been changed. Therefore in the related undo function, only `touched` field should be reverted. In addition, whether remove this obj from dirty map should depend on prevDirty flag.
* Merge pull request #3723 from karalabe/logger-updates-2Péter Szilágyi2017-02-281-12/+0
|\ | | | | Logger updates
| * core/state: drop most of a logs (useless at this volume)Péter Szilágyi2017-02-281-12/+0
| |
* | all: unify big.Int zero checks, use common/math in more places (#3716)Felix Lange2017-02-281-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | * common/math: optimize PaddedBigBytes, use it more name old time/op new time/op delta PaddedBigBytes-8 71.1ns ± 5% 46.1ns ± 1% -35.15% (p=0.000 n=20+19) name old alloc/op new alloc/op delta PaddedBigBytes-8 48.0B ± 0% 32.0B ± 0% -33.33% (p=0.000 n=20+20) * all: unify big.Int zero checks Various checks were in use. This commit replaces them all with Int.Sign, which is cheaper and less code. eg templates: func before(x *big.Int) bool { return x.BitLen() == 0 } func after(x *big.Int) bool { return x.Sign() == 0 } func before(x *big.Int) bool { return x.BitLen() > 0 } func after(x *big.Int) bool { return x.Sign() != 0 } func before(x *big.Int) int { return x.Cmp(common.Big0) } func after(x *big.Int) int { return x.Sign() } * common/math, crypto/secp256k1: make ReadBits public in package math
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-11/+10
|
* core, core/state, core/vm: remove exported account getters (#3618)Jeffrey Wilcke2017-02-231-50/+34
| | | | Removed exported statedb object accessors, reducing the chance for nasty bugs to creep in. It's also ugly and unnecessary to have these methods.
* logger: remove Core verbosity level (#3659)Felix Lange2017-02-151-3/+3
|
* core, core/vm: implemented a generic environment (#3348)Jeffrey Wilcke2016-12-061-1/+1
| | | | | | | | Environment is now a struct (not an interface). This reduces a lot of tech-debt throughout the codebase where a virtual machine environment had to be implemented in order to test or run it. The new environment is suitable to be used en the json tests, core consensus and light client.
* core, core/state: fixed consensus issue added touch revertJeffrey Wilcke2016-11-251-1/+18
| | | | | Implemented proper touch revert journal entries and copied a Parity consensus bug in order to remain in sync with the current longest chain.
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-1/+12
| | | | | | | | | | | | | | | 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>
* trie, core/state: improve memory usage and performance (#3135)Felix Lange2016-10-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* core/state: optimize GetStateFelix Lange2016-10-061-5/+7
| | | | There is no need to use the reflection-based decoder to decode []byte.
* core/state: rename Delete/IsDeleted to Suicide/HasSuicidedFelix Lange2016-10-061-6/+6
| | | | The delete/remove naming has caused endless confusion in the past.
* core/state: implement reverts by journaling all changesFelix Lange2016-10-061-9/+45
| | | | | | | | | | 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!
* core/state: track dirty state entries for each objectPéter Szilágyi2016-10-031-11/+17
|
* cmd, core, internal, light, tests: avoid hashing the code in the VMPéter Szilágyi2016-10-011-2/+2
|
* core, trie: replace state caches with trie journalFelix Lange2016-09-281-13/+0
|
* core/state: track all accounts in canon stateFelix Lange2016-09-261-131/+171
| | | | | This change introduces a global, per-state cache that keeps account data in the canon state. Thanks to @karalabe for lots of fixes.
* core/state: short-circuit balance change if zero valueGustav Simonsson2016-09-261-0/+6
|
* core/state, light: remove unused StateObject.initCodeGustav Simonsson2016-09-191-3/+0
|
* core/state: Fix memory expansion bug by not copying clean objectsNick Johnson2016-09-191-1/+1
|
* core/state: fix TestDumpFelix Lange2016-04-151-1/+1
| | | | Lazy "I'll just put return here instead of fixing the test" found by go vet.
* core: Added EVM configuration optionsJeffrey Wilcke2016-03-241-18/+15
| | | | | The EVM is now initialised with an additional configured object that allows you to turn on debugging options.
* all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()Ricardo Catalinas Jiménez2016-02-221-2/+2
| | | | As we aren't really using the standarized SHA-3
* core, core/vm, crypto: fixes for homesteadJeffrey Wilcke2016-02-181-6/+1
| | | | | | * Removed some strange code that didn't apply state reverting properly * Refactored code setting from vm & state transition to the executioner * Updated tests
* parmas, crypto, core, core/vm: homestead consensus protocol changesGustav Simonsson2016-02-181-0/+12
| | | | | | | | * change gas cost for contract creating txs * invalidate signature with s value greater than secp256k1 N / 2 * OOG contract creation if not enough gas to store code * new difficulty adjustment algorithm * new DELEGATECALL op code
* core/state, core/types use package rlp for state, receipt serialisationFelix Lange2015-12-181-49/+44
|
* core, core/state: move gas tracking out of core/stateFelix Lange2015-10-171-36/+1
| | | | | | | 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.
* core, core/state: batch-based state syncFelix Lange2015-09-231-6/+2
|
* core, trie: new trieFelix Lange2015-09-231-6/+9
|
* all: move common.Database to package ethdbFelix Lange2015-09-151-3/+4
|
* core, core/vm, core/state: remove unused functionsGustav Simonsson2015-09-111-43/+0
|
* core/state: deleted field in StateObject Copy() and unit testGustav Simonsson2015-09-081-0/+1
|
* core, tests: Double SUICIDE fixJeffrey Wilcke2015-08-211-2/+3
|
* all: fix license headers one more timeFelix Lange2015-07-241-1/+1
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-231-4/+4
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* all: update license informationFelix Lange2015-07-071-0/+16
|
* core, core/state: only write necessary state. Skip intermediateJeffrey Wilcke2015-07-041-8/+0
|
* core, miner, xeth: renamed gas methodsobscuren2015-06-211-16/+3
| | | | | | * BuyGas => SubGas * RefundGas => AddGas * SetGasPool => SetGasLimit
* core/state: removed state from state objectobscuren2015-06-171-18/+15
|
* core/state: remove the need for common.Valueobscuren2015-06-171-2/+4
|
* core/state, core/vm: reworked storage get / set to use common.Hashobscuren2015-06-171-27/+20
|
* core/vm, core/state: added storage to structured vm loggingobscuren2015-06-101-0/+16
|
* solidity compiler and contract metadocs integrationzelig2015-05-071-0/+3
| | | | | | | | | | | | | * common/compiler: solidity compiler + tests * rpc: eth_compilers, eth_compileSolidity + tests * fix natspec test using keystore API, notice exp dynamically changes addr, cleanup * resolver implements registrars and needs to create reg contract (temp) * xeth: solidity compiler. expose getter Solc() and paths setter SetSolc(solcPath) * ethereumApi: implement compiler related RPC calls using XEth - json struct tests * admin: make use of XEth.SetSolc to allow runtime setting of compiler paths * cli: command line flags solc to set custom solc bin path * js admin api with new features debug and contractInfo modules * wiki is the doc https://github.com/ethereum/go-ethereum/wiki/Contracts-and-Transactions
* Moved logging to logger.Coreobscuren2015-04-041-4/+4
|
* basic glogobscuren2015-04-041-4/+15
|
* moved state and vm to coreobscuren2015-03-231-0/+357