Commit Graph

168 Commits

Author SHA1 Message Date
Jeffrey Wilcke
e6bb9c1cad core, miner: removed vm errors from consensus err checking
Removed VM errors from the consensus errors. They now used for output
only.
2015-07-06 12:43:05 +02:00
Jeffrey Wilcke
bcc1660abc core, miner, tests: added test, implemented bad block reporting 2015-07-05 15:14:31 +02:00
Jeffrey Wilcke
ab16ce70fc core, miner, tests: renamed state methods
* 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.
2015-07-04 02:51:36 +02:00
Jeffrey Wilcke
2feb23c1da core, eth, miner, xeth: receipt storage fix
* Added GetReceiptsFromBlock, GetReceipt, PutReceipts
* Added ContractAddress to receipt. See #1042
2015-07-04 02:32:10 +02:00
Jeffrey Wilcke
0e33fbdcb9 miner: ignore future errors 2015-07-03 17:21:23 +02:00
Jeffrey Wilcke
29e2fb38f8 core, miner: miner header validation, transaction & receipt writing
* 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
2015-07-03 13:56:50 +02:00
Gustav Simonsson
4c490db6af Use uint64 for block header timestamp 2015-06-30 10:52:11 +02:00
Jeffrey Wilcke
d8fe64acaa core, miner: added queued write to WriteBlock
This fixes an issue with the lru cache not being available when calling
WriteBlock. WriteBlock previously always assumed to be called from the
InsertChain where the lru cache was always created prior to calling
WriteBlock. When being called from the worker this could lead in to a
nil pointer exception being thrown and causing database corruption.
2015-06-30 11:14:43 +02:00
Jeffrey Wilcke
a8ebf756c7 Merge branch 'miner-broadcast' into core-optimisations-2
Conflicts:
	core/chain_manager.go
	miner/worker.go
2015-06-29 18:55:49 +02:00
Jeffrey Wilcke
ac80ec59dc miner: update root only when mining 2015-06-29 18:51:49 +02:00
Felix Lange
1d42888d30 core/types: make blocks immutable 2015-06-29 18:51:47 +02:00
Jeffrey Wilcke
b39042db56 core, miner: implemented canary 2015-06-29 13:31:49 +02:00
Jeffrey Wilcke
d1e93db3eb core, miner: added write block method & changed mining propagation 2015-06-29 13:31:49 +02:00
Jeffrey Wilcke
059a1e9e4e miner: broadcast block before insertion/validation 2015-06-29 13:31:49 +02:00
obscuren
07c3de3f75 core, miner, xeth: renamed gas methods
* BuyGas => SubGas
* RefundGas => AddGas
* SetGasPool => SetGasLimit
2015-06-21 17:09:19 +02:00
obscuren
6d817e16c1 core, miner: tx pool drops txs below ask price 2015-06-15 11:33:08 +02:00
obscuren
cf3aabb9d3 miner: update gas used after tx proc for pending block 2015-06-10 13:52:38 +02:00
Jason Carver
a9c058dfe0 crash fix: skip deep log if self.chain is not caught up
@see trace https://gist.github.com/eupraxic/87fdfefe702c51d5944d
2015-06-08 11:49:59 -07:00
obscuren
d09a6e5421 core, eth, miner: moved nonce management to tx pool.
Removed the managed tx state from the chain manager to the transaction
pool where it's much easier to keep track of nonces (and manage them).
The transaction pool now also uses the queue and pending txs differently
where queued txs are now moved over to the pending queue (i.e. txs ready
for processing and propagation).
2015-06-03 22:43:23 +02:00
obscuren
35806ccc1c build server fix 2015-05-28 17:18:13 +02:00
obscuren
912ae80350 miner: Added 5 blocks wait in prep for #1067 2015-05-27 13:33:52 +02:00
obscuren
12650e16d3 core, miner: fixed miner time issue and removed future blocks
* Miner should no longer generate blocks with a time stamp less or equal
than it's parent.
* Future blocks are no longer processed and queued directly.
  Closes #1118
2015-05-27 13:30:52 +02:00
Jason Carver
de12183d38 deep-mining-log: need ring buffer to be one bigger for all-blocks-mined case 2015-05-26 18:55:52 -07:00
Jason Carver
6019f1bb0a deep-mining-log: only track non-stale blocks
if you track stale blocks, then you quickly overflow your ring buffer in the local network case where you're mining every block and generating a lot of stales.
2015-05-26 18:54:56 -07:00
Jason Carver
f1ce5877ba do not export ring buffer struct 2015-05-23 12:09:59 -07:00
Jason Carver
8a7fb5fd34 do not export constant for when to log a deep block you mined 2015-05-23 12:09:52 -07:00
Jason Carver
ba295ec6fe Log locally mined blocks, after they are 5-deep in the chain
This helps determine which blocks are unlikely to end up as uncles

 * Store the 5 most recent locally mined block numbers
 * On every imported block, check if the 5-deep block num is in that store
 * Also confirm that the block is signed with miner's coinbase

Why not just check the coinbase? This log is useful if you're running
multiple miners and want to know if *this* miner is performing well.
2015-05-22 12:53:32 -07:00
obscuren
054abe20b8 miner: moved break INSIDE the switch ... 2015-05-21 19:53:27 +02:00
obscuren
3ea9868b65 miner: on downloader.Done/Fail stop immediately. Ignore pending evs 2015-05-21 18:14:32 +02:00
obscuren
907848997b miner: one-shot update loop 2015-05-21 11:57:00 +02:00
zelig
f9abcee0f9 fix solc tests unskip 2015-05-20 02:47:13 +01:00
Jeffrey Wilcke
bd0c0a633b Merge pull request #1022 from obscuren/parallel_nonce_checks
Parallelise nonce checks
2015-05-18 11:13:53 -07:00
obscuren
bc5e60cd63 miner: stale block notification 2015-05-18 18:16:53 +02:00
Bas van Kervel
60561cdca2 fixed issue when miner is not stopping af stop command 2015-05-18 16:09:01 +02:00
Bas van Kervel
7778740315 fixed race condition in miner 2015-05-18 15:13:58 +02:00
obscuren
c2ef8682fe eth/downloader: moved start event
Start event has moved because it could possibly could stall the miner
2015-05-16 13:02:30 +02:00
Vitalik Buterin
fe64a13cea Adjust miner coinbase and not just miner worker coinbase 2015-05-16 12:56:06 +02:00
obscuren
741fa8ca9c miner: mutex locks on cpu agent. Closes #1007 2015-05-16 12:55:56 +02:00
obscuren
d3e84cc8b4 miner: properly check for mining operation on Register 2015-05-15 20:26:15 +02:00
obscuren
5cec1aad15 core, miner: fork resolving and restart miner after sync op
Fork resolving fixes #940
2015-05-15 20:26:15 +02:00
obscuren
b71091e337 eth, eth/downloader, miner: use download events to check miner start 2015-05-15 00:43:10 +02:00
Jeffrey Wilcke
c7a13c9be8 Merge pull request #969 from Gustav-Simonsson/ethash_improve_hashrate_update2
Make read of ethash hashrate atomic and update ethash godep
2015-05-14 04:05:27 -07:00
Vitalik Buterin
bdec8c3e41 Combined two loops 2015-05-14 05:02:15 -04:00
Gustav Simonsson
b24f16fa53 Make read of ethash hashrate atomic and update ethash godep 2015-05-14 04:05:49 +02:00
Vitalik Buterin
fca3333f7f Created separate family and ancestors environment objects 2015-05-13 20:46:23 -04:00
Gustav Simonsson
2c1b0ff17e Update key store to new spec but keep address field for now
* Also fix address types post-rebase
2015-05-12 17:22:17 +02:00
obscuren
97dd4551ef miner, cmd/geth: miner will not ignored owned account transactions
Miner does not ignore low gas txs from accounts that are owned.
2015-05-11 21:47:34 +02:00
obscuren
21e52efdfe cmd/geth, miner, backend, xeth: Fixed miner threads to be settable
Miner threads are now settable through the admin interface (closes #897)
and specify 0 CPU worker threads when eth_getWork is called (closes #916)
2015-05-11 17:21:22 +02:00
Taylor Gerring
8e77f81586 Return 32-byte hashes from GetWork
Ensures that the Get Work results are a consistent length. Closes #917
2015-05-11 10:11:33 -04:00
obscuren
6ecba12650 miner: added log message for mining operation. #912 2015-05-11 11:39:33 +02:00