aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain_test.go
Commit message (Collapse)AuthorAgeFilesLines
* params: enable Byzantium on Ropsten/tests, fix failuresPéter Szilágyi2017-09-141-1/+1
|
* core: only fire one chain head per batch (#15123)Péter Szilágyi2017-09-111-1/+1
| | | | | | * core: only fire one chain head per batch * miner: announce chan events synchronously
* core, light: send chain events using event.Feed (#14865)Miya Chen2017-08-181-26/+27
|
* core: fix blockchain goroutine leaks in testsPéter Szilágyi2017-08-071-6/+51
|
* core: remove redundant storage of transactions and receipts (#14801)Péter Szilágyi2017-07-151-4/+4
| | | | | | | | | | | | | | * 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/state: access trie through Database interface, track errors (#14589)Felix Lange2017-06-271-5/+5
| | | | | | | | | 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).
* consensus/clique: Proof of Authority (#3753)Péter Szilágyi2017-04-101-4/+1
| | | | This PR is a prototype implementation of plugable consensus engines and the Clique PoA protocol ethereum/EIPs#225
* consensus, core: drop all the legacy custom core error typesPéter Szilágyi2017-04-061-3/+3
|
* core, consensus: pluggable consensus engines (#3817)Péter Szilágyi2017-04-051-49/+48
| | | | | 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-243/+108
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* all: swap out the C++ ethash to the pure Go one (mining todo)Péter Szilágyi2017-03-091-20/+14
|
* params: core, core/vm, miner: 64bit gas instructionsJeffrey Wilcke2017-02-141-8/+8
| | | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* core, eth, internal: Added `debug_getBadBlocks()` method (#3654)Martin Holst Swende2017-02-141-0/+1
| | | | | | | | | | | | | | | | * core,eth,internal: Added `debug_getBadBlocks()` method When bad blocks are discovered, these are stored within geth. An RPC-endpoint makes them availablewithin the `debug` namespace. This feature makes it easier to discover network forks. ``` * core, api: go format + docs * core/blockchain: Documentation, fix minor nitpick * core: fix failing blockchain test
* Revert "params: core, core/vm, miner: 64bit gas instructions (#3514)"Jeffrey Wilcke2017-02-131-8/+8
| | | | This reverts commit 8b57c494908637a5c0e74f8f7a13b3218e026757.
* params: core, core/vm, miner: 64bit gas instructions (#3514)Jeffrey Wilcke2017-02-021-8/+8
| | | | | | | | | | | | | | | | Reworked the EVM gas instructions to use 64bit integers rather than arbitrary size big ints. All gas operations, be it additions, multiplications or divisions, are checked and guarded against 64 bit integer overflows. In additon, most of the protocol paramaters in the params package have been converted to uint64 and are now constants rather than variables. * common/math: added overflow check ops * core: vmenv, env renamed to evm * eth, internal/ethapi, les: unmetered eth_call and cancel methods * core/vm: implemented big.Int pool for evm instructions * core/vm: unexported intPool methods & verification methods * core/vm: added memoryGasCost overflow check and test
* cmd/geth, core: add support for recording SHA3 preimages (#3543)Nick Johnson2017-01-171-13/+13
|
* all: gofmt -w -sFelix Lange2017-01-061-1/+1
|
* Merge pull request #3516 from fjl/types-drop-sign-ecdsaPéter Szilágyi2017-01-061-15/+15
|\ | | | | core/types: remove redundant SignECDSA wrappers, rename to SignTx
| * core/types: remove redundant SignECDSA wrappers, rename to SignTxFelix Lange2017-01-051-15/+15
| |
* | core/vm: move Log to core/typesFelix Lange2017-01-061-1/+1
|/ | | | | | | | 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: eip unit tests (#3309)Jeffrey Wilcke2016-11-281-7/+71
|
* core: improved bad block error reporting (#3320)Jeffrey Wilcke2016-11-231-2/+2
|
* core, core/types: refactored tx chain id checkingJeffrey Wilcke2016-11-141-5/+2
| | | | Refactored explicit chain id checking in to the Sender deriviation method
* core/types, params: EIP#155Jeffrey Wilcke2016-11-131-11/+117
|
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-10/+10
| | | | | | | | | | | | | | | 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>
* cmd/geth, code, eth/downloader: tune import logs and mem statsPéter Szilágyi2016-10-211-1/+1
|
* core: ensure the canonical block is written before the canonical hash is setBas van Kervel2016-08-161-0/+38
|
* accounts, core, eth: pass chain config for chain maker to test DAOPéter Szilágyi2016-07-151-8/+8
|
* core: improved chainDb using sequential keyszsfelfoldi2016-06-071-15/+15
|
* accounts/a/b/backends, core: chain maker homestead block set to 0Jeffrey Wilcke2016-04-011-6/+4
| | | | | | | The chain maker and the simulated backend now run with a homestead phase beginning at block 0 (i.e. there's no frontier). This commit also fixes up #2388
* core: added basic chain configurationJeffrey Wilcke2016-04-011-17/+18
| | | | | | | | | Added chain configuration options and write out during genesis database insertion. If no "config" was found, nothing is written to the database. Configurations are written on a per genesis base. This means that any chain (which is identified by it's genesis hash) can have their own chain settings.
* core: Added EVM configuration optionsJeffrey Wilcke2016-03-241-2/+2
| | | | | The EVM is now initialised with an additional configured object that allows you to turn on debugging options.
* core, eth: replace reorganiz with reorganisLeif Jurvetson2016-03-161-4/+4
|
* core: various typosLeif Jurvetson2016-03-161-4/+4
|
* core: create a header chain structure shared by core.BlockChain and ↵zsfelfoldi2016-03-101-3/+8
| | | | light.LightChain
* core: announce ChainSideEvent during reorgJeffrey Wilcke2016-03-081-0/+80
| | | | | | | | | | | Previously all blocks that were already in our chain were never re announced as potential uncle block (e.g. ChainSideEvent). This is problematic during mining where you want to gather as much possible uncles as possible increasing the profit. This is now addressed in this PR where during reorganisations of chains the old chain is regarded as uncles. Fixed #2298
* eth/filters: ✨ pending logs ✨Jeffrey Wilcke2016-02-131-2/+2
| | | | | | Pending logs are now filterable through the Go API. Filter API changed such that each filter type has it's own bucket and adding filter explicitly requires you specify the bucket to put it in.
* core: added a new RemovedLogEventJeffrey Wilcke2015-12-011-0/+43
| | | | | | When a chain reorganisation occurs we collect the logs that were deleted during the chain reorganisation. The removed logs are posted to the event mux indicating that those were deleted during the reorg.
* cmd, common, core, eth, node, rpc, tests, whisper, xeth: use protocol stacksPéter Szilágyi2015-11-271-4/+4
|
* core, eth, miner, xeth: clean up tx/receipt db accessorsPéter Szilágyi2015-11-191-4/+4
|
* core, eth, rpc: split out block validator and state processorJeffrey Wilcke2015-11-181-64/+75
| | | | | | | | | | | | This removes the burden on a single object to take care of all validation and state processing. Now instead the validation is done by the `core.BlockValidator` (`types.Validator`) that takes care of both header and uncle validation through the `ValidateBlock` method and state validation through the `ValidateState` method. The state processing is done by a new object `core.StateProcessor` (`types.Processor`) and accepts a new state as input and uses that to process the given block's transactions (and uncles for rewords) to calculate the state root for the next block (P_n + 1).
* core, eth, trie: fix data races and merge/review issuesPéter Szilágyi2015-10-211-1/+1
|
* core, eth: roll back uncertain headers in failed fast syncsPéter Szilágyi2015-10-191-2/+13
|
* eth/downloader: concurrent receipt and state processingPéter Szilágyi2015-10-191-10/+19
|
* core, eth: receipt chain reconstructionPéter Szilágyi2015-10-191-5/+157
|
* core: support inserting pure header chainsPéter Szilágyi2015-10-191-235/+352
|
* core: fixed head write on block insertionJeffrey Wilcke2015-10-051-0/+13
| | | | | Due to a rebase this probably got overlooked / ignored. This fixes the issue of a block insertion never writing the last block.
* cmd/geth, cmd/utils, core, rpc: renamed to blockchainJeffrey Wilcke2015-10-041-0/+652
* Renamed ChainManager to BlockChain * Checkpointing is no longer required and never really properly worked when the state was corrupted.