Commit Graph

121 Commits

Author SHA1 Message Date
Alex Sharov
77560b6732
More careful handle of sequences in stage_headers --reset (#4023)
* save

* save

* save

* save
2022-04-29 14:37:02 +07:00
Alex Sharov
89d4477df3
Snapshots: nil indices on p2p fix (#3772) 2022-03-27 10:07:58 +07:00
Alex Sharov
4cf4c1bac1
Snapshots: better support of p2p (#3749) 2022-03-21 20:36:03 +07:00
alex.sharov
c67d4d14e8 better logging 2022-03-11 13:56:10 +07:00
Alex Sharov
b003d07839
Add system-txs to begin end of block (#3654)
* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* up torrent

* up torrent

* up torrent

* up torrent

* up torrent

* up torrent

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save

* save
2022-03-10 07:48:58 +00:00
Alex Sharov
a5f4c721bb
fix lost migrations (#3661) 2022-03-09 16:46:48 +07:00
Alex Sharov
191a3f9232
Disallow db version downgrade (#3657)
* save

* save
2022-03-08 10:02:35 +07:00
Alex Sharov
c9cee7a884
path -> filepath (path package is for urls) (#3493) 2022-02-12 20:33:09 +07:00
Alex Sharov
bf9e109115
Revert "Change major db version check (#3241)" (#3421)
This reverts commit db7fa3d0ed.
2022-02-04 09:21:10 +07:00
Alex Sharov
db7fa3d0ed
Change major db version check (#3241)
* remove major jump check

* remove major jump check
2022-01-12 13:30:23 +00:00
ledgerwatch
9f861e1b3f
Check upgrade/downgrade of database schema version to prevent accidental upgrade, remove migrations (#3133)
* Check upgrade/downgrade

* Remove old migrations

* Fix compilation

* Fix lint

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-12-15 21:03:04 +00:00
brendan-kelly
ee99f17fbe
Add Parlia consensus engine for Binance Smart Chain support (#3086)
* Add Parlia consensus engine for Binance Smart Chain support

* Leave RamanujanBlock as nil in params/config.go

* Run `go fmt` on files needing it

* Add comment for PoSA

* Remove empty branches and ineffectual assignments in parlia.go

* Remove commented imports

* Fix compilation error

* Remove EIP155Signer in transaction_signing.go

* Fix compilation issue

* Fix go fmt issues

* Remove Ramanujan from print statement

* Remove references to EthAPIBackend approach

* Fix Finalize method across consensus engines

* Run go fmt

* More linting

* Remove more changes

* remove a comment

* Remove unneeded hashing function

* Remove bytes check and fix actual vs expected mistake
2021-12-11 00:07:10 +00:00
TBC Dev
ae4819ddad
Prefer Block.NumberU64() over Block.Number.Uint64() (#3051) 2021-11-29 11:32:41 +00:00
TBC Dev
57d641b6f9
Avoid redundant Block.Header() deep-copy (#3050)
* Add separate Block.Nonce() and Block.NonceU64()

* Add Block.Seal()

* Avoid redundant Block.Header() deep-copy

* Add warning comment for Block.Header()
2021-11-29 08:52:36 +00:00
Alex Sharov
e55256296b
snapshots: read block from snapshots, add sender to txs file (#2996) 2021-11-21 10:32:14 +07:00
Alex Sharov
6639be6049
save (#2913) 2021-11-04 17:23:45 +07:00
Alex Sharov
5d7904c133
erl.collector - move logPrefix to constructor (#2866) 2021-10-25 15:09:43 +07:00
Andrea Lanfranchi
c913f35c2e
Inner errors (#2774) 2021-10-04 22:16:52 +07:00
Alexandr Borodulin
d7159cd8bd
More convenient pruning for non-PoW consensus: add --prune.*.before flags (#2714) 2021-09-23 09:13:19 +07:00
ledgerwatch
15b4095718
Move ETL to erigon-lib (#2667)
* Move ETL to erigon-lib

* Update link in the readme

* go mod tidy

* Use common/chan.go from erigon-lib

* Clean up

* Fix lint

* Fix test

* Fix compilation

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-09-12 08:50:17 +01:00
Alex Sharov
c7c3a5932a
rename ReadBody to ReadBodyWithTransactions to make it obvious that it's heavier then just ReadBody (#2534)
* rename ReadBody to ReadBodyWithTransactions

* rename ReadBody to ReadBodyWithTransactions
2021-08-15 17:08:28 +07:00
Evgeny Danilenko
4cd72c8328
Keep readonly value while changing interpreters back and forth (#2508)
* restore TEVM

* fuzzing and property based

* comment

* lint

* stack callback into defer ater checking an error

* sequential tests
2021-08-10 09:48:56 +07:00
alex.sharov
12982b21c1 remove old migration 2021-08-02 19:10:14 +07:00
alex.sharov
f5e30f293a remove old example from migrations package 2021-08-02 19:04:51 +07:00
Alex Sharov
aeb2426b8c
etl call traces (#2481) 2021-08-02 11:26:42 +07:00
Alex Sharov
6bd44eb26c
move kv to erigon-lib (#2467) 2021-07-29 18:53:13 +07:00
Alex Sharov
5069558752
Apache licensed logger (#2460) 2021-07-29 17:23:23 +07:00
Alex Sharov
21cb7befa4
finish remove bucket suffix (#2458) 2021-07-28 10:43:51 +07:00
Alex Sharov
838e5f9ef2
Move bucket constants into kv package, move kv interface to kv package (#2455) 2021-07-28 09:47:38 +07:00
Alex Sharov
6801208497
move some tests to kv interface (#2438) 2021-07-24 14:14:11 +07:00
Alex Sharov
a36a613e61
move migrations to kv interfaces (#2430) 2021-07-24 11:28:05 +07:00
Alex Sharov
d2552196ad
Sokol v0: support for first epoch-set transition (#2411) 2021-07-21 18:13:26 +07:00
Alex Sharov
c3e1cfdac8
Pruning for: exec, log_index, tx_lookup, history stages (#2399)
* Pruning for: exec, log_index, tx_lookup, history stages

* Pruning for: exec, log_index, tx_lookup, history stages

* Pruning for: exec, log_index, tx_lookup, history stages

* Pruning for: exec, log_index, tx_lookup, history stages

* add tvm flag

* save

* db migration for storage mode
add flag --prune=
remove flag --storage-mode=
add flag --experiments=tevm,...
rename integration set_storage_mode to set_prune

* fix

* forward move of stages must skip everything before PruneTo

* keep in db progress of prune method

* keep in db progress of prune method

* simplify logs

* simplify logs

* simplify logs

* fix test

* simplify logs

* simplify logs

* simplify logs

* simplify logs

* remove callTraceSet as dupsort
use etl transform for txlookup prune
remove some logs

* cleanup tests a bit

* print_stages and eth_sync to show prune progress

* fix print_stages

* add readme about --prune.to flag

* more docs

* add --prune.history.older and other flags support

* fix migration on empty db

* better toString

* better toString
2021-07-20 21:03:19 +01:00
Alex Sharov
4c53f51767
Remove "persistent unwind" concept (#2388) 2021-07-17 21:14:51 +07:00
Alex Sharov
557d082c51
Sokol v0: epoch support (#2348)
* remove ctx from state writer interface

* call me baby

* save

* save

* can process block 1

* can process block 1

* can process block 1

* can process block 1

* save

* save

* parse logs logic

* cleans

* cleans

* cleans
2021-07-12 16:27:25 +01:00
Alex Sharov
7c60cc0fee
step towards kv interface (#2313) 2021-07-08 09:56:09 +07:00
Alex Sharov
a68b5ba361
Replace ChainConfig.WithEIPsFlags by go-ethereum's ChainConfig.Rules (#2304)
* use chainRules

* use chainRules

* use chainRules

* use chainRules

* use chainRules
2021-07-05 19:52:50 +01:00
ledgerwatch
9023f2a29c
Investigate slow receipt repair (#2306)
* Collect data about broken receipts

* Actually collect data

* Fix CBOR problem more efficiently

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-07-05 19:14:58 +01:00
ledgerwatch
954304e43a
Turn off receipt repair migration for investigation (#2303)
* receipt repair migration - check for r storage mode

* Turn off migration

* Fix lint

* Better way to disable migration

* Better way to disable migration

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-07-05 11:25:18 +01:00
ledgerwatch
afadde628c
receipt repair migration - check for r storage mode (#2301)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-07-05 08:53:46 +01:00
ledgerwatch
63ccabc72f
Receipt repair migration (#2291)
* Fixes in rpctest and rpcdaemon for debug_traceTransaction

* Fix for opcode tracer

* Tool to fix receipts

* Better mechanism for detecting broken receipts

* Fixes

* Introduce receipt_repair migration

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-07-04 14:48:13 +01:00
Alex Sharov
ba902f7ef3
separate_config_from_node_and_eth (#2289) 2021-07-04 08:50:32 +01:00
ledgerwatch
5ad449ef22
Migration to fix receipts (broken due to change of CBOR codec) (#2221)
* Scan receipts

* Not check tx type before Berlin

* Reverse

* scan receipt code in the migration

* Turn migration on

* Apply migration

* Fix

* Print last

* Remove last

* Not remove last

* Not updata in migration

* no cursors in migration

* Handle empty blocks

* Handle empty blocks

* Use the same code in hack

* Print

* Print

* Save

* Fix

* Fix lint

* Fix lint

* Fix for empty DB

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-06-23 15:05:16 +01:00
Artem Vorotnikov
72e9a34365
Remove unused tables, soft rename, take 3 (#2207)
* Remove unused tables, soft rename, take 3

* Bump db schema version

* nil check in migration
2021-06-20 20:46:57 +01:00
Alex Sharov
bc271f92ce
To break dependency to db implementation - move all db classes to "ethdb/kv" and leave in "ethdb" only interfaces (#2195) 2021-06-19 15:21:53 +07:00
Artem Vorotnikov
af836a6200
Nuke LMDB (#2167) 2021-06-16 13:57:58 +03:00
Alex Sharov
5ba3ea162a
Simulated backend and genesis to kv (#2104)
* move to kv

* move to kv

* move to kv

* move to kv

* move to kv

* move to kv

* merge

* merge

* merge

* merge

* merge

* merge

* merge

* merge
2021-06-05 16:17:04 +01:00
Alex Sharov
eee871aedf
Add db label (later will add txpool db) (#2081)
* add db label - later will add txpool db

* move commit marker to kv_mdbx behind Chain label

* Update migrations.go

* clean

Co-authored-by: ledgerwatch <akhounov@gmail.com>
2021-06-04 15:56:49 +01:00
ledgerwatch
5a54eab268
Fix migration for clean database (#2097)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-06-04 15:08:22 +01:00
ledgerwatch
43915a73a8
Migration to fix trace_filter (#2095)
* Migration to fix trace_filter

* Fix to db/tx

* Fix to db/tx

* Error fixes

* Bump KV version

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
2021-06-04 12:45:06 +01:00