Skip to Content
MCN Blockchain

Run a validator

Create a signing key, submit an MCN deposit, and configure a persistent validator service.

One validator requires 10,000 MCN for activation and an additional wallet balance for transaction fees. This guide creates one key with 0x02 withdrawal credentials and a 10,000 MCN deposit. The server instructions use Ubuntu 24.04.

1. Prepare the full node

Complete the full-node guide, then install the validator client.

cd "$HOME/start-mcn"
./install-clients --validator
./start wait

Keep signing disabled until wait completes successfully.

2. Create keys on your secure computer

Choose an MCN withdrawal address you control. It starts with 0x followed by 40 hexadecimal characters. Keep access to that wallet.

On a secure Ubuntu 24.04 computer, install the dependencies and generator while connected to the internet.

sudo apt update
sudo apt install -y git python3 python3-venv ca-certificates
git clone https://github.com/MCNBlockchain/start-mcn.git
cd start-mcn
./setup-deposit

Disconnect that computer from the network, then run the generator.

./create-validator

The interactive generator asks for the withdrawal address and a keystore encryption password. It shows a recovery phrase and asks you to repeat it. Back up the phrase offline and keep the password. Files are written to $HOME/mcn-validator/validator_keys/.

  • keystore-*.json holds the encrypted signing key. Copy this file to the server.
  • deposit_data-*.json holds the public deposit fields and signature.
  • The recovery phrase restores the key. Keep it offline with a protected backup.

The MCN adapter uses EthStaker Deposit CLI 1.3.0 with MCN's signing domain, minimum deposit and amount cap from network/config.yaml. EthStaker handles recovery phrases, key derivation and keystore encryption. Upstream source

3. Submit the deposit

Print the public fields on the computer where you created the keys.

./deposit-details "$HOME"/mcn-validator/validator_keys/deposit_data-*.json

Confirm the withdrawal address and record the pubkey for validator lookup.

Add MCN to your browser wallet and select it.

Wallet fieldValue
Network nameMCN Mainnet
RPC URLhttps://rpc.mcnblockchain.com
Chain ID2325
Currency symbolMCN
Explorerhttps://mcnscan.org

Open the MCN deposit contract, select the contract write tab, connect your wallet, and find the payable deposit function.

Form fieldInput
pubkeyThe pubkey printed by deposit-details
withdrawal_credentialsThe corresponding withdrawal_credentials
signatureThe corresponding signature
deposit_data_rootThe corresponding deposit_data_root
Value10,000 MCN, or 10000000000000000000000 when the selected unit is wei

Include the 0x prefix in all four fields. Before approving, confirm Chain ID 2325, recipient contract 0x00000000219ab540356cBB839Cbe05303d7705Fa, and the amount in your wallet. Submit and record the transaction hash. If confirmation is delayed, inspect that hash before retrying to avoid a second deposit.

4. Copy and import the keystore

From your secure computer, replace USER@SERVER with the user and address used to run your full node.

ssh USER@SERVER 'umask 077; mkdir -p "$HOME/mcn-validator/keystores"'
scp "$HOME"/mcn-validator/validator_keys/keystore-*.json USER@SERVER:mcn-validator/keystores/

On the server, from $HOME/start-mcn, create the Prysm wallet password file. This password protects imported keys. The command asks twice using hidden input.

python3 - <<'PY'
from pathlib import Path
import getpass
import os
folder = Path.home() / "mcn-validator"
folder.mkdir(mode=0o700, exist_ok=True)
password = getpass.getpass("New Prysm wallet password: ")
confirmation = getpass.getpass("Repeat password: ")
if len(password) < 12 or password != confirmation:
    raise SystemExit("Passwords must match and contain at least 12 characters.")
fd = os.open(folder / "wallet-password.txt", os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600)
with os.fdopen(fd, "w") as output:
    output.write(password + "\n")
PY
./bin/validator accounts import \
  --keys-dir="$HOME/mcn-validator/keystores" \
  --wallet-dir="$HOME/mcn-validator/wallet" \
  --wallet-password-file="$HOME/mcn-validator/wallet-password.txt"

Enter the keystore password from step 2 when prompted. List the imported keys and compare them with the deposit's pubkey.

./bin/validator accounts list \
  --wallet-dir="$HOME/mcn-validator/wallet" \
  --wallet-password-file="$HOME/mcn-validator/wallet-password.txt"

5. Start signing

Choose an address for fees from proposed blocks. You can use the same address as the withdrawal address. Replace YOUR_MCN_ADDRESS with your address.

./run-validator --fee-recipient YOUR_MCN_ADDRESS

The command waits for the full node, then starts Prysm Validator in the current terminal. If the key is awaiting activation, the client waits for duties.

For persistent operation, stop the foreground process with Ctrl+C, then create a user service.

mkdir -p "$HOME/.config/systemd/user"
cat > "$HOME/.config/systemd/user/mcn-validator.service" <<'UNIT'
[Unit]
Description=MCN Mainnet validator
Requires=mcn-node.service
After=mcn-node.service

[Service]
Type=simple
WorkingDirectory=%h/start-mcn
ExecStart=%h/start-mcn/run-validator --fee-recipient YOUR_MCN_ADDRESS
Restart=on-failure
RestartSec=30
TimeoutStopSec=300
UMask=0077

[Install]
WantedBy=default.target
UNIT

Edit $HOME/.config/systemd/user/mcn-validator.service and replace YOUR_MCN_ADDRESS. Start the service.

systemctl --user daemon-reload
systemctl --user enable --now mcn-validator
journalctl --user -u mcn-validator -n 50 --no-pager

6. Track activation

Search for the pubkey in Beacon Explorer. A pending status means the validator is awaiting activation. Once active, monitor attestation inclusion and the validator logs. If a confirmed deposit does not appear, retain its transaction hash and public key for diagnosis.

Move an existing validator

Use the existing keystore and slashing protection history. Stop the old service, export its history, and import it into the new client's data directory before signing. Keep $HOME/mcn-validator/data, which holds that history. Run one active signing client per public key. Prysm migration commands

On this page