Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
Release 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Mar 11, 2021
1 parent c220eac commit 42cdf00
Show file tree
Hide file tree
Showing 14 changed files with 636 additions and 638 deletions.
2 changes: 1 addition & 1 deletion bin/node/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub fn pangolin_session_keys(
pub fn properties() -> Properties {
let mut properties = Properties::new();

properties.insert("ss58Format".into(), 42.into());
properties.insert("ss58Format".into(), 18.into());
properties.insert("tokenDecimals".into(), vec![9, 9].into());
properties.insert("tokenSymbol".into(), vec!["PRING", "PKTON"].into());

Expand Down
2 changes: 1 addition & 1 deletion bin/node/runtime/pangolin/src/claims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use darwinia_claims::Config;

frame_support::parameter_types! {
pub const ClaimsModuleId: ModuleId = ModuleId(*b"da/claim");
pub Prefix: &'static [u8] = b"Pay RINGs to the template account:";
pub Prefix: &'static [u8] = b"Pay PRINGs to the Pangolin account:";
}
impl Config for Runtime {
type Event = Event;
Expand Down
4 changes: 2 additions & 2 deletions bin/node/runtime/pangolin/src/collective.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ pub type ApproveOrigin = EnsureOneOf<
>;

frame_support::parameter_types! {
pub const CouncilMotionDuration: BlockNumber = 3 * DAYS;
pub const CouncilMotionDuration: BlockNumber = 3 * MINUTES;
pub const CouncilMaxProposals: u32 = 100;
pub const CouncilMaxMembers: u32 = 100;
pub const TechnicalMotionDuration: BlockNumber = 3 * DAYS;
pub const TechnicalMotionDuration: BlockNumber = 3 * MINUTES;
pub const TechnicalMaxProposals: u32 = 100;
pub const TechnicalMaxMembers: u32 = 100;
}
Expand Down
14 changes: 7 additions & 7 deletions bin/node/runtime/pangolin/src/democracy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ use crate::*;
use darwinia_democracy::{weights::SubstrateWeight, Config};

frame_support::parameter_types! {
pub const LaunchPeriod: BlockNumber = 7 * DAYS;
pub const VotingPeriod: BlockNumber = 7 * DAYS;
pub const FastTrackVotingPeriod: BlockNumber = 3 * HOURS;
pub const MinimumDeposit: Balance = 1 * MILLI;
pub const EnactmentPeriod: BlockNumber = 8 * DAYS;
pub const CooloffPeriod: BlockNumber = 7 * DAYS;
pub const PreimageByteDeposit: Balance = 10 * NANO;
pub const LaunchPeriod: BlockNumber = 3 * MINUTES;
pub const VotingPeriod: BlockNumber = 3 * MINUTES;
pub const FastTrackVotingPeriod: BlockNumber = 3 * MINUTES;
pub const MinimumDeposit: Balance = 1 * COIN;
pub const EnactmentPeriod: BlockNumber = 3 * MINUTES;
pub const CooloffPeriod: BlockNumber = 3 * MINUTES;
pub const PreimageByteDeposit: Balance = 1 * MILLI;
pub const InstantAllowed: bool = true;
pub const MaxVotes: u32 = 100;
pub const MaxProposals: u32 = 100;
Expand Down
2 changes: 1 addition & 1 deletion bin/node/runtime/pangolin/src/elections_phragmen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ frame_support::parameter_types! {
pub const DesiredMembers: u32 = 13;
pub const DesiredRunnersUp: u32 = 7;
/// Daily council elections.
pub const TermDuration: BlockNumber = 24 * HOURS;
pub const TermDuration: BlockNumber = 3 * MINUTES;
}

impl Config for Runtime {
Expand Down
2 changes: 1 addition & 1 deletion bin/node/runtime/pangolin/src/ethereum_relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use ethereum_primitives::EthereumNetworkType;
frame_support::parameter_types! {
pub const EthereumRelayModuleId: ModuleId = ModuleId(*b"da/ethrl");
pub const EthereumNetwork: EthereumNetworkType = EthereumNetworkType::Ropsten;
pub const ConfirmPeriod: BlockNumber = 200;
pub const ConfirmPeriod: BlockNumber = 20;
pub const ApproveThreshold: Perbill = Perbill::from_percent(60);
pub const RejectThreshold: Perbill = Perbill::from_percent(1);
}
Expand Down
10 changes: 5 additions & 5 deletions bin/node/runtime/pangolin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ pub mod constants {
pub const CAP: Balance = 10_000_000_000 * COIN;
pub const TOTAL_POWER: Power = 1_000_000_000;

pub const MILLISECS_PER_BLOCK: Moment = 3000;
pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK;
pub const BLOCKS_PER_SESSION: BlockNumber = 10 * MINUTES;
pub const SESSIONS_PER_ERA: SessionIndex = 6;

// Time is measured by number of blocks.
pub const MINUTES: BlockNumber = 60_000 / (MILLISECS_PER_BLOCK as BlockNumber);
pub const HOURS: BlockNumber = 60 * MINUTES;
pub const DAYS: BlockNumber = 24 * HOURS;

pub const MILLISECS_PER_BLOCK: Moment = 3000;
pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK;
pub const BLOCKS_PER_SESSION: BlockNumber = MINUTES / 2;
pub const SESSIONS_PER_ERA: SessionIndex = 6;

// 1 in 4 blocks (on average, not counting collisions) will be primary babe blocks.
pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4);

Expand Down
Empty file.
4 changes: 2 additions & 2 deletions bin/node/runtime/pangolin/src/relay_authorities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ use darwinia_relay_primitives::relay_authorities::OpCode;

frame_support::parameter_types! {
pub const EthereumRelayAuthoritiesLockId: LockIdentifier = *b"ethrauth";
pub const EthereumRelayAuthoritiesTermDuration: BlockNumber = 30 * DAYS;
pub const EthereumRelayAuthoritiesTermDuration: BlockNumber = 3 * MINUTES;
pub const MaxCandidates: usize = 7;
pub const OpCodes: (OpCode, OpCode) = (
[71, 159, 189, 249],
[180, 188, 244, 151]
);
pub const SignThreshold: Perbill = Perbill::from_percent(60);
pub const SubmitDuration: BlockNumber = 100;
pub const SubmitDuration: BlockNumber = 20;
}
impl Config<EthereumRelayAuthoritiesInstance> for Runtime {
type Event = Event;
Expand Down
6 changes: 3 additions & 3 deletions bin/node/runtime/pangolin/src/society.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ frame_support::parameter_types! {
pub const CandidateDeposit: Balance = 10 * COIN;
pub const WrongSideDeduction: Balance = 2 * COIN;
pub const MaxStrikes: u32 = 10;
pub const RotationPeriod: BlockNumber = 80 * HOURS;
pub const RotationPeriod: BlockNumber = 3 * MINUTES;
pub const PeriodSpend: Balance = 500 * COIN;
pub const MaxLockDuration: BlockNumber = 36 * 30 * DAYS;
pub const ChallengePeriod: BlockNumber = 7 * DAYS;
pub const MaxLockDuration: BlockNumber = 3 * MINUTES;
pub const ChallengePeriod: BlockNumber = 3 * MINUTES;
}
impl Config for Runtime {
type Event = Event;
Expand Down
10 changes: 4 additions & 6 deletions bin/node/runtime/pangolin/src/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ use darwinia_staking::{weights::SubstrateWeight, Config, EraIndex};
frame_support::parameter_types! {
pub const StakingModuleId: ModuleId = ModuleId(*b"da/staki");
pub const SessionsPerEra: SessionIndex = SESSIONS_PER_ERA;
pub const BondingDurationInEra: EraIndex = 14 * DAYS
/ (SESSIONS_PER_ERA as BlockNumber * BLOCKS_PER_SESSION);
pub const BondingDurationInBlockNumber: BlockNumber = 14 * DAYS;
pub const SlashDeferDuration: EraIndex = 14 * DAYS
/ (SESSIONS_PER_ERA as BlockNumber * BLOCKS_PER_SESSION) - 1;
pub const BondingDurationInEra: EraIndex = 2;
pub const BondingDurationInBlockNumber: BlockNumber = 2 * BLOCKS_PER_SESSION * SESSIONS_PER_ERA;
pub const SlashDeferDuration: EraIndex = 1;
// quarter of the last session will be for election.
pub const ElectionLookahead: BlockNumber = BLOCKS_PER_SESSION / 4;
pub const ElectionLookahead: BlockNumber = BLOCKS_PER_SESSION / 2;
pub const MaxIterations: u32 = 5;
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
pub const MaxNominatorRewardedPerValidator: u32 = 128;
Expand Down
2 changes: 1 addition & 1 deletion bin/node/runtime/pangolin/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ frame_support::parameter_types! {
})
.avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)
.build_or_panic();
pub const SS58Prefix: u8 = 42;
pub const SS58Prefix: u8 = 18;
}
impl Config for Runtime {
type BaseCallFilter = ();
Expand Down
8 changes: 4 additions & 4 deletions bin/node/runtime/pangolin/src/treasury.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ frame_support::parameter_types! {
pub const ProposalBond: Permill = Permill::from_percent(5);
pub const RingProposalBondMinimum: Balance = 20 * COIN;
pub const KtonProposalBondMinimum: Balance = 20 * COIN;
pub const SpendPeriod: BlockNumber = 6 * DAYS;
pub const SpendPeriod: BlockNumber = 3 * MINUTES;
pub const Burn: Permill = Permill::from_percent(0);
pub const TipCountdown: BlockNumber = 1 * DAYS;
pub const TipCountdown: BlockNumber = 3 * MINUTES;
pub const TipFindersFee: Percent = Percent::from_percent(20);
pub const TipReportDepositBase: Balance = 1 * COIN;
pub const DataDepositPerByte: Balance = 1 * MILLI;
pub const BountyDepositBase: Balance = 1 * COIN;
pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS;
pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS;
pub const BountyDepositPayoutDelay: BlockNumber = 3 * MINUTES;
pub const BountyUpdatePeriod: BlockNumber = 3 * MINUTES;
pub const MaximumReasonLength: u32 = 16384;
pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
pub const BountyValueMinimum: Balance = 2 * COIN;
Expand Down
Loading

0 comments on commit 42cdf00

Please sign in to comment.