aboutsummaryrefslogtreecommitdiffstats
path: root/core/chain_makers.go
Commit message (Collapse)AuthorAgeFilesLines
* core, core/state, trie: EIP158, reprice & skip empty account writeJeffrey Wilcke2016-11-131-10/+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>
* core/state: implement reverts by journaling all changesFelix Lange2016-10-061-1/+1
| | | | | | | | | | 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!
* accounts, core, eth: pass chain config for chain maker to test DAOPéter Szilágyi2016-07-151-3/+25
|
* accounts/a/b/backends, core: chain maker homestead block set to 0Jeffrey Wilcke2016-04-011-15/+6
| | | | | | | 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-4/+23
| | | | | | | | | 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-1/+1
| | | | | The EVM is now initialised with an additional configured object that allows you to turn on debugging options.
* core: various typosLeif Jurvetson2016-03-161-2/+2
|
* core: fix invalid state reuse in chain maker based testsPéter Szilágyi2016-01-111-12/+7
|
* eth/downloader: fix negative balance issue in testsFelix Lange2015-12-181-0/+5
| | | | | | | | | | The test chain generated by makeChainFork included invalid uncle headers, crashing the generator during the state commit. The headers were invalid because they used the iteration counter as the block number, even though makeChainFork uses a block with number > 0 as the parent. Fix this by introducing BlockGen.Number, which allows accessing the actual number of the block being generated.
* core: added a new RemovedLogEventJeffrey Wilcke2015-12-011-2/+2
| | | | | | 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-1/+1
|
* core, eth, rpc: split out block validator and state processorJeffrey Wilcke2015-11-181-7/+4
| | | | | | | | | | | | 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).
* Merge pull request #1889 from karalabe/fast-sync-rebaseJeffrey Wilcke2015-10-221-21/+47
|\ | | | | eth/63 fast synchronization algorithm
| * eth/downloader: concurrent receipt and state processingPéter Szilágyi2015-10-191-1/+1
| |
| * core, eth: receipt chain reconstructionPéter Szilágyi2015-10-191-7/+9
| |
| * core: differentiate receipt concensus and storage decodingPéter Szilágyi2015-10-191-1/+1
| |
| * core: support inserting pure header chainsPéter Szilágyi2015-10-191-13/+37
| |
* | core, core/state: move gas tracking out of core/stateFelix Lange2015-10-171-6/+5
|/ | | | | | | 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.
* Merge pull request #1899 from obscuren/mipmap-bloomJeffrey Wilcke2015-10-171-0/+9
|\ | | | | core, eth/filters, miner, xeth: Optimised log filtering
| * core, eth/filters, miner, xeth: Optimised log filteringJeffrey Wilcke2015-10-171-1/+6
| | | | | | | | | | | | | | Log filtering is now using a MIPmap like approach where addresses of logs are added to a mapped bloom bin. The current levels for the MIP are in ranges of 1.000.000, 500.000, 100.000, 50.000, 1.000. Logs are therefor filtered in batches of 1.000.
| * eth/filters: added benchmarkJeffrey Wilcke2015-10-161-0/+4
| |
* | Merge pull request #1869 from Gustav-Simonsson/gpu_minerJeffrey Wilcke2015-10-161-1/+1
|\ \ | | | | | | all: Add GPU mining, disabled by default
| * | all: Add GPU mining, disabled by defaultGustav Simonsson2015-10-071-1/+1
| | |
* | | core/state, core, miner: handle missing root error from state.NewGustav Simonsson2015-10-161-1/+4
| |/ |/|
* | cmd/geth, cmd/utils, core, rpc: renamed to blockchainJeffrey Wilcke2015-10-041-2/+2
|/ | | | | | * Renamed ChainManager to BlockChain * Checkpointing is no longer required and never really properly worked when the state was corrupted.
* core, core/state: batch-based state syncFelix Lange2015-09-231-5/+9
|
* core: allow modifying test-chain block timesPéter Szilágyi2015-09-171-0/+11
|
* all: move common.Database to package ethdbFelix Lange2015-09-151-3/+4
|
* core: split out TD from database and all internalsPéter Szilágyi2015-09-111-1/+0
|
* Add tests for uncle timestamps and refactor timestamp typeGustav Simonsson2015-08-251-3/+8
|
* core, eth, trie, xeth: merged state, chain, extra databases in oneJeffrey Wilcke2015-08-081-3/+3
|
* core, miner: added difficulty bombJeffrey Wilcke2015-08-051-1/+1
|
* 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".
* cmd, core, eth, common: genesis preparationJeffrey Wilcke2015-07-101-1/+3
| | | | | Implemented the --genesis flag thru which we can set a custom genesis block, including the official Ethereum genesis block.
* Use uint64 on ts in chain_manager, block_processorGustav Simonsson2015-07-081-1/+1
|
* all: update license informationFelix Lange2015-07-071-0/+16
|
* core, miner, tests: renamed state methodsJeffrey Wilcke2015-07-041-2/+2
| | | | | | | | | | | | * 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, miner: miner header validation, transaction & receipt writingJeffrey Wilcke2015-07-031-1/+1
| | | | | | | | * Miners do now verify their own header, not their state. * Changed old putTx and putReceipts to be exported * Moved writing of transactions and receipts out of the block processer in to the chain manager. Closes #1386 * Miner post ChainHeadEvent & ChainEvent. Closes #1388
* Use uint64 for block header timestampGustav Simonsson2015-06-301-1/+1
|
* core: add GenerateChain, GenesisBlockForTestingFelix Lange2015-06-301-74/+127
|
* core/types: make blocks immutableFelix Lange2015-06-301-35/+23
|
* core, miner, xeth: renamed gas methodsobscuren2015-06-211-1/+1
| | | | | | * BuyGas => SubGas * RefundGas => AddGas * SetGasPool => SetGasLimit
* core: settable genesis nonceobscuren2015-06-091-1/+1
| | | | | | | You can set the nonce of the block with `--genesisnonce`. When the genesis nonce changes and it doesn't match with the first block in your database it will fail. A new `datadir` must be given if the nonce of the genesis block changes.
* core: don't remove transactions after block processingFelix Lange2015-06-041-2/+1
| | | | | The transaction pool drops processed transactions on its own during pool maintenance.
* core: fixed testsobscuren2015-05-191-1/+1
|
* core: fixed mining strategyobscuren2015-05-151-1/+1
|
* Integrate new ethash API and change geth makedag cmdGustav Simonsson2015-05-051-2/+2
|
* core: return the index of the block that failed when inserting a chainobscuren2015-04-291-1/+1
|
* core, miner: added value check on tx validationobscuren2015-04-261-2/+2
| | | | | | * Changed CalcGasLimit to no longer need current block * Added a gas * price + value on tx validation * Transactions in the pool are now re-validated once every X
* xeth, core, cmd/utils: Transaction can not be over block gas limitobscuren2015-04-241-1/+1
| | | | Transactions will be invalidated when the tx.gas_limit > block.gas_limit
* core: fixed testobscuren2015-04-231-1/+3
|
* core: moved TD calculation from proc to chainobscuren2015-04-201-2/+2
|
* Improved transaction poolobscuren2015-04-091-6/+7
| | | | | | | | | | 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
* Block header changed & console miner controlobscuren2015-04-061-1/+1
| | | | | | * miner control moved to `admin.miner` * miner option to set extra data * block extra now bytes
* Improved chain manager, improved block processor, fixed testsobscuren2015-04-041-0/+1
| | | | | | * ChainManager allows cached future blocks for later processing * BlockProcessor allows a 4 second window on future blocks * Fixed tests
* Removed old (unused) argumentobscuren2015-04-021-2/+2
|
* moved state and vm to coreobscuren2015-03-231-1/+1
|
* mergeobscuren2015-03-191-1/+1
|\
| * fixed chain event. Closes #529obscuren2015-03-191-2/+2
| |
* | converted chain managerobscuren2015-03-171-5/+5
|/
* Moved ethutil => commonobscuren2015-03-161-15/+15
|
* Add additional extra database for non-protocol related dataobscuren2015-03-121-1/+1
| | | | * Add transaction to extra database after a successful block process
* Separated block db from state db. Partial fix for #416obscuren2015-03-071-1/+1
|
* uncle validationobscuren2015-03-041-1/+1
|
* Changed nonce to a uint64obscuren2015-03-041-3/+3
|
* fixed pow stuffobscuren2015-03-041-3/+3
|
* Introducing ethashMatthew Wampler-Doty2015-03-031-18/+29
|
* public functions for making chains on the flyEthan Buchman2015-02-281-0/+131