Monad 백서

Monad

원문

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

ackup/bls-backup \ | tee /home/monad/pubkey-secp-bls echo "Success: New keystores generated" EOF ``` Public keys are exported to `/home/monad/pubkey-secp-bls` for convenience. <Warning title="External Backup"> These files contain your node's private keys — they define your node identity. Anyone with access to them can take over your node's identity. **Please ensure that these backup files are stored in an external location outside of the node (e.g. a password manager or secrets vault). They are required to restore your full node or validator identity in the event of hardware failure or system loss:** * `/opt/monad/backup/secp-backup` * `/opt/monad/backup/bls-backup` For validators, this is especially important: losing your keys means you cannot migrate your validator, and re-registering with a new identity requires moving all delegations manually. </Warning> ### Update `node.toml` <Note title="Public full node configuration"> Full nodes can receive block proposals either directly from a validator that whitelists it, or via a raptorcast group. These different configurations are described [here](/node-ops/full-node-block-delivery). The bellow instructions are intended for the **public full node** configuration, where a full node joins the network by connecting to available upstream validators participating in secondary raptorcast. Joining in this configuration is **permissionless**. </Note> Update the configuration that was downloaded previously (for reference, you can check the [testnet config](https://bucket.monadinfra.com/config/testnet/latest/full-node-node.toml) and the [mainnet config](https://bucket.monadinfra.com/config/mainnet/latest/full-node-node.toml)): 1. Edit `/home/monad/monad-bft/config/node.toml` using a text editor (e.g., `nano /home/monad/monad-bft/config/node.toml`). 2. The `beneficiary` field to include the address that should receive block rewards.<br /> For **full nodes**, this field can be set to the burn address. ``` beneficiary = "0x0000000000000000000000000000000000000000" ``` For **validator**, use the beneficiary wallet address. This address should be prefixed by `0x`. ``` beneficiary = "0x<VALIDATOR_REWARDS_ADDRESS>" ``` 3. Update the `node_name` field to include your provider name. Note that if you are operating multiple nodes, **the node name should be unique**. ```bash theme={null} node_name = "full_<PROVIDER>-<OPTIONAL_SUFFIX>" ``` 4. Ensure `enable_client = true` under `[fullnode_raptorcast]`. 5. Ensure `expand_to_group = true` under `[statesync]`. 6. `[blocksync_override]` peers should remain empty for public full nodes. ### Node signature record The node Name record is a cryptographically signed record that contains a node's network address information and is used for peer discovery and network topology management in the monad-bft system. Using the keypairs are created, a fullnode will need to sign its name record using the SECP key in order to participate in peer discovery. The sequence number (seq) in the record allows nodes to determine which version of a peer's address information is most recent, supporting scenarios where nodes change their network location. <Tabs> <Tab title="Mainnet"> Generate the node record signature: ``` source /home/monad/.env monad-sign-name-record \ --ip $(curl -s4 ifconfig.me) \ --tcp-port 8000 \ --udp-port 8000 \ --authenticated-udp-port 8001 \ --keystore-path /home/monad/monad-bft/config/id-secp \ --password "${KEYSTORE_PASSWORD}" \ --self-record-seq-num 1 ``` Running the command above prints the fields needed for the next step, for example: ``` self_ip = "91.203.44.216" self_tcp_port = 8000 self_udp_port = 8000 self_record_seq_num = 1 self_name_record_sig = "5995f8dc5af4ca70e3b49ce793e7fe353d72b261c14037272958a9f0cc105fdd4890e56cb99765750ca48bab113cccbb378fc61dff8b23da4a03c07bba60034300" ``` Update the `peer_discovery` section in `node.toml` with the IP addresses, sequence number and name record signature generated from the previous command, for example. `node.toml` still expects a single `self_address` field: * To build `self_address`, concatenate `self_ip` and `self_tcp_port` as `"<self_ip>:<self_tcp_port>"` * `self_udp_port` can be ignored ```toml theme={null} [peer_discovery] self_address = "91.203.44.216:8000" self_record_seq_num = 1 self_name_record_sig = "5995f8dc5af4ca70e3b49ce793e7fe353d72b261c14037272958a9f0cc105fdd4890e56cb99765750ca48bab113cccbb378fc61dff8b23da4a03c07bba60034300" ``` </Tab> <Tab title="Testnet"> Generate the node record signature: ``` source /home/monad/.env monad-sign-name-record \ --ip $(curl -s4 ifconfig.me) \ --tcp-port 8000 \ --authenticated-udp-port 8001 \ --direct-udp-port 8002 \ --keystore-path /home/monad/monad-bft/config/id-secp \ --password "${KEYSTORE_PASSWORD}" \ --self-record-seq-num 1 ``` Running the command above prints the fields needed for the next step, for example: ``` self_address = "91.203.44.216" self_tcp_port = 8000 self_record_seq_num = 1 self_auth_port = 8001 self_direct_udp_auth_port = 8002 self_name_record_sig = "8864dcd0ab2c6a78b48f35957d30b2d3c95249f5f4071534a080d9d022802e462c3e5e1fc3855e3f7bc1db6611b13beaf1c61dde5694c85178e0a0bb752009e500" ``` Update the `peer_discovery` section in `node.toml` with the address, ports, sequence number and name record signature generated from the previous command, for example: ```toml theme={null} [peer_discovery] self_address = "91.203.44.216" self_tcp_port = 8000 self_record_seq_num = 1 self_auth_port = 8001 self_direct_udp_auth_port = 8002 self_name_record_sig = "8864dcd0ab2c6a78b48f35957d30b2d3c95249f5f4071534a080d9d022802e462c3e5e1fc3855e3f7bc1db6611b13beaf1c61dde5694c85178e0a0bb752009e500" # Name Record Signature ``` </Tab> </Tabs> ### Remote Configuration Fetching (v0.12.1+) Nodes can automatically fetch `forkpoint.toml` and `validators.toml` from remote locations on startup. This feature is configured using the following environment variables in `/home/monad/.env`: <Tabs> <Tab title="Mainnet"> ```bash theme={null} REMOTE_VALIDATORS_URL='https://bucket.monadinfra.com/validators/mainnet/validators.toml' REMOTE_FORKPOINT_URL='https://bucket.monadinfra.com/forkpoint/mainnet/forkpoint.toml' ``` </Tab> <Tab title="Testnet"> ```bash theme={null} REMOTE_VALIDATORS_URL='https://bucket.monadinfra.com/validators/testnet/validators.toml' REMOTE_FORKPOINT_URL='https://bucket.monadinfra.com/forkpoint/testnet/forkpoint.toml' ``` </Tab> </Tabs> These URLs point to the latest configuration files. When defined, the node will automatically attempt to download fresh configuration files on startup, simplifying node operations and reducing manual intervention during network updates. Monad Foundation is not the exclusive provider of these configuration files. Feel free to replace the above remote links with those from other providers. ### Call traces (optional) For full nodes intended for archiving or RPC workflows, enabling `--trace_calls` is recommended. This preserves the detailed error information necessary for call traces, e.g. `debug_traceTransaction`. To make this override, please run `systemctl edit monad-execution` and add the `--trace_calls` CLI param to the `ExecStart` definition (may need a line continuation character `\`): ```sh theme={null} systemctl edit monad-execution ``` ```toml theme={null} [Service] Type=simple ExecStart= ExecStart=/usr/local/bin/monad \ ... --trace_calls ... ``` ### Monad Cruft service Installation of the `monad` Debian package enables the `monad-cruft` timer, which runs hourly to clear old artifacts (`/opt/monad/scripts/clear-old-artifacts.sh`). This is necessary to prevent inode exhaustion as artifacts like `forkpoint.toml` and ledger files accumulate. Starting with v0.12.2, you can configure artifact retention times by setting environment variables in `/home/monad/.env`. The following variables control how long artifacts are retained before deletion (all values in minutes): * `RETENTION_LEDGER` - Ledger files (headers and bodies, default: 600 = 10 hours) * `RETENTION_WAL` - WAL files (default: 300 = 5 hours) * `RETENTION_FORKPOINT` - Forkpoint files (default: 300 = 5 hours) * `RETENTION_VALIDATORS` - Validators files (default: 43200 = 30 days) ```bash theme={null} # Example: Add retention configuration to /home/monad/.env RETENTION_LEDGER=600 RETENTION_WAL=300 RETENTION_FORKPOINT=300 RETENTION_VALIDATORS=43200 ``` To customize retention, add or modify these variables in `/home/monad/.env`. For example, to retain ledger files for 20 hours: ```bash theme={null} echo "RETENTION_LEDGER=1200" >> /home/monad/.env ``` These settings will be automatically picked up by the `monad-cruft` timer on its next hourly run. ## Start the Node Set filesystem permissions: ```bash theme={null} chown -R monad:monad /home/monad/ ``` Enable the monad services to allow them to automatically start whenever the server is rebooted: ```bash theme={null} systemctl enable monad-bft monad-execution monad-rpc ``` **Next, run the [Hard Reset Instructions](/node-ops/node-recovery/hard-reset)** to import a recent database snapshot into the node. Start the monad services: ```bash theme={null} systemctl start monad-bft monad-execution monad-rpc ``` **This completes the process of starting up a full node!** Refer to the [General Operations](/node-ops/general-operations) to monitor the state of the node. ## Keeping Updated 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 # General Operations Source: https://docs.monad.xyz/node-ops/general-operations ## Version Information View the version and build information for your Monad binaries: ```bash theme={null} monad-node --version # Example output: monad-node {"commit":"c0cdcaae8eb527e44d72c4638c1f1335025a5132","tag":"v0.12.2-rc","branch":"","modified":true} ``` ## CLI Help View available command-line arguments for any Monad binary: ```bash theme={null} monad-rpc --help monad --help monad-bft --help ``` <Warning> CLI arguments should not be changed arbitrarily as some configurations may result in unexpected behavior or crashes. </Warning> ## Service Management Check the status of Monad services: ```bash theme={null} # Check all services at once systemctl status monad-bft monad-execution monad-rpc --no-pager -l # Check individual service status systemctl status monad-bft systemctl status monad-execution systemctl status monad-rpc # View logs for a specific service journalctl -u monad-bft -f journalctl -u monad-execution -f journalctl -u monad-rpc -f ``` ## Monitoring Block Height The RPC service will start listening on port `8080` when the statesync is completed. Check the current block height via RPC: ```bash theme={null} curl http://localhost:8080/ \ -X POST \ -H "Content-Type: application/json" \ --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}' ``` ## Viewing MonadDB Disk Usage Note that MonadDB (TrieDB) will automatically compact when at 80% capacity to preserve optimal SSD performance. To check MonadDB disk usage and retained block history: ```bash theme={null} monad-mpt --storage /dev/triedb ``` Example output: ``` MPT database on storages: Capacity Used % Path 3.49 Tb 24.30 Gb 0.68% "/dev/nvme1n1p1" MPT database internal lists: Fast: 94 chunks with capacity 23.50 Gb used 23.40 Gb Slow: 3 chunks with capacity 768.00 Mb used 658.72 Mb Free: 14207 chunks with capacity 3.47 Tb used 0.00 bytes MPT database has 599928 history, earliest is 36784905 latest is 37384832. It has been configured to retain no more than 33554432. Latest proposed is (37384832, 88a5550ba067c2f21cef6b6e8953fbf700fe300905952e5621335fe2bd58729c). Latest voted is (37384831, 56074c2429909c2966bfe8df55810ec3b8f4f4f599b407ff89ec92b090656ab1). Latest finalized is 37384830, latest verified is 37384827, auto expire version is 36784905 ``` ## Consensus Information with `ledger-tail` `monad-ledger-tail` exposes consensus information by directly parsing ledger artifacts and streams the data in JSON format. Start the service: ```bash theme={null} systemctl start monad-ledger-tail # View output journalctl -fu monad-ledger-tail ``` Example output: ```json theme={null} // the real output is all on one line, but we've prettified this for legibility: { "timestamp": "2025-11-23T03:09:09.534974Z", "level": "INFO", "fields": { "message": "proposed_block", "round": "53449032", "parent_round": "53449031", "epoch": "1024", "seq_num": "51203516", "num_tx": "3", "author": "036daee7750e29e46eb64d86ad1cc7b235d7f1ad9597941a3a77cdd641cead4528", "block_ts_ms": "1763867349470", "now_ts_ms": "1763867349534", "author_address": "" }, "target": "ledger_tail" } ``` ## Node Status with `monad-status` Install `monad-status`: ``` curl -sSL https://bucket.monadinfra.com/scripts/monad-status.sh -o /usr/local/bin/monad-status chmod +x /usr/local/bin/monad-status ``` Run `monad-status` to get the status of the node. This should print similar output: ```yaml theme={null} ### Monad Node Status hostname: monad-node date: Wed Nov 26 10:48:26 PM CET 2025 uptime: 0d 00h 41m 49s version: 0.12.2 config: network: mainnet chain: monad_mainnet chainId: 143 secpPublicKey: 03831b36b50261011d82f94d58f8aa0edfe058359e2c365c37cce678436b9eb371 blsPublicKey: b9c1905e11e8395a789bece454ec24bed98b96cf9dc04c02c9512fb94900d3e0355383e542c44a0eb1be4d2780a1fb2f nodeSignature: 4f6e3e47af0e8ff3614e1eb53f9015ef4fc8593e60c13d52c2b458d05385b5f94cff8776ceb8b9401c3647148637d599622353d0631864a23b07f6d7fb55e84f00 selfAddress: 65.109.145.172:8000 recordSeqNum: 0 services: monad-bft: running monad-execution: running monad-rpc: running otelcol: running monad-cruft: activated: true previous: 48min ago next: 11min peers: peersNumber: 1146 consensus: status: in-sync mode: live epoch: 764 round: 38259075 blockNumber: 38200041 blockNumberFromExternal: 38200040 blockDifference: 0 statesync: percentage: 100.0000% progress: 38193694 target: 38193694 rpc: status: active clientVersion: Monad/0.12.2 netVersion: 143 blockNumber: 38200041 ``` ## Exporting Key Backups If you followed the [full node installation](/node-ops/full-node-installation#generate-keystores) guide, backup files for your keys were automatically created at: * `/opt/monad/backup/secp-backup` * `/opt/monad/backup/bls-backup` If those files are missing or you need to re-export your keys, use the commands below to recreate them. Any existing backup files will be preserved with a timestamp suffix before being overwritten. ```bash theme={null} source /home/monad/.env [ -f /opt/monad/backup/secp-backup ] && mv /opt/monad/backup/secp-backup "/opt/monad/backup/secp-backup.$(date +%Y%m%d%H%M%S).bak" [ -f /opt/monad/backup/bls-backup ] && mv /opt/monad/backup/bls-backup "/opt/monad/backup/bls-backup.$(date +%Y%m%d%H%M%S).bak" monad-keystore recover \ --password "$KEYSTORE_PASSWORD" \ --keystore-path /home/monad/monad-bft/config/id-secp \ --key-type secp > /opt/monad/backup/secp-backup monad-keystore recover \ --password "$KEYSTORE_PASSWORD" \ --keystore-path /home/monad/monad-bft/config/id-bls \ --key-type bls > /opt/monad/backup/bls-backup ``` <Warning title="External Backup"> These files contain your node's private keys — they define your node identity. Anyone with access to them can take over your node's identity. **Ensure that these backup files are stored in an external location outside of the node (e.g. a password manager or secrets vault). They are required to restore your full node or validator identity in the event of hardware failure or system loss:** * `/opt/monad/backup/secp-backup` * `/opt/monad/backup/bls-backup` For validators, this is especially important: losing your keys means you cannot migrate your validator, and re-registering with a new identity requires moving all delegations manually. </Warning> ## Importing Keys from Backups To restore your node identity from a backup, extract the IKM secret from each backup file and import it using `monad-keystore import`: ```bash theme={null} source /home/monad/.env [ -f /home/monad/monad-bft/config/id-secp ] && mv /home/monad/monad-bft/config/id-secp "/home/monad/monad-bft/config/id-secp.$(date +%Y%m%d%H%M%S).bak" [ -f /home/monad/monad-bft/config/id-bls ] && mv /home/monad/monad-bft/config/id-bls "/home/monad/monad-bft/config/id-bls.$(date +%Y%m%d%H%M%S).bak" SECP_IKM=$(grep -E "Keystore secret:|Keep your IKM secure:" /opt/monad/backup/secp-backup | awk '{print $NF}') BLS_IKM=$(grep -E "Keystore secret:|Keep your IKM secure:" /opt/monad/backup/bls-backup | awk '{print $NF}') monad-keystore import \ --ikm "$SECP_IKM" \ --password "$KEYSTORE_PASSWORD" \ --keystore-path /home/monad/monad-bft/config/id-secp \ --key-type secp monad-keystore import \ --ikm "$BLS_IKM" \ --password "$KEYSTORE_PASSWORD" \ --keystore-path /home/monad/monad-bft/config/id-bls \ --key-type bls ``` ## Keeping Updated 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 # Hardware Requirements Source: https://docs.monad.xyz/node-ops/hardware-requirements <Warning> Cloud-based environments are not officially supported. </Warning> ## Requirements All requirements are the same between validators (consensus participants) and full nodes aside from bandwidth: * **CPU**: 16 core CPU with 4.5 GHz+ base clock speed, e.g. AMD Ryzen 9950x, AMD Ryzen 7950x, AMD EPYC 4584PX, etc. * **Memory**: 32 GB+ RAM * **Storage**: * 2TB dedicated disk for TrieDB (Execution) * 500GB Disk for MonadBFT / OS * PCIe Gen4x4 NVME SSD or better for both * **Bandwidth**: * 300 Mbit/s (Validators) * 100 Mbit/s (Full Nodes) <Warning> Hard drive performance can vary dramatically by manufacturer. Below are results from internal testing: **Ranked performance** 1. Samsung 980 / 990 Pro - PCIe 4.0, top class performance 2. Samsung PM9A1 - PCIe 4.0, pretty good performance and stable performance under load 3. Micron 7450 - PCIe 4.0, pretty good performance BUT has weird random slowdowns under a lot of load **Known unreliable** 1. Nextorage SSDs - can become unresponsive under load due to overheating, requiring a system reboot. </Warning> A community-driven set of hardware recommendations and notes can be found [here](https://monadhcl.xyz/#recommended-hardware). ## Why Bare Metal? Monad nodes must operate on bare metal servers rather than virtualized or cloud-based environments (e.g., AWS EC2, GCP, Azure) due to the system's strict performance and timing requirements. A bare metal server gives the node direct, stable access to hardware, ensuring smooth operation and synchronization with the network: * Monad’s consensus protocol enforces tight time windows—blocks are proposed and voted on in sub-second intervals, and the network assumes nodes can validate and execute blocks within this budget. In such a situation, cloud-based environments may introduce latency and unpredictability, which can cause nodes to miss deadlines, fall behind in block processing, or become unstable during high-throughput periods. * Even when resources appear sufficient on paper, virtualization adds an additional layer of software between the node and physical hardware. This layer introduces context switching overhead and restricts direct I/O access to SSDs and network interfaces. These effects are negligible for average compute tasks but become significant when sustained high-throughput and low-latency operations are required, as in Monad’s consensus and execution loops. In summary,
프로젝트로 돌아가기