Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(p2p): remove min peers option #11789

Merged
merged 30 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
66d27dd
exp: flood publishing disabled
Maddiaa0 Feb 3, 2025
216c045
exp: add 64 validators yaml
Maddiaa0 Feb 3, 2025
27d7733
chore: alter gossip params
Maddiaa0 Feb 4, 2025
cd041cc
fix: mplex fix
Maddiaa0 Feb 4, 2025
5a270a8
tmp
Maddiaa0 Feb 5, 2025
4bf1c24
worker test
Maddiaa0 Feb 5, 2025
61d2b17
tmp score changes
Maddiaa0 Feb 6, 2025
dc109ea
misc
Maddiaa0 Feb 6, 2025
ee936ab
chore: log source peer id
Maddiaa0 Feb 6, 2025
59e4572
feat: testbench
Maddiaa0 Feb 6, 2025
fd35372
clean spartan changes
Maddiaa0 Feb 6, 2025
d45bebd
chore: add some testing env vars
Maddiaa0 Feb 6, 2025
e21be41
fix: config
Maddiaa0 Feb 6, 2025
bfcfd8e
chore: add readme
Maddiaa0 Feb 6, 2025
329a470
fix: update test helpers name
Maddiaa0 Feb 6, 2025
4935ac8
fix: include flood publish env var
Maddiaa0 Feb 6, 2025
44a9012
fix: reset libp2p parameter changes
Maddiaa0 Feb 6, 2025
c6fe12c
fix: set min peer count
Maddiaa0 Feb 6, 2025
9b5bc3d
fix: rm 64
Maddiaa0 Feb 6, 2025
012b5f6
fix: paths
Maddiaa0 Feb 6, 2025
f883701
Merge branch 'master' into md/worker-test
Maddiaa0 Feb 6, 2025
2d3ac41
fix: review comments
Maddiaa0 Feb 7, 2025
09956da
Merge branch 'master' into md/worker-test
Maddiaa0 Feb 7, 2025
f74e18d
fix: merge fix
Maddiaa0 Feb 7, 2025
fd03b2a
fmt
Maddiaa0 Feb 7, 2025
53d7645
fix: reqresp dirty merge
Maddiaa0 Feb 7, 2025
0d8125d
chore(p2p): remove minimum peers
Maddiaa0 Feb 6, 2025
6fb3561
chore: remove min peers value
Maddiaa0 Feb 6, 2025
ff9c484
fix: set min connections to 0 by default
Maddiaa0 Feb 6, 2025
a222526
Merge branch 'master' into md/remove-min-peers
Maddiaa0 Feb 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ P2P_TCP_ANNOUNCE_ADDR='' # TCP Address to announce to the p2p network. Format: <
P2P_UDP_ANNOUNCE_ADDR='' # UDP Hostname to announce to the p2p network (used for peer discovery). Uses TCP announce addr if not provided
P2P_ANNOUNCE_PORT='' # Port to announce to the p2p network
P2P_NAT_ENABLED='false' # Whether to enable NAT from libp2p
P2P_MIN_PEERS=10 # The minimum number of peers (a peer count below this will cause the node to look for more peers)
P2P_MAX_PEERS=100 # The maximum number of peers (a peer count above this will cause the node to refuse connection attempts)

## Aztec Contract Addresses ##
Expand Down
79 changes: 39 additions & 40 deletions docs/docs/run_node/guides/run_nodes/how_to_run_sequencer_draft.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ Once you connect and begin to see gossiped messages such as attestations, propos

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`

| Variable | Description |
| ----- | ----- |
| 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`|
| BOOTNODE_URL | URL to a bootnode that supplies L1 contract addresses and the ENR of the bootstrap nodes. |
| IMAGE | The docker image to run |
| Variable | Description |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| 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` |
| BOOTNODE_URL | URL to a bootnode that supplies L1 contract addresses and the ENR of the bootstrap nodes. |
| IMAGE | The docker image to run |

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.

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

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

|Variable| Description|
|----|-----|
|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`|
|L1_CHAIN_ID | Chain ID of the L1 |
| DATA_DIRECTORY | Optional dir to store archiver and world state data. If omitted will store in memory |
| ARCHIVER_POLLING_INTERVAL_MS | The polling interval in ms for retrieving new L2 blocks and encrypted logs
| SEQ_PUBLISHER_PRIVATE_KEY | This should be the same as your validator private key |
|SEQ_PUBLISH_RETRY_INTERVAL_MS | The interval to wait between publish retries|
| SEQ_VIEM_POLLING_INTERVAL_TIME | The polling interval viem uses in ms |
| Variable | Description |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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` |
| L1_CHAIN_ID | Chain ID of the L1 |
| DATA_DIRECTORY | Optional dir to store archiver and world state data. If omitted will store in memory |
| ARCHIVER_POLLING_INTERVAL_MS | The polling interval in ms for retrieving new L2 blocks and encrypted logs |
| SEQ_PUBLISHER_PRIVATE_KEY | This should be the same as your validator private key |
| SEQ_PUBLISH_RETRY_INTERVAL_MS | The interval to wait between publish retries |
| SEQ_VIEM_POLLING_INTERVAL_TIME | The polling interval viem uses in ms |

### Sequencer Config

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

|Variable| Description|
|----|-----|
| VALIDATOR_DISABLED | If this is True, the client won't perform any validator duties. |
|VALIDATOR_ATTESTATIONS_WAIT_TIMEOUT_MS | Wait for attestations timeout. After this, client throws an error and does not propose a block for that slot. |
| VALIDATOR_ATTESTATIONS_POLLING_INTERVAL_MS | If not enough attestations, sleep for this long and check again |
|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.|
| SEQ_ENFORCE_TIME_TABLE | Whether to enforce strict timeliness requirement when building blocks. Refer [here](#sequencer-timeliness-requirements) for more on the timetable |
| SEQ_MAX_TX_PER_BLOCK | Increase this to make larger blocks |
| SEQ_MIN_TX_PER_BLOCK | Increase this to require making larger blocks |
| 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 |
| SEQ_MAX_SECONDS_BETWEEN_BLOCKS | Sequencer will ignore the minTxPerBlock if this many seconds have passed since the last L2 block.|
| COINBASE | This is the Ethereum address that will receive the validator's share of block rewards. It defaults to your validator address. |
| 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). |
| Variable | Description |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| VALIDATOR_DISABLED | If this is True, the client won't perform any validator duties. |
| VALIDATOR_ATTESTATIONS_WAIT_TIMEOUT_MS | Wait for attestations timeout. After this, client throws an error and does not propose a block for that slot. |
| VALIDATOR_ATTESTATIONS_POLLING_INTERVAL_MS | If not enough attestations, sleep for this long and check again |
| 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. |
| SEQ_ENFORCE_TIME_TABLE | Whether to enforce strict timeliness requirement when building blocks. Refer [here](#sequencer-timeliness-requirements) for more on the timetable |
| SEQ_MAX_TX_PER_BLOCK | Increase this to make larger blocks |
| SEQ_MIN_TX_PER_BLOCK | Increase this to require making larger blocks |
| 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 |
| SEQ_MAX_SECONDS_BETWEEN_BLOCKS | Sequencer will ignore the minTxPerBlock if this many seconds have passed since the last L2 block. |
| COINBASE | This is the Ethereum address that will receive the validator's share of block rewards. It defaults to your validator address. |
| 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). |

#### Sequencer Timeliness Requirements

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

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

| Variable | Description |
| ---- | ------|
| BOOTSTRAP_NODES | A list of bootstrap peer ENRs to connect to. Separated by commas. |
| P2P_TCP_ANNOUNCE_ADDR | Format: `<IP_ADDRESS>:<TCP_PORT>`|
|P2P_UDP_ANNOUNCE_ADDR |Format: `<IP_ADDRESS>:<UDP_PORT>`|
| P2P_TCP_LISTEN_ADDR | Format: `<IP_ADDRESS>:<TCP_PORT>` or can use `0.0.0.0:<TCP_PORT>` to listen on all interfaces|
| P2P_UDP_LISTEN_ADDR |Format: `<IP_ADDRESS>:<TCP_PORT>` or can use `0.0.0.0:<UDP_PORT>` to listen on all interfaces |
| 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.
| P2P_ENABLED | Whether to run the P2P module. Defaults to False, so make sure to set to True |
| P2P_MIN_PEERS | The min number of peers to connect to. |
| P2P_MAX_PEERS | The max number of peers to connect to. |
| P2P_BLOCK_CHECK_INTERVAL_MS | How milliseconds to wait between each check for new L2 blocks. |
| Variable | Description |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| BOOTSTRAP_NODES | A list of bootstrap peer ENRs to connect to. Separated by commas. |
| P2P_TCP_ANNOUNCE_ADDR | Format: `<IP_ADDRESS>:<TCP_PORT>` |
| P2P_UDP_ANNOUNCE_ADDR | Format: `<IP_ADDRESS>:<UDP_PORT>` |
| P2P_TCP_LISTEN_ADDR | Format: `<IP_ADDRESS>:<TCP_PORT>` or can use `0.0.0.0:<TCP_PORT>` to listen on all interfaces |
| P2P_UDP_LISTEN_ADDR | Format: `<IP_ADDRESS>:<TCP_PORT>` or can use `0.0.0.0:<UDP_PORT>` to listen on all interfaces |
| 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. |
| P2P_ENABLED | Whether to run the P2P module. Defaults to False, so make sure to set to True |
| P2P_MAX_PEERS | The max number of peers to connect to. |
| P2P_BLOCK_CHECK_INTERVAL_MS | How milliseconds to wait between each check for new L2 blocks. |

### Prover Config

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

That way we can dedicate more time to troubleshoot and open Github issues if no known fix.
That way we can dedicate more time to troubleshoot and open Github issues if no known fix.
Loading
Loading