Commit Graph

322 Commits

Author SHA1 Message Date
Alex Sharov
e5023775aa
Enforce blockReader interface (#7737)
- breaks dependency from staged_sync to package with block_reader
implementation
- breaks dependency from snap_sync to package with block_reader
implementation
- breaks dependency from mining to txpool implementation
2023-06-15 13:11:51 +07:00
Alex Sharov
afd8ea94d0
e3: move domains to tables.go (#7707) 2023-06-11 21:12:05 +07:00
Alex Sharov
afa4f53ae2
e3: use deserializeV3 for history (#7691) 2023-06-09 10:53:04 +07:00
Alex Sharov
d703c3cd8e
e3: Fix integration tests, step 2 (#7673) 2023-06-06 15:51:04 +07:00
Alex Sharov
bf9f5067f3
fix integration tests run (#7672) 2023-06-06 13:49:01 +07:00
Alex Sharov
e14664d53b
Store Canonical/NonCanonical/Bad blocks/senders/txs in same tables. Make re-org cheaper (#7648)
- allow store non-canonical blocks/senders
- optimize re-org: don't update/delete most of data
- allow mark chain as `Bad` - will be not visible by eth_getBlockByHash,
but can read if have hash+num
2023-06-05 12:36:24 +07:00
Alex Sharov
c8e717c957
rawdb methods to rw db schema version (#7653) 2023-06-04 09:20:22 +07:00
Alex Sharov
63c92010cd
remove txsV3 cli flag (#7644) 2023-06-03 15:54:27 +07:00
Alex Sharov
ad72b7178e
prune speedup. stage_senders: don't re-calc existing senders (#7643)
- stage_senders: don't re-calc existing senders
- stage_tx_lookup: prune less blocks per iteration - because
random-deletes are expensive. pruning must not slow-down sync.
- prune data even if --snap.stop is set
- "prune as-much-as-possible at startup" is not very good idea: at
initialCycle machine can be cold and prune will cause big downtime, no
reason to produce much freelist in 1 tx. People may also restart erigon
- because of some bug - and it will cause unexpected downtime (usually
Erigon startup very fast). So, I just remove all `initialSync`-related
logic in pruning.
- fix lost metrics about disk write byte/sec
2023-06-03 12:30:53 +07:00
Alex Sharov
d40317c905
preparation for --txs.v3, step 2 (#7636) 2023-06-03 07:20:22 +07:00
Alex Sharov
6439bdd835
txsv3: release small parts (#7632) 2023-06-02 11:38:20 +07:00
Alex Sharov
299c81e522
move "makeBodiesCanonical" method to blockWriter (#7605) 2023-05-31 15:44:01 +07:00
Alex Sharov
3cba3908dd
use BlockReader.CanonicalHash method instead of rawdb (#7604) 2023-05-31 13:41:10 +07:00
Alex Sharov
af83845f7e
cheaper isCanonicalHash func, less lookups of blockHash by blockNum in rpc (#7603) 2023-05-31 11:26:38 +07:00
Alex Sharov
3ec7d9b010
receipts: less allocs in DeriveFields, use blockReader, remove ReadReceiptsByHash, gasPriceOracle don't read block twice and use blockLru (#7592)
preparation for adding BlockID
2023-05-27 16:39:14 +07:00
Alex Sharov
279e1bec33
use blockReader as service-provider of RoSnapshots (#7584) 2023-05-26 17:12:33 +07:00
Alex Sharov
000dda6a37
blockReader in tests, step7 (#7574) 2023-05-25 10:56:59 +07:00
Alex Sharov
0c399e5082
blockReader tests, step5 (#7572) 2023-05-24 17:41:24 +07:00
Alex Sharov
4d0dee6fb0
Introduce BlockWriter object (txsV3 step 0) (#7559) 2023-05-22 15:49:21 +07:00
ledgerwatch
b382f96f6c
Introduce logger into etl (#7537)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-18 21:20:07 +01:00
racytech
42e8db3958
eip-4844: modified DecodeTransaction version 1 (#7442)
Blob transactions are SSZ encoded, so it had to be added to decoding.
There are 2 encoding forms: `network` and `minimal` (usual). Network
encoded blob transactions include "wrapper data" which are `kzgs`,
`blobs` and `proofs`, and decoded by `DecodeWrappedTransaction`. For
previous types of transactions the network encoding is no different.
Execution-payloads / blocks use the minimal encoding of transactions. In
the transaction-pool and local transaction-journal the network encoding
is used.

Concerns: 
1. Possible performance reduction caused by these changes, not sure if
streams are better then slices. Go slices in this modifications are
read-only, so they should be referred to the same underlying array and
passed by a reference.
2. If `DecodeWrappedTransaction` and `DecodeTransaction` will create
confusion and should be merged into one function.
2023-05-09 18:44:53 +01:00
Alex Sharov
ded8283df7
erigon backup: v0 of sub-command (#7396) 2023-04-27 10:42:12 +07:00
Alex Sharov
417a437584
Break dependency of ethcfg package to core/consensus/etc... move genesis struct to 'types' package (#7206) 2023-03-29 07:27:06 +00:00
Alex Sharov
9001f668a7
go 1.19 atomics (#7164) 2023-03-23 05:11:28 +00:00
Alex Sharov
52cb720cdc
e3: remove settings table (#7155) 2023-03-22 05:21:17 +00:00
alex.sharov
94a3257ec7 e4: reset state 2023-03-22 12:06:48 +07:00
Andrew Ashikhmin
56a3844656
Drop Default from GenesisBlock* functions (#7147)
Small cosmetic changes and clean-ups
2023-03-20 15:44:22 +00:00
Alex Sharov
4ab63db6e2
nil ptr in delete ancient (#7081) 2023-03-11 05:46:32 +00:00
alex.sharov
086398777e fix headers reset 2023-03-03 09:53:01 +07:00
nanevardanyan
cf9ee425ed
check for TransactionsV3 flag (#6988) 2023-03-01 02:13:12 +00:00
Alex Sharov
b3c49af086
e3: aggressive drain resultCh to heap before start conflict-resolution (#6979) 2023-02-27 13:08:33 +00:00
nanevardanyan
ab6239b30f
WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
alex.sharov
319af1eeca check error in TruncateBlocks 2023-02-12 11:34:08 +07:00
Alex Sharov
320c6b2b7e
Snapshots Indexing: avoid loop with semaphore locking before logging (#6846) 2023-02-12 10:00:42 +07:00
ledgerwatch
ee83447fa1
CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829)
… startup

---------

Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-02-11 20:44:51 +00:00
Alex Sharov
b99e4abb3e
move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
Alex Sharov
82c478a419
e3: getLogs on iterators (#6683) 2023-01-25 16:29:41 +07:00
Alex Sharov
4fbbdf9186
e3: move txnum to erigon-lib (#6663) 2023-01-22 19:39:33 +07:00
Andrew Ashikhmin
f151a52c0e
Withdrawal amount in GWei (#6578)
See https://github.com/ethereum/execution-apis/pull/354 &
https://github.com/ethereum/EIPs/pull/6325.

Prerequisite: https://github.com/ledgerwatch/erigon-lib/pull/832.
2023-01-17 11:22:08 +01:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
Willian Mitsuda
c738045557
Fix err being ignored (#6572)
err is being ignored, so it silently fails reset when new table is not
whitelisted
2023-01-13 17:46:32 +07:00
Alex Sharov
731569bbb7
e3: invalid txnum table (#6540) 2023-01-12 09:31:41 +07:00
Alex Sharov
088757ed07
e3: domain to used blockNumber for e2 (#6534) 2023-01-09 16:25:35 +07:00
Alex Sharov
c38868cc46
better pagesize error message (#6497) 2023-01-04 13:07:46 +07:00
Alex Sharov
0483fc5539
integration: cancel warmup (#6494) 2023-01-03 12:51:00 +07:00
Alex Sharov
17e0afbe44
"erigon snapshots retire" save progress (#6486) 2023-01-02 12:38:03 +07:00
alex.sharov
f0be579fd1 warmup: 100K prefixes 2023-01-02 10:50:08 +07:00
alex.sharov
8ffdda14f2 warmup: million prefixes 2023-01-02 10:47:06 +07:00
Alex Sharov
9159f7e8aa
"integration stage_exec --warmup" (#6471) 2022-12-30 15:44:50 +07:00
Alex Sharov
b0af04f2df
bsc: incrementally calc and store all old snapshots. slower initial stage_snapshots, but faster restart during initial sync (#6457) 2022-12-30 12:44:54 +07:00