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

feat: Upgrade to polkadot v0.9.37 #61

Merged
merged 1 commit into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2,042 changes: 1,385 additions & 657 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions access-segregator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ codec = { package = "parity-scale-codec", version = "3.0", default-features = fa
scale-info = { version = "2.0", default-features = false, features = ["derive", "serde", "decode"] }

# Substrate
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false }

[dev-dependencies]
# Substrate
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }

[features]
default = ["std"]
Expand Down
1 change: 1 addition & 0 deletions access-segregator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub mod pallet {
#[pallet::call]
impl<T: Config> Pallet<T> {
/// Grants access to an account for a extrinsic.
#[pallet::call_index(0)]
#[pallet::weight(195_000_000)]
pub fn grant_access(
origin: OriginFor<T>,
Expand Down
22 changes: 11 additions & 11 deletions basic-fee-handler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ codec = { package = "parity-scale-codec", version = "3.0", default-features = fa
scale-info = { version = "2.0", default-features = false, features = ["derive", "serde", "decode"] }

# Substrate
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false }

# Polkadot
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33", default-features = false }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33", default-features = false }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }

# Local
sygma-traits = { path = "../traits", default-features = false }
sygma-access-segregator = { path = "../access-segregator", default-features = false }

[dev-dependencies]
# Substrate
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }

[features]
default = ["std"]
Expand Down
1 change: 1 addition & 0 deletions basic-fee-handler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ pub mod pallet {
#[pallet::call]
impl<T: Config> Pallet<T> {
/// Set bridge fee for a specific asset
#[pallet::call_index(0)]
#[pallet::weight(195_000_000)]
pub fn set_fee(
origin: OriginFor<T>,
Expand Down
7 changes: 6 additions & 1 deletion basic-fee-handler/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ impl pallet_assets::Config for Test {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type AssetId = u32;
type AssetIdParameter = codec::Compact<u32>;
type Currency = Balances;
type CreateOrigin = AsEnsureOriginWithArg<EnsureSigned<AccountId32>>;
type ForceOrigin = frame_system::EnsureRoot<Self::AccountId>;
Expand All @@ -110,9 +111,13 @@ impl pallet_assets::Config for Test {
type MetadataDepositPerByte = MetadataDepositPerByte;
type ApprovalDeposit = ApprovalDeposit;
type StringLimit = AssetsStringLimit;
type RemoveItemsLimit = ConstU32<1000>;
type Freezer = ();
type Extra = ();
type WeightInfo = ();
type CallbackHandle = ();
type WeightInfo = pallet_assets::weights::SubstrateWeight<Test>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
}

parameter_types! {
Expand Down
52 changes: 26 additions & 26 deletions bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ funty = { version = "3.0.0-rc1", default-features = false }
hex = {version = "0.4.3", default-features = false, features = ["alloc"] }

# Substrate
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false, optional = true }
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false, optional = true }
sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }

# Polkadot
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33", default-features = false }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33", default-features = false }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33", default-features = false }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }

sygma-traits = { path = "../traits", default-features = false }
sygma-access-segregator = { path = "../access-segregator", default-features = false }
Expand All @@ -39,21 +39,21 @@ assert_matches = "1.4.0"
hex-literal = "0.3"

# Substrate
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }

# Polkadot
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33"}
parachains-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.33" }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37" }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37"}
parachains-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }

sygma-basic-feehandler = { path = "../basic-fee-handler" }
sygma-traits = { path = "../traits" }
Expand Down
15 changes: 14 additions & 1 deletion bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ pub mod pallet {
{
/// Pause bridge, this would lead to bridge transfer failure before it being unpaused.
#[pallet::weight(195_000_000)]
#[pallet::call_index(0)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see now we have this call_index annotation in v0.9.37, is it a mandatory annotation for each extrinsic now from this version? I remember that when we worked on the access grant feature, we used to define a number for each extrinsic, then we decided to use a more readable and maintainable name, is this annotation related to that number?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is used to identify the extrinsic. We were planning to use the index but we thought the index may change. I have short discuss with parity team when they implement this function, suggested to add name too but they don't think runtime should care about the name, see here

pub fn pause_bridge(origin: OriginFor<T>, dest_domain_id: DomainID) -> DispatchResult {
if <T as Config>::BridgeCommitteeOrigin::ensure_origin(origin.clone()).is_err() {
// Ensure bridge committee or the account that has permission to pause bridge
Expand Down Expand Up @@ -271,6 +272,7 @@ pub mod pallet {

/// Unpause bridge.
#[pallet::weight(195_000_000)]
#[pallet::call_index(1)]
pub fn unpause_bridge(origin: OriginFor<T>, dest_domain_id: DomainID) -> DispatchResult {
if <T as Config>::BridgeCommitteeOrigin::ensure_origin(origin.clone()).is_err() {
// Ensure bridge committee or the account that has permission to unpause bridge
Expand Down Expand Up @@ -302,6 +304,7 @@ pub mod pallet {

/// Mark an ECDSA address as a MPC account.
#[pallet::weight(195_000_000)]
#[pallet::call_index(2)]
pub fn set_mpc_address(origin: OriginFor<T>, addr: MpcAddress) -> DispatchResult {
if <T as Config>::BridgeCommitteeOrigin::ensure_origin(origin.clone()).is_err() {
// Ensure bridge committee or the account that has permission to set mpc address
Expand All @@ -325,6 +328,7 @@ pub mod pallet {

/// Mark the give dest domainID with chainID to be enabled
#[pallet::weight(195_000_000)]
#[pallet::call_index(3)]
pub fn register_domain(
origin: OriginFor<T>,
dest_domain_id: DomainID,
Expand Down Expand Up @@ -362,6 +366,7 @@ pub mod pallet {

/// Mark the give dest domainID with chainID to be disabled
#[pallet::weight(195_000_000)]
#[pallet::call_index(4)]
pub fn unregister_domain(
origin: OriginFor<T>,
dest_domain_id: DomainID,
Expand Down Expand Up @@ -409,6 +414,7 @@ pub mod pallet {
/// Initiates a transfer.
#[pallet::weight(195_000_000)]
#[transactional]
#[pallet::call_index(5)]
pub fn deposit(
origin: OriginFor<T>,
asset: MultiAsset,
Expand Down Expand Up @@ -491,6 +497,7 @@ pub mod pallet {
/// This method is used to trigger the process for retrying failed deposits on the MPC side.
#[pallet::weight(195_000_000)]
#[transactional]
#[pallet::call_index(6)]
pub fn retry(
origin: OriginFor<T>,
deposit_on_block_height: u128,
Expand All @@ -515,6 +522,7 @@ pub mod pallet {
/// Executes a batch of deposit proposals (only if signature is signed by MPC).
#[pallet::weight(195_000_000)]
#[transactional]
#[pallet::call_index(7)]
pub fn execute_proposal(
_origin: OriginFor<T>,
proposals: Vec<Proposal>,
Expand Down Expand Up @@ -1200,7 +1208,12 @@ pub mod pallet {
>>::create(UsdcAssetId::get(), ASSET_OWNER, true, 1,));

// Mint some USDC to ALICE for test
assert_ok!(Assets::mint(Origin::signed(ASSET_OWNER), 0, ALICE, ENDOWED_BALANCE,));
assert_ok!(Assets::mint(
Origin::signed(ASSET_OWNER),
codec::Compact(0),
ALICE,
ENDOWED_BALANCE,
));
assert_eq!(Assets::balance(UsdcAssetId::get(), &ALICE), ENDOWED_BALANCE);

assert_ok!(SygmaBridge::deposit(
Expand Down
7 changes: 6 additions & 1 deletion bridge/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ impl pallet_assets::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type AssetId = AssetId;
type AssetIdParameter = codec::Compact<u32>;
type Currency = Balances;
type CreateOrigin = AsEnsureOriginWithArg<EnsureSigned<AccountId32>>;
type ForceOrigin = frame_system::EnsureRoot<Self::AccountId>;
Expand All @@ -133,9 +134,13 @@ impl pallet_assets::Config for Runtime {
type MetadataDepositPerByte = MetadataDepositPerByte;
type ApprovalDeposit = ApprovalDeposit;
type StringLimit = AssetsStringLimit;
type RemoveItemsLimit = ConstU32<1000>;
type Freezer = ();
type Extra = ();
type WeightInfo = ();
type CallbackHandle = ();
type WeightInfo = pallet_assets::weights::SubstrateWeight<Runtime>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
}

impl pallet_timestamp::Config for Runtime {
Expand Down
22 changes: 11 additions & 11 deletions fee-handler-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ codec = { package = "parity-scale-codec", version = "3.0", default-features = fa
scale-info = { version = "2.0", default-features = false, features = ["derive", "serde", "decode"] }

# Substrate
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.33", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37", default-features = false }
sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.37", default-features = false }

# Polkadot
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33", default-features = false }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.33", default-features = false }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }

# Local
sygma-traits = { path = "../traits", default-features = false }
Expand All @@ -24,12 +24,12 @@ sygma-access-segregator = { path = "../access-segregator", default-features = fa

[dev-dependencies]
# Substrate
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.33" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }

sygma-access-segregator = { path = "../access-segregator" }
sygma-basic-feehandler = { path = "../basic-fee-handler" }
Expand Down
1 change: 1 addition & 0 deletions fee-handler-router/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pub mod pallet {
impl<T: Config> Pallet<T> {
/// Set fee handler specific (domain, asset) pair
#[pallet::weight(195_000_000)]
#[pallet::call_index(0)]
pub fn set_fee_handler(
origin: OriginFor<T>,
domain: DomainID,
Expand Down
7 changes: 6 additions & 1 deletion fee-handler-router/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ impl pallet_assets::Config for Test {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type AssetId = u32;
type AssetIdParameter = codec::Compact<u32>;
type Currency = Balances;
type CreateOrigin = AsEnsureOriginWithArg<EnsureSigned<AccountId32>>;
type ForceOrigin = frame_system::EnsureRoot<Self::AccountId>;
Expand All @@ -113,9 +114,13 @@ impl pallet_assets::Config for Test {
type MetadataDepositPerByte = MetadataDepositPerByte;
type ApprovalDeposit = ApprovalDeposit;
type StringLimit = AssetsStringLimit;
type RemoveItemsLimit = ConstU32<1000>;
type Freezer = ();
type Extra = ();
type WeightInfo = ();
type CallbackHandle = ();
type WeightInfo = pallet_assets::weights::SubstrateWeight<Test>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
}

parameter_types! {
Expand Down
Loading