Monad 백서

Monad

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 69쪽

_FORKPOINT_URL ``` 1. SSH into the node as `root` user 2. Stop monad-related services ```bash theme={null} systemctl stop monad-bft monad-execution monad-rpc ``` 3. Fetch new `forkpoint.toml` and `validators.toml`. <Tabs> <Tab title="Mainnet"> ```bash theme={null} MF_BUCKET=https://bucket.monadinfra.com VALIDATORS_FILE=/home/monad/monad-bft/config/validators/validators.toml curl -sSL $MF_BUCKET/scripts/mainnet/download-forkpoint.sh | bash curl $MF_BUCKET/validators/mainnet/validators.toml -o $VALIDATORS_FILE chown monad:monad $VALIDATORS_FILE ``` </Tab> <Tab title="Testnet"> ```bash theme={null} MF_BUCKET=https://bucket.monadinfra.com VALIDATORS_FILE=/home/monad/monad-bft/config/validators/validators.toml curl -sSL $MF_BUCKET/scripts/testnet/download-forkpoint.sh | bash curl $MF_BUCKET/validators/testnet/validators.toml -o $VALIDATORS_FILE chown monad:monad $VALIDATORS_FILE ``` </Tab> </Tabs> You may see the following log message: ```bash theme={null} failed to fetch remote configs, using local forkpoint and validators config ``` 4. Start monad-related services ```bash theme={null} systemctl start monad-bft monad-execution monad-rpc ``` 5. Verify the systemd services are running: ```bash theme={null} systemctl list-units --type=service monad-bft.service monad-execution.service monad-rpc.service UNIT LOAD ACTIVE SUB DESCRIPTION monad-bft.service loaded active running "Service file for Monad BFT" monad-execution.service loaded active running "Service file for Monad Execution" monad-rpc.service loaded active running "Service file for Monad RPC" # Check logs for a specific process, e.g. bft journalctl -u monad-bft ``` ## Configuration Details ### Forkpoint Serialization Starting with v0.12.1, forkpoints are serialized in both TOML and RLP formats: * **RLP format**: Source of truth * **TOML format**: Maintained for backward compatibility * If TOML serialization fails, the node will no longer panic * Nodes can start from either format for operational backwards compatibility # Authenticated UDP Migration Source: https://docs.monad.xyz/node-ops/upgrade-instructions/auth-udp <Warning> Please do not proceed until Monad Foundation provides notice. </Warning> ## Overview UDP Authentication provides secure, authenticated peer-to-peer communication for Monad nodes. This feature is currently **opt-in** and will become required in a future release. **Benefits:** * **Enhanced Security**: Cryptographically authenticated peer connections using your existing validator keys * **DoS Protection**: Prevents resource exhaustion from spoofed packets * **Traffic Prioritization**: Enables efficient QoS policies for transaction forwarding * **Performance**: \~100x faster packet verification compared to per-packet ECDSA signatures *** ## Prerequisites * **Monad Version**: `0.12.6` or later * **Access**: Root/sudo privileges on your node * **Keystore**: Existing `/home/monad/monad-bft/config/id-secp` file * **Network**: Ability to open UDP port 8001 on your firewall *** ## Instructions for node operators ### 1. Verify the Monad version Verify the installation: ```bash theme={null} monad-node --version # Expected output 0.12.6+ ``` If not, please refer to the official documentation to upgrade to the latest recommended version: [https://docs.monad.xyz/node-ops/upgrade-instructions/](https://docs.monad.xyz/node-ops/upgrade-instructions/). *** ### 2. Configure Firewall Open UDP port 8001 for authenticated traffic: ```bash theme={null} sudo ufw allow 8001/udp comment 'monad authenticated udp' ``` Verify the rule was added: ```bash theme={null} sudo ufw status | grep 8001 ``` **Expected output:** ``` 8001/udp ALLOW Anywhere # monad authenticated udp ``` Note: if the node is behind a Network Firewall, make sure to also open the port 8001. *** ### 3. Generate Authentication Signature Generate your node's authenticated name record signature: ```bash theme={null} source /home/monad/.env monad-sign-name-record \ --address $(curl -4 -s ifconfig.me):8000 \ --authenticated-udp-port 8001 \ --self-record-seq-num 1 \ --keystore-path /home/monad/monad-bft/config/id-secp \ --password "$KEYSTORE_PASSWORD" ``` > **Important**: The `--self-record-seq-num` value must be **greater** than your current `self_record_seq_num` in `node.toml`. > > * If your config shows `self_record_seq_num = 0`, use `1` > * If your config shows `self_record_seq_num = 1`, use `2` **Example Output:** ``` self_address = "15.235.224.21:8000" self_record_seq_num = 1 authenticated_udp_port = 8001 self_name_record_sig = "f754ed009f82a5c0e402b8f573a1b7e44e9f5fc957cf6360316b5a3baf617f0d1ffe23558845747dd21a51408ac2555a4f4bb70a0032cdf59921d5905663e41200" ``` Warning: do not copy the `authenticated_udp_port` parameter, as the parameter name in `node.toml` is `self_auth_port`. **Save this output** - you'll need it in the next step. *** ### 4. Update Configuration Edit your Monad configuration: ```bash theme={null} sudo vim /home/monad/monad-bft/config/node.toml ``` #### 4.1 Update Peer Discovery Section In the node configuration: * replace the values in the `[peer_discovery]` section with your output from Step 3 * add the `self_auth_port` parameter ```toml theme={null} [peer_discovery] self_address = "YOUR_IP:8000" self_auth_port = 8001 self_record_seq_num = 1 self_name_record_sig = "YOUR_GENERATED_SIGNATURE_FROM_STEP_3" ``` #### 4.2 Update Network Section Add the `authenticated_bind_address_port` parameter to `[network]`: ```toml theme={null} [network] bind_address_host = "0.0.0.0" bind_address_port = 8000 authenticated_bind_address_port = 8001 # Add this line max_rtt_ms = 300 max_mbps = 1000 ``` #### 4.3 Update Peer Records (Validators Only) If you operate a **validator** with downstream full nodes, update peer configurations as they enable UDP authentication. **For peers that have enabled UDP authentication**: * update `record_seq_num` and `name_record_sig` using the new values of the downstream node * set the `auth_port = 8001` Note: Authenticated UDP activated nodes would appear in the `peers.toml` file with `auth_port = 8001`. ```toml theme={null} [[bootstrap.peers]] address = "188.214.131.5:8000" record_seq_num = 1 secp256k1_pubkey = "0x0342f3e447bd6951b2cf7cd717958a84e58dbe8cfbe2780f0247c69591216d2d7c" name_record_sig = "0x215e845dade986e48f6fcb1f065f3ff993ddf0d38b0ef41a05f6621d71bf4c6c2d25747629ac8a3d583418857bc0b4c75140202e14919faf643f431ade4b944d00" auth_port = 8001 # Add this for upgraded peers ``` **For peers not yet enabled**, nothing needs to be updated, `auth_port` line should be omited: ```toml theme={null} [[bootstrap.peers]] address = "188.214.131.6:8000" record_seq_num = 0 secp256k1_pubkey = "0x..." name_record_sig = "0x..." # No auth_port - this peer hasn't upgraded yet ``` Note: the downstream nodes peering configuration do not need to be updated. Save and exit the file. *** ### 5. Restart and Verify Restart the Monad service: ```bash theme={null} sudo systemctl restart monad-bft ``` Monitor the logs for successful startup: ```bash theme={null} journalctl -u monad-bft -f -n 50 --no-pager ``` *** ## Verification ### Check Service Status ```bash theme={null} systemctl status monad-bft --no-pager ``` Expected: `active (running)` ### Verify Port Binding ```bash theme={null} sudo ss -ulpn | grep 8001 ``` **Expected output:** ``` udp UNCONN 0 0 0.0.0.0:8001 0.0.0.0:* users:(("monad-node",pid=12345,fd=20)) ``` ## Troubleshooting *** ### Issue: "invalid name record signature in config file" **Cause:** The signature in `node.toml` doesn't match the parameters. **Solution:** 1. Verify you incremented `self_record_seq_num` correctly 2. Re-run `monad-sign-name-record` with the correct seq\_num 3. Copy the new signature to `node.toml` 4. Restart the service *** ### Issue: Port 8001 Not Listening **Solution:** ```bash theme={null} # Verify config grep -A5 "\[network\]" /home/monad/monad-bft/config/node.toml | grep authenticated # Check for startup errors journalctl -u monad-bft -n 100 --no-pager | grep -i error # Restart service sudo systemctl restart monad-bft ``` *** ### Issue: Firewall Blocking Connections **Solution:** ```bash theme={null} # Check current UFW rules sudo ufw status numbered # Add rule if missing sudo ufw allow 8001/udp comment 'monad authenticated udp' # Reload firewall sudo ufw reload ``` *** ## Rollback Instructions To disable UDP authentication if needed: ### 1. Generate New Signature Without Auth Port ```bash theme={null} source /home/monad/.env monad-sign-name-record \ --address $(curl -4 -s ifconfig.me):8000 \ --self-record-seq-num 2 \ --keystore-path /home/monad/monad-bft/config/id-secp \ --password "$KEYSTORE_PASSWORD" ``` Note: Increment the seq\_num from your current value. ### 2. Update Configuration Edit `/home/monad/monad-bft/config/node.toml`: * Update `self_record_seq_num` and `self_name_record_sig` in `[peer_discovery]` * Remove or comment out `authenticated_bind_address_port` in `[network]` * Remove all `auth_port` entries from peer configurations ### 3. Restart Service ```bash theme={null} sudo systemctl restart monad-bft ``` *** ## Quick Health Check Script Save this as `check_udp_auth.sh` for quick verification: ```bash theme={null} #!/bin/bash echo "=== Monad UDP Authentication Health Check ===" echo "" echo "Checking Monad version..." monad-node --version 2>/dev/null || echo "monad-node not found" echo "" echo "Checking firewall rule..." sudo ufw status | grep 8001 || echo "No UFW rule for 8001/udp" echo "" echo "Checking port binding..." sudo ss -tulpn | grep 8001 || echo "Port 8001 not bound" echo "" echo "Checking service status..." systemctl is-active monad-bft || echo "Service not active" echo "" echo "Checking configuration..." grep -q "authenticated_bind_address_port = 8001" /home/monad/monad-bft/config/node.toml && \ echo "authenticated_bind_address_port configured" || \ echo "authenticated_bind_address_port not found" echo "" echo "Complete!" ``` Make it executable: ```bash theme={null} chmod +x check_udp_auth.sh ./check_udp_auth.sh ``` **Expected output:** ``` === Monad UDP Authentication Health Check === Checking Monad version... monad-node {"commit":"e1e9489b8fc42c0a5af208bab20f6704f83c91c0","tag":"v0.12.7","branch":"","modified":true} Checking firewall rule... 8001/udp ALLOW Anywhere # authenticated udp port Checking port binding... udp UNCONN 0 0 0.0.0.0:8001 0.0.0.0:* users:(("monad-node",pid=3433495,fd=13)) Checking service status... active Checking configuration... authenticated_bind_address_port configured Complete! ``` *** ## Additional Notes * **Backward Compatibility**: Nodes can communicate with both authenticated and non-authenticated peers * **Gradual Rollout**: You can enable authentication at your own pace during the opt-in period * **Future Requirement**: UDP authentication will become mandatory in a future release (date TBD) * **Sequence Numbers**: Always increment `self_record_seq_num` when regenerating signatures * **Key Reuse**: Authentication uses your existing validator keys (secp256k1) *** ## Support If you encounter issues not covered in this guide: 1. Check logs: `journalctl -u monad-bft -n 500 --no-pager` 2. Verify all configuration parameters match the examples 3. Ensure your firewall and network policies allow UDP/8001 4. Contact Monad support with your logs and configuration (sanitized of sensitive data) # Authenticated UDP Checking Source: https://docs.monad.xyz/node-ops/upgrade-instructions/authenticated-udp-checking In preparation for the upcoming Clear UDP traffic decommission, this guide helps verify that a Monad node is properly configured for Authenticated UDP. It checks that the node's configuration and peer settings fully support Auth UDP operation. ## Steps ### 1. Install yq (`tomlq` tool) ```bash theme={null} sudo apt-get update && sudo apt-get install -y yq ``` ### 2. Verify the configuration validation script ```bash theme={null} MF_BUCKET=https://bucket.monadinfra.com curl -fsSL $MF_BUCKET/scripts/validate-auth-udp-config.sh ``` ### 3. Run the configuration validation script ```bash theme={null} MF_BUCKET=https://bucket.monadinfra.com curl -fsSL $MF_BUCKET/scripts/validate-auth-udp-config.sh | bash -s - ``` **Example output:** ``` ====================================== Checking monad client configuration... Node name : my-node Node config file : /home/monad/monad-bft/config/node.toml Peers file : /home/monad/monad-bft/config/peers.toml peer_discovery.self_auth_port = 8001 ✔ bootstrap.peers[1] address=64.31.29.190:8000 auth_port=8001 ✔ bootstrap.peers[2] address=64.31.53.173:8000 auth_port=8001 ✔ bootstrap.peers[3] address=208.115.197.25:8000 auth_port=8001 ✔ bootstrap.peers[4] address=64.130.52.235:8000 auth_port=8001 ✔ bootstrap.peers[5] address=64.130.56.50:8000 auth_port=8001 ✔ bootstrap.peers[6] address=64.130.49.148:8000 auth_port=8001 ✔ bootstrap.peers[7] address=69.162.93.53:8000 auth_port=8001 ✔ bootstrap.peers[8] address=185.189.46.19:8001 auth_port=8001 ✔ Current peers (depends on the network): Auth UDP : 166 Clear UDP : 25 Total : 191 ✔ Configuration is Auth UDP compliant, and ready for Clear UDP decommission. ``` ## If the configuration is not Auth UDP compliant Please consider the following steps: 1. Follow the Auth UDP guide: [Authenticated UDP Migration](./auth-udp) 2. Verify the **bootnode peers configuration** are updated, previous communication: <Accordion title="Bootstrap Peers Update (11 Feb 2026)"> With the recent activation Authenticated UDP traffic, the bootstrap peers needed to be updated on all nodes, in order to join the network. 1. Get the new bootstrap peers signatures (all \[\[bootstrap.peers]] items): Mainnet: * Validators: [https://bucket.monadinfra.com/config/mainnet/latest/node.toml](https://bucket.monadinfra.com/config/mainnet/latest/node.toml) * Full node: [https://bucket.monadinfra.com/config/mainnet/latest/full-node-node.toml](https://bucket.monadinfra.com/config/mainnet/latest/full-node-node.toml) Testnet: * Validators: [https://bucket.monadinfra.com/config/testnet/latest/node.toml](https://bucket.monadinfra.com/config/testnet/latest/node.toml) * Full node: [https://bucket.monadinfra.com/config/testnet/latest/full-node-node.toml](https://bucket.monadinfra.com/config/testnet/latest/full-node-node.toml) 2. Make sure to replace existing peering records with the new ones. The configuration should not have duplicated entries for a given secp256k1\_pubkey. 3. Restart the node: systemctl restart monad-bft monad-execution monad-rpc. (No hard reset required) 4. Verify the node can rejoin the network. Note: Be aware that a hard reset wipes the node's peering cache, since the reset-workspace.sh script deletes the peers.toml file. Any outdated peering setup may cause connection issues. After a hard reset, nodes must rebuild their peer list from scratch using the new bootstrap peering signatures. </Accordion> 3. Ensure the **upstream/downstream connections** (validator \<> dedicated/prioritized full node) are using Auth UDP * If the **remote peer already supports Auth UDP**, the script should locate the corresponding record in peers.toml and print the expected configuration. * If the **remote peer is still using Clear UDP**, the script will not find a matching record. In this case, contact the remote peer operator to request Auth UDP activation and the new name record signature. # Upgrade Instructions Source: https://docs.monad.xyz/node-ops/upgrade-instructions/index <Note> To stay updated on new releases: * join the [Monad Node Announcements](https://t.me/MonadNodeAnnouncements) telegram group, or * join the [Monad Developer Discord](https://discord.gg/monaddev) and follow the `#mainnet-fullnode-announcements` channel </Note> <CardGroup> <Card title="MIP-8 Activation and Page Storage Migration" href="/node-ops/upgrade-instructions/page-storage-mip-8-migration"> Migration instructions for MIP-8 activation and the slot → page storage change </Card> <Card title="Prometheus Metrics Migration" href="/node-ops/upgrade-instructions/prometheus-metrics-migration"> Configure and verify the native Monad metrics endpoint and allow access from Monad Foundation monitoring </Card> <Card title="v0.16.4" href="/node-ops/upgrade-instructions/v0.16.4"> Upgrade instructions for v0.16.4 - snapshot format flag, ledger-tail gas logging </Card> <Card title="v0.16.3" href="/node-ops/upgrade-instructions/v0.16.3"> Upgrade instructions for v0.16.3 - State Archive nodes that skipped the v0.16.1 hot-fix must promote the page timeline </Card> <Card title="v0.16.2" href="/node-ops/upgrade-instructions/v0.16.2"> Upgrade instructions for v0.16.2 - raptorcast v1 coordinated rollout </Card> <Card title="v0.16.1 (MONAD_TEN mainnet)" href="/node-ops/upgrade-instructions/v0.16.1"> Upgrade instructions for v0.16.1 - MIP-8 mainnet activation </Card> <Card title="v0.16.0 (MONAD_TEN)" href="/node-ops/upgrade-instructions/v0.16.0"> Upgrade instructions for v0.16.0 - MIP-8 Activation </Card> <Card title="v0.15.2" href="/node-ops/upgrade-instructions/v0.15.2"> Upgrade instructions for v0.15.2 </Card> <Card title="v0.15.1" href="/node-ops/upgrade-instructions/v0.15.1"> Upgrade instructions for v0.15.1 </Card> <Card title="v0.15.0" href="/node-ops/upgrade-instructions/v0.15.0"> Upgrade instructions for v0.15.0 </Card> <Card title="v0.14.5" href="/node-ops/upgrade-instructions/v0.14.5"> Upgrade instructions for v0.14.5 </Card> <Card title="v0.14.4" href="/node-ops/upgrade-instructions/v0.14.4"> Upgrade instructions for v0.14.4 </Card> <Card title="v0.14.3" href="/node-ops/upgrade-instructions/v0.14.3"> Upgrade instructions for v0.14.3 </Card> <Card title="v0.14.2" href="/node-ops/upgrade-instructions/v0.14.2"> Upgrade instructions for v0.14.2 </Card> <Card title="v0.14.1" href="/node-ops/upgrade-instructions/v0.14.1"> Upgrade instructions for v0.14.1 - eth\_fillTransaction patch </Card> <Card title="v0.14.0" href="/node-ops/upgrade-instructions/v0.14.0"> Upgrade instructions for v0.14.0 </Card> <Card title="v0.13.1" href="/node-ops/upgrade-instructions/v0.13.1"> Upgrade instructions for v0.13.1 - State Archive patch </Card> <Card title="v0.13.0 (MONAD_NINE)" href="/node-ops/upgrade-instructions/v0.13.0"> Upgrade instructions for v0.13.0 - Hard Fork </Card> <Card title="v0.12.7" href="/node-ops/upgrade-instructions/v0.12.7"> Upgrade instructions for v0.12.7 </Card> <Card title="Authenticated UDP Migration" href="/node-ops/upgrade-instructions/auth-udp"> Migration instructions for Authenticated UDP </Card> <Card title="Authenticated UDP Checking" href="/node-ops/upgrade-instructions/authenticated-udp-checking"> Validate that your node is properly configured for Authenticated UDP </Card> <Card title="v0.12.6" href="/node-ops/upgrade-instructions/v0.12.6"> Upgrade instructions for v0.12.6 </Card> <Card title="v0.12.5 Testnet Re-genesis" href="/node-ops/upgrade-instructions/v0.12.5-testnet-regenesis"> Re-genesis instructions for testnet v0.12.5 </Card> <Card title="v0.12.3" href="/node-ops/upgrade-instructions/v0.12.3"> Upgrade instructions for v0.12.3 </Card> </CardGroup> # MIP-8 Activation and Page Storage Migration Source: https://docs.monad.xyz/node-ops/upgrade-instructions/page-storage-mip-8-migration ## Introduction This document covers the operational side of activating MIP-8: migrating a node's database from **slot to page encoding**, live and without resyncing from genesis. Each node **dual-writes** both encodings until the fork flips the network to **page-encoded** database, then drops the old **slot-encoded** database. ## Background ### MIP-8 [MIP-8](https://monad.xyz/blog/mip-8) reorganizes the EVM state trie to be page-aware: storage slots are grouped into 4 KB pages instead of b
프로젝트로 돌아가기