Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update audit branch to check on fixes #476

Merged
merged 40 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ea3afa3
make the allocate extrinsic free for the oracles (#418)
ETeissonniere Oct 27, 2021
998fe08
add staking-local spec (#419)
ETeissonniere Oct 29, 2021
bef7df3
update decimals (#421)
ETeissonniere Nov 3, 2021
661a9fe
split runtimes (#420)
ETeissonniere Nov 4, 2021
3942580
fix srtool config (#426)
ETeissonniere Nov 9, 2021
3e2e149
bump version for release
ETeissonniere Nov 9, 2021
6607875
upgrade to polkadot-v0.9.12 (#424)
rajesh-nodle Nov 15, 2021
583d8be
Bump serde_json from 1.0.69 to 1.0.70 (#428)
dependabot[bot] Nov 18, 2021
088dc1a
Bump serde_json from 1.0.70 to 1.0.71 (#429)
dependabot[bot] Nov 24, 2021
65b1d9a
Bump actions/cache from 2.1.6 to 2.1.7 (#431)
dependabot[bot] Nov 24, 2021
a89210b
Bump futures from 0.3.17 to 0.3.18 (#432)
dependabot[bot] Nov 24, 2021
0ec18e9
runtime main & staking integration to node (#427)
rajesh-nodle Nov 24, 2021
7e2d884
bump version for release
ETeissonniere Nov 29, 2021
22ce366
fix release script
ETeissonniere Nov 29, 2021
79bff93
nodle parachain bringup (#433)
rajesh-nodle Dec 1, 2021
9b41e16
also log into docker hub (#435)
ETeissonniere Dec 1, 2021
1be66a8
pallet grants BlockNumberProvider integration (#436)
rajesh-nodle Dec 1, 2021
a410aa4
minimize chain spec parameters (#437)
ETeissonniere Dec 1, 2021
ed7b150
create eden-local chain spec (#438)
ETeissonniere Dec 2, 2021
8fe0c22
fix spec import (#440)
ETeissonniere Dec 6, 2021
3070e38
Enable endowed accounts (#441)
aliXsed Dec 7, 2021
164a6db
production eden spec (#442)
ETeissonniere Dec 8, 2021
a181df7
bump version for release
ETeissonniere Dec 8, 2021
f56f0d9
generate compressed runtime as well
ETeissonniere Dec 9, 2021
7e47767
fix parachain id in genesis config
ETeissonniere Dec 9, 2021
c87be98
remove log
ETeissonniere Dec 9, 2021
522a04f
Bump serde from 1.0.130 to 1.0.131 (#443)
dependabot[bot] Dec 13, 2021
38f24cf
pallets: reorganize benchmark compilation flags (#445)
Dec 16, 2021
b195ad3
feat: support try-runtime for all our runtimes (#444)
aliXsed Dec 24, 2021
3ba7bf6
Bump serde from 1.0.131 to 1.0.132 (#446)
dependabot[bot] Jan 3, 2022
45bb279
Bump futures from 0.3.18 to 0.3.19 (#447)
dependabot[bot] Jan 3, 2022
a683012
Bump serde from 1.0.132 to 1.0.133 (#448)
dependabot[bot] Jan 3, 2022
f31c19a
feat(pallet-allocations): fast return on zero allocation (#450)
aliXsed Jan 6, 2022
00b96ba
fix(ci): remove dead code (#451)
aliXsed Jan 6, 2022
41ce7de
Upgrade rust edition (#449)
aliXsed Jan 9, 2022
91cfe0c
minor refactorings (#454)
ETeissonniere Jan 12, 2022
d58a549
Staking proto chainspec & verification updates ... (#453)
rajesh-nodle Jan 14, 2022
040517f
update copyright year from 2020 to 2022 (#460)
ETeissonniere Jan 14, 2022
414609a
preinstall toolchain in devcontainer (#473)
ETeissonniere Jan 18, 2022
afbec6d
replace arcadia chain spec (#474)
ETeissonniere Jan 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends cmake pkg-config libssl-dev git clang build-essential curl ca-certificates

RUN useradd -ms /bin/bash codespace
COPY ./scripts/init.sh /home/codespace/init.sh
RUN chmod +x /home/codespace/init.sh

USER codespace
WORKDIR /home/codespace
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \
export PATH=$PATH:$HOME/.cargo/bin
export PATH=$PATH:$HOME/.cargo/bin && \
./init.sh
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"build": {
"dockerfile": "Dockerfile"
"dockerfile": "Dockerfile",
"context": ".."
}
}
6 changes: 3 additions & 3 deletions .github/workflows/binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ jobs:
- uses: actions/checkout@v2

- name: Cache cargo registry
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-

- name: Cache cargo index
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-

- name: Cache cargo build
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
Expand Down
102 changes: 63 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,96 @@
name: Test rust code

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
workflow_dispatch:

env:
nightly: nightly-2021-11-01
target: wasm32-unknown-unknown
tarpaulin-vers: '0.18.4'
try-runtime-chain: dev
try-runtime-uri: wss://main3.nodleprotocol.io:443

jobs:

test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.nightly }}
override: true
target: ${{ env.target }}

- name: Cache cargo registry
uses: actions/[email protected].6
with:
path: ~/.cargo/registry
- name: Cache cargo registry
uses: actions/[email protected].7
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-

- name: Cache cargo index
uses: actions/[email protected].6
with:
path: ~/.cargo/git
- name: Cache cargo index
uses: actions/[email protected].7
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-

- name: Cache cargo build
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-target-

- name: Install ubuntu native dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev

- name: Cleanup ubuntu filesystem
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt clean
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- name: Setup toolchain
run: ./scripts/init.sh

- name: Install tarpaulin
run: cargo install cargo-tarpaulin

- name: Cargo check
run: SKIP_WASM_BUILD= cargo check --all-targets --all-features --workspace

- name: Generate coverage report
run: cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
version: ${{ env.tarpaulin-vers }}
args: '--avoid-cfg-tarpaulin --verbose --all-features --workspace --timeout 120'

- name: Upload to Codecov
uses: codecov/[email protected]
with:
fail_ci_if_error: true

# - name: Run tests
# run: SKIP_WASM_BUILD= cargo test --all-targets --all-features --workspace
try-runtime:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install latest stable Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ env.nightly }}
target: ${{ env.target }}

- name: Cargo build --features=try-runtime
uses: actions-rs/cargo@v1
with:
command: build
args: --release --features=try-runtime

- name: Try Runtime
uses: actions-rs/cargo@v1
with:
command: run
args: --release --features=try-runtime try-runtime --execution native --chain ${{ env.try-runtime-chain }} on-runtime-upgrade live -u ${{ env.try-runtime-uri }}

fmt:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ jobs:
- uses: actions/checkout@v2

- name: Cache cargo registry
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-

- name: Cache cargo index
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-

- name: Cache cargo build
uses: actions/[email protected].6
uses: actions/[email protected].7
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [ push, release ]
jobs:

container_gpr:
name: Push Docker image to GitHub Packages
name: Build and push docker image
runs-on: ubuntu-latest

steps:
Expand All @@ -19,6 +19,7 @@ jobs:
with:
# list of Docker images to use as base name for tags
images: |
nodlecode/chain
ghcr.io/nodlecode/chain
# generate Docker tags based on the following events/attributes
tags: |
Expand All @@ -38,11 +39,17 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: '.maintain/docker/Dockerfile'
file: './Dockerfile'
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
38 changes: 16 additions & 22 deletions .github/workflows/srtool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
chain: ["nodle-chain"]
runtime: ["main", "eden"]

steps:
- uses: actions/checkout@v2
Expand All @@ -18,35 +18,29 @@ jobs:
id: srtool_build
uses: chevdor/[email protected]
with:
chain: ${{ matrix.chain }}
runtime_dir: runtime
chain: ${{ matrix.runtime }}
package: runtime-${{ matrix.runtime }}
runtime_dir: runtimes/${{ matrix.runtime }}
tag: 1.56.1

- name: Summary
run: |
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.chain }}-srtool-digest.json
cat ${{ matrix.chain }}-srtool-digest.json
echo '${{ steps.srtool_build.outputs.json }}' | jq > ${{ matrix.runtime }}-srtool-digest.json
cat ${{ matrix.runtime }}-srtool-digest.json
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}"

- name: Archive Runtime
- name: Archive Metadata
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.chain }}-runtime-${{ github.sha }}.compact.wasm
name: ${{ matrix.runtime }}-srtool-digest.json
path: |
${{ steps.srtool_build.outputs.wasm }}

- name: Archive Metadata
${{ matrix.runtime }}-srtool-digest.json
- name: Archive Runtime
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.chain }}-srtool-digest.json
name: ${{ matrix.runtime }}-${{ github.sha }}
path: |
${{ matrix.chain }}-srtool-digest.json

# TODO: once supported, upload compressed runtime too
# - name: Archive Runtime
# uses: actions/upload-artifact@v2
# with:
# name: ${{ matrix.chain }}-runtime-${{ github.sha }}
# path: |
# ${{ steps.srtool_build.outputs.wasm }}
# ${{ steps.srtool_build.outputs.wasm_compressed }}
# ${{ matrix.chain }}-srtool-digest.json
${{ steps.srtool_build.outputs.wasm }}
${{ steps.srtool_build.outputs.wasm_compressed }}
${{ matrix.runtime }}-srtool-digest.json
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ launch.json
# SRTool and release script
nodle-chain-runtime*
nodle-chain-srtool*

# Polkadot Launch
rococo-local*
17 changes: 0 additions & 17 deletions .maintain/chaos/docker-compose.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .maintain/docker/entrypoint.sh

This file was deleted.

24 changes: 0 additions & 24 deletions .maintain/docker/load_keys.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .maintain/frame-weight-template.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Nodle Chain distributed at https://github.com/NodleCode/chain
* Copyright (C) 2020 Nodle International
* Copyright (C) 2022 Nodle International
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion .maintain/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ echo "Please wait for srtool github action to complete and enter the file name:
read runtime_file

gh run download -n $runtime_file -n nodle-chain-srtool-digest.json
gh release create $1 --title $1 --target master "$runtime_file/nodle_chain_runtime.compact.wasm" "nodle-chain-srtool-digest.json/nodle-chain-srtool-digest.json"
gh release create $1 --title $1 --target master "$runtime_file/runtime_main.compact.wasm" "nodle-chain-srtool-digest.json"
1 change: 1 addition & 0 deletions .maintain/srtool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker run --rm -it -e PACKAGE=runtime-eden -e RUNTIME_DIR="runtimes/eden" -v `pwd`:/build paritytech/srtool:1.56.1
2 changes: 1 addition & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
edition = "2018"
edition = "2021"
Loading