-
Notifications
You must be signed in to change notification settings - Fork 270
feat: reef chain bootstrap #415
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
base: canary
Are you sure you want to change the base?
Conversation
built with Refined Cloudflare Pages Actionβ‘ Cloudflare Pages Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive support for deploying Reef Chain blockchain infrastructure through Dokploy templates. Reef is an EVM-compatible blockchain platform, and this implementation enables users to set up complete validator clusters with various deployment options.
Key Changes:
- Added 7 new Reef Chain templates covering the complete deployment lifecycle (keys generation, spec generation, validators, RPC nodes, and ETH RPC)
- Implemented two deployment methodologies: single full-cluster setup and modular bootstrap + individual validator approach
- Integrated Docker-based deployment using custom Reef Chain node images with runtime script fetching
Reviewed changes
Copilot reviewed 15 out of 22 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| meta.json | Added 7 new template entries for Reef Chain services (bootnode, dev-cluster, eth-rpc, keygen, rpc, spec-gen, validator) |
| blueprints/reef-validator/* | Individual validator node template with configurable network parameters |
| blueprints/reef-spec-gen/* | Spec generator service that creates blockchain configuration files |
| blueprints/reef-rpc/* | RPC node template for blockchain query interface |
| blueprints/reef-keygen/* | Key generation service producing validator credentials |
| blueprints/reef-eth-rpc/* | Ethereum-compatible RPC adapter for EVM interactions |
| blueprints/reef-dev-cluster/* | All-in-one development cluster with bootnode and multiple validators |
| blueprints/reef-bootnode/* | Bootstrap node template serving as network entry point |
| SPEC_URL = "http://reef.host:8000/local-chain-spec-raw.json" | ||
| BOOTNODE_NODE_KEY="http://reef.host:8000/bootnode_node_key.txt" | ||
|
|
||
| BOOTNODE_IP="72.60.35.83" |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded IP address '72.60.35.83' should not be a default value in a template. This exposes a specific external IP address and prevents proper customization. Users should provide their own bootnode IP through the variable system (e.g., using ${bootnode_ip} variable).
| ports: | ||
| - "${P2P_PORT}:${P2P_PORT}" |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to project conventions, ports should be omitted from docker-compose.yml as Dokploy handles port mapping and service isolation via internal networks. The port exposure is already configured in template.toml through config.domains.
| SPEC_URL = "http://reef.host:8001/local-chain-spec-raw.json" | ||
| BOOTNODE_NODE_KEY="http://reef.host:8001/bootnode_node_key.txt" |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Port 8001 is inconsistent with other templates which use port 8000 for the spec generator (e.g., reef-spec-gen uses 8000, reef-validator uses 8000, reef-dev-cluster uses 8000). This inconsistency will cause the RPC node to fail when trying to fetch the spec file.
| SPEC_URL = "http://reef.host:8001/local-chain-spec-raw.json" | ||
| BOOTNODE_NODE_KEY="http://reef.host:8001/bootnode_node_key.txt" | ||
|
|
||
| BOOTNODE_IP="72.60.35.83" |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded IP address '72.60.35.83' should not be a default value. This should be replaced with a configurable variable (e.g., ${bootnode_ip}) to allow users to specify their own bootnode address.
| ports: | ||
| - "${P2P_PORT}:${P2P_PORT}" | ||
| - "${RPC_PORT}:${RPC_PORT}" |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to project conventions, ports should be omitted from docker-compose.yml as Dokploy handles port mapping through template.toml config.domains. Remove the ports section since these are already properly configured in template.toml.
| ports: | ||
| - "${PORT}:${PORT}" |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to project conventions, ports should be omitted from docker-compose.yml as Dokploy handles port mapping via template.toml config.domains.
| ports: | ||
| - "30335" | ||
| - "30333" | ||
| - "30334" | ||
| - "30336" | ||
| - "8001" | ||
| - "9944" |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to project conventions, ports should be omitted from docker-compose.yml as Dokploy handles port exposure through template.toml config.domains. All these ports are already properly configured in template.toml.
| ports: | ||
| - "${PORT}:${PORT}" | ||
| - "${P2P_PORT}:${P2P_PORT}" |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to project conventions, ports should be omitted from docker-compose.yml since Dokploy manages port mapping through template.toml config.domains configuration.
| "reef-chain", | ||
| "eth-rpc", | ||
| "self-hosted", | ||
| "keys" |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tag 'keys' appears inconsistent with the tagging pattern used throughout the repository. For reef-eth-rpc, this should likely be 'evm' to match the service's purpose of providing EVM layer RPC functionality, similar to other Reef Chain entries.
| "keys" | |
| "evm" |
|
|
||
| [[config.domains]] | ||
| serviceName = "reef-rpc" | ||
| port = 30339 | ||
| host = "${domain}" | ||
| path = "/" | ||
|
|
||
| [[config.domains]] | ||
| serviceName = "reef-rpc" | ||
| port = 9994 | ||
| host = "${domain}" |
Copilot
AI
Jan 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both domain configurations use the same ${domain} host, which will cause a conflict as two different ports cannot be mapped to the same domain without path differentiation. Consider using different domain variables (e.g., ${p2p_domain} and ${rpc_domain}) or adding subdomain differentiation.
| [[config.domains]] | |
| serviceName = "reef-rpc" | |
| port = 30339 | |
| host = "${domain}" | |
| path = "/" | |
| [[config.domains]] | |
| serviceName = "reef-rpc" | |
| port = 9994 | |
| host = "${domain}" | |
| p2p_domain = "${p2p_domain}" | |
| rpc_domain = "${rpc_domain}" | |
| [[config.domains]] | |
| serviceName = "reef-rpc" | |
| port = 30339 | |
| host = "${p2p_domain}" | |
| path = "/" | |
| [[config.domains]] | |
| serviceName = "reef-rpc" | |
| port = 9994 | |
| host = "${rpc_domain}" |

Added Reef chain node to dokploy template for setting up a cluster
Can read more about reef chain here - https://reef.io
π Reef Cluster β Dokploy Deployment Guide
A Reef validator cluster can be deployed in two different ways on Dokploy:
π’ Method 1: Single Template (Full Cluster Setup) [RECOMMENDED]
A single deployment handles bootnode + all validators + RPC.
π΅ Method 2: Multiple Templates (Bootstrap + Individual Validators)
You deploy bootstrap + validators separately for more control.
π Table of Contents
Method 1 β Single Template
Method 2 β Multiple Templates
π’ Method 1: Single Template β Full Cluster Setup
Step 1: Generate Validator Keys
Go to Create Service
Select Template from the menu.
Add template repo URL at the top-right:
Search for βReefβ
Click Create on Reef Chain β Keys Generator, then confirm.
Deploy the service.
Visit the port
http://reef.host:48765or your IP address / hostname at port48765Copy all address + seed pairs, they will be needed later.
Step 2: Deploy Custom Spec Generator
Reef Chain β Custom Spec Generator
Deploy it.
It runs on port 8000 by default:
You can change the port in environment variables if needed.
This service is used by the validators to automatically fetch the custom chain spec.
Step 3: Deploy the Complete Cluster
Reef Chain β Dev Cluster
You may configure:
specgenurlβ URL of your custom spec generatorhttp://reef.host:8000Deploy the service.
Logs should show successful bootnode + 3 validators starting:
π The cluster is now running!
Adding More Validators
Generate more validators using Reef Chain β Keys Generator.
Fill in the new keys β Deploy.
Deploy Ethereum RPC
Search template:
Reef Chain β ETH RPC
Deploy β It will use the default substrate RPC:
ETH RPC runs at:
π Your full cluster (bootnode + validators + RPC + ETH RPC) is now live.
π΅ Method 2: Multiple Templates β Bootstrap & Validators
Step 1: Generate Validator Keys (Same as Method 1)
π Jump to: Generate Validator Keys
Step 2: Deploy Bootnode Validator
Create service β choose template:
Reef Chain β Bootnode Validator
Fill in:
v1sec,v2sec,v3secv1addr,v2addr,v3addrPORT=8000β exposes custom specP2P_PORT=30335β bootnode peer portBootnode starts β no peers yet (expected).
Step 3: Deploy Additional Validators
Use:
Reef Chain β Validator
Deploy 2 or more validators β finalize blocks.
Deploy ETH RPC (Method 2)
Same template:
Reef Chain β ETH RPC
ETH RPC default port: