Péter Szilágyi
399c920380
core: separate and contain POW verifier, extensive tests
9 years ago
Felix Lange
8c4dab77ba
all: move common.Database to package ethdb
9 years ago
Péter Szilágyi
cdc2662c40
core: split out TD from database and all internals
9 years ago
Péter Szilágyi
2b339cbbd8
core, eth: split the db blocks into headers and bodies
9 years ago
Gustav Simonsson
7324176f70
Add tests for uncle timestamps and refactor timestamp type
9 years ago
Jeffrey Wilcke
b4369e1015
core, miner: write miner receipts
9 years ago
Jeffrey Wilcke
a23478c0be
core, eth, trie, xeth: merged state, chain, extra databases in one
9 years ago
Jeffrey Wilcke
846f34f78b
core/vm, tests: implemented semi-jit vm
...
* changed stack and removed stack ptr. Let go decide on slice reuse.
9 years ago
Jeffrey Wilcke
7a75da63c6
core: added default genesis block
...
When a user runs a freshly setup geth w/o a database initialised the
default genesis block is decoded and inserted in to the database.
9 years ago
Jeffrey Wilcke
acd2c4e520
core: added a running flag to prevent panics in the chainmanager
...
The running flag will determine whether the chain manager is still
running or not. This will prevent the quit channel from being closed
twice resulting in a panic. This PR should fix this issue.
Closes #1559
9 years ago
Jeffrey Wilcke
036e6301af
cmd/geth, core, eth: Version 1.0.0
...
Genesis release. Closes #1402
Conflicts:
cmd/geth/main.go
9 years ago
Felix Lange
bfbcfbe4a9
all: fix license headers one more time
...
I forgot to update one instance of "go-ethereum" in commit 3f047be5a
.
9 years ago
Jeffrey Wilcke
8fc9830971
cmd/core,xeth: removed unneeded states & added batch writes
9 years ago
Felix Lange
3f047be5aa
all: update license headers to distiguish GPL/LGPL
...
All code outside of cmd/ is licensed as LGPL. The headers
now reflect this by calling the whole work "the go-ethereum library".
9 years ago
Jeffrey Wilcke
e17d8ddbeb
core: during chain reorg rewrite receipts and transactions
...
Added PutBlockReceipts; storing receipts by blocks. Eventually this will
require pruning during some cleanup cycle. During forks the receipts by
block are used to get the new canonical receipts and transactions.
This PR fixes #1473 by rewriting transactions and receipts from the point
of where the fork occured.
9 years ago
Jeffrey Wilcke
a32c51effd
cmd, core, eth, common: genesis preparation
...
Implemented the --genesis flag thru which we can set a custom genesis
block, including the official Ethereum genesis block.
9 years ago
Gustav Simonsson
5d6d40f329
Use uint64 on ts in chain_manager, block_processor
9 years ago
Felix Lange
bdae4fd573
all: add some godoc synopsis comments
9 years ago
Felix Lange
ea54283b30
all: update license information
9 years ago
Jeffrey Wilcke
bcc1660abc
core, miner, tests: added test, implemented bad block reporting
9 years ago
Jeffrey Wilcke
2feb23c1da
core, eth, miner, xeth: receipt storage fix
...
* Added GetReceiptsFromBlock, GetReceipt, PutReceipts
* Added ContractAddress to receipt. See #1042
9 years ago
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
9 years ago
Jeffrey Wilcke
70d5d791cc
core, cmd/geth: improved recover functionality
...
`geth recover` now accepts both hashes and numbers using "#" and no
longer requires the ethereum instance.
9 years ago
Jeffrey Wilcke
29ab1fa8a5
core, cmd/geth: recover by number
9 years ago
Jeffrey Wilcke
c14f0a4471
core: added checkpoint for last block
...
* Add a checkpoint every X blocks
* Removed queued write
9 years ago
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.
9 years ago
Gustav Simonsson
4c490db6af
Use uint64 for block header timestamp
9 years ago
Péter Szilágyi
5f3792c2a7
cmd/geth: decent error message if metrics are disabled
10 years ago
Péter Szilágyi
01fe972113
cmd, core, eth, metrics, p2p: require enabling metrics
10 years ago
Jeffrey Wilcke
992e4f83cb
core: replaced BlockCache with lru.Cache
10 years ago
Jeffrey Wilcke
e349fac97d
core: fixed tests
10 years ago
Jeffrey Wilcke
aba901e13c
core: removed write's go routine
10 years ago
obscuren
07db098ccf
core: renamed next to pending & fixed tests
10 years ago
obscuren
855e76fddd
core: reduced cache limit to 256
10 years ago
obscuren
6ca3a44638
core: switched to proper LRU
10 years ago
obscuren
4460dc9d1a
core: added LRU caching and added batch writing when LDB is used
10 years ago
Felix Lange
76821d167a
core, eth, rpc: avoid unnecessary block header copying
10 years ago
Felix Lange
fccc7d71eb
core: remove superfluous big.Int allocations
...
With blocks now being immutable, use big.Int values from
accessor functions instead of copying their results.
10 years ago
Felix Lange
1d42888d30
core/types: make blocks immutable
10 years ago
Jeffrey Wilcke
d1e93db3eb
core, miner: added write block method & changed mining propagation
10 years ago
Péter Szilágyi
792b0ddccd
core, eth, eth/fetcher, ethdb: polish metrics gathering a bit
10 years ago
Péter Szilágyi
43e4a6501b
core, ethdb: instrument the block and state db
...
Conflicts:
ethdb/database.go
10 years ago
Péter Szilágyi
7f92e708c5
cmd/geth, core: impl. percentile reporting, instrument insertions
10 years ago
obscuren
c590b505ed
core, ethdb, trie: validate database errors
10 years ago
obscuren
e79cc42dfe
core: moved check for max queue to checkQueue
...
Moved the queue to check to the checkQueue method so no undeeded loops
need to be initiated or sorting needs to happen twice.
10 years ago
obscuren
645dfd9693
core: changed interrupt strategy
...
Removed chain manager's select/channel approach when checking for
interrupts. Now using an atomic int32 instead which checked for every
block processed.
10 years ago
obscuren
90c4493a10
eth, core: interupt the chain processing on stop
...
Added an additional channel which is used to interupt the chain manager
when it's processing blocks.
10 years ago
obscuren
1774c49456
core: log tx count for each set of blocks we're importing
10 years ago
Péter Szilágyi
d652a58ada
core: fix a race condition accessing the gas limit
10 years ago
Péter Szilágyi
fecf214175
core: fix a lock annoyance and potential deadlock
10 years ago