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

Inherents and empty block production overhaul #86

Merged
merged 33 commits into from
May 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d1bce56
inherent overhaul
liamaharon May 7, 2024
20878ee
bump version
liamaharon May 7, 2024
d58941c
clean up custom idps
liamaharon May 8, 2024
ff30415
smart inherent provider
liamaharon May 8, 2024
5883f46
licence and basic docs
liamaharon May 9, 2024
b27fd10
clippy
liamaharon May 9, 2024
62d9696
remove node-executor node-primitive deps
liamaharon May 9, 2024
9c5fcbe
fmt
liamaharon May 9, 2024
ac898c2
update cargo.lock
liamaharon May 9, 2024
36a8cf1
move shared params to common
liamaharon May 10, 2024
4424f61
move misc logging to common
liamaharon May 10, 2024
a0a5485
move parse to common
liamaharon May 10, 2024
16c5b39
move state to common
liamaharon May 10, 2024
9632a14
move inherents to empty block production dir
liamaharon May 10, 2024
4f7e04e
move block creation out of fast forward
liamaharon May 10, 2024
b728086
improve log
liamaharon May 10, 2024
039cdaf
clippy
liamaharon May 10, 2024
bcdd083
cargo fmt
liamaharon May 13, 2024
4a406c6
update test runtimes and snapshots
liamaharon May 14, 2024
fd0092e
use stable for clippy
liamaharon May 14, 2024
4b4648b
fix typos
liamaharon May 14, 2024
527c857
Update core/src/common/empty_block/inherents/pre_apply.rs
liamaharon May 15, 2024
c7dbbfe
address comments
liamaharon May 16, 2024
8b465e2
doc comment
liamaharon May 16, 2024
828a357
doc
liamaharon May 16, 2024
5980993
use valueenum
liamaharon May 16, 2024
aee8086
rename execute_next_block to mine_block
liamaharon May 16, 2024
2254202
bump relay_offset +1
liamaharon May 17, 2024
00e2962
blocktime arg
liamaharon May 20, 2024
e80f524
make blocktime a required value
liamaharon May 20, 2024
47a76ca
hardcode relaychain blocktime
liamaharon May 20, 2024
c6a143b
clippy
liamaharon May 26, 2024
5fdd6d5
free disk space on test runner
liamaharon May 26, 2024
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
56 changes: 48 additions & 8 deletions .github/workflows/rust-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ concurrency:
env:
RUST_BACKTRACE: 1
# pin nightly to avoid constantly throwing out cache
TOOLCHAIN_LINT: nightly-2023-11-13
TOOLCHAIN_FMT: nightly-2024-04-09

jobs:
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ env.TOOLCHAIN_LINT }}
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
Expand All @@ -34,21 +34,35 @@ jobs:
- name: cargo doc
run: RUSTFLAGS="-D warnings" cargo doc --locked

lint:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ env.TOOLCHAIN_LINT }}
- name: Install Rust ${{ env.TOOLCHAIN_FMT }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.TOOLCHAIN_LINT }}
toolchain: ${{ env.TOOLCHAIN_FMT }}
targets: wasm32-unknown-unknown
components: rustfmt, clippy, rust-src
- uses: Swatinem/rust-cache@v2
with:
key: lint-v0
key: fmt-v0
- name: cargo fmt
run: cargo +${{ env.TOOLCHAIN_LINT }} fmt --all -- --check
run: cargo +${{ env.TOOLCHAIN_FMT }} fmt --all -- --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: wasm32-unknown-unknown
components: rustfmt, clippy, rust-src
- uses: Swatinem/rust-cache@v2
with:
key: clippy-v0
- name: Install deps for musl build
run: |
sudo apt-get update
Expand All @@ -57,7 +71,7 @@ jobs:
- name: cargo clippy
uses: actions-rs-plus/clippy-check@v2
with:
toolchain: ${{ env.TOOLCHAIN_LINT }}
toolchain: stable
args: --all-targets --all-features --locked --no-deps -- --deny warnings

test:
Expand All @@ -78,6 +92,32 @@ jobs:
uses: arduino/setup-protoc@v1
with:
version: "3.6.1"
- name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
sudo rm -rf \
/usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \
/usr/lib/jvm || true
sudo apt install aptitude -y >/dev/null 2>&1
sudo aptitude purge aria2 ansible azure-cli shellcheck rpm xorriso zsync \
esl-erlang firefox gfortran-8 gfortran-9 google-chrome-stable \
google-cloud-sdk imagemagick \
libmagickcore-dev libmagickwand-dev libmagic-dev ant ant-optional kubectl \
mercurial apt-transport-https mono-complete libmysqlclient \
unixodbc-dev yarn chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
snmp pollinate libpq-dev postgresql-client powershell ruby-full \
sphinxsearch subversion mongodb-org azure-cli microsoft-edge-stable \
-y -f >/dev/null 2>&1
sudo aptitude purge google-cloud-sdk -f -y >/dev/null 2>&1
sudo aptitude purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo apt purge microsoft-edge-stable -f -y >/dev/null 2>&1 || true
sudo aptitude purge '~n ^mysql' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^php' -f -y >/dev/null 2>&1
sudo aptitude purge '~n ^dotnet' -f -y >/dev/null 2>&1
sudo apt-get autoremove -y >/dev/null 2>&1
sudo apt-get autoclean -y >/dev/null 2>&1
- name: build try-runtime-cli
# this is required for testing
# build --release or the execution time of the test is too long
Expand Down
Loading
Loading