Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ergo Devnet Panel

A desktop app (Scala 2.12 + Swing + FlatLaf IntelliJ theme) for running a local Ergo devnet: download Ergo node releases from GitHub, run several nodes connected to each other, and mint ERG and tokens with buttons.

Two connected devnet nodes with the terminal-style log

Requirements

  • JDK 17+ (tested with JDK 21)
  • sbt 1.10+
  • Internet access to download Ergo jars from GitHub releases

Run

sbt run

Usage

  1. Download Ergo: pick a version in the Ergo: combo (fetched from GitHub, pre-releases included) and click Download. The jar is checked against its sha256 and saved to ~/.ergo-devnet-panel/. You can download several versions.
  2. Add node: adds a node. The first node has Mining on by default; later nodes only sync.
    • Version column: the jar each node runs ((latest) = newest downloaded jar).
    • Mining column: turn mining on/off (takes effect on the next Start/Restart).
  3. Start / Start all: starts nodes. The panel creates and unlocks a wallet for each node; nodes connect to each other automatically.
  4. Mint ERG tab: sends ERG from the selected node's wallet to any address (empty = the node's own wallet).
  5. Mint Token tab: issues an EIP-4 token (name, description, amount, decimals) to an address (empty = the node's wallet).
  6. Wallet tab: address, balance and tokens. Log tab: node log with WARN/ERROR highlighting.
  7. Right-click a node: Start, Stop, Restart, Copy address, Open Swagger UI, Open data folder, Delete node.
Wallet Mint Token
Wallet tab showing balance and a received token Mint Token form

On devnet, ERG only comes from mining, so "Mint ERG" transfers from the miner wallet. Block rewards become spendable only after 720 blocks (a devnet rule). Devnet mines ~1.5 blocks/s, so a fresh chain needs about 8 minutes before you can mint.

Node settings

Value
Directory ~/.ergo-devnet-panel/node-<id>/ (node.conf, ergo.log, data/, mnemonic.txt)
REST API port 9500 + id (Swagger: http://127.0.0.1:<port>/swagger)
P2P port 9600 + id (bound to 127.0.0.1 only)
API key hello
Wallet password devnet

The first node with Mining enabled gets offlineGeneration so it produces blocks without peers; other nodes sync from it. scorex.network.allowLocal = true lets nodes on the same machine connect.

Deleting a node (Delete node) stops it and removes all its data, including the wallet.

Code layout

File Contents
src/main/scala/devnet/Ergo.scala REST client (Api), GitHub release download (Downloader)
src/main/scala/devnet/Node.scala One node: config generation, process start/stop, log capture, status polling, wallet init/unlock
src/main/scala/devnet/Main.scala Swing UI
src/test/scala/devnet/Smoke.scala End-to-end test
src/test/scala/devnet/Screenshot.scala Generates the README screenshots

Testing

sbt "Test/runMain devnet.Smoke"

Starts 2 temporary nodes, waits for the second to sync and for mining rewards to unlock (~8 minutes), then mints 5 ERG and a token with supply 10^18 + 1 to the second node and checks the exact amounts received.

Regenerate the README screenshots (runs 2 temporary nodes, ~9 minutes; keep your own node-0/node-1 stopped since the ports are shared):

sbt "Test/runMain devnet.Screenshot docs"

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages