Skip to content

Commit

Permalink
Astar upgrade for ds re-launch (#608)
Browse files Browse the repository at this point in the history
Rebase & update astar params

Add precompiles, version bump, unbonding-period change

Use git branch for dep

Update deps

Expose try-runtime access

Spec version uplift

Fix benchmark issues

tag-usage for dapps-staking pallets

Adjust params as agreed on Slack

Fix int type
  • Loading branch information
Dinonard authored Apr 12, 2022
1 parent b96d3f8 commit 9f204f1
Show file tree
Hide file tree
Showing 10 changed files with 309 additions and 109 deletions.
104 changes: 75 additions & 29 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion bin/collator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "astar-collator"
version = "3.18.0"
version = "3.19.0"
authors = ["Stake Technologies <[email protected]>"]
description = "Astar collator implementation in Rust."
build = "build.rs"
Expand Down
20 changes: 17 additions & 3 deletions bin/collator/src/parachain/chain_spec/astar.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
//! Astar chain specifications.
use astar_runtime::{
wasm_binary_unwrap, AccountId, AuraId, Balance, BaseFeeConfig, EVMConfig, ParachainInfoConfig,
Precompiles, Signature, SystemConfig, ASTR,
wasm_binary_unwrap, AccountId, AuraId, Balance, BaseFeeConfig, BlockRewardConfig, EVMConfig,
ParachainInfoConfig, Precompiles, Signature, SystemConfig, ASTR,
};
use cumulus_primitives_core::ParaId;
use sc_service::ChainType;
use sp_core::{crypto::Ss58Codec, sr25519, Pair, Public};
use sp_runtime::traits::{IdentifyAccount, Verify};
use sp_runtime::{
traits::{IdentifyAccount, Verify},
Perbill,
};

use super::{get_from_seed, Extensions};

Expand Down Expand Up @@ -126,6 +129,17 @@ fn make_genesis(
},
parachain_info: ParachainInfoConfig { parachain_id },
balances: astar_runtime::BalancesConfig { balances },
block_reward: BlockRewardConfig {
// Make sure sum is 100
reward_config: pallet_block_reward::RewardDistributionConfig {
base_treasury_percent: Perbill::from_percent(10),
base_staker_percent: Perbill::from_percent(20),
dapps_percent: Perbill::from_percent(20),
collators_percent: Perbill::from_percent(5),
adjustable_percent: Perbill::from_percent(45),
ideal_dapps_staking_tvl: Perbill::from_percent(40),
},
},
vesting: astar_runtime::VestingConfig { vesting: vec![] },
session: astar_runtime::SessionConfig {
keys: authorities
Expand Down
33 changes: 30 additions & 3 deletions runtime/astar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "astar-runtime"
version = "3.18.0"
version = "3.19.0"
authors = ["Stake Technologies <[email protected]>"]
edition = "2018"
build = "build.rs"
Expand Down Expand Up @@ -73,12 +73,18 @@ frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch =
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", default-features = false, optional = true }
pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", default-features = false, optional = true }

# try-runtime
frame-try-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", default-features = false, optional = true }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17", default-features = false, optional = true }

# Astar pallets
pallet-block-reward = { git = "https://github.com/AstarNetwork/astar-frame", tag = "pallet-block-reward-0.2.0/polkadot-v0.9.17", default-features = false }
pallet-block-reward = { git = "https://github.com/AstarNetwork/astar-frame", tag = "pallet-block-reward-2.0.0/polkadot-v0.9.17", default-features = false }
pallet-collator-selection = { git = "https://github.com/AstarNetwork/astar-frame", branch = "polkadot-v0.9.17", default-features = false }
pallet-custom-signatures = { git = "https://github.com/AstarNetwork/astar-frame", branch = "polkadot-v0.9.17", default-features = false }
pallet-dapps-staking = { git = "https://github.com/AstarNetwork/astar-frame", branch = "pallet-dapps-staking-1.1.2/polkadot-v0.9.17", default-features = false }
pallet-vesting = { git = "https://github.com/AstarNetwork/astar-frame", branch = "polkadot-v0.9.17", default-features = false }
pallet-dapps-staking = { git = "https://github.com/AstarNetwork/astar-frame", tag = "pallet-dapps-staking-3.2.1/polkadot-v0.9.17", default-features = false }
pallet-precompile-dapps-staking = { git = "https://github.com/AstarNetwork/astar-frame", tag = "pallet-dapps-staking-3.2.1/polkadot-v0.9.17", default-features = false }
pallet-evm-precompile-sr25519 = { git = "https://github.com/AstarNetwork/astar-frame", tag = "pallet-evm-precompile-sr25519-1.0.0/polkadot-v0.9.17", default-features = false }

[build-dependencies]
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.17" }
Expand Down Expand Up @@ -110,6 +116,8 @@ std = [
"pallet-block-reward/std",
"pallet-custom-signatures/std",
"pallet-dapps-staking/std",
"pallet-precompile-dapps-staking/std",
"pallet-evm-precompile-sr25519/std",
"pallet-base-fee/std",
"pallet-ethereum/std",
"pallet-evm/std",
Expand Down Expand Up @@ -153,4 +161,23 @@ runtime-benchmarks = [
'pallet-timestamp/runtime-benchmarks',
'pallet-collective/runtime-benchmarks',
"pallet-ethereum/runtime-benchmarks",
"pallet-dapps-staking/runtime-benchmarks",
"pallet-block-reward/runtime-benchmarks",
]
try-runtime = [
"frame-try-runtime",
"frame-executive/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-aura/try-runtime",
"pallet-balances/try-runtime",
"pallet-block-reward/try-runtime",
"pallet-custom-signatures/try-runtime",
"pallet-dapps-staking/try-runtime",
"pallet-block-reward/try-runtime",
"pallet-sudo/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-utility/try-runtime",
"pallet-vesting/try-runtime",
]
Loading

0 comments on commit 9f204f1

Please sign in to comment.