2021-09-18 13:58:23 +00:00
|
|
|
# TxPool v2
|
2021-09-17 11:21:21 +00:00
|
|
|
|
|
|
|
Design docs: https://github.com/ledgerwatch/erigon/wiki/Transaction-Pool-Design
|
|
|
|
|
|
|
|
Has 2 modes: internal and external
|
|
|
|
|
|
|
|
## Internal mode
|
|
|
|
|
2021-09-22 08:39:51 +00:00
|
|
|
Works inside Erigon: add `--txpool.v2` flags to Erigon, and `--txpool.v2` flag to RPCDaemon
|
2021-09-17 11:21:21 +00:00
|
|
|
|
|
|
|
## External mode
|
|
|
|
|
|
|
|
Works in separated process and **require** external Sentry. TxPool connect to Erigon and Sentry. RPCDaemon connect to
|
|
|
|
TxPool. Build by:
|
|
|
|
|
|
|
|
```
|
|
|
|
make txpool
|
|
|
|
```
|
|
|
|
|
|
|
|
Start by:
|
|
|
|
|
|
|
|
```
|
|
|
|
# Add `--state.stream --txpool.disable` flags to Erigon.
|
|
|
|
./build/bin/sentry
|
|
|
|
./build/bin/txpool
|
|
|
|
```
|
|
|
|
|
|
|
|
To change address/port of Erigon or Sentry:
|
|
|
|
|
|
|
|
```
|
|
|
|
./build/bin/txpool --private.api.addr localhost:9090 --sentry.api.addr localhost:9091 --txpool.api.addr localhost:9094
|
|
|
|
```
|
|
|
|
|
|
|
|
## Increase pool limits
|
|
|
|
|
|
|
|
Will add this part soon [tbd]
|
2021-09-18 13:58:23 +00:00
|
|
|
|
|
|
|
## ToDo list
|
|
|
|
|
|
|
|
[x] Remote-mode support - with coherent state cache
|
|
|
|
[x] Persistence
|
|
|
|
[x] Grafana board
|
|
|
|
[x] Non-mainnet support
|
2021-09-20 13:16:50 +00:00
|
|
|
[x] DevNet - doesn't send mined block notification on first mined block (because initialCycle = true)
|
|
|
|
[x] DiscardReasons - user must understand clearly why tx were rejected
|
2021-09-22 08:39:51 +00:00
|
|
|
[x] Notify about new pending transactions - we sending more than need
|
2021-09-24 02:42:17 +00:00
|
|
|
[] Add cli options to manage pool limits: --txpool.pricelimit, --txpool.globalslots, --txpool.globalqueue (now each
|
|
|
|
sub-pool has limit 200_000, and no pricelimit)
|
|
|
|
[] Add way for simple introspection - where is tx and why
|
2021-09-18 13:58:23 +00:00
|
|
|
[] Hard-forks support (now rules are parsed ones on txPool start)
|
|
|
|
[] Add pool to docker-compose
|
|
|
|
[] Add pool (db table) - where store recently mined txs - for faster unwind/reorg.
|
|
|
|
[] Save history of local transactions - with 1 day expiration
|