op-geth/core
Felix Lange 10181b57a9 core, eth/downloader: commit block data using batches (#15115)
* ethdb: add Putter interface and Has method

* ethdb: improve docs and add IdealBatchSize

* ethdb: remove memory batch lock

Batches are not safe for concurrent use.

* core: use ethdb.Putter for Write* functions

This covers the easy cases.

* core/state: simplify StateSync

* trie: optimize local node check

* ethdb: add ValueSize to Batch

* core: optimize HasHeader check

This avoids one random database read get the block number. For many uses
of HasHeader, the expectation is that it's actually there. Using Has
avoids a load + decode of the value.

* core: write fast sync block data in batches

Collect writes into batches up to the ideal size instead of issuing many
small, concurrent writes.

* eth/downloader: commit larger state batches

Collect nodes into a batch up to the ideal size instead of committing
whenever a node is received.

* core: optimize HasBlock check

This avoids a random database read to get the number.

* core: use numberCache in HasHeader

numberCache has higher capacity, increasing the odds of finding the
header without a database lookup.

* core: write imported block data using a batch

Restore batch writes of state and add blocks, tx entries, receipts to
the same batch. The change also simplifies the miner.

This commit also removes posting of logs when a forked block is imported.

* core: fix DB write error handling

* ethdb: use RLock for Has

* core: fix HasBlock comment
2017-09-09 19:03:07 +03:00
..
asm core/asm: use ContainsRune instead of IndexRune (#15098) 2017-09-07 23:11:48 +02:00
bloombits core/bloombits: drop nil-matcher special case 2017-09-06 11:14:22 +03:00
state core, eth/downloader: commit block data using batches (#15115) 2017-09-09 19:03:07 +03:00
types core/types, miner: avoid tx sender miscaching (#14773) 2017-09-07 23:22:27 +02:00
vm core/vm: Make MaxCodesize non-retroactive (#15072) 2017-09-04 12:53:25 +03:00
.gitignore Renamed `chain` => `core` 2014-12-04 10:28:02 +01:00
bench_test.go core, light: send chain events using event.Feed (#14865) 2017-08-18 12:58:36 +02:00
block_validator.go core/state: access trie through Database interface, track errors (#14589) 2017-06-27 15:57:06 +02:00
block_validator_test.go core, light: send chain events using event.Feed (#14865) 2017-08-18 12:58:36 +02:00
blockchain.go core, eth/downloader: commit block data using batches (#15115) 2017-09-09 19:03:07 +03:00
blockchain_test.go core, light: send chain events using event.Feed (#14865) 2017-08-18 12:58:36 +02:00
blocks.go core: typos and comments improve 2017-05-25 17:14:33 +03:00
chain_indexer.go core, eth: clean up bloom filtering, add some tests 2017-09-06 11:14:19 +03:00
chain_indexer_test.go core, eth: clean up bloom filtering, add some tests 2017-09-06 11:14:19 +03:00
chain_makers.go consensus, core, tests: implement Metropolis EIP 649 2017-08-24 17:16:39 +03:00
chain_makers_test.go core, light: send chain events using event.Feed (#14865) 2017-08-18 12:58:36 +02:00
dao_test.go core, light: send chain events using event.Feed (#14865) 2017-08-18 12:58:36 +02:00
database_util.go core, eth/downloader: commit block data using batches (#15115) 2017-09-09 19:03:07 +03:00
database_util_test.go core, eth: add bloombit indexer, filter based on it 2017-09-06 11:13:13 +03:00
error.go core: make txpool operate on immutable state 2017-09-05 13:34:41 +03:00
events.go core: remove unused events 2017-06-23 10:39:38 +08:00
evm.go all: update license information 2017-04-14 10:29:00 +02:00
fees.go core: typos and comments improve 2017-05-25 17:14:33 +03:00
gaspool.go consensus, core: drop all the legacy custom core error types 2017-04-06 17:34:19 +03:00
gen_genesis.go core: blocknumber in genesis as hex (#14812) 2017-07-17 10:33:13 +02:00
gen_genesis_account.go tests: update tests and implement general state tests (#14734) 2017-07-11 13:49:14 +02:00
genesis.go core: blocknumber in genesis as hex (#14812) 2017-07-17 10:33:13 +02:00
genesis_alloc.go cmd, core, params: add --rinkeby flag for fast connectivity 2017-05-04 12:36:20 +03:00
genesis_test.go core, light: send chain events using event.Feed (#14865) 2017-08-18 12:58:36 +02:00
headerchain.go core, eth/downloader: commit block data using batches (#15115) 2017-09-09 19:03:07 +03:00
helper_test.go core: typos and comments improve 2017-05-25 17:14:33 +03:00
mkalloc.go core: refactor genesis handling 2017-03-23 15:58:43 +01:00
state_processor.go core/state: revert metro suicide map addition (#15024) 2017-08-24 12:42:00 +02:00
state_transition.go core: make txpool operate on immutable state 2017-09-05 13:34:41 +03:00
tx_journal.go cmd, core, eth: journal local transactions to disk (#14784) 2017-07-28 15:09:39 +02:00
tx_list.go core: make txpool operate on immutable state 2017-09-05 13:34:41 +03:00
tx_list_test.go cmd, core, eth: configurable txpool parameters 2017-05-29 11:29:46 +03:00
tx_pool.go core: use blocks and avoid deep reorgs in txpool 2017-09-05 19:50:29 +03:00
tx_pool_test.go core: use blocks and avoid deep reorgs in txpool 2017-09-05 19:50:29 +03:00
types.go core, consensus: pluggable consensus engines (#3817) 2017-04-05 00:16:29 +02:00