heminetwork

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: MIT

README

Hemi Network

Table of Contents

What is the Hemi Network?

Hemi is an EVM compatible L2 blockchain that brings Bitcoin security and Ethereum programability together.

Services

Hemi Network consists of 3 services:

License

This project is licensed under the MIT License.

Getting Started

Building from Source

To build, you must have the following installed:

  • git
  • make
  • go 1.21+

First, clone the repository:

git clone https://github.com/hemilabs/heminetwork.git

Then build:

make

This will put built binaries in <path-to-repo>/bin/

Downloading Binaries from Releases

You can find releases on the Releases Page

Running

To view options for any of the services, you may run the following

./bin/popmd --help
./bin/bfgd --help
./bin/bssd --help
Running popmd

popmd has a few crucial requirements to run:

  • a BTC private key that is funded, this can be a testnet address if you configure popmd as such
  • a BFG URL to connect to

if configured correctly and running, then popmd will start "mining" L2 Keystones by adding them to btc blocks that make it into the chain

CLI
./bin/popmd
Web
cd ./web
make
go run ./integrationtest
Running bfgd

bfgd has a few crucial requirements to run:

  • a postgres database, bfgd expects the sql scripts in ./database/bfgd/scripts/ to be run to set up your schema
  • an electrumx node connected to the proper bitcoin network (testnet vs mainnet, etc.)
Running bssd

bssd has a few crucial requirements to run:

  • a bfgd instance running to connect to
Running Network

Prerequisites: docker

To run the full network locally, you can run the following. Note that this will create L2Keytones and BTC Blocks at a high rate. You can modify these in ./e2e/mocktimism/mocktimism.go or ./e2e/docker-compose.yml.

note: the --build flag is optional if you want to rebuild your code

docker-compose -f ./e2e/docker-compose.yml up --build
Running the full network tests

This runs a test with an entirely local heminet, it uses bitcoind in regtest mode for the bitcoin chain

Prerequisites: docker

make networktest

Directories

Path Synopsis
api
cmd
bfgd command
bssd command
extool command
hemictl command
keygen command
popmd command
e2e
mocktimism command
monitor module
pop
service
bfg
bss
deucalion
Package deucalion provides an easy-to-use Prometheus metrics server.
Package deucalion provides an easy-to-use Prometheus metrics server.
web
integrationtest command
popminer command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL