Calling vm to get a metric and then preregistering it to avoid
duplication is expensive.
To avoid this we can make a local lookup first which is a map this
quicker. This is a temporary fix
until vm is removed at which point we'll have a single prom_client
registry
Fixes: https://github.com/ledgerwatch/erigon/issues/8558
Allow overriding go binary
On FreeBSD go binaries are installed as go118, go119, go120, etc.
This fixes the ability to build erigon with a command like:
GO=go120 gmake
Should fix the [following
issue](https://discord.com/channels/687972960811745322/738982866670714901/1164291343745568858):
```
git_branch=devel git_tag=v2.52.0-50-g82f1e9f34-dirty git_commit=82f1e9f342ae46d38f41b0561f879f192cdd8fa0
[WARN] [10-18|19:40:19.892] newPayload failed err="rlp: element is larger than containing list"
[WARN] [10-18|19:40:19.892] fail to process block reason="rlp: element is larger than containing list" slot=7569470
```
This introduces _experimental_ RPC daemon run by embedded Silkworm
library. Same notes as in PR #8353 apply here plus the following ones:
- activated if `http` command-line option is enabled and `silkworm.path`
option is present, nothing more is required (i.e. currently, both block
execution and RPC daemon run by Silkworm when specifying
`silkworm.path`, just to keep things as simple as possible)
- only Execution API endpoints are implemented by Silkworm RPCDaemon,
whilst Engine API endpoints are still served by Erigon RPCDaemon
- some features are still missing, in particular:
- state change notification handling
- custom JSON RPC settings (i.e. Erigon RPC settings are not passed to
Silkworm yet)
Problem:
"Started P2P networking" log message contains port zero on startup,
e.g.: 127.0.0.1:0 because of the outdated localnodeAddrCache.
Solution:
Call updateLocalNodeStaticAddrCache after updating the port.
db must not use "Durable" and "SyncPeriod" in same time
txpool and downloader must be: Durable
nodedb: SafeNoSync+SyncPeriod
because txpool and downloader already can call sync when they need
(txpool after regular flush, downloader after piece download+validation
completion).
Consensus Specification Tests takes less than 8 minutes so I think they
can be in a PR's own CI for whenever it is ready. for reference it is
less than make test