aboutsummaryrefslogtreecommitdiffstats
path: root/core/state
Commit message (Collapse)AuthorAgeFilesLines
* core: support extracting governance state from state trieSonic2019-06-121-0/+31
|
* Change import go github.com/dexon-foundation/dexonWei-Ning Huang2019-06-1213-40/+40
|
* core/state: rename 'new' variable (#18301)Shuai Qi2018-12-141-2/+2
|
* cmd, core, eth, light, trie: add trie read caching layerPéter Szilágyi2018-11-151-4/+10
|
* core/state: remove lock (#18065)Felix Lange2018-11-091-6/+0
| | | | The lock in StateDB is useless. It's only held in Copy, but Copy is safe for concurrent use because all it does is read.
* core/state: simplify proof methods (#17965)Felix Lange2018-10-241-7/+13
| | | | This fixes the import cycle build error in core/vm tests. There is no need to refer to core/vm for a type definition.
* EIP-1186 eth_getProof (#17737)Simon Jentzsch2018-10-191-0/+20
| | | | | | | | | | | | | | | | * first impl of eth_getProof * fixed docu * added comments and refactored based on comments from holiman * created structs * handle errors correctly * change Value to *hexutil.Big in order to have the same output as parity * use ProofList as return type
* core, params: polish net gas metering PR a bitPéter Szilágyi2018-09-184-69/+83
|
* core,state: finish implementing Eip 1283Martin Holst Swende2018-09-182-0/+18
|
* core, state: initial implementation of Eip-1283Martin Holst Swende2018-09-182-2/+24
|
* core/statedb: deep copy logs (#17489)gary rong2018-08-231-3/+6
|
* trie: cache collapsed tries node, not rlp blobs (#16876)Péter Szilágyi2018-06-211-1/+1
| | | | | | | | | | | | The current trie memory database/cache that we do pruning on stores trie nodes as binary rlp encoded blobs, and also stores the node relationships/references for GC purposes. However, most of the trie nodes (everything apart from a value node) is in essence just a collection of references. This PR switches out the RLP encoded trie blobs with the collapsed-but-not-serialized trie nodes. This permits most of the references to be recovered from within the node data structure, avoiding the need to track them a second time (expensive memory wise).
* core: fix typo in comment codehadv2018-06-051-1/+1
|
* trie: rename TrieSync to Sync and improve hexToKeybytes (#16804)Wenbiao Zheng2018-05-291-3/+3
| | | | | | | This removes a golint warning: type name will be used as trie.TrieSync by other packages, and that stutters; consider calling this Sync. In hexToKeybytes len(hex) is even and (even+1)/2 == even/2, remove the +1.
* common: improve documentation comments (#16701)kiel barry2018-05-291-1/+1
| | | | | This commit adds many comments and removes unused code. It also removes the EmptyHash function, which had some uses but was silly.
* core, consensus: fix some typos in comment code and output loghadv2018-05-191-1/+1
|
* all: get rid of error when creating memory database (#16716)gary rong2018-05-094-23/+16
| | | | | | | | * all: get rid of error when create mdb * core: clean up variables definition * all: inline mdb definition
* core, eth: fix tracer dirty finalizationPéter Szilágyi2018-04-271-21/+0
|
* core/state: cache missing storage entries (#16584)Felix Lange2018-04-271-4/+1
|
* core/state: fix ripemd-cornercase in CopyMartin Holst Swende2018-04-111-2/+8
|
* core/state: fix bug in copy of copy StateMartin Holst Swende2018-04-112-0/+26
|
* Merge pull request #15225 from holiman/test_removefrom_dirtysetPéter Szilágyi2018-04-105-91/+166
|\ | | | | Change handling of dirty objects in state
| * state: handle nil in journal dirtiesMartin Holst Swende2018-04-101-1/+11
| |
| * core/state: avoid linear overhead on journal dirty listingPéter Szilágyi2018-03-284-66/+92
| |
| * core/state: rework dirty handling to avoid quadratic overheadMartin Holst Swende2018-03-285-73/+112
| |
* | core/state: avoid redundant addition to code size cache (#16427)Jia Chenhui2018-04-031-4/+1
|/
* core/state: uniform parameter style (#16398)Jia Chenhui2018-03-281-10/+10
| | | - Uniform code style.
* core/state: fix typo (#16370)Jia Chenhui2018-03-261-2/+2
|
* core, trie: intermediate mempool between trie and database (#15857)Péter Szilágyi2018-02-067-61/+114
| | | This commit reduces database I/O by not writing every state trie to disk.
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-033-13/+10
|
* core/state: copy trie too, not just contentPéter Szilágyi2017-11-242-1/+52
|
* core/state: revert log index when removing logsFelix Lange2017-09-221-0/+1
|
* core, eth/downloader: commit block data using batches (#15115)Felix Lange2017-09-101-39/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ethdb: add Putter interface and Has method * ethdb: improve docs and add IdealBatchSize * ethdb: remove memory batch lock Batches are not safe for concurrent use. * core: use ethdb.Putter for Write* functions This covers the easy cases. * core/state: simplify StateSync * trie: optimize local node check * ethdb: add ValueSize to Batch * core: optimize HasHeader check This avoids one random database read get the block number. For many uses of HasHeader, the expectation is that it's actually there. Using Has avoids a load + decode of the value. * core: write fast sync block data in batches Collect writes into batches up to the ideal size instead of issuing many small, concurrent writes. * eth/downloader: commit larger state batches Collect nodes into a batch up to the ideal size instead of committing whenever a node is received. * core: optimize HasBlock check This avoids a random database read to get the number. * core: use numberCache in HasHeader numberCache has higher capacity, increasing the odds of finding the header without a database lookup. * core: write imported block data using a batch Restore batch writes of state and add blocks, tx entries, receipts to the same batch. The change also simplifies the miner. This commit also removes posting of logs when a forked block is imported. * core: fix DB write error handling * ethdb: use RLock for Has * core: fix HasBlock comment
* core/state: revert metro suicide map addition (#15024)Péter Szilágyi2017-08-242-47/+27
|
* core/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-2710-216/+312
| | | | | | | | | 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/downloader: separate state sync from queue (#14460)Felix Lange2017-06-222-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eth/downloader: separate state sync from queue Scheduling of state node downloads hogged the downloader queue lock when new requests were scheduled. This caused timeouts for other requests. With this change, state sync is fully independent of all other downloads and doesn't involve the queue at all. State sync is started and checked on in processContent. This is slightly awkward because processContent doesn't have a select loop. Instead, the queue is closed by an auxiliary goroutine when state sync fails. We tried several alternatives to this but settled on the current approach because it's the least amount of change overall. Handling of the pivot block has changed slightly: the queue previously prevented import of pivot block receipts before the state of the pivot block was available. In this commit, the receipt will be imported before the state. This causes an annoyance where the pivot block is committed as fast block head even when state downloads fail. Stay tuned for more updates in this area ;) * eth/downloader: remove cancelTimeout channel * eth/downloader: retry state requests on timeout * eth/downloader: improve comment * eth/downloader: mark peers idle when state sync is done * eth/downloader: move pivot block splitting to processContent This change also ensures that pivot block receipts aren't imported before the pivot block itself. * eth/downloader: limit state node retries * eth/downloader: improve state node error handling and retry check * eth/downloader: remove maxStateNodeRetries It fails the sync too much. * eth/downloader: remove last use of cancelCh in statesync.go Fixes TestDeliverHeadersHang*Fast and (hopefully) the weird cancellation behaviour at the end of fast sync. * eth/downloader: fix leak in runStateSync * eth/downloader: don't run processFullSyncContent in LightSync mode * eth/downloader: improve comments * eth/downloader: fix vet, megacheck * eth/downloader: remove unrequested tasks anyway * eth/downloader, trie: various polishes around duplicate items This commit explicitly tracks duplicate and unexpected state delieveries done against a trie Sync structure, also adding there to import info logs. The commit moves the db batch used to commit trie changes one level deeper so its flushed after every node insertion. This is needed to avoid a lot of duplicate retrievals caused by inconsistencies between Sync internals and database. A better approach is to track not-yet-written states in trie.Sync and flush on commit, but I'm focuing on correctness first now. The commit fixes a regression around pivot block fail count. The counter previously was reset to 1 if and only if a sync cycle progressed (inserted at least 1 entry to the database). The current code reset it already if a node was delivered, which is not stong enough, because unless it ends up written to disk, an attacker can just loop and attack ad infinitum. The commit also fixes a regression around state deliveries and timeouts. The old downloader tracked if a delivery is stale (none of the deliveries were requestedt), in which case it didn't mark the node idle and did not send further requests, since it signals a past timeout. The current code did mark it idle even on stale deliveries, which eventually caused two requests to be in flight at the same time, making the deliveries always stale and mass duplicating retrievals between multiple peers. * eth/downloader: fix state request leak This commit fixes the hang seen sometimes while doing the state sync. The cause of the hang was a rare combination of events: request state data from peer, peer drops and reconnects almost immediately. This caused a new download task to be assigned to the peer, overwriting the old one still waiting for a timeout, which in turned leaked the requests out, never to be retried. The fix is to ensure that a task assignment moves any pending one back into the retry queue. The commit also fixes a regression with peer dropping due to stalls. The current code considered a peer stalling if they timed out delivering 1 item. However, the downloader never requests only one, the minimum is 2 (attempt to fine tune estimated latency/bandwidth). The fix is simply to drop if a timeout is detected at 2 items. Apart from the above bugfixes, the commit contains some code polishes I made while debugging the hang. * core, eth, trie: support batched trie sync db writes * trie: rename SyncMemCache to syncMemBatch
* core/state: fixed (self)destructed objectsJeffrey Wilcke2017-05-182-2/+9
| | | | | | Add the object to the list of destructed objects during a selfdestruct / suicide operation and also remove it from the list once the journal reverts.
* consensus, core/*, params: metropolis preparation refactorJeffrey Wilcke2017-05-181-34/+57
| | | | | | | | | | | | | | | | | | | | | | | | This commit is a preparation for the upcoming metropolis hardfork. It prepares the state, core and vm packages such that integration with metropolis becomes less of a hassle. * Difficulty calculation requires header instead of individual parameters * statedb.StartRecord renamed to statedb.Prepare and added Finalise method required by metropolis, which removes unwanted accounts from the state (i.e. selfdestruct) * State keeps record of destructed objects (in addition to dirty objects) * core/vm pre-compiles may now return errors * core/vm pre-compiles gas check now take the full byte slice as argument instead of just the size * core/vm now keeps several hard-fork instruction tables instead of a single instruction table and removes the need for hard-fork checks in the instructions * core/vm contains a empty restruction function which is added in preparation of metropolis write-only mode operations * Adds the bn256 curve * Adds and sets the metropolis chain config block parameters (2^64-1)
* eth: add debug_storageRangeAtFelix Lange2017-04-252-2/+18
|
* trie: add start key to NodeIterator constructorsFelix Lange2017-04-253-5/+5
| | | | | | | | | The 'step' method is split into two parts, 'peek' and 'push'. peek returns the next state but doesn't make it current. The end of iteration was previously tracked by setting 'trie' to nil. End of iteration is now tracked using the 'iteratorEnd' error, which is slightly cleaner and requires less code.
* trie: clean up iterator constructorsFelix Lange2017-04-253-4/+5
| | | | | | | Make it so each iterator has exactly one public constructor: - NodeIterators can be created through a method. - Iterators can be created through NewIterator on any NodeIterator.
* core/state: make TestSnapshotRandom work again (#3816)gary rong2017-04-053-5/+8
| | | | | | 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.
* core/state: expose CommitToFelix Lange2017-03-231-2/+3
|
* Merge pull request #3723 from karalabe/logger-updates-2Péter Szilágyi2017-02-282-17/+2
|\ | | | | Logger updates
| * core/state: drop most of a logs (useless at this volume)Péter Szilágyi2017-02-282-17/+2
| |
* | 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-232-18/+16
|
* trie: add difference iterator (#3637)Nick Johnson2017-02-231-17/+16
| | | | | This PR implements a differenceIterator, which allows iterating over trie nodes that exist in one trie but not in another. This is a prerequisite for most GC strategies, in order to find obsolete nodes.
* core, core/state, core/vm: remove exported account getters (#3618)Jeffrey Wilcke2017-02-237-101/+99
| | | | 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-152-4/+4
|
* state: take write lock in GetNonce (#3625)Brian Schroeder2017-02-011-3/+5
| | | | We must take a write lock here because `GetNonce` calls `StateDB.GetStateObject`, which mutates the DB's live set.
* cmd/geth, core: add support for recording SHA3 preimages (#3543)Nick Johnson2017-01-172-1/+32
|
* all: fix ineffectual assignments and remove uses of crypto.Sha3Felix Lange2017-01-091-4/+4
| | | | | go get github.com/gordonklaus/ineffassign ineffassign .
* all: fix spelling errorsPéter Szilágyi2017-01-071-1/+1
|
* all: fix issues reported by honnef.co/go/simple/cmd/gosimpleFelix Lange2017-01-072-3/+3
|
* all: gofmt -w -sFelix Lange2017-01-064-9/+9
|
* trie: remove dependency on ethdbFelix Lange2017-01-062-9/+8
| | | | This removes the core/types -> leveldb dependency.
* core/vm: move Log to core/typesFelix Lange2017-01-062-12/+13
| | | | | | | | This significantly reduces the dependency closure of ethclient, which no longer depends on core/vm as of this change. All uses of vm.Logs are replaced by []*types.Log. NewLog is gone too, the constructor simply returned a literal.
* core, core/vm: implemented a generic environment (#3348)Jeffrey Wilcke2016-12-062-1/+10
| | | | | | | | 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-253-2/+51
| | | | | Implemented proper touch revert journal entries and copied a Parity consensus bug in order to remain in sync with the current longest chain.
* cmd/geth, core, light, mobile: removed state account StartingNonceJeffrey Wilcke2016-11-231-6/+2
| | | | All account's nonce start at 0.
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-135-18/+38
| | | | | | | | | | | | | | | 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>
* core/state, eth/downloader, trie: reset fast-failure on progressPéter Szilágyi2016-10-312-7/+9
|
* cmd/geth, trie: report on trie cache unloads, also add debug logPéter Szilágyi2016-10-191-0/+2
|
* cmd, core/state: allow configurable trie cache generationsPéter Szilágyi2016-10-191-5/+5
|
* core/state: bump trie cache values slightlyFelix Lange2016-10-181-4/+4
|
* trie, core/state: improve memory usage and performance (#3135)Felix Lange2016-10-152-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-065-27/+27
| | | | The delete/remove naming has caused endless confusion in the past.
* core/state: implement reverts by journaling all changesFelix Lange2016-10-068-143/+584
| | | | | | | | | | 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-032-18/+24
|
* cmd, core, internal, light, tests: avoid hashing the code in the VMPéter Szilágyi2016-10-015-11/+22
|
* core, eth, trie: reuse trie journals in all our codePéter Szilágyi2016-09-281-9/+42
|
* core, trie: replace state caches with trie journalFelix Lange2016-09-284-63/+69
|
* core/state: track all accounts in canon stateFelix Lange2016-09-266-295/+367
| | | | | 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-192-6/+0
|
* core/state: Fix memory expansion bug by not copying clean objectsNick Johnson2016-09-193-5/+8
|
* Revert "test, cmd/evm, core, core/vm: illegal code hash implementation"Péter Szilágyi2016-06-291-10/+0
| | | | This reverts commit 7a5b571c671e70e0e4807cf971c15e2d1e09d33d.
* Revert "core: update DAO soft-fork number, clean up the code"Péter Szilágyi2016-06-291-0/+2
| | | | This reverts commit ba784bdf36f2daf7827ec1ec864f3393ba8d86a0.
* core: update DAO soft-fork number, clean up the codePéter Szilágyi2016-06-231-2/+0
|
* test, cmd/evm, core, core/vm: illegal code hash implementationJeffrey Wilcke2016-06-221-0/+10
| | | | | | | | 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.
* core/state, eth: Updated suicides objects when tracing transactionsJeffrey Wilcke2016-06-131-0/+21
| | | | | | | | | | | | | | | | | | | | | | Consensus rules dictate that objects can only be removed during the finalisation of the transaction (i.e. after all calls have finished). Thus calling a suicided contract twice from the same transaction: A->B(S)->ret(A)->B(S) results in 2 suicides. Calling the suicided object twice from two transactions: A->B(S), A->B, results in only one suicide and a call to an empty object. Our current debug tracing functionality replays all transaction that were executed prior to the targetted transaction in order to provide the user with an accurate trace. As a side effect to calling StateDB.IntermediateRoot it also deletes any suicides objects. Our tracing code never calls this function because it isn't interested in the intermediate root. Becasue of this it caused a bug in the tracing code where transactions that were send to priviously deleted objects resulted in two suicides rather than one suicide and a call to an empty object. Fixes #2542
* Merge pull request #2585 from karalabe/trie-dirty-trackingJeffrey Wilcke2016-05-311-0/+22
|\ | | | | core, core/state, trie: enterprise hand-tuned multi-level caching
| * core, core/state, trie: enterprise hand-tuned multi-level cachingPéter Szilágyi2016-05-261-0/+22
| |
* | core/state: return the starting nonce for non-existent accs (testnet)Péter Szilágyi2016-05-271-1/+1
|/
* all: fix go vet warningsFelix Lange2016-04-151-5/+5
|
* core/state: fix TestDumpFelix Lange2016-04-153-9/+27
| | | | Lazy "I'll just put return here instead of fixing the test" found by go vet.
* all: update license informationFelix Lange2016-04-152-2/+2
|
* 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.
* core: various typosLeif Jurvetson2016-03-162-2/+2
|
* Merge pull request #2242 from jimenezrick/upstream-cryptoJeffrey Wilcke2016-02-241-2/+2
|\ | | | | Closes #2241: Use Keccak-256 from golang.org/x/crypto/sha3 and mention explicitly
| * 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
* | Merge pull request #2095 from karalabe/trie-node-iteratorPéter Szilágyi2016-02-233-3/+314
|\ \ | |/ |/| core/state, trie: add node iterator, test state/trie sync consistency
| * core/state, trie: switch iterator panics to error fieldsPéter Szilágyi2016-02-162-26/+37
| |
| * core/state, trie: node iterator reports parent hashes tooPéter Szilágyi2016-02-161-7/+13
| |
| * core/state, trie: surface iterator entry hashesPéter Szilágyi2016-02-163-7/+67
| |
| * core/state, trie: add node iterator, test state/trie sync consistencyPéter Szilágyi2016-02-162-3/+237
| |
* | core, core/vm, crypto: fixes for homesteadJeffrey Wilcke2016-02-183-24/+3
| | | | | | | | | | | | * 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-182-0/+29
|/ | | | | | | | * 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, ethdb, trie: test intermediate secure key leak, fix memdb bugPéter Szilágyi2016-01-201-0/+68
|
* core/state, trie: don't leak database writes before commitPéter Szilágyi2016-01-202-3/+59
|
* core/state: always commit in batches, just finish if not needed laterPéter Szilágyi2016-01-131-1/+2
|
* core, eth/downloader: ensure state presence in ancestor lookupPéter Szilágyi2016-01-041-1/+0
|
* core/state, core/types use package rlp for state, receipt serialisationFelix Lange2015-12-184-62/+61
|
* Merge pull request #1889 from karalabe/fast-sync-rebaseJeffrey Wilcke2015-10-222-0/+308
|\ | | | | eth/63 fast synchronization algorithm
| * core, eth, trie: fix data races and merge/review issuesPéter Szilágyi2015-10-212-4/+3
| |
| * eth/downloader: concurrent receipt and state processingPéter Szilágyi2015-10-192-68/+41
| |
| * core, eth, trie: direct state trie synchronizationPéter Szilágyi2015-10-192-0/+336
| |
* | core, core/state: move gas tracking out of core/stateFelix Lange2015-10-173-80/+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/state, core, miner: handle missing root error from state.NewGustav Simonsson2015-10-163-9/+9
|
* cmd, core, eth: added official testnetJeffrey Wilcke2015-10-091-0/+5
|
* cmd/evm, core/vm, test: refactored VM and coreJeffrey Wilcke2015-10-042-80/+27
| | | | | | | | | | | | | | | | | * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * core/vm: byte code VM moved to jump table instead of switch * Moved `vm.Transfer` to `core` package and changed execution to call `env.Transfer` instead of `core.Transfer` directly. * Byte code VM now shares the same code as the JITVM * Renamed Context to Contract * Changed initialiser of state transition & unexported methods * Removed the Execution object and refactor `Call`, `CallCode` & `Create` in to their own functions instead of being methods. * Removed the hard dep on the state for the VM. The VM now depends on a Database interface returned by the environment. In the process the core now depends less on the statedb by usage of the env * Moved `Log` from package `core/state` to package `core/vm`.
* core, core/state: batch-based state syncFelix Lange2015-09-233-51/+46
|
* core, trie: new trieFelix Lange2015-09-232-14/+25
|
* all: move common.Database to package ethdbFelix Lange2015-09-152-5/+7
|
* core, core/vm, core/state: remove unused functionsGustav Simonsson2015-09-112-64/+0
|
* core/state: test formatting adhering to Go conventionGustav Simonsson2015-09-091-17/+17
|
* core/state: deleted field in StateObject Copy() and unit testGustav Simonsson2015-09-082-0/+105
|
* core, tests: Double SUICIDE fixJeffrey Wilcke2015-08-212-9/+12
|
* core/state: Set log index. Closes #1226Jeffrey Wilcke2015-07-291-0/+5
|
* all: fix license headers one more timeFelix Lange2015-07-249-9/+9
| | | | I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
* all: update license headers to distiguish GPL/LGPLFelix Lange2015-07-239-36/+36
| | | | | All code outside of cmd/ is licensed as LGPL. The headers now reflect this by calling the whole work "the go-ethereum library".
* all: add some godoc synopsis commentsFelix Lange2015-07-071-0/+1
|
* all: update license informationFelix Lange2015-07-079-0/+144
|
* core, miner, tests: renamed state methodsJeffrey Wilcke2015-07-042-3/+5
| | | | | | | | | | | | * 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.
* core, core/state: only write necessary state. Skip intermediateJeffrey Wilcke2015-07-042-10/+20
|
* core, miner, xeth: renamed gas methodsobscuren2015-06-211-16/+3
| | | | | | * BuyGas => SubGas * RefundGas => AddGas * SetGasPool => SetGasLimit
* core/state: removed trie copyobscuren2015-06-171-1/+1
|
* core/state: removed state from state objectobscuren2015-06-173-31/+20
|
* core/state: fixed state testsobscuren2015-06-171-13/+10
|
* 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-172-32/+25
|
* core/state, core/vm: cleanup refundsobscuren2015-06-171-14/+8
|
* core/vm, core/state: added storage to structured vm loggingobscuren2015-06-101-0/+16
|
* core, xeth: moved nonce management burden from xeth to txpoolobscuren2015-06-101-1/+1
|
* core: fixed an issue with storing receiptsobscuren2015-05-281-7/+14
|
* 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
* core: removed nonce resetting from the block processor.obscuren2015-04-211-0/+1
| | | | All nonce error handling has been moved to the worker
* state: fixed mutex lockesobscuren2015-04-141-2/+14
|
* state: fixed nonce issue in managed stateobscuren2015-04-141-2/+2
| | | | Rlock => Lock when creating a new nonce
* Moved handling of nonces to the managed stateobscuren2015-04-092-5/+8
|
* Improved transaction poolobscuren2015-04-091-8/+4
| | | | | | | | | | The transaction pool will now some easily be able to pre determine the validity of a transaction by checking the following: * Account existst * gas limit higher than the instrinsic gas * enough funds to pay upfront costs * nonce check
* Changed how logs are being recordedobscuren2015-04-082-81/+49
| | | | | | | Logs are now recorded per transactions instead of tossing them out after each transaction. This should also fix an issue with `eth_getFilterLogs` (#629) Also now implemented are the `transactionHash, blockHash, transactionIndex, logIndex` on logs. Closes #654.
* Added additional methods to the managed stateobscuren2015-04-082-2/+44
| | | | | * GetNonce Returns the canonical nonce * SetNonce Set the managed account's nonce
* Moved logging to logger.Coreobscuren2015-04-042-5/+5
|
* basic glogobscuren2015-04-042-7/+16
|
* glog wipobscuren2015-04-031-1/+4
|
* Removed old (unused) argumentobscuren2015-04-022-2/+2
|
* fixed testsobscuren2015-04-011-1/+1
|
* Blocktest fixed, Execution fixedobscuren2015-04-011-26/+42
| | | | | | * Added new CreateAccount method which properly overwrites previous accounts (excluding balance) * Fixed block tests (100% success)
* Secure trie shakey / key matchingobscuren2015-03-241-4/+4
|
* moved state and vm to coreobscuren2015-03-239-0/+1159