Skip to content

Commit

Permalink
Merge release-v0.3.11 into main (#1071)
Browse files Browse the repository at this point in the history
* Update versions (#1063)

* Fix try-runtime makefile targets (#1065)

* Fix parachain-staking benchmarks (#1066)

* Fix fee tests (#1070)

* Update weights (#1068)
  • Loading branch information
sea212 committed Aug 8, 2023
1 parent d67ae38 commit 7a2e5cb
Show file tree
Hide file tree
Showing 58 changed files with 1,813 additions and 2,049 deletions.
46 changes: 23 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ pallet-author-slot-filter = { git = "https://github.com/zeitgeistpm/nimbus", bra
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37", default-features = false }

# Moonbeam (client)
moonbeam-vrf = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.37-use-paritytech-dependencies" }
moonbeam-vrf = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.37-use-paritytech-dependencies-bench-fix" }

# Moonbeam (wasm)
pallet-author-mapping = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.37-use-paritytech-dependencies", default-features = false }
pallet-parachain-staking = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.37-use-paritytech-dependencies", default-features = false }
session-keys-primitives = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.37-use-paritytech-dependencies", default-features = false }
pallet-author-mapping = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.37-use-paritytech-dependencies-bench-fix", default-features = false }
pallet-parachain-staking = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.37-use-paritytech-dependencies-bench-fix", default-features = false }
session-keys-primitives = { git = "https://github.com/zeitgeistpm/moonbeam", branch = "polkadot-v0.9.37-use-paritytech-dependencies-bench-fix", default-features = false }

# ORML (wasm)
orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.37", default-features = false }
Expand Down
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,26 @@ check-dummy:
--bin=zeitgeist \
--features=parachain,try-runtime \
try-runtime \
--execution=Native \
--chain=${TRYRUNTIME_CHAIN} \
--no-spec-check-panic \
--runtime=${RUNTIME_PATH} \
on-runtime-upgrade \
--checks=all \
live \
--uri=${TRYRUNTIME_URL}

try-runtime-upgrade-battery-station:
@$(MAKE) TRYRUNTIME_CHAIN="battery_station_staging" TRYRUNTIME_URL="wss://bsr.zeitgeist.pm:443" -- --try-runtime
@$(MAKE) TRYRUNTIME_CHAIN="battery_station_staging" \
TRYRUNTIME_URL="wss://bsr.zeitgeist.pm:443" \
RUNTIME_PATH="./target/debug/wbuild/battery-station-runtime/battery_station_runtime.compact.compressed.wasm" \
-- \
--try-runtime

try-runtime-upgrade-zeitgeist:
@$(MAKE) TRYRUNTIME_CHAIN="zeitgeist_staging" TRYRUNTIME_URL="wss://zeitgeist-rpc.dwellir.com:443" -- --try-runtime
@$(MAKE) TRYRUNTIME_CHAIN="zeitgeist_staging" \
TRYRUNTIME_URL="wss://zeitgeist-rpc.dwellir.com:443" \
RUNTIME_PATH="./target/debug/wbuild/zeitgeist-runtime/zeitgeist_runtime.compact.compressed.wasm" \
-- \
--try-runtime

build:
SKIP_WASM_BUILD= cargo build
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog_for_devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ APIs/RPC interface.
### Changed

- ⚠️ All tokens now use 10 fractional decimal places.
- cross-consensus messages (XCM) assume the global canonical representation for token balances.
- Cross-consensus messages (XCM) assume the global canonical representation for token balances.
- The token metadata in the asset registry now assumes that the existential deposit and fee factor
are stored in base 10,000,000,000.

Expand Down
2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ description = "An evolving blockchain for prediction markets and futarchy."
edition = "2021"
homepage = "https://zeitgeist.pm"
name = "zeitgeist-node"
version = "0.3.10"
version = "0.3.11"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
2 changes: 1 addition & 1 deletion node/src/chain_spec/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub fn dev_config() -> Result<BatteryStationChainSpec, String> {
nominations: vec![],
parachain_bond_reserve_percent: DefaultParachainBondReservePercent::get(),
parachain_id: crate::BATTERY_STATION_PARACHAIN_ID.into(),
num_selected_candidates: 1,
num_selected_candidates: 8,
},
#[cfg(not(feature = "parachain"))]
AdditionalChainSpec {
Expand Down
2 changes: 1 addition & 1 deletion primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ with-global-disputes = []
authors = ["Zeitgeist PM <contact@zeitgeist.pm>"]
edition = "2021"
name = "zeitgeist-primitives"
version = "0.3.10"
version = "0.3.11"
2 changes: 1 addition & 1 deletion runtime/battery-station/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ with-global-disputes = [
authors = ["Zeitgeist PM <contact@zeitgeist.pm>"]
edition = "2021"
name = "battery-station-runtime"
version = "0.3.10"
version = "0.3.11"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use orml_traits::MultiCurrency;
use xcm::latest::{Junction, Junction::*, Junctions::*, MultiLocation, NetworkId};
use xcm_emulator::{Limited, TestExt};
use zeitgeist_primitives::{
constants::BalanceFractionalDecimals,
constants::{BalanceFractionalDecimals, BASE},
types::{CustomMetadata, XcmMetadata},
};

Expand Down Expand Up @@ -87,9 +87,6 @@ fn transfer_ztg_to_sibling() {
// Verify that BOB now has (amount transferred - fee)
assert_eq!(current_balance, transfer_amount - ztg_fee());

// Sanity check for the actual amount BOB ends up with
assert_eq!(current_balance, 49_907_304_000);

// Verify that fees (of foreign currency) have been put into treasury
assert_eq!(
Tokens::free_balance(FOREIGN_ZTG_ID, &ZeitgeistTreasuryAccount::get()),
Expand Down Expand Up @@ -352,7 +349,7 @@ fn transfer_roc_to_relay_chain() {
});

RococoNet::execute_with(|| {
assert_eq!(rococo_runtime::Balances::free_balance(&BOB), 999_988_806_429);
assert_eq!(rococo_runtime::Balances::free_balance(&BOB), 999_988_690_728);
});
}

Expand Down Expand Up @@ -419,10 +416,7 @@ fn transfer_ztg_to_sibling_with_custom_fee() {
let custom_fee = calc_fee(default_per_second(10) * 10);

// Verify that BOB now has (amount transferred - fee)
assert_eq!(current_balance, transfer_amount - custom_fee);

// Sanity check for the actual amount BOB ends up with
assert_eq!(current_balance, 49_073_040_000);
assert_eq!(current_balance, transfer_amount - ztg_fee() * fee_factor / BASE);

// Verify that fees (of foreign currency) have been put into treasury
assert_eq!(
Expand All @@ -434,8 +428,8 @@ fn transfer_ztg_to_sibling_with_custom_fee() {

#[test]
fn test_total_fee() {
assert_eq!(ztg_fee(), 92_696_000);
assert_eq!(roc_fee(), 9_269_600_000);
assert_eq!(ztg_fee(), 80_824_000);
assert_eq!(roc_fee(), 8_082_400_000);
}

#[inline]
Expand Down
4 changes: 2 additions & 2 deletions runtime/battery-station/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("zeitgeist"),
impl_name: create_runtime_str!("zeitgeist"),
authoring_version: 1,
spec_version: 47,
spec_version: 48,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 22,
transaction_version: 23,
state_version: 1,
};

Expand Down
2 changes: 1 addition & 1 deletion runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ with-global-disputes = []
authors = ["Zeitgeist PM <contact@zeitgeist.pm>"]
edition = "2021"
name = "common-runtime"
version = "0.3.10"
version = "0.3.11"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
6 changes: 3 additions & 3 deletions runtime/common/src/weights/cumulus_pallet_xcmp_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//! Autogenerated weights for cumulus_pallet_xcmp_queue
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-07-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-08-04, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("dev"), DB CACHE: 1024

// Executed Command:
Expand Down Expand Up @@ -51,13 +51,13 @@ pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::weights::WeightInfo for WeightInfo<T> {
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_u32() -> Weight {
Weight::from_ref_time(12_761_000)
Weight::from_ref_time(16_530_000)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
// Storage: XcmpQueue QueueConfig (r:1 w:1)
fn set_config_with_weight() -> Weight {
Weight::from_ref_time(14_000_000)
Weight::from_ref_time(13_770_000)
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}
Expand Down
Loading

0 comments on commit 7a2e5cb

Please sign in to comment.