Skip to content

Commit

Permalink
[DOCS] ISMP (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege authored Jan 22, 2024
1 parent 018b98e commit 84cea2d
Show file tree
Hide file tree
Showing 59 changed files with 10,903 additions and 100 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ env:
jobs:
check-wasm:
name: Check Wasm Crates
runs-on: self-hosted
runs-on: arc-runner-set
if: github.event.pull_request.draft == false
strategy:
matrix:
crate: [messier-runtime, gargantua-runtime]
Expand Down Expand Up @@ -57,7 +58,8 @@ jobs:
check-workspace:
name: Check Workspace
runs-on: self-hosted
runs-on: arc-runner-set
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -93,6 +95,7 @@ jobs:
fmt:
name: Cargo fmt
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3

Expand All @@ -106,7 +109,7 @@ jobs:

unit-tests:
name: Unit Tests
runs-on: self-hosted
runs-on: arc-runner-set
if: github.event.pull_request.draft == false
steps:
- name: Checkout sources
Expand Down Expand Up @@ -226,6 +229,7 @@ jobs:
check-solidity:
name: Check ismp-solidity
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

- name: Build
run: |
cargo +nightly build --release -p hyperbridge --features sepolia
cargo +nightly build --release -p hyperbridge
mv ./target/release/hyperbridge ./
- name: Install Cargo get
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy Documentation

on:
# Runs on pushes targeting the default branch
push:
branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

env:
GA_ID: ${{ secrets.GA_ID }}

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v3

with:
node-version: 18
cache: "npm"
cache-dependency-path: "docs"

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload dist repository
path: './docs/dist'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@
evm/out/
evm/cache/
evm/broadcast/
evm/integration-tests/target/
evm/integration-tests/target/

.uuid*
124 changes: 118 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,123 @@
# Hyperbridge
Hyperbridge is a hyper-scalable, interoperability coprocessor.
Hyperbridge is a hyper-scalable coprocessor for cryptographically secure, cross-chain interoperability.

## Docker

Hyperbridge is available at the official docker repository [`polytopelabs/hyperbridge`](https://hub.docker.com/r/polytopelabs/hyperbridge)

```bash
docker run polytopelabs/hyperbridge:latest --chain=messier
```

## Prebuilt Binaries

You can install a prebuilt binary for the hyperbridge node with the following bash script

```bash
wget -q --show-progress https://github.com/polytope-labs/hyperbridge/releases/download/${latest-tag}/hyperbridge-x86_64-unknown-linux-gnu.tar.gz
tar -xvzf hyperbridge-x86_64-unknown-linux-gnu.tar.gz
# copy to $PATH
cp hyperbridge-x86_64-unknown-linux-gnu/hyperbridge $HOME/.local/bin/
```

or a 1-liner shell script

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/polytope-labs/hyperbridge/releases/download/${latest-tag}/hyperbridge-installer.sh | sh
```

## Building from source

You can follow the steps below if you'd prefer to build the hyperbridge node from source:


### Install Dependencies

Building the hyperbridge node requires some dependencies

- git
- clang
- curl
- make
- build-essential
- libssl-dev
- llvm
- libudev-dev
- protobuf-compiler

Debian/Ubuntu

```bash
sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler
```
Arch

```bash
pacman -Syu --needed --noconfirm curl git clang make protobuf
```
Fedora

```bash
sudo dnf update
sudo dnf install clang curl git openssl-devel make protobuf-compiler
```
Opensuse

```bash
sudo zypper install clang curl git openssl-devel llvm-devel libudev-devel make protobuf
```

### Install rust compiler

If you don't have an already existing rust installation, you can install it using the one-liner below. Follow the prompts displayed to proceed with a default installation.

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

### Install WebAssembly target

Hyperbridge's blockchain runtime compiles to wasm which allows it's code to be forklessly upgraded. In order to build hyperbridge we need the wasm toolchain installed.

```bash
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
```

### Clone the repo

Download a local copy of the repo and checkout the latest release tag

```bash
git clone https://github.com/polytope-labs/hyperbridge.git
cd ./hyperbidge
git checkout ${latest-tag}
```

### Build the node

```bash
cargo build --release -p hyperbridge
```

## Running the node

```bash
hyperbridge --chain=messier --enable-offchain-indexing --base-path=$HOME/.hyperbridge --pruning-archive
```

## Running a local tesnet with zombienet
1. Download the zombienet binary for your os from https://github.com/paritytech/zombienet
2. Run `./zombienet spawn --provider native ./scripts/zombienet/local-testnet.toml`
Download the zombienet binary for your operating system [here](https://github.com/paritytech/zombienet).

```bash
zombienet spawn --provider native ./scripts/zombienet/local-testnet.toml
```

## Running a local testnet with docker
1. Build the hyperbridge docker image by running `docker build -t hyperbridge -f ./scripts/docker/Dockerfile .`
2. Navigate to `scripts/parachain-launch`
3. Run `docker compose up`
Build the and run the hyperbridge docker image locally by running

```bash
docker build -t hyperbridge -f ./scripts/docker/Dockerfile .
cd scripts/parachain-launch
docker compose up
```
Loading

0 comments on commit 84cea2d

Please sign in to comment.