Skip to content

Commit

Permalink
Bifrost Runtime (#137)
Browse files Browse the repository at this point in the history
* update runtime

* upload genesis data

* upload genesis data

* Add vesting (#139)

* Add vesting

* fix

* ✨ ($NODE) Load genesis config of balances from json file

* 🚚 ($NODE) Rename node/service/res to node/service/genesis_config

* 🐛 ($NODE) Fix the err of the json format of balances genesis config

* ✨ ($NODE) Support read genesis config from multi json files

* 🍱 ($NODE) Change balance from string to int

* 🐛 ($NODE) Fix the err of the json format of vesting genesis config

* ✨ ($NODE) Load genesis config of vesting from json file

* remove governance

* update bifrost chain spec

* sudo key

* update marketing

* support session and collator selection

* 🔨 ($SCRIPT) Add script to check if the address is correct

* update invulnerables

* ✨ ($ROOT) Make command: copy genesis_config dir to target

* 🩹 ($ROOT) Improv check_address.js

* 🍱 ($NODE) Fix address error

* 🔧 ($ROOT) Upgrade Cargo.lock

* 🐛 ($NODE) Remove duplicate item & sum the balances in mintdrop.json

* 🚑 ($ROOT) fix Makefile

* update invulnerables

* tmp

* sort

* remove and sum duplicate item

* update filter

* Remove all duplicate item & sum in marketing.json

* update filter

* 🐛 ($NODE) Fix the error that cannot load genesis config json file

* fix warning

* fix vesting

* 🍱 ($NODE) Upgrade genesis config settings

* remove invalid address

* 🐛 ($NODE) Fix duplicate item

* ✨ ($NODE) Combine duplicate accounts after load from json

* remove println

* add mintdrop-ksm.json

* add sum balance scripts

* fix data

* fix data

* fix dockerfile

* update mintdrop-ksm.json

* fix mintdrop-eth

* fix data

* fix data

* fix data

* generate bifrost chain sepc file

Co-authored-by: yrong1997 <[email protected]>
Co-authored-by: Allen Pocket <[email protected]>
  • Loading branch information
3 people authored Jun 12, 2021
1 parent 702e38e commit 30a5bd0
Show file tree
Hide file tree
Showing 32 changed files with 105,549 additions and 4,017 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
polkadot.*
.DS_Store
.cargo-remote.toml
.gitignore
.gitignore
node_modules
98 changes: 55 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with Bifrost. If not, see <http:#www.gnu.org/licenses/>.

FROM ubuntu:latest as builder
FROM ubuntu:20.04 as builder
LABEL description="The first stage for building a release bifrost binary."

ARG PROFILE=release
Expand All @@ -23,22 +23,25 @@ WORKDIR /src
ENV DEBIAN_FRONTEND noninteractive

COPY . /src
COPY ./id_rsa /root/.ssh/id_rsa

RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y cmake pkg-config libssl-dev git clang curl apt-utils
apt-get install -y cmake pkg-config libssl-dev git clang curl apt-utils ssh

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
export PATH="$PATH:$HOME/.cargo/bin" && \
rustup toolchain install nightly && \
rustup target add wasm32-unknown-unknown --toolchain nightly && \
rustup default nightly && \
rustup default stable && \
cargo build "--$PROFILE"
rustup default stable

RUN export PATH="$PATH:$HOME/.cargo/bin" && \
eval `ssh-agent` && ssh-add /root/.ssh/id_rsa && \
make build-bifrost-release

# ===== SECOND STAGE ======

FROM ubuntu:latest
FROM ubuntu:20.04
LABEL description="The second stage for configuring the image."
ARG PROFILE=release
WORKDIR /bifrost
Expand Down
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-asgard:
cargo build -p node-cli --locked --features "with-asgard-runtime"

.PHONY: build-bifrost
build-bifrost:
build-bifrost: copy-genesis-config
cargo build -p node-cli --locked --features "with-bifrost-runtime"

.PHONY: build-all
Expand All @@ -23,7 +23,7 @@ build-asgard-release:
cargo build -p node-cli --locked --features "with-asgard-runtime" --release

.PHONY: build-bifrost-release
build-bifrost-release:
build-bifrost-release: copy-genesis-config-release
cargo build -p node-cli --locked --features "with-bifrost-runtime" --release

.PHONY: build-all-release
Expand Down Expand Up @@ -62,4 +62,12 @@ test-all:
clean:
cargo clean

# TODO: Copy genesis_config JSON files to target directory
.PHONY: copy-genesis-config
copy-genesis-config:
mkdir -p "target/debug/res"
cp -r node/service/res/genesis_config target/debug/res

.PHONY: copy-genesis-config-release
copy-genesis-config-release:
mkdir -p "target/release/res"
cp -r node/service/res/genesis_config target/release/res
Loading

0 comments on commit 30a5bd0

Please sign in to comment.