From 3ecf73bf03a51af52216612e6592bf80570f4461 Mon Sep 17 00:00:00 2001 From: Dengjianping Date: Wed, 31 May 2023 16:09:24 +0800 Subject: [PATCH 01/12] Add mantapay to manta runtime Signed-off-by: Dengjianping --- Cargo.lock | 2 + node/src/command.rs | 8 +- node/src/rpc/{common.rs => manta.rs} | 18 +- node/src/rpc/mod.rs | 4 +- runtime/manta/Cargo.toml | 6 + runtime/manta/src/assets_config.rs | 13 +- runtime/manta/src/lib.rs | 19 ++ runtime/manta/src/weights/mod.rs | 1 + runtime/manta/src/weights/pallet_manta_pay.rs | 162 ++++++++++++++++++ 9 files changed, 225 insertions(+), 8 deletions(-) rename node/src/rpc/{common.rs => manta.rs} (74%) create mode 100644 runtime/manta/src/weights/pallet_manta_pay.rs diff --git a/Cargo.lock b/Cargo.lock index f403e3b95..a69df298b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5547,6 +5547,8 @@ dependencies = [ "pallet-balances", "pallet-collective", "pallet-democracy", + "pallet-manta-pay", + "pallet-manta-support", "pallet-membership", "pallet-multisig", "pallet-parachain-staking", diff --git a/node/src/command.rs b/node/src/command.rs index c7270f545..44e811834 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -458,6 +458,12 @@ pub fn run_with(cli: Cli) -> Result { rpc::create_calamari_full, ).await .map_err(Into::into); + } else if config.chain_spec.is_calamari() { + return crate::service::start_dev_nimbus_node::( + config, + rpc::create_manta_full, + ).await + .map_err(Into::into); } else { return Err("Dev mode not support for current chain".into()); } @@ -520,7 +526,7 @@ pub fn run_with(cli: Cli) -> Result { collator_options, id, hwbench, - rpc::create_common_full, + rpc::create_manta_full, ) .await .map(|r| r.0) diff --git a/node/src/rpc/common.rs b/node/src/rpc/manta.rs similarity index 74% rename from node/src/rpc/common.rs rename to node/src/rpc/manta.rs index b774df001..7f440e079 100644 --- a/node/src/rpc/common.rs +++ b/node/src/rpc/manta.rs @@ -14,12 +14,16 @@ // You should have received a copy of the GNU General Public License // along with Manta. If not, see . -//! Common RPC Extensions +//! Manta RPC Extensions use super::*; +use pallet_manta_pay::{ + rpc::{Pull, PullApiServer}, + runtime::PullLedgerDiffApi, +}; -/// Instantiate all RPC extensions for common nodes like calamari/manta. -pub fn create_common_full(deps: FullDeps) -> Result +/// Instantiate all RPC extensions for manta. +pub fn create_manta_full(deps: FullDeps) -> Result where C: ProvideRuntimeApi + HeaderBackend @@ -31,6 +35,7 @@ where C::Api: frame_rpc_system::AccountNonceApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, C::Api: BlockBuilder, + C::Api: PullLedgerDiffApi, P: TransactionPool + Sync + Send + 'static, { use frame_rpc_system::{System, SystemApiServer}; @@ -47,7 +52,12 @@ where .merge(System::new(client.clone(), pool, deny_unsafe).into_rpc()) .map_err(|e| sc_service::Error::Other(e.to_string()))?; module - .merge(TransactionPayment::new(client).into_rpc()) + .merge(TransactionPayment::new(client.clone()).into_rpc()) + .map_err(|e| sc_service::Error::Other(e.to_string()))?; + + let manta_pay_rpc: jsonrpsee::RpcModule> = Pull::new(client).into_rpc(); + module + .merge(manta_pay_rpc) .map_err(|e| sc_service::Error::Other(e.to_string()))?; Ok(module) diff --git a/node/src/rpc/mod.rs b/node/src/rpc/mod.rs index 9f0fc3757..16e0fcefa 100644 --- a/node/src/rpc/mod.rs +++ b/node/src/rpc/mod.rs @@ -26,12 +26,12 @@ use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use std::sync::Arc; mod calamari; -mod common; mod dolphin; +mod manta; pub use calamari::create_calamari_full; -pub use common::create_common_full; pub use dolphin::create_dolphin_full; +pub use manta::create_manta_full; /// A type representing all RPC extensions. pub type RpcExtension = jsonrpsee::RpcModule<()>; diff --git a/runtime/manta/Cargo.toml b/runtime/manta/Cargo.toml index 131ca2814..745bfda72 100644 --- a/runtime/manta/Cargo.toml +++ b/runtime/manta/Cargo.toml @@ -91,7 +91,9 @@ orml-xtokens = { git = 'https://github.com/manta-network/open-runtime-module-lib # Self dependencies manta-collator-selection = { path = '../../pallets/collator-selection', default-features = false } manta-primitives = { path = '../../primitives/manta', default-features = false } +manta-support = { package = "pallet-manta-support", path = "../../pallets/manta-support", default-features = false } pallet-asset-manager = { path = '../../pallets/asset-manager', default-features = false } +pallet-manta-pay = { path = '../../pallets/manta-pay', default-features = false, features = ["runtime"] } pallet-parachain-staking = { path = '../../pallets/parachain-staking', default-features = false } pallet-tx-pause = { path = '../../pallets/tx-pause', default-features = false } runtime-common = { path = '../common', default-features = false } @@ -142,6 +144,7 @@ runtime-benchmarks = [ 'cumulus-pallet-xcmp-queue/runtime-benchmarks', 'orml-xtokens/runtime-benchmarks', 'cumulus-pallet-parachain-system/runtime-benchmarks', + 'pallet-manta-pay/runtime-benchmarks', 'pallet-xcm-benchmarks/runtime-benchmarks', ] try-runtime = [ @@ -179,6 +182,7 @@ try-runtime = [ 'cumulus-pallet-xcmp-queue/try-runtime', 'cumulus-pallet-xcm/try-runtime', 'pallet-asset-manager/try-runtime', + 'pallet-manta-pay/try-runtime', 'orml-xtokens/try-runtime', ] # Set timing constants (e.g. session period) to faster versions to speed up testing. @@ -245,6 +249,8 @@ std = [ 'pallet-treasury/std', 'pallet-assets/std', 'pallet-asset-manager/std', + 'pallet-manta-pay/std', + 'manta-support/std', 'orml-traits/std', 'orml-xtokens/std', ] diff --git a/runtime/manta/src/assets_config.rs b/runtime/manta/src/assets_config.rs index b5209fe4e..fbebf1f5d 100644 --- a/runtime/manta/src/assets_config.rs +++ b/runtime/manta/src/assets_config.rs @@ -24,7 +24,7 @@ use manta_primitives::{ AssetConfig, AssetIdType, AssetLocation, AssetRegistry, AssetRegistryMetadata, AssetStorageMetadata, BalanceType, LocationType, NativeAndNonNative, }, - constants::{ASSET_MANAGER_PALLET_ID, MANTA_DECIMAL}, + constants::{ASSET_MANAGER_PALLET_ID, MANTA_DECIMAL, MANTA_PAY_PALLET_ID}, types::{AccountId, Balance, MantaAssetId}, }; @@ -181,3 +181,14 @@ impl pallet_asset_manager::Config for Runtime { type PalletId = AssetManagerPalletId; type WeightInfo = weights::pallet_asset_manager::SubstrateWeight; } + +parameter_types! { + pub const MantaPayPalletId: PalletId = MANTA_PAY_PALLET_ID; +} + +impl pallet_manta_pay::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type WeightInfo = weights::pallet_manta_pay::SubstrateWeight; + type AssetConfig = MantaAssetConfig; + type PalletId = MantaPayPalletId; +} diff --git a/runtime/manta/src/lib.rs b/runtime/manta/src/lib.rs index 0b4a3e2c7..103287879 100644 --- a/runtime/manta/src/lib.rs +++ b/runtime/manta/src/lib.rs @@ -64,6 +64,7 @@ use manta_primitives::{ constants::{time::*, RocksDbWeight, STAKING_PALLET_ID, TREASURY_PALLET_ID, WEIGHT_PER_SECOND}, types::{AccountId, Balance, BlockNumber, Hash, Header, Index, Signature}, }; +use manta_support::manta_pay::{InitialSyncResponse, PullResponse, RawCheckpoint}; pub use pallet_parachain_staking::{InflationInfo, Range}; use pallet_session::ShouldEndSession; use runtime_common::{ @@ -810,6 +811,7 @@ construct_runtime!( // Assets management Assets: pallet_assets::{Pallet, Call, Storage, Event} = 45, AssetManager: pallet_asset_manager::{Pallet, Call, Storage, Config, Event} = 46, + MantaPay: pallet_manta_pay::{Pallet, Call, Storage, Event} = 47, } ); @@ -880,6 +882,7 @@ mod benches { [pallet_tx_pause, TransactionPause] [manta_collator_selection, CollatorSelection] [pallet_parachain_staking, ParachainStaking] + [pallet_manta_pay, MantaPay] // Nimbus pallets [pallet_author_inherent, AuthorInherent] ); @@ -1011,6 +1014,22 @@ impl_runtime_apis! { } } + impl pallet_manta_pay::runtime::PullLedgerDiffApi for Runtime { + fn pull_ledger_diff( + checkpoint: RawCheckpoint, + max_receiver: u64, + max_sender: u64 + ) -> PullResponse { + MantaPay::pull_ledger_diff(checkpoint.into(), max_receiver, max_sender) + } + fn pull_ledger_total_count() -> [u8; 16] { + MantaPay::pull_ledger_total_count() + } + fn initial_pull(checkpoint: RawCheckpoint, max_receiver: u64) -> InitialSyncResponse { + MantaPay::initial_pull(checkpoint.into(), max_receiver) + } + } + impl nimbus_primitives::NimbusApi for Runtime { fn can_author(author: NimbusId, relay_parent: u32, parent_header: &::Header) -> bool { let next_block_number = parent_header.number + 1; diff --git a/runtime/manta/src/weights/mod.rs b/runtime/manta/src/weights/mod.rs index a1a9ede54..8c85598e0 100644 --- a/runtime/manta/src/weights/mod.rs +++ b/runtime/manta/src/weights/mod.rs @@ -25,6 +25,7 @@ pub mod pallet_author_inherent; pub mod pallet_balances; pub mod pallet_collective; pub mod pallet_democracy; +pub mod pallet_manta_pay; pub mod pallet_membership; pub mod pallet_multisig; pub mod pallet_parachain_staking; diff --git a/runtime/manta/src/weights/pallet_manta_pay.rs b/runtime/manta/src/weights/pallet_manta_pay.rs new file mode 100644 index 000000000..5e37cb143 --- /dev/null +++ b/runtime/manta/src/weights/pallet_manta_pay.rs @@ -0,0 +1,162 @@ +// Copyright 2020-2023 Manta Network. +// This file is part of Manta. +// +// Manta is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Manta is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Manta. If not, see . + +//! Autogenerated weights for pallet_manta_pay +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-05-23, STEPS: `50`, REPEAT: 40, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("manta-dev"), DB CACHE: 1024 + +// Executed Command: +// ./target/production/manta +// benchmark +// pallet +// --chain=manta-dev +// --steps=50 +// --repeat=40 +// --pallet=pallet_manta_pay +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=./scripts/benchmarking/frame-weights-output/pallet_manta_pay.rs +// --template=.github/resources/frame-weight-template.hbs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(clippy::unnecessary_cast)] + +use frame_support::{traits::Get, weights::Weight}; +use sp_std::marker::PhantomData; +use manta_primitives::constants::RocksDbWeight; + +/// Weight functions needed for pallet_manta_pay. +pub trait WeightInfo { + fn to_private() -> Weight; + fn to_public() -> Weight; + fn private_transfer() -> Weight; + fn public_transfer() -> Weight; +} + +/// Weights for pallet_manta_pay using the Substrate node and recommended hardware. +pub struct SubstrateWeight(PhantomData); +impl pallet_manta_pay::WeightInfo for SubstrateWeight { + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:0) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: MantaPay UtxoAccumulatorOutputs (r:0 w:1) + // Storage: MantaPay Shards (r:0 w:1) + fn to_private() -> Weight { + // Minimum execution time: 39_313_587 nanoseconds. + Weight::from_ref_time(39_413_323_000) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(7)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:1) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:1) + fn to_public() -> Weight { + // Minimum execution time: 52_555_094 nanoseconds. + Weight::from_ref_time(52_646_272_000) + .saturating_add(T::DbWeight::get().reads(11)) + .saturating_add(T::DbWeight::get().writes(13)) + } + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:2) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:2 w:2) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:2 w:2) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:2) + fn private_transfer() -> Weight { + // Minimum execution time: 69_769_388 nanoseconds. + Weight::from_ref_time(69_888_940_000) + .saturating_add(T::DbWeight::get().reads(9)) + .saturating_add(T::DbWeight::get().writes(13)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + fn public_transfer() -> Weight { + // Minimum execution time: 50_113 nanoseconds. + Weight::from_ref_time(50_860_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(3)) + } +} + +// For backwards compatibility and tests +impl WeightInfo for () { + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:0) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: MantaPay UtxoAccumulatorOutputs (r:0 w:1) + // Storage: MantaPay Shards (r:0 w:1) + fn to_private() -> Weight { + // Minimum execution time: 39_313_587 nanoseconds. + Weight::from_ref_time(39_413_323_000) + .saturating_add(RocksDbWeight::get().reads(6)) + .saturating_add(RocksDbWeight::get().writes(7)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:1) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:1 w:1) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:1 w:1) + // Storage: System Account (r:1 w:1) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:1) + fn to_public() -> Weight { + // Minimum execution time: 52_555_094 nanoseconds. + Weight::from_ref_time(52_646_272_000) + .saturating_add(RocksDbWeight::get().reads(11)) + .saturating_add(RocksDbWeight::get().writes(13)) + } + // Storage: MantaPay UtxoAccumulatorOutputs (r:2 w:2) + // Storage: MantaPay NullifierCommitmentSet (r:2 w:2) + // Storage: MantaPay UtxoSet (r:2 w:2) + // Storage: MantaPay NullifierSetSize (r:1 w:1) + // Storage: MantaPay ShardTrees (r:2 w:2) + // Storage: MantaPay NullifierSetInsertionOrder (r:0 w:2) + // Storage: MantaPay Shards (r:0 w:2) + fn private_transfer() -> Weight { + // Minimum execution time: 69_769_388 nanoseconds. + Weight::from_ref_time(69_888_940_000) + .saturating_add(RocksDbWeight::get().reads(9)) + .saturating_add(RocksDbWeight::get().writes(13)) + } + // Storage: Assets Asset (r:1 w:1) + // Storage: Assets Account (r:2 w:2) + fn public_transfer() -> Weight { + // Minimum execution time: 50_113 nanoseconds. + Weight::from_ref_time(50_860_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(3)) + } +} From 224591cc830dca430426b58d332102f80951d54c Mon Sep 17 00:00:00 2001 From: Dengjianping Date: Fri, 2 Jun 2023 10:40:18 +0800 Subject: [PATCH 02/12] Update doc comment Signed-off-by: Dengjianping --- node/src/rpc/manta.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/src/rpc/manta.rs b/node/src/rpc/manta.rs index 7317ad22f..489ce75ce 100644 --- a/node/src/rpc/manta.rs +++ b/node/src/rpc/manta.rs @@ -26,7 +26,7 @@ use pallet_manta_sbt::{ runtime::SBTPullLedgerDiffApi, }; -/// Instantiate all RPC extensions for calamari. +/// Instantiate all RPC extensions for manta. pub fn create_manta_full(deps: FullDeps) -> Result where C: ProvideRuntimeApi From 2441902cab6aedd2a93af3bf7598624f3a63a634 Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Fri, 2 Jun 2023 19:59:10 +0300 Subject: [PATCH 03/12] Pin rust nightly to 01-01-2023 Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 4 ++-- .github/workflows/integration_test_calamari.yml | 2 +- .github/workflows/integration_test_manta.yml | 2 +- .github/workflows/metadata_diff.yml | 2 +- .github/workflows/publish_draft_releases.yml | 2 +- .github/workflows/run_all_benchmarks.yml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 02446a0e9..09065d035 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -74,9 +74,9 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable - rustup default stable rustup update rustup target add wasm32-unknown-unknown + rustup default nightly-2023-01-01 - name: Run Unit Tests env: RUST_BACKTRACE: full @@ -211,9 +211,9 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable - rustup default stable rustup update rustup target add wasm32-unknown-unknown + rustup default nightly-2023-01-01 - name: Run live benchmarks test env: RUST_BACKTRACE: full diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index f0c57b312..f11dc7c80 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -82,9 +82,9 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable - rustup default stable rustup update rustup target add wasm32-unknown-unknown + rustup default nightly-2023-01-01 - name: build env: RUST_BACKTRACE: full diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 3697fd8a5..77b0efd44 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -82,9 +82,9 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable - rustup default stable rustup update rustup target add wasm32-unknown-unknown + rustup default nightly-2023-01-01 - name: build env: RUST_BACKTRACE: full diff --git a/.github/workflows/metadata_diff.yml b/.github/workflows/metadata_diff.yml index bcdd6e7a0..541d134e1 100644 --- a/.github/workflows/metadata_diff.yml +++ b/.github/workflows/metadata_diff.yml @@ -78,9 +78,9 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable - rustup default stable rustup update rustup target add wasm32-unknown-unknown + rustup default nightly-2023-01-01 - name: Build New Binary env: RUST_BACKTRACE: full diff --git a/.github/workflows/publish_draft_releases.yml b/.github/workflows/publish_draft_releases.yml index bf1d54b25..1044393b9 100644 --- a/.github/workflows/publish_draft_releases.yml +++ b/.github/workflows/publish_draft_releases.yml @@ -126,9 +126,9 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable - rustup default stable rustup update rustup target add wasm32-unknown-unknown + rustup default nightly-2023-01-01 - name: build env: RUST_BACKTRACE: full diff --git a/.github/workflows/run_all_benchmarks.yml b/.github/workflows/run_all_benchmarks.yml index c738aed28..e5a8a1135 100644 --- a/.github/workflows/run_all_benchmarks.yml +++ b/.github/workflows/run_all_benchmarks.yml @@ -65,9 +65,9 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install stable - rustup default stable rustup update rustup target add wasm32-unknown-unknown + rustup default nightly-2023-01-01 - name: build benchmarking binary env: RUST_BACKTRACE: full From 28c4279439736cb027b6fbb028e34ac4bf8f719b Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Sat, 3 Jun 2023 04:39:50 +0300 Subject: [PATCH 04/12] toolchain update Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 4 ++-- .github/workflows/integration_test_calamari.yml | 2 +- .github/workflows/integration_test_manta.yml | 2 +- .github/workflows/metadata_diff.yml | 2 +- .github/workflows/publish_draft_releases.yml | 2 +- .github/workflows/run_all_benchmarks.yml | 2 +- .github/workflows/try-runtime-mainnet.yml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 09065d035..5e66b0ac2 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -73,7 +73,7 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install stable + rustup toolchain install nightly-2023-01-01 rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 @@ -210,7 +210,7 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install stable + rustup toolchain install nightly-2023-01-01 rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index f11dc7c80..81d67b0ed 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -81,7 +81,7 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install stable + rustup toolchain install nightly-2023-01-01 rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 77b0efd44..0ad4b45db 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -81,7 +81,7 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install stable + rustup toolchain install nightly-2023-01-01 rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 diff --git a/.github/workflows/metadata_diff.yml b/.github/workflows/metadata_diff.yml index 541d134e1..29cd46b11 100644 --- a/.github/workflows/metadata_diff.yml +++ b/.github/workflows/metadata_diff.yml @@ -77,7 +77,7 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install stable + rustup toolchain install nightly-2023-01-01 rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 diff --git a/.github/workflows/publish_draft_releases.yml b/.github/workflows/publish_draft_releases.yml index 1044393b9..7f35c01f9 100644 --- a/.github/workflows/publish_draft_releases.yml +++ b/.github/workflows/publish_draft_releases.yml @@ -125,7 +125,7 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install stable + rustup toolchain install nightly-2023-01-01 rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 diff --git a/.github/workflows/run_all_benchmarks.yml b/.github/workflows/run_all_benchmarks.yml index e5a8a1135..10c3b9e06 100644 --- a/.github/workflows/run_all_benchmarks.yml +++ b/.github/workflows/run_all_benchmarks.yml @@ -64,7 +64,7 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install stable + rustup toolchain install nightly-2023-01-01 rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 diff --git a/.github/workflows/try-runtime-mainnet.yml b/.github/workflows/try-runtime-mainnet.yml index f10b2fc04..e39a95fbd 100644 --- a/.github/workflows/try-runtime-mainnet.yml +++ b/.github/workflows/try-runtime-mainnet.yml @@ -83,7 +83,7 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install stable + rustup toolchain install nightly-2023-01-01 rustup default stable rustup update rustup target add wasm32-unknown-unknown From 69c7c42ff2051912a26c919f370b92743e058ff3 Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Sat, 3 Jun 2023 04:51:00 +0300 Subject: [PATCH 05/12] Check Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 2 -- .github/workflows/integration_test_calamari.yml | 1 - .github/workflows/integration_test_manta.yml | 1 - .github/workflows/metadata_diff.yml | 1 - .github/workflows/publish_draft_releases.yml | 1 - .github/workflows/run_all_benchmarks.yml | 1 - .github/workflows/try-runtime-mainnet.yml | 3 +-- 7 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 5e66b0ac2..65d1bb930 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -74,7 +74,6 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 - name: Run Unit Tests @@ -211,7 +210,6 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 - name: Run live benchmarks test diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 81d67b0ed..e18229e9b 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -82,7 +82,6 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 - name: build diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 0ad4b45db..ccbb1dd8b 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -82,7 +82,6 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 - name: build diff --git a/.github/workflows/metadata_diff.yml b/.github/workflows/metadata_diff.yml index 29cd46b11..5cacf87b7 100644 --- a/.github/workflows/metadata_diff.yml +++ b/.github/workflows/metadata_diff.yml @@ -78,7 +78,6 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 - name: Build New Binary diff --git a/.github/workflows/publish_draft_releases.yml b/.github/workflows/publish_draft_releases.yml index 7f35c01f9..5e6b0a197 100644 --- a/.github/workflows/publish_draft_releases.yml +++ b/.github/workflows/publish_draft_releases.yml @@ -126,7 +126,6 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 - name: build diff --git a/.github/workflows/run_all_benchmarks.yml b/.github/workflows/run_all_benchmarks.yml index 10c3b9e06..c885cf2e3 100644 --- a/.github/workflows/run_all_benchmarks.yml +++ b/.github/workflows/run_all_benchmarks.yml @@ -65,7 +65,6 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup update rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 - name: build benchmarking binary diff --git a/.github/workflows/try-runtime-mainnet.yml b/.github/workflows/try-runtime-mainnet.yml index e39a95fbd..06f2c080c 100644 --- a/.github/workflows/try-runtime-mainnet.yml +++ b/.github/workflows/try-runtime-mainnet.yml @@ -84,8 +84,7 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup default stable - rustup update + rustup default nightly-2023-01-01 rustup target add wasm32-unknown-unknown - name: Build Binary env: From 6ee309057b2c29a6842695c982db2e06805f60f2 Mon Sep 17 00:00:00 2001 From: Charles Ferrell Date: Sat, 3 Jun 2023 10:34:11 -0400 Subject: [PATCH 06/12] flip order of adding wasm toolchain Signed-off-by: Charles Ferrell --- .github/workflows/check_tests.yml | 4 ++-- .github/workflows/integration_test_calamari.yml | 2 +- .github/workflows/integration_test_manta.yml | 2 +- .github/workflows/publish_draft_releases.yml | 2 +- .github/workflows/run_all_benchmarks.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 65d1bb930..a6169661a 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -74,8 +74,8 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 + rustup target add wasm32-unknown-unknown - name: Run Unit Tests env: RUST_BACKTRACE: full @@ -210,8 +210,8 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 + rustup target add wasm32-unknown-unknown - name: Run live benchmarks test env: RUST_BACKTRACE: full diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index e18229e9b..4f8911b88 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -82,8 +82,8 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 + rustup target add wasm32-unknown-unknown - name: build env: RUST_BACKTRACE: full diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index ccbb1dd8b..06f1653d5 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -82,8 +82,8 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 + rustup target add wasm32-unknown-unknown - name: build env: RUST_BACKTRACE: full diff --git a/.github/workflows/publish_draft_releases.yml b/.github/workflows/publish_draft_releases.yml index 5e6b0a197..488d248ac 100644 --- a/.github/workflows/publish_draft_releases.yml +++ b/.github/workflows/publish_draft_releases.yml @@ -126,8 +126,8 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 + rustup target add wasm32-unknown-unknown - name: build env: RUST_BACKTRACE: full diff --git a/.github/workflows/run_all_benchmarks.yml b/.github/workflows/run_all_benchmarks.yml index c885cf2e3..226517815 100644 --- a/.github/workflows/run_all_benchmarks.yml +++ b/.github/workflows/run_all_benchmarks.yml @@ -65,8 +65,8 @@ jobs: curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env rustup toolchain install nightly-2023-01-01 - rustup target add wasm32-unknown-unknown rustup default nightly-2023-01-01 + rustup target add wasm32-unknown-unknown - name: build benchmarking binary env: RUST_BACKTRACE: full From 70ae0f6f21774cd8dbe8a48c29abf0f000206f42 Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Sun, 4 Jun 2023 13:55:24 +0300 Subject: [PATCH 07/12] Try 03.03 Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index a6169661a..92612886a 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -73,8 +73,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install nightly-2023-01-01 - rustup default nightly-2023-01-01 + rustup toolchain install nightly-2023-03-03 + rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - name: Run Unit Tests env: From 602d67b0af5227b3eed218b3eafed7efa223c444 Mon Sep 17 00:00:00 2001 From: Charles Ferrell Date: Sun, 4 Jun 2023 18:51:52 -0400 Subject: [PATCH 08/12] add additional volume size Signed-off-by: Charles Ferrell --- .github/workflows/check_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 92612886a..038956262 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -10,7 +10,7 @@ concurrency: env: AWS_REGION: us-east-1 AWS_INSTANCE_TYPE: c5.4xlarge - AWS_INSTANCE_ROOT_VOLUME_SIZE: 256 + AWS_INSTANCE_ROOT_VOLUME_SIZE: 512 AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]' jobs: From d40b18b6420fb9bdaa00ea08862f568f938d2719 Mon Sep 17 00:00:00 2001 From: Charles Ferrell Date: Sun, 4 Jun 2023 19:03:35 -0400 Subject: [PATCH 09/12] use same cargo version for all workflows Signed-off-by: Charles Ferrell --- .github/workflows/check_tests.yml | 4 ++-- .github/workflows/integration_test_calamari.yml | 4 ++-- .github/workflows/integration_test_manta.yml | 4 ++-- .github/workflows/metadata_diff.yml | 4 ++-- .github/workflows/publish_draft_releases.yml | 4 ++-- .github/workflows/run_all_benchmarks.yml | 4 ++-- .github/workflows/try-runtime-mainnet.yml | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 038956262..bfd3df563 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -209,8 +209,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install nightly-2023-01-01 - rustup default nightly-2023-01-01 + rustup toolchain install nightly-2023-03-03 + rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - name: Run live benchmarks test env: diff --git a/.github/workflows/integration_test_calamari.yml b/.github/workflows/integration_test_calamari.yml index 4f8911b88..42d20a45d 100644 --- a/.github/workflows/integration_test_calamari.yml +++ b/.github/workflows/integration_test_calamari.yml @@ -81,8 +81,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install nightly-2023-01-01 - rustup default nightly-2023-01-01 + rustup toolchain install nightly-2023-03-03 + rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - name: build env: diff --git a/.github/workflows/integration_test_manta.yml b/.github/workflows/integration_test_manta.yml index 06f1653d5..764c7a567 100644 --- a/.github/workflows/integration_test_manta.yml +++ b/.github/workflows/integration_test_manta.yml @@ -81,8 +81,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install nightly-2023-01-01 - rustup default nightly-2023-01-01 + rustup toolchain install nightly-2023-03-03 + rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - name: build env: diff --git a/.github/workflows/metadata_diff.yml b/.github/workflows/metadata_diff.yml index 5cacf87b7..db9020ede 100644 --- a/.github/workflows/metadata_diff.yml +++ b/.github/workflows/metadata_diff.yml @@ -77,9 +77,9 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install nightly-2023-01-01 + rustup toolchain install nightly-2023-03-03 + rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - rustup default nightly-2023-01-01 - name: Build New Binary env: RUST_BACKTRACE: full diff --git a/.github/workflows/publish_draft_releases.yml b/.github/workflows/publish_draft_releases.yml index 488d248ac..90c4348de 100644 --- a/.github/workflows/publish_draft_releases.yml +++ b/.github/workflows/publish_draft_releases.yml @@ -125,8 +125,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install nightly-2023-01-01 - rustup default nightly-2023-01-01 + rustup toolchain install nightly-2023-03-03 + rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - name: build env: diff --git a/.github/workflows/run_all_benchmarks.yml b/.github/workflows/run_all_benchmarks.yml index 226517815..7e4e4f415 100644 --- a/.github/workflows/run_all_benchmarks.yml +++ b/.github/workflows/run_all_benchmarks.yml @@ -64,8 +64,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install nightly-2023-01-01 - rustup default nightly-2023-01-01 + rustup toolchain install nightly-2023-03-03 + rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - name: build benchmarking binary env: diff --git a/.github/workflows/try-runtime-mainnet.yml b/.github/workflows/try-runtime-mainnet.yml index 06f2c080c..588ecdc42 100644 --- a/.github/workflows/try-runtime-mainnet.yml +++ b/.github/workflows/try-runtime-mainnet.yml @@ -83,8 +83,8 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install nightly-2023-01-01 - rustup default nightly-2023-01-01 + rustup toolchain install nightly-2023-03-03 + rustup default nightly-2023-03-03 rustup target add wasm32-unknown-unknown - name: Build Binary env: From 531c88e7909aafb35bb82bddb8b774fa4cbbb9d7 Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Mon, 5 Jun 2023 08:13:32 +0300 Subject: [PATCH 10/12] Use c5.9xlarge Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index bfd3df563..4faccb0b8 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -9,7 +9,7 @@ concurrency: cancel-in-progress: true env: AWS_REGION: us-east-1 - AWS_INSTANCE_TYPE: c5.4xlarge + AWS_INSTANCE_TYPE: c5.9xlarge AWS_INSTANCE_ROOT_VOLUME_SIZE: 512 AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]' From bf118c8964911581978b94f1d422721103e91c4e Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Mon, 5 Jun 2023 11:52:06 +0300 Subject: [PATCH 11/12] Try 1 tb Signed-off-by: Georgi Zlatarev --- .github/workflows/check_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_tests.yml b/.github/workflows/check_tests.yml index 4faccb0b8..45af30623 100644 --- a/.github/workflows/check_tests.yml +++ b/.github/workflows/check_tests.yml @@ -10,7 +10,7 @@ concurrency: env: AWS_REGION: us-east-1 AWS_INSTANCE_TYPE: c5.9xlarge - AWS_INSTANCE_ROOT_VOLUME_SIZE: 512 + AWS_INSTANCE_ROOT_VOLUME_SIZE: 1024 AWS_IMAGE_SEARCH_PATTERN: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* AWS_IMAGE_SEARCH_OWNERS: '["099720109477"]' jobs: From 9c1874c477c07b807fed26e5b0c6e74e9ae1ec46 Mon Sep 17 00:00:00 2001 From: Georgi Zlatarev Date: Mon, 5 Jun 2023 16:58:36 +0300 Subject: [PATCH 12/12] USe stable for building client in publish-draft-release job Signed-off-by: Georgi Zlatarev --- .github/workflows/publish_draft_releases.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_draft_releases.yml b/.github/workflows/publish_draft_releases.yml index 90c4348de..bf1d54b25 100644 --- a/.github/workflows/publish_draft_releases.yml +++ b/.github/workflows/publish_draft_releases.yml @@ -125,8 +125,9 @@ jobs: protoc --version curl -s https://sh.rustup.rs -sSf | sh -s -- -y source ${HOME}/.cargo/env - rustup toolchain install nightly-2023-03-03 - rustup default nightly-2023-03-03 + rustup toolchain install stable + rustup default stable + rustup update rustup target add wasm32-unknown-unknown - name: build env: