Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into moonbeam-polkadot-s…
Browse files Browse the repository at this point in the history
…table2407

# Conflicts:
#	Cargo.toml
#	node/service/src/chain_spec/test_spec.rs
  • Loading branch information
gonzamontiel committed Sep 26, 2024
2 parents e473197 + 7fb1b17 commit 9cfc747
Show file tree
Hide file tree
Showing 24 changed files with 7,725 additions and 9,343 deletions.
2 changes: 1 addition & 1 deletion .github/workflow-templates/dev-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 22.8.0
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml

Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
- name: Run Eslint check
Expand Down Expand Up @@ -594,7 +594,7 @@ jobs:
(github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on:
labels: bare-metal
needs: ["set-tags", "build"]
needs: ["set-tags", "build", "dev-test"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -611,7 +611,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
- run: |
Expand Down Expand Up @@ -704,9 +704,10 @@ jobs:
lazy-loading-tests:
runs-on:
labels: bare-metal
needs: ["set-tags", "build"]
needs: ["set-tags", "build", "typescript-tracing-tests"]
strategy:
fail-fast: false
max-parallel: 1
matrix:
chain: ["moonbeam"]
env:
Expand All @@ -723,7 +724,7 @@ jobs:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 22
node-version: 20.10.0
- name: Create local folders
run: |
mkdir -p target/release/wbuild/${{ matrix.chain }}-runtime/
Expand Down Expand Up @@ -761,7 +762,7 @@ jobs:
chopsticks-upgrade-test:
runs-on:
labels: bare-metal
needs: ["set-tags", "build"]
needs: ["set-tags", "build", "typescript-tracing-tests"]
strategy:
fail-fast: false
matrix:
Expand All @@ -779,7 +780,7 @@ jobs:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 22
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
- name: Create local folders
Expand Down Expand Up @@ -808,9 +809,10 @@ jobs:
zombie_upgrade_test:
runs-on:
labels: bare-metal
needs: ["set-tags", "build"]
needs: ["set-tags", "build", "typescript-tracing-tests"]
strategy:
fail-fast: false
max-parallel: 1
matrix:
## TODO: add moonriver here when it is ready
chain: ["moonbase", "moonbeam"]
Expand All @@ -828,7 +830,7 @@ jobs:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 22
node-version: 20.10.0
- name: Create local folders
run: |
mkdir -p target/release/wbuild/${{ matrix.chain }}-runtime/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-typescript-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 20.10.0
- name: Build typescript API
run: |
cd typescript-api
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 20.10.0
- name: Upgrade polkadotjs for tests
run: |
cd test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-typescript-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 20.10.0
- name: Use pnpm
uses: pnpm/action-setup@v4
with:
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ strum_macros = "0.24"
smallvec = "1.11.0"
p256 = { version = "0.13.2", default-features = false, features = [
"ecdsa"] }
ansi_term = "0.12.1"

# Other (client)

Expand Down
2 changes: 1 addition & 1 deletion client/rpc/trace/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! executor.
//!
//! The implementation is composed of multiple tasks :
//! - Many calls the the RPC handler `Trace::filter`, communicating with the main task.
//! - Many calls the RPC handler `Trace::filter`, communicating with the main task.
//! - A main `CacheTask` managing the cache and the communication between tasks.
//! - For each traced block an async task responsible to wait for a permit, spawn a blocking
//! task and waiting for the result, then send it to the main `CacheTask`.
Expand Down
4 changes: 4 additions & 0 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,10 @@ pub fn run() -> Result<()> {
chain_spec::test_spec::lazy_loading_spec_builder(Default::default());
config.chain_spec = Box::new(spec_builder.build());

// TODO: create a tokio runtime inside offchain_worker thread (otherwise it will panic)
// We just disable it for now, since it is not needed
config.offchain_worker.enabled = false;

return moonbeam_service::lazy_loading::new_lazy_loading_service::<
moonbeam_runtime::RuntimeApi,
moonbeam_service::MoonbeamCustomizations,
Expand Down
5 changes: 3 additions & 2 deletions node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sha3 = { workspace = true }
tiny-bip39 = { workspace = true }
tokio = { workspace = true, features = ["macros", "sync"] }
tokio = { workspace = true, features = ["sync", "rt-multi-thread"] }
trie-root = { workspace = true }
tokio-retry = { workspace = true }
substrate-rpc-client = { workspace = true }
hex = { workspace = true, features = ["std"] }
thiserror = { workspace = true }
tracing = { workspace = true }
ansi_term = { workspace = true }

# Moonbeam
moonbeam-dev-rpc = { workspace = true }
Expand Down Expand Up @@ -189,7 +190,7 @@ default = [
"westend-native",
]

lazy-loading = ["sc-service/test-helpers"]
lazy-loading = ["sc-service/test-helpers", "parking_lot/send_guard"]

rococo-native = ["polkadot-cli/rococo-native", "polkadot-service/rococo-native"]
westend-native = [
Expand Down
7 changes: 4 additions & 3 deletions node/service/src/chain_spec/test_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ pub fn staking_spec(para_id: ParaId) -> ChainSpec {

#[cfg(feature = "lazy-loading")]
pub fn lazy_loading_spec_builder(para_id: ParaId) -> sc_chain_spec::ChainSpecBuilder<Extensions> {
use moonbeam_runtime::currency::{GLMR, SUPPLY_FACTOR};
crate::chain_spec::moonbeam::ChainSpec::builder(
moonbeam_runtime::WASM_BINARY.expect("WASM binary was not build, please build it!"),
Default::default(),
Expand Down Expand Up @@ -120,12 +121,12 @@ pub fn lazy_loading_spec_builder(para_id: ParaId) -> sc_chain_spec::ChainSpecBui
(
AccountId::from(hex!("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b")),
get_from_seed::<NimbusId>("Alice"),
1_000 * moonbeam_runtime::currency::GLMR,
20_000 * GLMR * SUPPLY_FACTOR,
),
(
AccountId::from(hex!("C0F0f4ab324C46e55D02D0033343B4Be8A55532d")),
get_from_seed::<NimbusId>("Faith"),
1_000 * moonbeam_runtime::currency::GLMR,
20_000 * GLMR * SUPPLY_FACTOR,
),
],
// Delegations
Expand All @@ -142,7 +143,7 @@ pub fn lazy_loading_spec_builder(para_id: ParaId) -> sc_chain_spec::ChainSpecBui
AccountId::from(hex!("Ff64d3F6efE2317EE2807d223a0Bdc4c0c49dfDB")),
AccountId::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")),
],
3_000_000 * moonbeam_runtime::currency::GLMR,
1_500_000 * GLMR * SUPPLY_FACTOR,
para_id,
// Chain ID
1280,
Expand Down
Loading

0 comments on commit 9cfc747

Please sign in to comment.