Skip to content

Commit cfb6797

Browse files
authored
chore(p2p): remove min peers option (#11789)
1 parent 857ea22 commit cfb6797

File tree

16 files changed

+79
-126
lines changed

16 files changed

+79
-126
lines changed

docs/docs/developers/reference/environment_reference/sandbox-reference.md

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ P2P_TCP_ANNOUNCE_ADDR='' # TCP Address to announce to the p2p network. Format: <
6060
P2P_UDP_ANNOUNCE_ADDR='' # UDP Hostname to announce to the p2p network (used for peer discovery). Uses TCP announce addr if not provided
6161
P2P_ANNOUNCE_PORT='' # Port to announce to the p2p network
6262
P2P_NAT_ENABLED='false' # Whether to enable NAT from libp2p
63-
P2P_MIN_PEERS=10 # The minimum number of peers (a peer count below this will cause the node to look for more peers)
6463
P2P_MAX_PEERS=100 # The maximum number of peers (a peer count above this will cause the node to refuse connection attempts)
6564

6665
## Aztec Contract Addresses ##

docs/docs/run_node/guides/run_nodes/how_to_run_sequencer_draft.md

+39-40
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ Once you connect and begin to see gossiped messages such as attestations, propos
5656

5757
The `aztec-spartan.sh` script will set the following required variables on your behalf. You can ofcourse override the variables set by the script by simply changing the `.env` file directly and re-running `./aztec-spartan.sh`
5858

59-
| Variable | Description |
60-
| ----- | ----- |
61-
| ETHEREUM_HOST | URL to the Ethereum node your validator will connect to. For as long as we're on private networks, please use the value in `aztec-spartan.sh`|
62-
| BOOTNODE_URL | URL to a bootnode that supplies L1 contract addresses and the ENR of the bootstrap nodes. |
63-
| IMAGE | The docker image to run |
59+
| Variable | Description |
60+
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
61+
| ETHEREUM_HOST | URL to the Ethereum node your validator will connect to. For as long as we're on private networks, please use the value in `aztec-spartan.sh` |
62+
| BOOTNODE_URL | URL to a bootnode that supplies L1 contract addresses and the ENR of the bootstrap nodes. |
63+
| IMAGE | The docker image to run |
6464

6565
In addition, the user is prompted to enter 1) an IP Address and a P2P port to be used for the TCP and UDP addresses (defaults to 40400) 2) A port for your node (8080) 3) an Ethereum private key 4) `COINBASE` which is the Ethereum address associated with the private key and 5) a path to a local directory to store node data if you don't opt for a named volume.
6666

@@ -72,33 +72,33 @@ The Publisher is the main node component that interacts with the Ethereum L1, fo
7272

7373
The Archiver's primary functions are data storage and retrieval (i.e. L1->L2 messages), state synchronization and re-org handling.
7474

75-
|Variable| Description|
76-
|----|-----|
77-
|ETHEREUM_HOST| This is the URL to the L1 node your validator will connect to. For as long as we're on private networks, please use the value in `aztec-spartan.sh`|
78-
|L1_CHAIN_ID | Chain ID of the L1 |
79-
| DATA_DIRECTORY | Optional dir to store archiver and world state data. If omitted will store in memory |
80-
| ARCHIVER_POLLING_INTERVAL_MS | The polling interval in ms for retrieving new L2 blocks and encrypted logs
81-
| SEQ_PUBLISHER_PRIVATE_KEY | This should be the same as your validator private key |
82-
|SEQ_PUBLISH_RETRY_INTERVAL_MS | The interval to wait between publish retries|
83-
| SEQ_VIEM_POLLING_INTERVAL_TIME | The polling interval viem uses in ms |
75+
| Variable | Description |
76+
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
77+
| ETHEREUM_HOST | This is the URL to the L1 node your validator will connect to. For as long as we're on private networks, please use the value in `aztec-spartan.sh` |
78+
| L1_CHAIN_ID | Chain ID of the L1 |
79+
| DATA_DIRECTORY | Optional dir to store archiver and world state data. If omitted will store in memory |
80+
| ARCHIVER_POLLING_INTERVAL_MS | The polling interval in ms for retrieving new L2 blocks and encrypted logs |
81+
| SEQ_PUBLISHER_PRIVATE_KEY | This should be the same as your validator private key |
82+
| SEQ_PUBLISH_RETRY_INTERVAL_MS | The interval to wait between publish retries |
83+
| SEQ_VIEM_POLLING_INTERVAL_TIME | The polling interval viem uses in ms |
8484

8585
### Sequencer Config
8686

8787
The Sequencer Client is a criticial component that coordinates tx validation, L2 block creation, collecting attestations and block submission (through the Publisher).
8888

89-
|Variable| Description|
90-
|----|-----|
91-
| VALIDATOR_DISABLED | If this is True, the client won't perform any validator duties. |
92-
|VALIDATOR_ATTESTATIONS_WAIT_TIMEOUT_MS | Wait for attestations timeout. After this, client throws an error and does not propose a block for that slot. |
93-
| VALIDATOR_ATTESTATIONS_POLLING_INTERVAL_MS | If not enough attestations, sleep for this long and check again |
94-
|GOVERNANCE_PROPOSER_PAYLOAD_ADDRESS | To nominate proposals for voting, you must set this variable to the Ethereum address of the `proposal` payload. You must edit this to vote on a governance upgrade.|
95-
| SEQ_ENFORCE_TIME_TABLE | Whether to enforce strict timeliness requirement when building blocks. Refer [here](#sequencer-timeliness-requirements) for more on the timetable |
96-
| SEQ_MAX_TX_PER_BLOCK | Increase this to make larger blocks |
97-
| SEQ_MIN_TX_PER_BLOCK | Increase this to require making larger blocks |
98-
| SEQ_MIN_SECONDS_BETWEEN_BLOCKS | If greater than zero, the sequencer will not propose a block until this much time has passed since the last L2 block was published to L1 |
99-
| SEQ_MAX_SECONDS_BETWEEN_BLOCKS | Sequencer will ignore the minTxPerBlock if this many seconds have passed since the last L2 block.|
100-
| COINBASE | This is the Ethereum address that will receive the validator's share of block rewards. It defaults to your validator address. |
101-
| FEE_RECIPIENT | This is the Aztec address that will receive the validator's share of transaction fees. Also defaults to your validator's address (but on Aztec L2). |
89+
| Variable | Description |
90+
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
91+
| VALIDATOR_DISABLED | If this is True, the client won't perform any validator duties. |
92+
| VALIDATOR_ATTESTATIONS_WAIT_TIMEOUT_MS | Wait for attestations timeout. After this, client throws an error and does not propose a block for that slot. |
93+
| VALIDATOR_ATTESTATIONS_POLLING_INTERVAL_MS | If not enough attestations, sleep for this long and check again |
94+
| GOVERNANCE_PROPOSER_PAYLOAD_ADDRESS | To nominate proposals for voting, you must set this variable to the Ethereum address of the `proposal` payload. You must edit this to vote on a governance upgrade. |
95+
| SEQ_ENFORCE_TIME_TABLE | Whether to enforce strict timeliness requirement when building blocks. Refer [here](#sequencer-timeliness-requirements) for more on the timetable |
96+
| SEQ_MAX_TX_PER_BLOCK | Increase this to make larger blocks |
97+
| SEQ_MIN_TX_PER_BLOCK | Increase this to require making larger blocks |
98+
| SEQ_MIN_SECONDS_BETWEEN_BLOCKS | If greater than zero, the sequencer will not propose a block until this much time has passed since the last L2 block was published to L1 |
99+
| SEQ_MAX_SECONDS_BETWEEN_BLOCKS | Sequencer will ignore the minTxPerBlock if this many seconds have passed since the last L2 block. |
100+
| COINBASE | This is the Ethereum address that will receive the validator's share of block rewards. It defaults to your validator address. |
101+
| FEE_RECIPIENT | This is the Aztec address that will receive the validator's share of transaction fees. Also defaults to your validator's address (but on Aztec L2). |
102102

103103
#### Sequencer Timeliness Requirements
104104

@@ -114,18 +114,17 @@ Currently the default timetable values are hardcoded in [sequencer.ts](https://g
114114

115115
The P2P client coordinates peer-to-peer communication between Nodes.
116116

117-
| Variable | Description |
118-
| ---- | ------|
119-
| BOOTSTRAP_NODES | A list of bootstrap peer ENRs to connect to. Separated by commas. |
120-
| P2P_TCP_ANNOUNCE_ADDR | Format: `<IP_ADDRESS>:<TCP_PORT>`|
121-
|P2P_UDP_ANNOUNCE_ADDR |Format: `<IP_ADDRESS>:<UDP_PORT>`|
122-
| P2P_TCP_LISTEN_ADDR | Format: `<IP_ADDRESS>:<TCP_PORT>` or can use `0.0.0.0:<TCP_PORT>` to listen on all interfaces|
123-
| P2P_UDP_LISTEN_ADDR |Format: `<IP_ADDRESS>:<TCP_PORT>` or can use `0.0.0.0:<UDP_PORT>` to listen on all interfaces |
124-
| P2P_QUERY_FOR_IP | Useful in dynamic environments where your IP is not known in advance. Set this to True, and only supply `:TCP_PORT` and `:UDP_PORT` for the `ANNOUNCE_ADDR` variables. If you know your public IP address in advance, set this to False or just provide the full announce addresses.
125-
| P2P_ENABLED | Whether to run the P2P module. Defaults to False, so make sure to set to True |
126-
| P2P_MIN_PEERS | The min number of peers to connect to. |
127-
| P2P_MAX_PEERS | The max number of peers to connect to. |
128-
| P2P_BLOCK_CHECK_INTERVAL_MS | How milliseconds to wait between each check for new L2 blocks. |
117+
| Variable | Description |
118+
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
119+
| BOOTSTRAP_NODES | A list of bootstrap peer ENRs to connect to. Separated by commas. |
120+
| P2P_TCP_ANNOUNCE_ADDR | Format: `<IP_ADDRESS>:<TCP_PORT>` |
121+
| P2P_UDP_ANNOUNCE_ADDR | Format: `<IP_ADDRESS>:<UDP_PORT>` |
122+
| P2P_TCP_LISTEN_ADDR | Format: `<IP_ADDRESS>:<TCP_PORT>` or can use `0.0.0.0:<TCP_PORT>` to listen on all interfaces |
123+
| P2P_UDP_LISTEN_ADDR | Format: `<IP_ADDRESS>:<TCP_PORT>` or can use `0.0.0.0:<UDP_PORT>` to listen on all interfaces |
124+
| P2P_QUERY_FOR_IP | Useful in dynamic environments where your IP is not known in advance. Set this to True, and only supply `:TCP_PORT` and `:UDP_PORT` for the `ANNOUNCE_ADDR` variables. If you know your public IP address in advance, set this to False or just provide the full announce addresses. |
125+
| P2P_ENABLED | Whether to run the P2P module. Defaults to False, so make sure to set to True |
126+
| P2P_MAX_PEERS | The max number of peers to connect to. |
127+
| P2P_BLOCK_CHECK_INTERVAL_MS | How milliseconds to wait between each check for new L2 blocks. |
129128

130129
### Prover Config
131130

@@ -156,4 +155,4 @@ Some issues are fairly light, the group and ourselves can help you within 60 min
156155
**Steps to Reproduce (if known)**: If there’s a clear way to reproduce the error, please describe it.
157156
**System Information**: Share details like your system’s operating system, hardware specs, and any other relevant environment information.
158157

159-
That way we can dedicate more time to troubleshoot and open Github issues if no known fix.
158+
That way we can dedicate more time to troubleshoot and open Github issues if no known fix.

0 commit comments

Comments
 (0)