new flag examples.
--https.enabled
--https.addr="0.0.0.0"
--https.port=443
--https.url="unix:///file.wow"
--https.cert="keyfile.cert"
--https.key="certfile.cert"
also adds support for h2c to the http handler - http2 protocol without tls.
* call getEnode before NodeStarted to make sure it is ready for RPC
calls
* fix connection error detection on macOS
* use a non-default p2p port to avoid conflicts
* disable bor milestones on local heimdall
* generate node keys for static peers config
## Description
Add the possibility to change the RPC address used in `devnet` without
requiring a rebuild.
## Test
- [x] `make devnet`
- [x] `./build/bin/devnet --datadir tmp`
- [x] `./build/bin/devnet --datadir tmp --rpc.host localhost --rpc.port
8546`
This PR removes the empty headers check when responding to
`GetBlockHeaders` p2p request. Currently, as we return from the
function, the requests on the caller's end gets timed out causing peer
drop. This will prevent that from happening by sending empty header list
which will be of no use but still helps in maintaining the peer
connection.
With this change, those running erigon 2.48 with
`--sentry.drop-useless-peers` will drop peers as they consider receiving
empty headers a harsh move which is fine.
We have also discovered that if we don't remove this check maintaining
connectivity to Bor is not maintained. This is significant as Erigon
becomes a minority validator, as bor chain stability (reducing forks) is
dependent upon good validator connectivity.
Fixes and issue with Polygon validators where locally mined blocks are
broadcast with invalid header hashes because the NewBlock message
constructor was removing the ReceiptHash which contributed to the header
hash.
The results in the bor header validation code not being able to
correctly identify the signer of the header - so header validation
fails.
This also likely fixes part of the bogon-block issue which was
identified by the polygon team.
This fixes 2 related issues:
* Now that the bor consensus engine is required for queries it can't be
created based on the pretense of a db directory, but must be based on
chain config read from the db. Using the DB presence causes Bor to get
instantiated for non bor chains which breaks.
* At the moment eth_calls on a remote daemon don't check Bor headers
prior to calling the EVM code as it was just using a fake ETHash
instance - which performs ETH header validation only.
The current version is mostly working but needs adapting to perform lazy
initialization of the engine.