Update readme ports (#8205)

This commit is contained in:
a 2023-09-15 18:27:13 +02:00 committed by GitHub
parent 438dd6bdb1
commit c44188871b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 50 deletions

2
.gitignore vendored
View File

@ -88,3 +88,5 @@ __debug_bin
caplin-recordings caplin-recordings
jwt.hex jwt.hex
.tool-versions

View File

@ -530,60 +530,61 @@ Detailed explanation: [./docs/programmers_guide/db_faq.md](./docs/programmers_gu
### Default Ports and Firewalls ### Default Ports and Firewalls
#### `erigon` ports #### `erigon` ports
| Port | Protocol | Purpose | Expose |
|:-----:|:---------:|:----------------------:|:-------:| | Component | Port | Protocol | Purpose | Should Expose |
| 30303 | TCP & UDP | eth/66 peering | Public | | --------- | ----- | --------- | --------------------------- | ------------- |
| 30304 | TCP & UDP | eth/67 peering | Public | | engine | 9090 | TCP | gRPC Server | Private |
| 9090 | TCP | gRPC Connections | Private | | engine | 42069 | TCP & UDP | Snap sync (Bittorrent) | Public |
| 42069 | TCP & UDP | Snap sync (Bittorrent) | Public | | engine | 6060 | TCP | Metrics or Pprof | Private |
| 6060 | TCP | Metrics or Pprof | Private | | engine | 8551 | TCP | Engine API (JWT auth) | Private |
| 8551 | TCP | Engine API (JWT auth) | Private | | sentry | 30303 | TCP & UDP | eth/68 peering | Public |
| sentry | 30304 | TCP & UDP | eth/67 peering | Public |
| sentry | 9091 | TCP | incoming gRPC Connections | Private |
| rpcdaemon | 8545 | TCP | HTTP & WebSockets & GraphQL | Private |
Typically, 30303 and 30304 are exposed to the internet to allow incoming peering connections. 9090 is exposed only Typically, 30303 and 30304 are exposed to the internet to allow incoming peering connections. 9090 is exposed only
internally for rpcdaemon or other connections, (e.g. rpcdaemon -> erigon). internally for rpcdaemon or other connections, (e.g. rpcdaemon -> erigon).
Port 8551 (JWT authenticated) is exposed only internally for [Engine API] JSON-RPC queries from the Consensus Layer Port 8551 (JWT authenticated) is exposed only internally for [Engine API] JSON-RPC queries from the Consensus Layer
node. node.
#### `RPC` ports
| Port | Protocol | Purpose | Expose |
|:----:|:--------:|:---------------------------:|:-------:|
| 8545 | TCP | HTTP & WebSockets & GraphQL | Private |
Typically, 8545 is exposed only internally for JSON-RPC queries. Both HTTP and WebSocket and GraphQL are on the same
port.
#### `sentry` ports
| Port | Protocol | Purpose | Expose | #### `caplin` ports
|:-----:|:---------:|:----------------:|:-------:| | Component | Port | Protocol | Purpose | Should Expose |
| 30303 | TCP & UDP | Peering | Public | | --------- | ---- | -------- | ---------------- | ------------- |
| 9091 | TCP | gRPC Connections | Private | | sentinel | 4000 | UDP | Peering | Public |
| sentinel | 4000 | UDP | Peering | Public |
| sentinel | 4001 | TCP | Peering | Public |
| sentinel | 7777 | TCP | gRPC Connections | Private |
Typically, a sentry process will run one eth/xx protocol (e.g. eth/66) and will be exposed to the internet on 30303.
Port
9091 is for internal gRCP connections (e.g erigon -> sentry).
#### `sentinel` ports If you are using `--internalcl` aka `caplin` as your consensus client, then also look at the chart above
| Port | Protocol | Purpose | Expose |
|:----:|:--------:|:----------------:|:-------:|
| 4000 | UDP | Peering | Public |
| 4001 | TCP | Peering | Public |
| 7777 | TCP | gRPC Connections | Private |
#### Other ports #### `shared` ports
| Component | Port | Protocol | Purpose | Should Expose |
| --------- | ----- | --------- | --------------------------- | ------------- |
| all | 6060 | TCP | pprof | Private |
| all | 6060 | TCP | metrics | Private |
| Port | Protocol | Purpose | Expose |
|:----:|:--------:|:-------:|:-------:|
| 6060 | TCP | pprof | Private |
| 6060 | TCP | metrics | Private |
Optional flags can be enabled that enable pprof or metrics (or both) - however, they both run on 6060 by default, so Optional flags can be enabled that enable pprof or metrics (or both) - however, they both run on 6060 by default, so
you'll have to change one if you want to run both at the same time. use `--help` with the binary for more info. you'll have to change one if you want to run both at the same time. use `--help` with the binary for more info.
#### `other` ports
Reserved for future use: **gRPC ports**: `9092` consensus engine, `9093` snapshot downloader, `9094` TxPool Reserved for future use: **gRPC ports**: `9092` consensus engine, `9093` snapshot downloader, `9094` TxPool
#### Hetzner expecting strict firewall rules #### Hetzner expecting strict firewall rules
@ -600,13 +601,13 @@ Reserved for future use: **gRPC ports**: `9092` consensus engine, `9093` snapsho
192.88.99.0/24 6to4 Relay Anycast RFC 3068 192.88.99.0/24 6to4 Relay Anycast RFC 3068
192.168.0.0/16 Private-Use Networks RFC 1918 192.168.0.0/16 Private-Use Networks RFC 1918
198.18.0.0/15 Network Interconnect 198.18.0.0/15 Network Interconnect
Device Benchmark Testing RFC 2544 Device Benchmark Testing RFC 2544
198.51.100.0/24 TEST-NET-2 RFC 5737 198.51.100.0/24 TEST-NET-2 RFC 5737
203.0.113.0/24 TEST-NET-3 RFC 5737 203.0.113.0/24 TEST-NET-3 RFC 5737
224.0.0.0/4 Multicast RFC 3171 224.0.0.0/4 Multicast RFC 3171
240.0.0.0/4 Reserved for Future Use RFC 1112, Section 4 240.0.0.0/4 Reserved for Future Use RFC 1112, Section 4
255.255.255.255/32 Limited Broadcast RFC 919, Section 7 255.255.255.255/32 Limited Broadcast RFC 919, Section 7
RFC 922, Section 7 RFC 922, Section 7
``` ```
Same in [IpTables syntax](https://ethereum.stackexchange.com/questions/6386/how-to-prevent-being-blacklisted-for-running-an-ethereum-client/13068#13068) Same in [IpTables syntax](https://ethereum.stackexchange.com/questions/6386/how-to-prevent-being-blacklisted-for-running-an-ethereum-client/13068#13068)
@ -677,15 +678,15 @@ Next tools show correct memory usage of Erigon:
browser `localhost:3000`, credentials `admin/admin`) browser `localhost:3000`, credentials `admin/admin`)
- `cat /proc/<PID>/smaps` - `cat /proc/<PID>/smaps`
Erigon uses ~4Gb of RAM during genesis sync and ~1Gb during normal work. OS pages cache can utilize unlimited amount of Erigon uses ~4Gb of RAM during genesis sync and ~1Gb during normal work. OS pages cache can utilize unlimited amount of
memory. memory.
**Warning:** Multiple instances of Erigon on same machine will touch Disk concurrently, it impacts performance - one of **Warning:** Multiple instances of Erigon on same machine will touch Disk concurrently, it impacts performance - one of
main Erigon optimisations: "reduce Disk random access". main Erigon optimisations: "reduce Disk random access".
"Blocks Execution stage" still does many random reads - this is reason why it's slowest stage. We do not recommend "Blocks Execution stage" still does many random reads - this is reason why it's slowest stage. We do not recommend
running running
multiple genesis syncs on same Disk. If genesis sync passed, then it's fine to run multiple Erigon instances on same multiple genesis syncs on same Disk. If genesis sync passed, then it's fine to run multiple Erigon instances on same
Disk. Disk.
### Blocks Execution is slow on cloud-network-drives ### Blocks Execution is slow on cloud-network-drives