Alexey Sharp
519b19f8aa
Compilation fixes
2021-03-14 08:00:37 +00:00
gary rong
df56644121
core: persist bad blocks ( #21827 )
...
* core: persist bad blocks
* core, eth, internal: address comments
* core/rawdb: add badblocks to inspector
* core, eth: update
* internal: revert
* core, eth: only save 10 bad blocks
* core/rawdb: address comments
* core/rawdb: fix
* core: address comments
# Conflicts:
# core/blockchain.go
# core/rawdb/accessors_chain_test.go
# core/rawdb/database.go
# core/rawdb/schema.go
2021-03-09 10:31:26 +01:00
Alex Sharov
eb7d2ad16a
Add validation of senders amount ( #1539 )
2021-03-04 16:34:49 +07:00
ledgerwatch
da74bd8f38
Fixes to unwind logic for the new staged sync ( #1521 )
...
* Make DB visible
* Further fixes to unwind logic
* Fix lint
* Fix lint
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-28 08:47:31 +00:00
Alex Sharov
6faec7e834
remove blocks compression ( #1453 )
2021-01-27 20:11:34 +07:00
Alex Sharov
068463dff4
Store transactions individually ( #1358 )
...
* Store transactions individually
* Store transactions individually
* save progress
* checkIndex
* merge
2020-11-22 21:25:26 +00:00
Alex Sharov
9712e858e2
Method delete to accept second param: allow delete dupsort values ( #1297 )
...
* aloow_delete_dupsort_values
* check canonical receipt
* exclusive lock for mdbx
* readme_load_dump_tables
* readme_load_dump_tables
* readme_load_dump_tables
* Remove IdealBatchSize change
Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
2020-10-29 13:19:31 +00:00
Alex Sharov
331dcd45eb
Store receipts separately - one record per tx ( #1271 )
...
* squash
* add --database flag to integration
* clean
* split to 2 buckets
* split to 2 buckets
* split to 2 buckets
* split to 2 buckets
* split to 2 buckets
* save progress
* save progress
* improve test
* improve test
* save progress
* change app logic
* change app logic
* return err from rawdb package
* don't clean automatically
* don't clean automatically
* clean
* clean
* clean
* don't rely on `make clean`
* improve cbor code
* clean
* clean
* clean
* fix tests
* rebase master
* stop on error: headers stage
* make TxDb walk and multiwalk safe
* Fix panics
Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
2020-10-25 08:38:55 +00:00
Alex Sharov
c2f41d7723
stop on error: headers stage ( #1289 )
2020-10-24 18:05:12 +01:00
Alex Sharov
77a4b3305d
rawdb to return errors: part 1 ( #1286 )
...
* ReadBlockByNumber and ReadChainConfig return error
* Let's make rawdb package to return error. But by small steps.
High-level methods need to move first:
ReadBlockByNumber
ReadChainConfig
ReadBlockByHash
ReadHeaderByHash
WriteChainConfig
WriteDatabaseVersion
WriteBlock
DeleteTd
WriteTd
ReadTd
2020-10-24 07:57:09 +01:00
Alex Sharov
88a099702b
rawdb.ReadCanonicalHash to return err ( #1204 )
...
* read_canonical_hash_return_err
* hack hugeFreelist
* fix tests
2020-10-10 07:05:56 +01:00
ledgerwatch
086952df16
Fix wrong log error messages ( #1186 )
2020-10-05 16:56:25 +01:00
ledgerwatch
82193a3670
Not swallow errors in accessor_chain ( #1185 )
2020-10-05 15:18:51 +01:00
Alex Sharov
809d79b15f
Switch to cbor ( #1172 )
...
* switch receipts to cbor
* switch receipts to cbor
* rpcdaemon to cache chainconfig
* rpcdaemon to cache chainconfig
* rpcdaemon to cache chainconfig
* rpcdaemon to cache chainconfig
2020-10-02 13:51:20 +01:00
ledgerwatch
4be6174a15
Add comment about ContractAddress in receipts, followed by some simplification ( #1137 )
...
* Add comment about receipts
* Panic on error
* Ignore errors in the simulated backend
* Fix lint
2020-09-26 13:38:10 +01:00
Evgeny Danilenko
e4f495fa44
Get logs ( #1028 )
...
* it compiles
* after recent master
* fix linters warnings
* grpcV7
* go mod tidy
* unmarshall adresses or adress
* fix linters
* after cr
* after cr
* after cr
* after cr
* fix tests
* remove dev version
* it compiles
* mod tidy
* fix bin deps
* use stable version of grpc
* switch back to master constructor
* switch back to master constructor
* add a bit docs
* add a bit docs
Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2020-09-03 08:51:19 +01:00
Alex Sharov
6379516a0f
add support of blocks compression to txpool stage ( #925 )
2020-08-17 10:17:40 +07:00
Alex Sharov
d9d9e14f45
change bucket type to string ( #894 )
2020-08-11 06:55:32 +07:00
Igor Mandrigin
8600616c3d
geth 1.9.18 post-rebase fixups
2020-08-08 17:33:35 +02:00
gary rong
8738c90219
les: historical data garbage collection ( #19570 )
...
This change introduces garbage collection for the light client. Historical
chain data is deleted periodically. If you want to disable the GC, use
the --light.nopruning flag.
# Conflicts:
# cmd/geth/main.go
# cmd/utils/flags.go
# core/blockchain.go
# core/chain_indexer.go
# core/chain_indexer_test.go
# core/chain_makers.go
# core/dao_test.go
# core/genesis.go
# core/rawdb/accessors_chain_test.go
# core/rawdb/accessors_indexes_test.go
# core/rawdb/freezer.go
# core/state/statedb_test.go
# eth/downloader/downloader.go
# eth/downloader/downloader_test.go
# eth/downloader/testchain_test.go
# eth/gen_config.go
# internal/ethapi/api.go
# internal/ethapi/backend.go
# les/api_backend.go
# les/client.go
# les/odr_requests.go
# les/odr_test.go
# les/request_test.go
# les/server.go
# les/sync_test.go
# les/test_helper.go
# les/ulc_test.go
# light/lightchain.go
# light/odr.go
# light/odr_util.go
# light/postprocess.go
# trie/database.go
# trie/iterator_test.go
# trie/trie_test.go
2020-08-07 13:16:46 +02:00
Alex Sharov
95365c8f37
remove ReadLastBlockNumber method = read execution stage status instead ( #780 )
...
* remove ReadLastBlockNumber method = read execution stage status instead
* make linter happy
2020-07-24 14:46:49 +01:00
Alex Sharov
a7e5c4b453
Remove remote_chain package, fix rpc methods: eth_blockNumber and eth_getBlockByNumber ( #769 )
2020-07-21 15:19:04 +07:00
ledgerwatch
49181a298b
Special bucket for transaction senders ( #707 )
...
* Senders in the separate bucket
* Pre-create txSenders bucket
* Fix compile error
* Fix compile error
* Fix compile error, remove block transformations
* Fix formatting
* Fix test
2020-07-03 08:23:49 +01:00
Alex Sharov
b05fafc628
Optimize multi put ( #657 )
...
* remove unused slice from MultiPut
* mutation: reuse tuples slice and preallocate bucketPuts
* use bucketPool in kv_lmdb
* remove duplicated check of context status
* more benchmarks
* remove reusage of puts
2020-06-12 18:59:06 +01:00
Igor Mandrigin
0dae3ade0d
post-rebase fixups
2020-05-20 15:26:22 +03:00
Martin Holst Swende
f66c118cad
cmd, core, eth: background transaction indexing ( #20302 )
...
* cmd, core, eth: init tx lookup in background
* core/rawdb: tiny log fixes to make it clearer what's happening
* core, eth: fix rebase errors
* core/rawdb: make reindexing less generic, but more optimal
* rlp: implement rlp list iterator
* core/rawdb: new implementation of tx indexing/unindex using generic tx iterator and hashing rlp-data
* core/rawdb, cmd/utils: fix review concerns
* cmd/utils: fix merge issue
* core/rawdb: add some log formatting polishes
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
# Conflicts:
# accounts/abi/bind/backends/simulated.go
# cmd/geth/main.go
# cmd/geth/usage.go
# cmd/utils/flags.go
# consensus/clique/snapshot_test.go
# core/bench_test.go
# core/block_validator_test.go
# core/blockchain.go
# core/blockchain_test.go
# core/chain_makers_test.go
# core/dao_test.go
# core/rawdb/accessors_indexes.go
# core/rawdb/schema.go
# eth/config.go
# eth/helper_test.go
# eth/sync.go
# light/odr_test.go
# light/trie_test.go
# light/txpool_test.go
# miner/worker_test.go
# tests/block_test_util.go
2020-05-20 15:26:22 +03:00
b00ris
d0af8a2139
Blocks compression ( #510 )
...
* block compression
* rerun lint
* fix lint
2020-05-04 06:55:51 +01:00
Evgeny Danilenko
17a4a56634
Refactor mining. Remove a few mining goroutines ( #338 )
...
* add context
* extract chain events
* run commit in goroutines
* mine only on canonical
* typo
* linters
* fmt
* mark unused methods
* restore stress test
* test single miner
* remove unsafe Trie storage
* remove locks from miner
* restore interrupt
* remove result goroutine
* remove unconfirmedBlocks
* cherry-pick 04a1d475ff1a36ad8f92fec80385df18c52bdc1f
* extract uncles
* one miner succeeded
* restore context cancel
* cleanup
* skip an unstable test
* remove pending state
* use context instead of interrupt func
* calculate sealHash only once
* comment out unstable test
* after merge
* fix after merge
Co-authored-by: ledgerwatch <akhounov@gmail.com>
2020-02-03 15:02:26 +03:00
alex.sharov
73b50e080d
debug_StorageRangeAt v0, got wrong response on request: {"jsonrpc":"2.0","method":"debug_storageRangeAt","params":["0x2bf07c790737be3bc4c57cbf3dedb231806f6bfef434657d59dcc9ddbe4665ab", 1,"0x8b3b3b624c3c0397d3da8fd861512393d51dcbac","0xfade75560a6cfb895f5dc7c4ab3fa10089ac2372c98aa78280d029ab36285ad6",1024],"id":1377}
2019-12-13 09:56:30 +06:00
Igor Mandrigin
1e231a8a9a
Add storage mode flags as letters. ( #229 )
2019-12-06 12:19:00 +01:00
gary rong
215f99b49e
core/rawdb: check hash before return data from ancient db ( #20195 )
...
* core/rawdb: check hash before return data from ancient db
* core/rawdb: fix lint
* core/rawdb: calculate the hash in the fly
2019-12-03 13:42:54 +01:00
Alexey Akhunov
fe01bccbb8
Apply Turbo-Geth modifications to go-ethereum codebase
2019-11-01 21:52:03 +01:00
gary rong
37d280da41
core, cmd, vendor: fixes and database inspection tool ( #15 )
...
* core, eth: some fixes for freezer
* vendor, core/rawdb, cmd/geth: add db inspector
* core, cmd/utils: check ancient store path forceily
* cmd/geth, common, core/rawdb: a few fixes
* cmd/geth: support windows file rename and fix rename error
* core: support ancient plugin
* core, cmd: streaming file copy
* cmd, consensus, core, tests: keep genesis in leveldb
* core: write txlookup during ancient init
* core: bump database version
2019-05-16 10:39:34 +03:00
gary rong
80469bea0c
all: integrate the freezer with fast sync
...
* all: freezer style syncing
core, eth, les, light: clean up freezer relative APIs
core, eth, les, trie, ethdb, light: clean a bit
core, eth, les, light: add unit tests
core, light: rewrite setHead function
core, eth: fix downloader unit tests
core: add receipt chain insertion test
core: use constant instead of hardcoding table name
core: fix rollback
core: fix setHead
core/rawdb: remove canonical block first and then iterate side chain
core/rawdb, ethdb: add hasAncient interface
eth/downloader: calculate ancient limit via cht first
core, eth, ethdb: lots of fixes
* eth/downloader: print ancient disable log only for fast sync
2019-05-16 10:39:32 +03:00
Péter Szilágyi
006c21efc7
cmd, core, eth, les, node: chain freezer on top of db rework
2019-05-16 10:39:29 +03:00
Hongbin Mao
504f88b65b
core/rawdb: typo fix storea => stores ( #19498 )
...
* typo fix
* change to stores
2019-04-26 12:22:21 +03:00
Péter Szilágyi
7221cb1434
core, eth, les, light: scope receipt functionality a bit cleaner
2019-04-15 13:42:26 +03:00
Matthew Halpern
6b0ddd141e
core, eth, les, light: store transaction receipts without txHash and gasCost
2019-04-15 13:15:39 +03:00
Brent
7fb89697fd
core/types: add block location fields to receipt ( #17662 )
...
Solves #15210 without changing consensus, in a backwards compatible way,
by adding tx inclusion information to the Receipt struct.
2019-03-27 13:39:25 +01:00
Martin Holst Swende
59e1953246
core, ethdb, trie: mode dirty data to clean cache on flush ( #19307 )
...
This PR is a more advanced form of the dirty-to-clean cacher (#18995 ),
where we reuse previous database write batches as datasets to uncache,
saving a dirty-trie-iteration and a dirty-trie-rlp-reencoding per block.
2019-03-26 15:48:31 +01:00
Péter Szilágyi
054412e335
all: clean up and proerly abstract database access
2019-03-06 13:35:03 +02:00
gary rong
7fd0ccaa68
core: remove unnecessary fields in logs, receipts and tx lookups ( #17106 )
...
* core: remove unnecessary fields in log
* core: bump blockchain database version
* core, les: remove unnecessary fields in txlookup
* eth: print db version explicitly
* core/rawdb: drop txlookup entry struct wrapper
2019-02-21 15:14:35 +02:00
Péter Szilágyi
accc0fab4f
core, eth/downloader: fix ancestor lookup for fast sync
2018-11-16 13:21:20 +02:00
Wuxiang
d98c45f70f
core: fix a typo ( #17941 )
2018-10-19 16:33:27 +03:00
Wenbiao Zheng
aab7ab04b0
core/rawdb: wrap db key creations ( #16914 )
...
* core/rawdb: use wrappered helper to assemble key
* core/rawdb: wrappered helper to assemble key
* core/rawdb: rewrite the wrapper, pass common.Hash
2018-06-11 16:06:26 +03:00
Péter Szilágyi
6cf0ab38bd
core/rawdb: separate raw database access to own package ( #16666 )
2018-05-07 14:35:06 +03:00