Open the app
[06]

Run a node

A monumental roof with three long printed ribbons falling from it

A node is one small program that keeps copies on disk and answers challenges over HTTPS. It needs a public HTTPS address, a disk, and a wallet with USDG for the bond (the current minimum is shown in the Run a node screen) and a little ETH for the registration.

1. Register

Open Run a node, connect the wallet that will own the node, enter your HTTPS endpoint and the bond, and register. The contract gives you a node number. You can also call it directly:

cast send 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 "approve(address,uint256)" 0x6B1a149fDDA14E080C213BA8df0EBa612B89Db66 10000 --private-key $KEY --rpc-url https://rpc.mainnet.chain.robinhood.com
cast send 0x6B1a149fDDA14E080C213BA8df0EBa612B89Db66 "registerNode(string,uint256)" "https://node.example.com" 10000 --private-key $KEY --rpc-url https://rpc.mainnet.chain.robinhood.com

2. Start the node with Docker

mkdir mempool-node && cd mempool-node
curl -O https://www.mempoollabs.tech/node/mempool-node.mjs
curl -O https://www.mempoollabs.tech/node/Dockerfile
docker build -t mempool-node .
docker run -d --restart unless-stopped --name mempool-node \
  -e NODE_ID=<your node number> -v mempool-data:/data -p 8080:8080 mempool-node

Put it behind HTTPS (a reverse proxy, a tunnel, or a host that terminates TLS) at the endpoint you registered. Without Docker: NODE_ID=5 DATA_DIR=./data node mempool-node.mjs.

3. What the node does

  • PUT /v1/blob/:id accepts a copy only when the chain says this node holds it and the bytes match the root.
  • GET /v1/blob/:id serves the ciphertext to agents and to other nodes repairing a copy.
  • GET /v1/challenge answers this hour's challenge with the segment and its Merkle path.
  • Every minute it fetches copies moved to it from a surviving node and drops copies of closed memories.

4. Get paid

Earnings accrue per copy and per hour. They are credited when a memory is collected, forgotten, released or moved; collect(ids) settles any memories at once. claim(node) sends your USDG to the node owner. To leave, call requestExit: no new copies arrive, your copies are moved, and the bond comes back 24 hours later with withdrawBond.

House nodes, run by the operator, keep storage available from the first day, alongside every node that joins.