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

Add genesis config presets to runtime #3138

Merged
merged 35 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b3b4509
refactor: :recycle: update deprecated options in command `moonbeam be…
manuelmauro Jan 17, 2025
aeecd0d
refactor: :recycle: update deprecated options in both invocations of …
manuelmauro Jan 17, 2025
52436cb
feat: :sparkles: add default preset for RuntimeGenesisConfig
manuelmauro Jan 21, 2025
1c4e1d0
Revert "feat: :sparkles: add default preset for RuntimeGenesisConfig"
manuelmauro Jan 21, 2025
31d8740
feat: :sparkles: add genesis builder dummy development preset
manuelmauro Jan 21, 2025
94bc298
refactor: :recycle: implement GenesisBuilder within each runtime
manuelmauro Jan 21, 2025
8a9da17
Merge branch 'master' into manuel/update-deprecation-in-benchmarks-sc…
manuelmauro Jan 22, 2025
dc562fa
refactor: :recycle: move moonbase runtime test config to runtime
manuelmauro Jan 22, 2025
1b73386
refactor: :art: improve structure
manuelmauro Jan 22, 2025
c5170a3
refactor: :recycle: move moonbeam runtime test config to runtime
manuelmauro Jan 22, 2025
ba403b4
refactor: :recycle: move moonriver runtime test config to runtime
manuelmauro Jan 22, 2025
0236acf
fix: :fire: remove unused dep
manuelmauro Jan 22, 2025
57cea86
chore: :page_facing_up: add copyright
manuelmauro Jan 23, 2025
a12ff6e
refactor: :fire: complete move of testnet_genesis functions to runtime
manuelmauro Jan 23, 2025
3e42e86
refactor: :coffin: remove dead functions *_inflation_config
manuelmauro Jan 23, 2025
3d0900c
refactor: :recycle: add get_preset and preset_names functions
manuelmauro Jan 23, 2025
b23c7e0
build: :sparkles:
manuelmauro Jan 23, 2025
e61473f
refactor: :recycle: correctly use with_genesis_config_preset_name in …
manuelmauro Jan 23, 2025
6ef78e3
refactor: :recycle: use with_genesis_config_preset_name in test_spec
manuelmauro Jan 23, 2025
570c6af
refactor: :fire: remove serde_json feature
manuelmauro Jan 23, 2025
34c3c15
fix json serialization of GenesisConfig in xcm-transactor
RomarQ Jan 23, 2025
f310990
fix serde_json dependendency in no_std environemnt
RomarQ Jan 23, 2025
bc92fbd
simplify code
RomarQ Jan 23, 2025
305d7cb
style: :art: format comment/tuple
manuelmauro Jan 23, 2025
22951b7
feat: :sparkles: add cargo feature to disable genesis builder
manuelmauro Jan 24, 2025
f323670
refactor: :zap: change cargo feature disable-genesis-builder to enabl…
manuelmauro Jan 24, 2025
1ba1ba3
fix: :bug: correct enable-genesis-builder cargo feature logic and add…
manuelmauro Jan 24, 2025
0e7a227
style: :art: rename enable-genesis-config cargo feature to genesis-co…
manuelmauro Jan 24, 2025
5908294
fix: :bug: apply renaming of cargo feature enable-genesis-builder
manuelmauro Jan 24, 2025
061254d
feat: :fire: remove genesis-builder from default features
manuelmauro Jan 24, 2025
261029d
feat: :zap: remove genesis-builder and serde_json from default features
manuelmauro Jan 24, 2025
c4b071e
refactor: :recycle: switch back to disable-genesis-builder
manuelmauro Jan 24, 2025
6794d92
fix: :bug: remove genesis-builder feature references
manuelmauro Jan 24, 2025
871d660
Merge branch 'master' into manuel/update-deprecation-in-benchmarks-sc…
RomarQ Jan 24, 2025
b0d81d0
chore(ci): fix wasm-size-check
RomarQ Jan 24, 2025
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
38 changes: 27 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ jobs:
name: "Check WASM runtimes with Twiggy"
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
pull-requests: write
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork }}
Expand All @@ -317,24 +318,47 @@ jobs:
- name: Download Twiggy
run: cargo install twiggy
- name: Lookup for latest target branch build
id: latest-target-build
run: |
TARGET_BRANCH=${{ github.event.pull_request.base.ref }}
LATEST_TARGET_BRANCH_BUILD=$(gh run -R moonbeam-foundation/moonbeam list -w Build --limit=100 --json databaseId,url,headBranch,event,status,conclusion,createdAt --jq ".[] | select(.headBranch == \"$TARGET_BRANCH\" and .event == \"push\" and .status == \"completed\" and .conclusion == \"success\") | .databaseId" | head -n 1)
echo "LATEST_TARGET_BRANCH_BUILD=$LATEST_TARGET_BRANCH_BUILD" >> $GITHUB_OUTPUT
- name: Download latest target branch build artifacts
- name: "Download runtimes from target branch"
uses: actions/download-artifact@v4
with:
name: runtimes
path: runtimes-target-branch
merge-multiple: true
github-token: ${{ github.token }}
run-id: ${{ steps.latest-target-build.outputs.LATEST_TARGET_BRANCH_BUILD }}
- name: "Download uncompressed-runtimes from target branch"
uses: actions/download-artifact@v4
with:
name: uncompressed-runtimes
path: uncompressed-runtimes-target-branch
merge-multiple: true
github-token: ${{ github.token }}
run-id: ${{ steps.latest-target-build.outputs.LATEST_TARGET_BRANCH_BUILD }}
- name: Check Runtimes size for target branch
run: |
gh run -R moonbeam-foundation/moonbeam download $LATEST_TARGET_BRANCH_BUILD -n uncompressed-runtimes --dir uncompressed-runtimes-target-branch
gh run -R moonbeam-foundation/moonbeam download $LATEST_TARGET_BRANCH_BUILD -n runtimes --dir runtimes-target-branch
PREVIOUS_MOONBASE=$(du -k runtimes-target-branch/* | awk '/moonbase_runtime/ {print $1}')
PREVIOUS_MOONBEAM=$(du -k runtimes-target-branch/* | awk '/moonbeam_runtime/ {print $1}')
PREVIOUS_MOONRIVER=$(du -k runtimes-target-branch/* | awk '/moonriver_runtime/ {print $1}')
echo "PREVIOUS_MOONBASE=$PREVIOUS_MOONBASE" >> $GITHUB_ENV
echo "PREVIOUS_MOONBEAM=$PREVIOUS_MOONBEAM" >> $GITHUB_ENV
echo "PREVIOUS_MOONRIVER=$PREVIOUS_MOONRIVER" >> $GITHUB_ENV
- name: "Download branch built runtime"
uses: actions/download-artifact@v4
with:
name: runtimes
path: runtimes-current-branch
merge-multiple: true
- name: "Download branch built uncompressed-runtimes"
uses: actions/download-artifact@v4
with:
name: uncompressed-runtimes
path: uncompressed-runtimes-current-branch
merge-multiple: true
- name: Check Runtimes size for current branch
run: |
CURRENT_MOONBASE=$(du -k runtimes-current-branch/* | awk '/moonbase_runtime/ {print $1}')
Expand All @@ -360,14 +384,6 @@ jobs:
echo "LATEST_MOONBASE=$LATEST_MOONBASE" >> $GITHUB_ENV
echo "LATEST_MOONBEAM=$LATEST_MOONBEAM" >> $GITHUB_ENV
echo "LATEST_MOONRIVER=$LATEST_MOONRIVER" >> $GITHUB_ENV
- name: Check Runtimes size for target branch
run: |
PREVIOUS_MOONBASE=$(du -k runtimes-target-branch/* | awk '/moonbase_runtime/ {print $1}')
PREVIOUS_MOONBEAM=$(du -k runtimes-target-branch/* | awk '/moonbeam_runtime/ {print $1}')
PREVIOUS_MOONRIVER=$(du -k runtimes-target-branch/* | awk '/moonriver_runtime/ {print $1}')
echo "PREVIOUS_MOONBASE=$PREVIOUS_MOONBASE" >> $GITHUB_ENV
echo "PREVIOUS_MOONBEAM=$PREVIOUS_MOONBEAM" >> $GITHUB_ENV
echo "PREVIOUS_MOONRIVER=$PREVIOUS_MOONRIVER" >> $GITHUB_ENV
- name: Create Twiggy diff reports
run: |
# Install Twiggy if not already installed
Expand Down
4 changes: 4 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ parking_lot = "0.12.1"
primitive-types = "0.12.1"
prometheus = { version = "0.13.0", default-features = false }
rand = "0.8.5"
serde_json = { version = "1.0.114" }
serde_json = { version = "1.0.114", default-features = false }
similar-asserts = "1.1.0"
tempfile = "3.8.1"
tiny-bip39 = { version = "0.8", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion client/evm-tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version = "0.1.0"
ethereum-types = { workspace = true, features = [ "std" ] }
hex = { workspace = true, features = [ "serde" ] }
serde = { workspace = true, features = [ "derive", "std" ] }
serde_json = { workspace = true }
serde_json = { workspace = true, default-features = true }

# Moonbeam
evm-tracing-events = { workspace = true, features = [ "std" ] }
Expand Down
2 changes: 1 addition & 1 deletion client/rpc-core/debug/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jsonrpsee = { workspace = true, features = [ "macros", "server" ] }
moonbeam-client-evm-tracing = { workspace = true }
moonbeam-rpc-core-types = { workspace = true }
serde = { workspace = true, features = [ "derive" ] }
serde_json = { workspace = true }
serde_json = { workspace = true, default-features = true }

sp-core = { workspace = true, features = [ "std" ] }
fc-rpc-core = { workspace = true }
2 changes: 1 addition & 1 deletion client/rpc-core/trace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jsonrpsee = { workspace = true, features = [ "macros", "server" ] }
moonbeam-client-evm-tracing = { workspace = true }
moonbeam-rpc-core-types = { workspace = true }
serde = { workspace = true, features = [ "derive" ] }
serde_json = { workspace = true }
serde_json = { workspace = true, default-features = true }
2 changes: 1 addition & 1 deletion client/rpc-core/txpool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ ethereum = { workspace = true, features = [ "std", "with-codec" ] }
ethereum-types = { workspace = true, features = [ "std" ] }
jsonrpsee = { workspace = true, features = [ "macros", "server" ] }
serde = { workspace = true, features = [ "derive" ] }
serde_json = { workspace = true }
serde_json = { workspace = true, default-features = true }

fc-rpc-core = { workspace = true }
2 changes: 1 addition & 1 deletion client/rpc-core/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ version = "0.1.0"
[dependencies]
ethereum-types = { workspace = true, features = [ "std" ] }
serde = { workspace = true, features = [ "derive" ] }
serde_json = { workspace = true }
serde_json = { workspace = true, default-features = true }
2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ assert_cmd = { workspace = true }
hex = { workspace = true, features = [ "std" ] }
nix = { workspace = true }
serde = { workspace = true, features = [ "derive" ] }
serde_json = { workspace = true }
serde_json = { workspace = true, default-features = true }
tempfile = { workspace = true }
tracing-core = { workspace = true }

Expand Down
3 changes: 1 addition & 2 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,7 @@ pub fn run() -> Result<()> {
max_retries_per_request: cli.run.lazy_loading_max_retries_per_request,
};

let spec_builder =
chain_spec::test_spec::lazy_loading_spec_builder(Default::default());
let spec_builder = chain_spec::test_spec::lazy_loading_spec_builder();
config.chain_spec = Box::new(spec_builder.build());

// TODO: create a tokio runtime inside offchain_worker thread (otherwise it will panic)
Expand Down
3 changes: 2 additions & 1 deletion node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ log = { workspace = true }
maplit = { workspace = true }
parking_lot = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde_json = { workspace = true, default-features = true }
sha3 = { workspace = true }
tiny-bip39 = { workspace = true }
tokio = { workspace = true, features = ["sync", "rt-multi-thread"] }
Expand Down Expand Up @@ -93,6 +93,7 @@ sp-block-builder = { workspace = true, features = ["std"] }
sp-blockchain = { workspace = true }
sp-consensus = { workspace = true }
sp-core = { workspace = true, features = ["std"] }
sp-genesis-builder = { workspace = true, features = ["std"] }
sp-inherents = { workspace = true, features = ["std"] }
sp-io = { workspace = true, features = ["std"] }
sp-keystore = { workspace = true, features = ["std"] }
Expand Down
Loading
Loading