Rework default values used by the RelayChainCli (#189)

This reworks the default values used by the RelayChainCli for stuff like
the listen port etc.

This also renames all the contracts related stuff to `cumulus-*` to
support `.cargo/config` overrides.
This commit is contained in:
Bastian Köcher
2020-08-10 09:53:07 +02:00
committed by GitHub
parent 2efe482c40
commit 3ed6030110
13 changed files with 265 additions and 325 deletions
@@ -34,9 +34,9 @@ pallet-sudo = { git = "https://github.com/paritytech/substrate", default-feature
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "rococo-branch" }
# In-Tree Fork of seal that does not use child trie nor storage transactions
pallet-contracts = { path = "../pallets/contracts", default-features = false }
pallet-contracts-primitives = { path = "../pallets/contracts/common", default-features = false }
pallet-contracts-rpc-runtime-api = { path = "../pallets/contracts/rpc/runtime-api", default-features = false }
cumulus-pallet-contracts = { path = "../pallets/contracts", default-features = false }
cumulus-pallet-contracts-primitives = { path = "../pallets/contracts/common", default-features = false }
cumulus-pallet-contracts-rpc-runtime-api = { path = "../pallets/contracts/rpc/runtime-api", default-features = false }
# Cumulus dependencies
cumulus-runtime = { path = "../../runtime", default-features = false }
@@ -71,9 +71,9 @@ std = [
"frame-executive/std",
"frame-system/std",
"pallet-balances/std",
"pallet-contracts/std",
"pallet-contracts-primitives/std",
"pallet-contracts-rpc-runtime-api/std",
"cumulus-pallet-contracts/std",
"cumulus-pallet-contracts-primitives/std",
"cumulus-pallet-contracts-rpc-runtime-api/std",
"pallet-randomness-collective-flip/std",
"pallet-timestamp/std",
"pallet-sudo/std",
@@ -22,7 +22,7 @@
#[cfg(feature = "std")]
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
use pallet_contracts_rpc_runtime_api::ContractExecResult;
use cumulus_pallet_contracts_rpc_runtime_api::ContractExecResult;
use sp_api::impl_runtime_apis;
use sp_core::OpaqueMetadata;
use sp_runtime::{
@@ -269,23 +269,23 @@ parameter_types! {
pub const SurchargeReward: Balance = 0;
}
impl pallet_contracts::Trait for Runtime {
impl cumulus_pallet_contracts::Trait for Runtime {
type Time = Timestamp;
type Randomness = RandomnessCollectiveFlip;
type Currency = Balances;
type Call = Call;
type Event = Event;
type DetermineContractAddress = pallet_contracts::SimpleAddressDeterminer<Runtime>;
type TrieIdGenerator = pallet_contracts::TrieIdFromParentCounter<Runtime>;
type DetermineContractAddress = cumulus_pallet_contracts::SimpleAddressDeterminer<Runtime>;
type TrieIdGenerator = cumulus_pallet_contracts::TrieIdFromParentCounter<Runtime>;
type RentPayment = ();
type SignedClaimHandicap = pallet_contracts::DefaultSignedClaimHandicap;
type SignedClaimHandicap = cumulus_pallet_contracts::DefaultSignedClaimHandicap;
type TombstoneDeposit = TombstoneDeposit;
type StorageSizeOffset = pallet_contracts::DefaultStorageSizeOffset;
type StorageSizeOffset = cumulus_pallet_contracts::DefaultStorageSizeOffset;
type RentByteFee = RentByteFee;
type RentDepositOffset = RentDepositOffset;
type SurchargeReward = SurchargeReward;
type MaxDepth = pallet_contracts::DefaultMaxDepth;
type MaxValueSize = pallet_contracts::DefaultMaxValueSize;
type MaxDepth = cumulus_pallet_contracts::DefaultMaxDepth;
type MaxValueSize = cumulus_pallet_contracts::DefaultMaxValueSize;
type WeightPrice = pallet_transaction_payment::Module<Self>;
}
@@ -298,7 +298,7 @@ construct_runtime! {
System: frame_system::{Module, Call, Storage, Config, Event<T>},
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
Contracts: pallet_contracts::{Module, Call, Config, Storage, Event<T>},
Contracts: cumulus_pallet_contracts::{Module, Call, Config, Storage, Event<T>},
Sudo: pallet_sudo::{Module, Call, Storage, Config<T>, Event<T>},
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
ParachainUpgrade: cumulus_parachain_upgrade::{Module, Call, Storage, Inherent, Event},
@@ -413,7 +413,7 @@ impl_runtime_apis! {
}
}
impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber>
impl cumulus_pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber>
for Runtime
{
fn call(
@@ -438,13 +438,13 @@ impl_runtime_apis! {
fn get_storage(
address: AccountId,
key: [u8; 32],
) -> pallet_contracts_primitives::GetStorageResult {
) -> cumulus_pallet_contracts_primitives::GetStorageResult {
Contracts::get_storage(address, key)
}
fn rent_projection(
address: AccountId,
) -> pallet_contracts_primitives::RentProjectionResult<BlockNumber> {
) -> cumulus_pallet_contracts_primitives::RentProjectionResult<BlockNumber> {
Contracts::rent_projection(address)
}
}