aboutsummaryrefslogtreecommitdiffstats
path: root/core/database_util_test.go
Commit message (Collapse)AuthorAgeFilesLines
* all: switch gas limits from big.Int to uint64Péter Szilágyi2018-01-031-7/+7
|
* core/types, internal: swap Receipt.Failed to StatusPéter Szilágyi2017-10-021-1/+1
|
* core, eth: add bloombit indexer, filter based on itZsolt Felfoldi2017-09-061-108/+0
|
* core/types: encode receipt status in PostState fieldFelix Lange2017-08-251-2/+2
| | | | | | | This fixes a regression where the new Failed field in ReceiptForStorage rejected previously stored receipts. Fix it by removing the new field and store status in the PostState field. This also removes massive RLP hackery around the status field.
* core: implement Metropolis EIP 658, receipt status byterjl4934564422017-08-221-2/+2
|
* core: remove redundant storage of transactions and receipts (#14801)Péter Szilágyi2017-07-151-67/+7
| | | | | | | | | | | | | | * core: remove redundant storage of transactions and receipts * core, eth, internal: new transaction schema usage polishes * eth: implement upgrade mechanism for db deduplication * core, eth: drop old sequential key db upgrader * eth: close last iterator on successful db upgrage * core: prefix the lookup entries to make their purpose clearer
* core, consensus: pluggable consensus engines (#3817)Péter Szilágyi2017-04-051-55/+5
| | | | | This commit adds pluggable consensus engines to go-ethereum. In short, it introduces a generic consensus interface, and refactors the entire codebase to use this interface.
* core: refactor genesis handlingFelix Lange2017-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This commit solves several issues concerning the genesis block: * Genesis/ChainConfig loading was handled by cmd/geth code. This left library users in the cold. They could specify a JSON-encoded string and overwrite the config, but didn't get any of the additional checks performed by geth. * Decoding and writing of genesis JSON was conflated in WriteGenesisBlock. This made it a lot harder to embed the genesis block into the forthcoming config file loader. This commit changes things so there is a single Genesis type that represents genesis blocks. All uses of Write*Genesis* are changed to use the new type instead. * If the chain config supplied by the user was incompatible with the current chain (i.e. the chain had already advanced beyond a scheduled fork), it got overwritten. This is not an issue in practice because previous forks have always had the highest total difficulty. It might matter in the future though. The new code reverts the local chain to the point of the fork when upgrading configuration. The change to genesis block data removes compression library dependencies from package core.
* common: move big integer math to common/math (#3699)Felix Lange2017-02-271-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common: remove CurrencyToString Move denomination values to params instead. * common: delete dead code * common: move big integer operations to common/math This commit consolidates all big integer operations into common/math and adds tests and documentation. There should be no change in semantics for BigPow, BigMin, BigMax, S256, U256, Exp and their behaviour is now locked in by tests. The BigD, BytesToBig and Bytes2Big functions don't provide additional value, all uses are replaced by new(big.Int).SetBytes(). BigToBytes is now called PaddedBigBytes, its minimum output size parameter is now specified as the number of bytes instead of bits. The single use of this function is in the EVM's MSTORE instruction. Big and String2Big are replaced by ParseBig, which is slightly stricter. It previously accepted leading zeros for hexadecimal inputs but treated decimal inputs as octal if a leading zero digit was present. ParseUint64 is used in places where String2Big was used to decode a uint64. The new functions MustParseBig and MustParseUint64 are now used in many places where parsing errors were previously ignored. * common: delete unused big integer variables * accounts/abi: replace uses of BytesToBig with use of encoding/binary * common: remove BytesToBig * common: remove Bytes2Big * common: remove BigTrue * cmd/utils: add BigFlag and use it for error-checked integer flags While here, remove environment variable processing for DirectoryFlag because we don't use it. * core: add missing error checks in genesis block parser * common: remove String2Big * cmd/evm: use utils.BigFlag * common/math: check for 256 bit overflow in ParseBig This is supposed to prevent silent overflow/truncation of values in the genesis block JSON. Without this check, a genesis block that set a balance larger than 256 bits would lead to weird behaviour in the VM. * cmd/utils: fixup import
* all: fix issues reported by honnef.co/go/simple/cmd/gosimpleFelix Lange2017-01-071-2/+2
|
* core/vm: move Log to core/typesFelix Lange2017-01-061-30/+24
| | | | | | | | 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/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-2/+3
| | | | | | | | | | | | | | | 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>
* tests: update test files from github.com/ethereum/tests @ 45bc1d21d3c1Felix Lange2016-10-061-2/+3
| | | | | | Two new tests are skipped because they're buggy. Making some newer random state tests work required implementing the 'compressed return value encoding'.
* accounts, core, eth: pass chain config for chain maker to test DAOPéter Szilágyi2016-07-151-1/+1
|
* core: improved chainDb using sequential keyszsfelfoldi2016-06-071-40/+40
|
* core, core/types, eth: add and use Block.BodyFelix Lange2016-04-151-3/+3
| | | | | This fixes a few uses of unkeyed Body literals which go vet was complaining about.
* cmd, eth, ethdb, node: prioritise chaindata for resources, bump cachePéter Szilágyi2016-03-091-1/+1
|
* core, core/vm, crypto: fixes for homesteadJeffrey Wilcke2016-02-181-2/+2
| | | | | | * Removed some strange code that didn't apply state reverting properly * Refactored code setting from vm & state transition to the executioner * Updated tests
* core, eth, miner, xeth: clean up tx/receipt db accessorsPéter Szilágyi2015-11-191-0/+609