Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
aa391c9
replacing dependencies
gianfra-t Jul 30, 2024
b883bc6
dependencies upgrades
gianfra-t Jul 30, 2024
1b22e66
restructure imports for update, relevant modifications of chain exten…
gianfra-t Jul 31, 2024
7a7a37d
reorder dependencies and types for pallets staking, tokens and allowance
gianfra-t Jul 31, 2024
2ab8195
update fixes for asset registry, runtime common
gianfra-t Jul 31, 2024
5187366
amplitude 1.1.0 changes
gianfra-t Jul 31, 2024
f7083ed
updating foucoco, pendulum runtimes
gianfra-t Aug 1, 2024
2a877c2
benchmark fixes for common
gianfra-t Aug 1, 2024
ce6a0af
fixes for runtimes with runtime benchmarks
gianfra-t Aug 5, 2024
fa9124c
node modifications for upgrade
gianfra-t Aug 5, 2024
afa2445
WIP fixing integration tests
gianfra-t Aug 6, 2024
bed37c5
fixed missing default features
gianfra-t Aug 7, 2024
fda5880
WIP fixing std issue
gianfra-t Aug 7, 2024
5ec2769
modification toml pendulum, orml-currencies, amplitude
gianfra-t Aug 7, 2024
34937d3
use serde, log with default features = false
gianfra-t Aug 8, 2024
b394ea5
remove std conditionals on pallets
gianfra-t Aug 8, 2024
c2411a1
fix foucoco default features declaration
gianfra-t Aug 8, 2024
3a1f47a
add trait to sibling currency id
gianfra-t Aug 8, 2024
af01ba6
remove unnecessary trait ConvertMultilocation
gianfra-t Aug 8, 2024
4bbd6b6
remove unnecessary trait ConvertMultilocation in integration tests si…
gianfra-t Aug 8, 2024
8613e59
use start_relay_chain_tasks in node
gianfra-t Aug 8, 2024
9639e19
modifications .toml integration tests
gianfra-t Aug 8, 2024
ad33520
WIP testing comprehensive patch
gianfra-t Aug 12, 2024
f844e6b
fix for integration tests dependencies
gianfra-t Aug 16, 2024
ef2b22f
remove deps of polkadot fellows runtime, solve integration test parac…
gianfra-t Aug 16, 2024
9c0a4bc
adding pallets to sibling chain
gianfra-t Aug 19, 2024
9514f40
compile sibling tests with emulator macros, fixing tests
gianfra-t Aug 19, 2024
b25abc0
fix all pen tests
gianfra-t Aug 19, 2024
b6f121f
fixing amplitude test
gianfra-t Aug 19, 2024
ab11b6f
integration tests stable
gianfra-t Aug 20, 2024
1bd8047
cleanup, solving features issue with pallet parachain system
gianfra-t Aug 20, 2024
00b5a9f
remove .txt files
gianfra-t Aug 21, 2024
4be1e9a
define storage version bump for bounties, staking
gianfra-t Aug 22, 2024
cc7d374
fix pallets mock runtimes
gianfra-t Aug 22, 2024
487b765
add patch to solve missing vrfs dependency and compile with newer nig…
gianfra-t Aug 22, 2024
1f266db
temporary remove flag
gianfra-t Aug 22, 2024
a342d92
allow deprecated flag
gianfra-t Aug 23, 2024
1606c9f
warnings and comment requests
gianfra-t Aug 26, 2024
9a0526a
more unused imports removal
gianfra-t Aug 26, 2024
5be0728
clippy fixes
gianfra-t Aug 26, 2024
2ce46a8
set inherent data provider closure to default
gianfra-t Aug 26, 2024
ccdcca9
add missing flag for eventual try-runtime command
gianfra-t Aug 26, 2024
e03041e
format nightly for latest changes
gianfra-t Aug 27, 2024
6a3f685
Revert "format nightly for latest changes"
gianfra-t Aug 27, 2024
44bbd06
generate weights for dia-oracle pallet
gianfra-t Aug 28, 2024
27dc016
use temporary spacewalk version with dia-oracle fix
gianfra-t Aug 29, 2024
2248cb3
re-introduce non local definition flag for clippy
gianfra-t Aug 29, 2024
57af166
use previous spacewalk revision
gianfra-t Aug 29, 2024
0dfa214
remove temporary dia-oracle fix branch
gianfra-t Aug 29, 2024
a8712ab
remove temp stellar sdk patch
gianfra-t Aug 29, 2024
f51fa62
Readme modification, nightly version used
gianfra-t Sep 3, 2024
422f4c2
clean comments and address review improvements
gianfra-t Sep 3, 2024
07db076
remove unused dependencies and imports
gianfra-t Sep 3, 2024
7f7d823
run fmt nightly
gianfra-t Sep 3, 2024
7f9d96d
move const outside macro definition
gianfra-t Sep 3, 2024
e37f5b2
fix bandersnatch parch url
gianfra-t Sep 10, 2024
79012a1
add benchmarkings (those not failed), modify config to use default we…
gianfra-t Sep 11, 2024
82ec7d3
Revert "add benchmarkings (those not failed), modify config to use de…
gianfra-t Sep 11, 2024
1d49c52
fix benchmark for orml-tokens-management, add benchmark helper script…
gianfra-t Sep 11, 2024
d186500
fix definition of weights in runtimes
gianfra-t Sep 11, 2024
96ba3db
run redeem benchmark after fix for ED
gianfra-t Sep 16, 2024
4e6924c
replace spacewalk rev latest
gianfra-t Sep 17, 2024
a6aecdf
use default values for pallet contracts
gianfra-t Sep 18, 2024
17aef86
Update pallets/vesting-manager/Cargo.toml
gianfra-t Sep 18, 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
Prev Previous commit
Next Next commit
Revert "format nightly for latest changes"
This reverts commit e03041e.
  • Loading branch information
gianfra-t committed Aug 27, 2024
commit 6a3f685e412b09c2fddcc62cb06d92f73f9442f4
4 changes: 2 additions & 2 deletions chain-extensions/price/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ use frame_support::{
pallet_prelude::{Get, PhantomData},
DefaultNoBound,
};
use sp_tracing::{error, trace};
use scale_info::prelude::vec::Vec;
use pallet_contracts::chain_extension::{
ChainExtension, Environment, Ext, InitState, RetVal, SysConfig,
};
use scale_info::prelude::vec::Vec;
use sp_core::crypto::UncheckedFrom;
use sp_runtime::DispatchError;
use sp_tracing::{error, trace};
use sp_weights::Weight;

// Enum that handles all supported function id options for this chain extension module
Expand Down
4 changes: 2 additions & 2 deletions chain-extensions/token/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ use frame_support::{
pallet_prelude::{Decode, Get, PhantomData},
DefaultNoBound,
};
use sp_tracing::{error, trace};
use sp_weights::Weight;
use orml_currencies::WeightInfo;
use orml_currencies_allowance_extension::{
default_weights::WeightInfo as AllowanceWeightInfo, Config as AllowanceConfig,
Expand All @@ -17,8 +19,6 @@ use pallet_contracts::chain_extension::{
};
use sp_core::crypto::UncheckedFrom;
use sp_runtime::DispatchError;
use sp_tracing::{error, trace};
use sp_weights::Weight;
use spacewalk_primitives::CurrencyId;

pub(crate) type BalanceOfForChainExt<T> =
Expand Down
92 changes: 37 additions & 55 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![allow(clippy::default_constructed_unit_structs)]

use crate::constants::{amplitude, foucoco, pendulum};
use core::default::Default;
use cumulus_primitives_core::ParaId;
use frame_benchmarking::__private::sp_std;
use runtime_common::{AccountId, AuraId, Balance, BlockNumber, Signature, UNIT};
Expand All @@ -16,7 +14,9 @@ use sp_runtime::{
traits::{IdentifyAccount, Verify},
FixedPointNumber, FixedU128, Perquintill,
};
use core::default::Default;
use spacewalk_primitives::{oracle::Key, Asset, CurrencyId, CurrencyId::XCM, VaultCurrencyPair};
use crate::constants::{amplitude, foucoco, pendulum};

const MAINNET_USDC_CURRENCY_ID: CurrencyId = pendulum_runtime::GetWrappedCurrencyId::get();
const TESTNET_USDC_CURRENCY_ID: CurrencyId = amplitude_runtime::GetWrappedCurrencyId::get();
Expand Down Expand Up @@ -254,25 +254,25 @@ pub fn foucoco_standalone_config() -> FoucocoChainSpec {
.map(|ss58| AccountId::from_ss58check(ss58).unwrap())
.collect();

let sudo_account = get_account_id_from_seed::<sr25519::Public>("Alice");
let sudo_account = get_account_id_from_seed::<sr25519::Public>("Alice");

let offchain_worker_price_feeder =
AccountId::from_ss58check(foucoco::OFF_CHAIN_WORKER_ADDRESS).unwrap();

let allowed_currencies = vec![
CurrencyId::Native,
CurrencyId::XCM(0),
CurrencyId::XCM(1),
CurrencyId::XCM(2),
CurrencyId::XCM(3),
CurrencyId::XCM(4),
CurrencyId::XCM(5),
CurrencyId::XCM(6),
CurrencyId::XCM(7),
CurrencyId::XCM(8),
CurrencyId::XCM(9),
CurrencyId::XCM(10),
];
CurrencyId::Native,
CurrencyId::XCM(0),
CurrencyId::XCM(1),
CurrencyId::XCM(2),
CurrencyId::XCM(3),
CurrencyId::XCM(4),
CurrencyId::XCM(5),
CurrencyId::XCM(6),
CurrencyId::XCM(7),
CurrencyId::XCM(8),
CurrencyId::XCM(9),
CurrencyId::XCM(10),
];

FoucocoChainSpec::from_genesis(
// Name
Expand Down Expand Up @@ -498,13 +498,10 @@ fn amplitude_genesis(
.expect("WASM binary was not build, please build it!")
.to_vec(),
#[allow(clippy::wrong_self_convention)]
_config: sp_std::marker::PhantomData::default(),
_config: sp_std::marker::PhantomData::default()
},
balances: amplitude_runtime::BalancesConfig { balances },
parachain_info: amplitude_runtime::ParachainInfoConfig {
parachain_id: id,
_config: sp_std::marker::PhantomData::default(),
},
parachain_info: amplitude_runtime::ParachainInfoConfig { parachain_id: id, _config: sp_std::marker::PhantomData::default() },
parachain_staking: amplitude_runtime::ParachainStakingConfig {
stakers,
inflation_config,
Expand All @@ -530,7 +527,7 @@ fn amplitude_genesis(
parachain_system: Default::default(),
polkadot_xcm: amplitude_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
_config: sp_std::marker::PhantomData::default(),
_config: sp_std::marker::PhantomData::default()
},
council: amplitude_runtime::CouncilConfig {
members: signatories.clone(),
Expand Down Expand Up @@ -573,7 +570,7 @@ fn amplitude_genesis(
} else {
amplitude_runtime::StatusCode::Error
},
_phantom: sp_std::marker::PhantomData::default(),
_phantom: sp_std::marker::PhantomData::default()
},
oracle: amplitude_runtime::OracleConfig {
max_delay: u32::MAX,
Expand Down Expand Up @@ -616,10 +613,7 @@ fn amplitude_genesis(
punishment_fee: FixedU128::checked_from_rational(1, 10).unwrap(), // 10%
replace_griefing_collateral: FixedU128::checked_from_rational(1, 10).unwrap(), // 10%
},
nomination: amplitude_runtime::NominationConfig {
is_nomination_enabled: false,
_phantom: sp_std::marker::PhantomData::default(),
},
nomination: amplitude_runtime::NominationConfig { is_nomination_enabled: false, _phantom: sp_std::marker::PhantomData::default() },
dia_oracle_module: amplitude_runtime::DiaOracleModuleConfig {
authorized_accounts: authorized_oracles,
supported_currencies: vec![
Expand All @@ -632,8 +626,8 @@ fn amplitude_genesis(
coin_infos_map: vec![],
},
token_allowance: Default::default(),
transaction_payment: Default::default(),
treasury: Default::default(),
transaction_payment: Default::default(),
treasury: Default::default(),
treasury_buyout_extension: Default::default(),
vesting: Default::default(),
zenlink_protocol: Default::default(),
Expand Down Expand Up @@ -706,13 +700,10 @@ fn foucoco_genesis(
code: foucoco_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
_config: sp_std::marker::PhantomData::default(),
_config: sp_std::marker::PhantomData::default()
},
balances: foucoco_runtime::BalancesConfig { balances },
parachain_info: foucoco_runtime::ParachainInfoConfig {
parachain_id: id,
_config: sp_std::marker::PhantomData::default(),
},
parachain_info: foucoco_runtime::ParachainInfoConfig { parachain_id: id , _config: sp_std::marker::PhantomData::default()},
parachain_staking: foucoco_runtime::ParachainStakingConfig {
stakers,
inflation_config,
Expand All @@ -738,7 +729,7 @@ fn foucoco_genesis(
parachain_system: Default::default(),
polkadot_xcm: foucoco_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(SAFE_XCM_VERSION),
_config: sp_std::marker::PhantomData::default(),
_config: sp_std::marker::PhantomData::default()
},
council: foucoco_runtime::CouncilConfig {
members: signatories.clone(),
Expand Down Expand Up @@ -782,7 +773,7 @@ fn foucoco_genesis(
} else {
foucoco_runtime::StatusCode::Error
},
_phantom: sp_std::marker::PhantomData::default(),
_phantom: sp_std::marker::PhantomData::default()
},
oracle: foucoco_runtime::OracleConfig {
max_delay: 604_800_000, // 7 days
Expand All @@ -792,7 +783,7 @@ fn foucoco_genesis(
Key::ExchangeRate(CurrencyId::Stellar(Asset::StellarNative)),
Key::ExchangeRate(TESTNET_USDC_CURRENCY_ID),
],
_phantom: sp_std::marker::PhantomData::default(),
_phantom: sp_std::marker::PhantomData::default()
},
vault_registry: foucoco_runtime::VaultRegistryConfig {
minimum_collateral_vault: vec![(XCM(0), 0)],
Expand Down Expand Up @@ -837,10 +828,7 @@ fn foucoco_genesis(
punishment_fee: FixedU128::checked_from_rational(1, 10).unwrap(), // 10%
replace_griefing_collateral: FixedU128::checked_from_rational(1, 10).unwrap(), // 10%
},
nomination: foucoco_runtime::NominationConfig {
is_nomination_enabled: false,
_phantom: sp_std::marker::PhantomData::default(),
},
nomination: foucoco_runtime::NominationConfig { is_nomination_enabled: false, _phantom: sp_std::marker::PhantomData::default() },
dia_oracle_module: foucoco_runtime::DiaOracleModuleConfig {
authorized_accounts: authorized_oracles,
supported_currencies: vec![
Expand All @@ -853,8 +841,8 @@ fn foucoco_genesis(
coin_infos_map: vec![],
},
token_allowance: foucoco_runtime::TokenAllowanceConfig { allowed_currencies },
transaction_payment: Default::default(),
treasury: Default::default(),
transaction_payment: Default::default(),
treasury: Default::default(),
treasury_buyout_extension: Default::default(),
vesting: Default::default(),
zenlink_protocol: Default::default(),
Expand Down Expand Up @@ -902,13 +890,10 @@ fn pendulum_genesis(
code: pendulum_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
_config: sp_std::marker::PhantomData::default(),
_config: sp_std::marker::PhantomData::default()
},
balances: pendulum_runtime::BalancesConfig { balances },
parachain_info: pendulum_runtime::ParachainInfoConfig {
parachain_id: id,
_config: sp_std::marker::PhantomData::default(),
},
parachain_info: pendulum_runtime::ParachainInfoConfig { parachain_id: id, _config: sp_std::marker::PhantomData::default() },
parachain_staking: pendulum_runtime::ParachainStakingConfig {
stakers,
inflation_config,
Expand Down Expand Up @@ -980,7 +965,7 @@ fn pendulum_genesis(
Key::ExchangeRate(CurrencyId::XCM(0)),
Key::ExchangeRate(MAINNET_USDC_CURRENCY_ID),
],
_phantom: sp_std::marker::PhantomData::default(),
_phantom: sp_std::marker::PhantomData::default()
},
vault_registry: pendulum_runtime::VaultRegistryConfig {
minimum_collateral_vault: vec![(XCM(0), 0)],
Expand Down Expand Up @@ -1014,10 +999,7 @@ fn pendulum_genesis(
punishment_fee: FixedU128::checked_from_rational(1, 10).unwrap(), // 10%
replace_griefing_collateral: FixedU128::checked_from_rational(1, 10).unwrap(), // 10%
},
nomination: pendulum_runtime::NominationConfig {
is_nomination_enabled: false,
_phantom: sp_std::marker::PhantomData::default(),
},
nomination: pendulum_runtime::NominationConfig { is_nomination_enabled: false, _phantom: sp_std::marker::PhantomData::default() },
dia_oracle_module: pendulum_runtime::DiaOracleModuleConfig {
authorized_accounts: authorized_oracles,
supported_currencies: vec![
Expand All @@ -1030,8 +1012,8 @@ fn pendulum_genesis(
coin_infos_map: vec![],
},
token_allowance: Default::default(),
transaction_payment: Default::default(),
treasury: Default::default(),
transaction_payment: Default::default(),
treasury: Default::default(),
tokens: Default::default(),
treasury_buyout_extension: Default::default(),
}
Expand Down
6 changes: 1 addition & 5 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ impl RelayChainCli {
let extension = crate::chain_spec::ParachainExtensions::try_get(&*para_config.chain_spec);
let chain_id = extension.map(|e| e.relay_chain.clone());
let base_path = para_config.base_path.path().join("polkadot");
Self {
base_path: Some(base_path),
chain_id,
base: clap::Parser::parse_from(relay_chain_args),
}
Self { base_path: Some(base_path), chain_id, base: clap::Parser::parse_from(relay_chain_args) }
}
}
25 changes: 11 additions & 14 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ impl SubstrateCli for Cli {
None => ChainIdentity::from_json_file(id)?.load_chain_spec_from_json_file(id)?,
})
}

}

impl SubstrateCli for RelayChainCli {
Expand Down Expand Up @@ -178,6 +179,7 @@ impl SubstrateCli for RelayChainCli {
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id)
}

}

macro_rules! construct_sync_run {
Expand Down Expand Up @@ -312,10 +314,9 @@ pub fn run() -> Result<()> {
cmd.run(config, polkadot_config)
})
},
Some(Subcommand::ExportGenesisState(cmd)) =>
construct_async_run!(|components, cli, cmd, config| {
Ok(async move { cmd.run(&*config.chain_spec, &*components.client) })
}),
Some(Subcommand::ExportGenesisState(cmd)) => construct_async_run!(|components, cli, cmd, config| {
Ok(async move { cmd.run(&*config.chain_spec, &*components.client) })
}),
Some(Subcommand::ExportGenesisWasm(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|_config| {
Expand All @@ -329,16 +330,12 @@ pub fn run() -> Result<()> {
let runner = cli.create_runner(cmd)?;

match runner.config().chain_spec.identify() {
ChainIdentity::Amplitude => runner.sync_run(|config| {
cmd.run::<Block, <AmplitudeRuntimeExecutor as NativeExecutionDispatch>::ExtendHostFunctions>(config)
}),
ChainIdentity::Foucoco =>
runner.sync_run(|config| {
cmd.run::<Block, <FoucocoRuntimeExecutor as NativeExecutionDispatch>::ExtendHostFunctions>(config)
}),
ChainIdentity::Pendulum => runner.sync_run(|config| {
cmd.run::<Block, <PendulumRuntimeExecutor as NativeExecutionDispatch>::ExtendHostFunctions>(config)
}),
ChainIdentity::Amplitude => runner
.sync_run(|config| cmd.run::<Block, <AmplitudeRuntimeExecutor as NativeExecutionDispatch>::ExtendHostFunctions>(config)),
ChainIdentity::Foucoco => runner
.sync_run(|config| cmd.run::<Block, <FoucocoRuntimeExecutor as NativeExecutionDispatch>::ExtendHostFunctions>(config)),
ChainIdentity::Pendulum => runner
.sync_run(|config| cmd.run::<Block, <PendulumRuntimeExecutor as NativeExecutionDispatch>::ExtendHostFunctions>(config)),
ChainIdentity::FoucocoStandalone => unimplemented!(),
}
} else {
Expand Down
Loading