Skip to content

Commit

Permalink
Document how to run a validator (Polkadex) (#301)
Browse files Browse the repository at this point in the history
* update validator doc
* prepare for v0.4.0 release
* fix comments
* Update after review
* Updated screenshots

Co-authored-by: Fredrik Simonsson <simson@polkadex.trade>
Co-authored-by: Pablo  <89174304+pdexpab@users.noreply.github.com>
  • Loading branch information
3 people authored Aug 20, 2021
1 parent 42e4bff commit deec6e8
Show file tree
Hide file tree
Showing 15 changed files with 626 additions and 2 deletions.
109 changes: 109 additions & 0 deletions .github/workflows/release-builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Release_Binaries
on:
push:
tags:
- 'v*'
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
outputs:
upload_url: ${{steps.create_release.outputs.upload_url}}
buildMac:
needs: prepare
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Rust Dependecies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Project
run: |
./scripts/init.sh
rustup target add x86_64-apple-darwin --toolchain nightly-2021-05-11
cargo build --release
- name: PackRelease
run: |
zip PolkadexNodeMacOS.zip --junk-paths target/release/polkadex-node docs/customSpecRaw.json
- name: Archive binary
uses: actions/upload-artifact@v1
with:
name: PolkadexNodeMacOS.zip
path: PolkadexNodeMacOS.zip
- name: Upload Release Asset
id: upload-release-asset0
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare.outputs.upload_url }}
asset_path: PolkadexNodeMacOS.zip
asset_name: PolkadexNodeMacOS.zip
asset_content_type: application/octet-stream
buildUbuntu:
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v2
- name: Cache Rust Dependecies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build Project
run: |
./scripts/init.sh
cargo build --release
cat docs/customSpecRaw.json > customSpecRaw.json
# # echo ./target/release/polkadex-node build-spec --chain local >customSpecRaw.json #Todo this is handcrafted
- name: PackRelease
run: |
zip PolkadexNodeUbuntu.zip --junk-paths target/release/polkadex-node docs/customSpecRaw.json
- name: Archive binary
uses: actions/upload-artifact@v1
with:
name: PolkadexNodeUbuntu.zip
path: PolkadexNodeUbuntu.zip
- name: Archive chainspec
uses: actions/upload-artifact@v1
with:
name: customSpecRaw.json
path: customSpecRaw.json
- name: Upload Release Asset
id: upload-release-asset0
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare.outputs.upload_url }}
asset_path: PolkadexNodeUbuntu.zip
asset_name: PolkadexNodeUbuntu.zip
asset_content_type: application/octet-stream
- name: Upload Release chainspec
id: upload-release-asset1
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare.outputs.upload_url }}
asset_path: customSpecRaw.json
asset_name: customSpecRaw.json
asset_content_type: application/json
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ When running a node via the binary file, data is stored in a local directory typ

This will remove the data folder, note that all chain data is now lost.

## Run as a validator node

This comment has been minimized.

Copy link
@egostowski

egostowski Sep 7, 2023

1kRPoZ5cvwbohRf6rmMKSjkW2az7gPoieY8trZymvoF8Qzi

## Run a local network (two nodes)

- Install `subkey`, `jq`
```bash
Expand Down Expand Up @@ -193,6 +193,9 @@ Start by connecting to it with Polkadot JS Apps. Open a browser to: https://polk
Click on the top left corner to open the menu to configure the networks, and then navigate down to open the Development sub-menu. In there, you will want to toggle the "Local Node" option, which points Polkadot JS Apps to ws://127.0.0.1:9944. Next, select the Switch button, and the site should connect to your Polkadex development node.
## How to run a validator
Here is a guide [Run a validator (Polkadex)](./docs/run-a-validator.md)
## Contribute :heart_eyes:
We would love to work with anyone who can contribute their work and improve this project. The details will be shared soon.
## License :scroll:
Expand Down
Loading

0 comments on commit deec6e8

Please sign in to comment.