Skip to content

Commit 954c503

Browse files
authored
🔖 Release Polimec 1.1.0 (#481)
This pull request includes updates to the versioning of the Polimec project, reflecting improvements or changes in the runtime and overall project release. The most important changes are: ### Versioning Updates: * [`Cargo.toml`](diffhunk://#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542L34-R34): Updated the project version from `1.0.0` to `1.1.0`, indicating a new release with potentially significant updates or improvements. * [`runtimes/polimec/src/lib.rs`](diffhunk://#diff-fa44a5ad015c5d189a690374b9164d3a58b7218228b56c151327dd62d143ee1bL245-R248): Incremented the `spec_version` from `1_000_000` to `1_001_000` and the `transaction_version` from `7` to `8` in the `RuntimeVersion` definition, signaling updates to the runtime specifications and transaction logic.
1 parent d61ebb7 commit 954c503

File tree

10 files changed

+53
-51
lines changed

10 files changed

+53
-51
lines changed

Cargo.lock

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ homepage = "https://www.polimec.org/"
3131
license-file = "LICENSE"
3232
readme = "README.md"
3333
repository = "https://github.com/Polimec/polimec-node"
34-
version = "1.0.0"
34+
version = "1.1.0"
3535

3636
[profile.release]
3737
# Substrate runtime requires unwinding.

integration-tests/Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ std = [
139139
"polkadot-parachain-primitives/std",
140140
"polkadot-primitives/std",
141141
"polkadot-runtime-parachains/std",
142-
"westend-runtime-constants/std",
143-
"westend-runtime/std",
144142
"scale-info/std",
145143
"serde/std",
146144
"sp-arithmetic/std",
@@ -151,13 +149,16 @@ std = [
151149
"sp-core/std",
152150
"sp-io/std",
153151
"sp-runtime/std",
152+
"westend-runtime-constants/std",
153+
"westend-runtime/std",
154154
"xcm-builder/std",
155155
"xcm-executor/std",
156156
"xcm-runtime-apis/std",
157157
"xcm/std",
158158
]
159159
development-settings = [ "polimec-runtime/development-settings" ]
160160
runtime-benchmarks = [
161+
"asset-hub-westend-runtime/runtime-benchmarks",
161162
"assets-common/runtime-benchmarks",
162163
"cumulus-pallet-parachain-system/runtime-benchmarks",
163164
"cumulus-primitives-core/runtime-benchmarks",
@@ -193,9 +194,10 @@ runtime-benchmarks = [
193194
"polkadot-primitives/runtime-benchmarks",
194195
"polkadot-runtime-parachains/runtime-benchmarks",
195196
"polkadot-service/runtime-benchmarks",
196-
"westend-runtime/runtime-benchmarks",
197197
"sp-runtime/runtime-benchmarks",
198+
"westend-runtime/runtime-benchmarks",
198199
"xcm-builder/runtime-benchmarks",
199200
"xcm-executor/runtime-benchmarks",
200201
"xcm-runtime-apis/runtime-benchmarks",
201202
]
203+

integration-tests/src/tests/evaluator_slash_sideffects.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ fn evaluator_slash_reduces_vesting_schedules() {
116116
assert_eq!(ProjectStatus::FundingFailed, inst.go_to_next_state(project_id));
117117
assert_eq!(ProjectStatus::SettlementStarted(FundingOutcome::Failure), inst.go_to_next_state(project_id));
118118

119-
const END_BLOCK: u32 = 18;
119+
const END_BLOCK: u32 = 19;
120120
assert_eq!(inst.current_block(), BlockNumberFor::<PolimecRuntime>::from(END_BLOCK));
121121

122122
// All schedules start at block 5, and funding ended at block 18
123-
const TIME_PASSED: u128 = 13u128;
123+
const TIME_PASSED: u128 = 14u128;
124124

125125
let alice_account_data = Account::<PolimecRuntime>::get(&alice.clone()).data;
126126
assert_eq!(

integration-tests/src/tests/transact.rs

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
extern crate alloc;
2-
use alloc::sync::Arc;
3-
41
use crate::{
52
asset_hub, polimec, AssetHubEvent, AssetHubOrigin, AssetHubRuntime, AssetHubWestendNet, AssetHubXcmPallet,
63
PolimecAccountId, PolimecEvent, PolimecNet, PolimecRuntime, ALICE,
7-
}; // Make sure ALICE and BOB are pub in accounts
4+
};
85
use parity_scale_codec::Encode;
96
use sp_runtime::traits::Hash;
10-
use xcm::{v4::prelude::*, DoubleEncoded};
7+
use xcm::{v4::prelude::*, DoubleEncoded, VersionedLocation, VersionedXcm};
118
use xcm_emulator::{Chain, ConvertLocation, TestExt};
129

1310
fn polimec_location() -> Location {
@@ -28,14 +25,10 @@ fn transact_from_asset_hub_to_polimec_works() {
2825

2926
AssetHubXcmPallet::send(
3027
AssetHubOrigin::signed(AssetHubWestendNet::account_id_of(ALICE)),
31-
Box::new(xcm::VersionedLocation::V4(polimec_location())),
32-
Box::new(xcm::VersionedXcm::V4(Xcm(vec![
28+
Box::new(VersionedLocation::V4(polimec_location())),
29+
Box::new(VersionedXcm::V4(Xcm(vec![
3330
Instruction::BuyExecution {
34-
fees: Asset {
35-
id: Location { parents: 1, interior: Here.into() }.into(),
36-
fun: Fungibility::Fungible(1_000_000_000),
37-
}
38-
.into(),
31+
fees: Asset { id: Location::parent().into(), fun: Fungibility::Fungible(1_000_000_000) }.into(),
3932
weight_limit: WeightLimit::Unlimited,
4033
},
4134
Instruction::Transact {
@@ -66,12 +59,11 @@ fn transact_from_asset_hub_to_polimec_works() {
6659
let sender_sovereign_account: PolimecAccountId =
6760
polimec_runtime::xcm_config::LocationToAccountId::convert_location(&Location {
6861
parents: 1,
69-
interior: Junctions::X2(Arc::new([
70-
Parachain(asset_hub::PARA_ID),
71-
AccountId32 { network: None, id: alice_westend.encode()[..].try_into().unwrap() },
72-
])),
62+
interior: Junctions::X2(
63+
[Parachain(asset_hub::PARA_ID), AccountId32 { network: None, id: alice_westend.into() }].into(),
64+
),
7365
})
74-
.expect("Failed to convert location to account id");
66+
.expect("Failed to convert Location to AccountId32");
7567

7668
let expected_hash = <AssetHubRuntime as frame_system::Config>::Hashing::hash(&MESSAGE);
7769

@@ -84,6 +76,6 @@ fn transact_from_asset_hub_to_polimec_works() {
8476
)
8577
});
8678

87-
assert!(contains_remark, "Expected a remark event in PolimecNet events");
79+
assert!(contains_remark, "Expected a remark event in Polimec events");
8880
});
8981
}

pallets/funding/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,6 @@ try-runtime = [
128128
"polimec-common-test-utils?/try-runtime",
129129
"polimec-common/try-runtime",
130130
"sp-runtime/try-runtime",
131+
"on-slash-vesting/try-runtime"
131132
]
132133
on-chain-release-build = []

pallets/funding/src/functions/3_auction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ impl<T: Config> Pallet<T> {
175175
};
176176

177177
Self::bond_plmc_with_mode(&bidder, project_id, plmc_bond, mode, funding_asset)?;
178-
Self::try_funding_asset_hold(&bidder, project_id, funding_asset_amount_locked, funding_asset.id().into())?;
178+
Self::try_funding_asset_hold(&bidder, project_id, funding_asset_amount_locked, funding_asset.id())?;
179179

180180
Bids::<T>::insert(project_id, bid_id, &new_bid);
181181
NextBidId::<T>::set(bid_id.saturating_add(One::one()));

pallets/on-slash-vesting/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,10 @@ runtime-benchmarks = [
4747
"pallet-vesting/runtime-benchmarks",
4848
"sp-runtime/runtime-benchmarks",
4949
]
50+
try-runtime = [
51+
"frame-support/try-runtime",
52+
"frame-system/try-runtime",
53+
"pallet-balances/try-runtime",
54+
"pallet-vesting/try-runtime",
55+
"sp-runtime/try-runtime"
56+
]

runtimes/polimec/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
242242
spec_name: Cow::Borrowed("polimec-mainnet"),
243243
impl_name: Cow::Borrowed("polimec-mainnet"),
244244
authoring_version: 1,
245-
spec_version: 1_000_000,
245+
spec_version: 1_001_000,
246246
impl_version: 0,
247247
apis: RUNTIME_API_VERSIONS,
248-
transaction_version: 7,
248+
transaction_version: 8,
249249
system_version: 1,
250250
};
251251

@@ -906,7 +906,7 @@ where
906906
let signature = raw_payload.using_encoded(|payload| C::sign(payload, public))?;
907907
let (call, extra, _) = raw_payload.deconstruct();
908908
let address = <Runtime as frame_system::Config>::Lookup::unlookup(account);
909-
let transaction = generic::UncheckedExtrinsic::new_signed(call, address, signature, extra).into();
909+
let transaction = generic::UncheckedExtrinsic::new_signed(call, address, signature, extra);
910910

911911
Some(transaction)
912912
}

runtimes/polimec/src/xcm_config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ pub type Barrier = TrailingSetTopicAsId<
266266
DenyReserveTransferToRelayChain,
267267
(
268268
TakeWeightCredit,
269+
// Allow DescendOrigin(AccountId32) from Asset Hub
269270
AllowPaidDescendFromAssetHub,
270271
// Expected responses are OK.
271272
AllowKnownQueryResponses<PolkadotXcm>,
@@ -371,7 +372,6 @@ pub type XcmRouter = (
371372

372373
impl pallet_xcm::Config for Runtime {
373374
type AdminOrigin = EnsureRoot<AccountId>;
374-
// ^ Override for AdvertisedXcmVersion default
375375
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
376376
type Currency = Balances;
377377
type CurrencyMatcher = ();
@@ -391,7 +391,7 @@ impl pallet_xcm::Config for Runtime {
391391
type WeightInfo = crate::weights::pallet_xcm::WeightInfo<Runtime>;
392392
type XcmExecuteFilter = Everything;
393393
type XcmExecutor = XcmExecutor<XcmConfig>;
394-
// We only allow reserve based transfers of AssetHub reserve assets back to AssetHub.
394+
// We only allow reserve based transfers of Asset Hub reserve assets back to Asset Hub.
395395
type XcmReserveTransferFilter = AssetHubAssetsAsReserve;
396396
type XcmRouter = XcmRouter;
397397
// We allow teleportation of PLMC to Polkadot Asset Hub.

0 commit comments

Comments
 (0)