-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from pellartech/multiple-improvements
Multiple improvements
- Loading branch information
Showing
12 changed files
with
275 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,90 @@ | |
|
||
![LightLink Hummingbird preview screenshot](<preview.png>) | ||
|
||
Hummingbird is a command line tool for interacting with the LightLink protocol. | ||
Hummingbird is a light client for interacting with the [LightLink Protocol](https://lightlink.io). | ||
|
||
It is designed to work in unison with the [lightlink-hummingbird-contracts](https://github.com/pellartech/lightlink-hummingbird-contracts) repository. | ||
|
||
## Commands | ||
## Installation | ||
|
||
### Prerequisites | ||
|
||
- [Golang](https://go.dev/dl/) (v1.21.5 or higher) installed. Go version can be checked with `$ go version` | ||
|
||
### Option 1: Install from source (Linux / MacOS) | ||
|
||
```bash | ||
git clone [email protected]:pellartech/lightlink-hummingbird.git | ||
cd lightlink-hummingbird | ||
git checkout -b v0.0.1 | ||
make | ||
``` | ||
|
||
### Option 2: Install from binary (Windows / Linux / MacOS) | ||
|
||
Download the latest release from [here](https://github.com/pellartech/lightlink-hummingbird/releases) | ||
|
||
### Configuration | ||
|
||
Hummingbird requires a configuration file to run. A sample configuration file is provided in the repository [here](config.example.json). Copy this file and rename it to `config.json`. Then fill in the required fields. | ||
|
||
```bash | ||
cp config.example.json config.json | ||
``` | ||
|
||
A single environment variable ETH_KEY is required to be set. This is the private key of the Ethereum account that will be used to sign transactions. This account must have sufficient funds to pay for gas fees. | ||
|
||
```bash | ||
export ETH_KEY=0x... | ||
``` | ||
|
||
|
||
|
||
**Note**: configuration file `config.json` path can be specified with the `--config-path` flag. If not specified, the default path is `./config.json` | ||
|
||
``` | ||
{ | ||
"storePath": "./storage", // Path to the local storage | ||
"celestia": { | ||
"token": "abcd", // Celestia token | ||
"endpoint": "", // Celestia rpc endpoint | ||
"namespace": "", // Celestia namespace to identify the blobs | ||
"tendermint_rpc": "", // Tendermint rpc endpoint | ||
"grpc": "", // Celestia grpc endpoint | ||
"gasPrice": 0.01 // Gas price to use when submitting new headers to Celestia | ||
}, | ||
"ethereum": { | ||
"httpEndpoint": "", // Ethereum http rpc endpoint | ||
"wsEndpoint": "", // Ethereum websocket rpc endpoint | ||
"canonicalStateChain": "", // Canonical state chain contract address | ||
"daOracle": "", // Data availability oracle contract address | ||
"challenge": "", // Challenge contract address | ||
"gasPriceIncreasePercent": 100 // Increase gas price manually when submitting new headers to L1 | ||
}, | ||
"lightlink": { | ||
"endpoint": "", // LightLink rpc endpoint | ||
"delay": 100 // Delay in ms between each block query | ||
}, | ||
"rollup": { | ||
"bundleSize": 200, // Number of headers to include in each bundle | ||
"l1pollDelay": 90000, // (90sec) Delay in ms between each L1 block query | ||
"l2pollDelay": 30000, // (30sec) Delay in ms between each L2 block query | ||
"storeCelestiaPointers": true, // Store celestia pointers in the local storage | ||
"storeHeaders": true // Store headers in the local storage | ||
}, | ||
"defender": { | ||
"workerDelay": 60000 // (60sec) Delay in ms between scanning for historical challenges to defend | ||
} | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
```bash | ||
hb rollup info # Get the current rollup state | ||
hb rollup next # Generate the next rollup block | ||
hb rollup start # Start the rollup loop to generate and submit bundles | ||
hb challenge challenge-da <block_number> # Challenge data availability | ||
hb rollup next # [Publisher Only] Generate the next rollup block | ||
hb rollup start # [Publisher Only] Start the rollup loop to generate and submit bundles | ||
hb challenger challenge-da <block_number> # Challenge data availability | ||
hb defender defend-da <block_hash> # Defend data availability | ||
hd defender info-da <block_hash> # Provides info on an existing challenge | ||
hb defender prove-da <block_hash> # Prove data availability | ||
|
@@ -34,4 +107,4 @@ see `hb --help` for more information | |
|
||
<p align="center"> | ||
<img src="humming.png" style="size:50%" alt="HummingBird"> | ||
</p> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.