Commit Graph

64 Commits

Author SHA1 Message Date
Mark Holt
d8b91c4d02
Fix startup sync for txpool processing for bor block production (#9219)
When the sync loop first runs it suppresses block sync events both in
the initial loop and when the blocks being processed are greater than
1000.

This fix removed the first check, because otherwise the first block
received by the process ends up not getting sent to the tx pool. Which
means it won't produce new block for polygon.

As well as this fix - I have also moved the gas initialization to the
txpool start method rather than prompting it with a 'synthetic block
event'

As the txpool start has access to the core & tx DB's it can find the
current block and chain config internally so that it doesn't need to be
externally activated it can just do this itself on start up. This has
the advantage of making the txpool more self contained.
2024-01-13 10:33:34 +00:00
Mark Holt
b05ffc909d
Fixes for Bor Block Production Synchronization (#9162)
This PR contains 3 fixes for interaction between the Bor mining loop and
the TX pool which where causing the regular creation of blocks with zero
transactions.

* Mining/Tx pool block synchronization
The synchronization of the tx pool between the sync loop and the mining
loop has been changed so that both are triggered by the same event and
synchronized via a sync.Cond rather than a polling loop with a hard
coded loop limit. This means that mining now waits for the pool to be
updated from the previous block before it starts the mining process.
* Txpool Startup consolidated into its MainLoop
Previously the tx pool start process was dynamically triggered at
various points in the code. This has all now been moved to the start of
the main loop. This is necessary to avoid a timing hole which can leave
the mining loop hanging waiting for a previously block broadcast which
it missed due to its delay start.
* Mining listens for block broadcast to avoid duplicate mining
operations
The mining loop for bor has a recommit timer in case blocks re not
produced on time. However in the case of sprint transitions where the
seal publication is delayed this can lead to duplicate block production.
This is suppressed by introducing a `waiting` state which is exited upon
the block being broadcast from the sealing operation.
2024-01-10 17:12:15 +00:00
Alex Sharov
55e05c440f
--txpool.gossip.disable (#8800)
Co-authored-by: cby3149 <cby3149@gmail.com>
2023-11-23 12:00:41 +07:00
Somnath Banerjee
f51d9b61a0
Txpool 4844 upgrades Part 2 (#8213)
Some peer-review changes from the last related PR. 
Addition of a flag for BlobSlots - for max allowed blobs per account in
txpool.
Use BlobFee from the block to validate txs in the pool.

See also https://github.com/ledgerwatch/erigon-lib/pull/1125
2023-09-20 17:29:30 +05:30
Somnath Banerjee
a699f64761
Txpool upgrades for EIP-4844 Blob Transactions (#8004)
See https://github.com/ledgerwatch/erigon-lib/pull/1075
2023-09-11 09:38:58 +07:00
Alex Sharov
bf8ac9a38f
mdbx_to_mdbx: to use logger (#7860) 2023-07-09 08:04:20 +01:00
ledgerwatch
067f695fff
[devnet tool] Separate logging (#7553)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-20 14:48:16 +01:00
ledgerwatch
5ae9cb7f39
[Devnet tool] side-quest logging step 6 (#7496)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-11 18:59:55 +01:00
ledgerwatch
fdd385cef1
[Devnet tool] Side-quest to improve logging - part 1 (#7445)
This is the beginning of the series of changes to make it possible to
run multiple instances of erigon inside a single process (as devnet tool
does), with the logging from these processes going to respective log
files correctly.
This is the first part where the initial infrastructure is being
established

---------

Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-05-07 07:28:15 +01:00
Alex Sharov
ded8283df7
erigon backup: v0 of sub-command (#7396) 2023-04-27 10:42:12 +07:00
Russel Waters
e56793d5ea
txpool: update cli flags (#7282)
it would appear that an extra `e` was added somewhere along the way to
the cli flags for txpool. If this was intentional I was curious as to
why, otherwise it seems like fixing the flag would remedy some
confusion. Thank you

Upon further investigation it would appear
https://github.com/ledgerwatch/erigon/blob/devel/cmd/utils/flags.go#L173
shows corrected spelling.
2023-04-08 06:52:04 +00:00
ledgerwatch
9690228ede
[Diagnostics] Simplify logging settings, introduce correct log rotation with lumberjack (#7273)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-04-07 21:08:44 +00: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
af4d2c22a9
--txpool.commit.every panic handling (#7163) 2023-03-23 03:18:36 +00:00
Temirlan
4e5dce1365
add flag txpool.commit_every (#7062)
Adds flag _--txpool.commit_every_ to control how often transactions
should be committed to the storage

[Related Issue](https://github.com/ledgerwatch/erigon/issues/7002)
2023-03-22 03:53:47 +00:00
Alex Sharov
999899d66d
e3: read files list from db (#6833) 2023-02-13 05:17:01 +00:00
ledgerwatch
bf24018205
Add support for eth/68 (#6764)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
Co-authored-by: Alex Sharp <alexsharp@surfer-172-29-1-65-hotspot.internet-for-guests.com>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2023-02-01 22:21:31 +00:00
hexoscott
7dcbfbc283
reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
Alex Sharov
8afeee56c8
Downloader extract, step2 (#6076) 2022-11-20 10:41:30 +07:00
Alex Sharov
26fdf9169d
move all packages from "internal" folder - to simplify users live (#5857) 2022-10-25 09:58:25 +07:00
Alex Sharov
606ce5c99a
add logging cli flags to various cmd (#5816) 2022-10-21 12:36:17 +07:00
Max Revitt
07ffa36d44
File system logging (#5812)
- lives in internal/logging
- all log flags moved to internal/logging/flags
- allows continued use of root logger via log.Info etc.
- update logger to take change allowing string to lvl for 'trace'

Verbosity flag is overridden by log.console.verbosity. Logs will be
colocated if all run as one process, only split where progs are run as
separate processes, in a future update this will be addressed so for
example rpcdeamon will always log to it's own file
2022-10-20 19:25:06 +01:00
Andrew Ashikhmin
4155ec101c
Fix txpool.accountslots flag (#4573) 2022-06-29 14:44:22 +02:00
Alex Sharov
a53642b4bf
datadir.Dirs configuration object to group dir config (#4387) 2022-06-07 10:24:50 +07:00
Alex Sharov
1eb9aec08a
Better validate --torrent.verbosity flag (#4257)
* lastDup no key

* lastDup no key

* lastDup no key
2022-05-25 15:24:11 +07:00
Alex Sharov
54ec6df6e1
ErigonLib: move types to own package (#3865) 2022-04-11 10:05:07 +07:00
Alex Sharov
c9cee7a884
path -> filepath (path package is for urls) (#3493) 2022-02-12 20:33:09 +07:00
Alex Sharov
3142541e5d
Better downloader and txpool docs, support --txpool.trace.senders in external pool (#3346)
* better docs

* better docs
2022-01-26 16:11:22 +07:00
Alex Sharov
bf01b047bd
Update main.go 2022-01-24 14:12:34 +07:00
Alex Sharov
d29ee65d70
Update readme.md 2022-01-24 14:11:10 +07:00
Alex Sharov
1e3228124a
Move cli root context to erigon-lib (#3294)
* save

* save

* save
2022-01-19 10:49:07 +07:00
alex.sharov
065898396a improve downloader readme 2021-12-31 16:36:24 +07:00
ledgerwatch
6910e18e7f
[txpool] Introduce PriceBump, change tx replacement logic, add test (#3039)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-11-26 14:39:26 +00:00
Alex Sharov
deed48c01a
Small step towards torrent downloader (#2929) 2021-11-08 20:40:56 +07:00
alex.sharov
e2ec9f7621 pool v2 docs 2021-10-28 17:50:49 +07:00
alex.sharov
e366abd9e8 pool v2 docs 2021-10-28 17:49:40 +07:00
Alex Sharov
b890e973db
Dockerfile: switch to go1.17 and alpine3.14 (#2766) 2021-10-04 08:04:38 +07:00
Alex Sharov
83555c2255
Pool v2: --txpool.accountslots flag support (#2765) 2021-10-03 13:27:37 +07:00
Alex Sharov
d61a9ad073
Pool v2: --txpool.pricelimit support (#2763) 2021-10-02 17:34:57 +07:00
alex.sharov
76aa1a7c1a no panic on nil filters 2021-10-01 09:15:45 +07:00
alex.sharov
3f10758faf add --txpool.globalbasefeeeslots 2021-09-29 14:55:43 +07:00
alex.sharov
fc44197f06 fix merge conflict 2021-09-29 14:48:19 +07:00
Alex Sharov
17abe11cc0
Remote RPC: add state cache (#2738) 2021-09-29 08:36:25 +07:00
alex.sharov
0976b9e452 add todo list to txpool readme 2021-09-24 09:42:17 +07:00
Alex Sharov
0b776eead4
flag --txpool.v2 to enable --state.stream flag (#2718) 2021-09-22 15:39:51 +07:00
Alex Sharov
133eec0c7e
Pool: correct new pending txs notifications (#2715) 2021-09-21 17:35:28 +07:00
Alex Sharov
a0321e2f3a
Pool: return lost error, fix race of 2 sentries, more friendly logs (#2707) 2021-09-20 20:16:50 +07:00
Alex Sharov
8d9e058eb7
Pool: chain config, non-mainnet (#2702) 2021-09-18 20:58:23 +07:00
Alex Sharov
165fe1696f
Pool: readme (#2699) 2021-09-17 18:21:21 +07:00
Alex Sharov
ad1682cf40
Expose mdbx's txID to remote_kv (#2686) 2021-09-15 14:22:57 +07:00