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

Commit

Permalink
Release Pangolin 2610 (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xavier Lau authored Aug 25, 2021
1 parent b52a013 commit 0a943a5
Show file tree
Hide file tree
Showing 58 changed files with 128 additions and 133 deletions.
112 changes: 56 additions & 56 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/node/bridge-primitives/pangolin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "pangolin-bridge-primitives"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# darwinia-network
Expand Down
2 changes: 1 addition & 1 deletion bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "GPL-3.0"
name = "drml"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

# TODO: Consider rename this repo to darwinia-runtime-module-library
[[bin]]
Expand Down
2 changes: 1 addition & 1 deletion bin/node/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "drml-primitives"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# paritytech
Expand Down
2 changes: 1 addition & 1 deletion bin/node/runtime/pangolin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "Unlicense"
name = "pangolin-runtime"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion bin/node/runtime/pangolin/src/constants/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "Unlicense"
name = "pangolin-constants"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# darwinia-network
Expand Down
35 changes: 15 additions & 20 deletions bin/node/runtime/pangolin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: sp_runtime::create_runtime_str!("Pangolin"),
impl_name: sp_runtime::create_runtime_str!("Pangolin"),
authoring_version: 1,
spec_version: 2600,
spec_version: 2610,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down Expand Up @@ -936,8 +936,6 @@ fn migrate_treasury() {
beneficiary: AccountId,
bond: Balance,
}
let mut ring_proposals_count = 0 as ProposalIndex;
let mut kton_proposals_count = 0 as ProposalIndex;
let mut ring_approvals = vec![];
let mut kton_approvals = vec![];
for (index, old_proposal) in migration::storage_key_iter::<
Expand All @@ -947,17 +945,15 @@ fn migrate_treasury() {
>(OLD_PREFIX, b"Proposals")
.drain()
{
let hash = Twox64Concat::hash(&index.encode());

if old_proposal.ring_value != 0 {
let new_proposal = Proposal {
proposer: old_proposal.proposer.clone(),
value: old_proposal.ring_value,
beneficiary: old_proposal.beneficiary.clone(),
bond: old_proposal.ring_bond,
};

ring_proposals_count += 1;
// All on-chain proposal have ring value
let hash = Twox64Concat::hash(&index.encode());

migration::put_storage_value(NEW_PREFIX, b"Proposals", &hash, new_proposal);

Expand All @@ -972,8 +968,8 @@ fn migrate_treasury() {
beneficiary: old_proposal.beneficiary,
bond: old_proposal.kton_bond,
};

kton_proposals_count += 1;
// Only one on-chain proposal have kton value, so set index to 0
let hash = Twox64Concat::hash(&(0 as ProposalIndex).encode());

migration::put_storage_value(KTON_TREASURY_PREFIX, b"Proposals", &hash, new_proposal);

Expand All @@ -982,17 +978,14 @@ fn migrate_treasury() {
}
}
}
if ring_proposals_count != 0 {
migration::put_storage_value(NEW_PREFIX, b"ProposalCount", &[], ring_proposals_count);
}
if kton_proposals_count != 0 {
migration::put_storage_value(
KTON_TREASURY_PREFIX,
b"ProposalCount",
&[],
kton_proposals_count,
);
}
migration::put_storage_value(NEW_PREFIX, b"ProposalCount", &[], 2 as ProposalIndex);
migration::put_storage_value(
KTON_TREASURY_PREFIX,
b"ProposalCount",
&[],
1 as ProposalIndex,
);

migration::remove_storage_prefix(OLD_PREFIX, b"Proposals", &[]);
log::info!("`Proposals` Migrated");

Expand All @@ -1006,6 +999,8 @@ fn migrate_treasury() {

migration::move_storage_from_pallet(b"Tips", OLD_PREFIX, NEW_PREFIX);
log::info!("`Tips` Migrated");
migration::move_storage_from_pallet(b"Reasons", OLD_PREFIX, NEW_PREFIX);
log::info!("`Reasons` Migrated");
migration::move_storage_from_pallet(b"BountyCount", OLD_PREFIX, NEW_PREFIX);
log::info!("`BountyCount` Migrated");
migration::move_storage_from_pallet(b"Bounties", OLD_PREFIX, NEW_PREFIX);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "Unlicense"
name = "pangolin-runtime-system-params"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion client/dvm/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "dc-db"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion client/dvm/mapping-sync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "dc-mapping-sync"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# paritytech
Expand Down
2 changes: 1 addition & 1 deletion client/dvm/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "dc-rpc"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/balances/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-balances"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/balances/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-balances-rpc"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/balances/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-balances-rpc-runtime-api"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/bridge/crab/issuing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-crab-issuing"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/bridge/ethereum-bsc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-bridge-bsc"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/bridge/ethereum/backing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-ethereum-backing"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/bridge/ethereum/issuing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-ethereum-issuing"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/bridge/ethereum/relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "GPL-3.0"
name = "darwinia-ethereum-relay"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/bridge/relay-authorities/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-relay-authorities"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/bridge/relayer-game/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-relayer-game"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/bridge/s2s/backing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-s2s-backing"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/bridge/tron/backing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-tron-backing"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/claims/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-claims"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/democracy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-democracy"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/dvm-dynamic-fee/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "dvm-dynamic-fee"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"


[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions frame/dvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "dvm-ethereum"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand All @@ -16,7 +16,7 @@ ethereum = { version = "0.7.1", default-features = false, features = ["wit
ethereum-types = { version = "0.11.0", default-features = false }
evm = { version = "0.27.0", default-features = false, features = ["with-codec"] }
libsecp256k1 = { version = "0.5", default-features = false, features = ["static-context", "hmac"] }
log = { version = "0.4.14"}
log = { version = "0.4.14" }
rlp = { version = "0.5.0", default-features = false }
serde = { version = "1.0.127", optional = true }
sha3 = { version = "0.9.1", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion frame/dvm/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "dvm-rpc-core"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/dvm/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "dvm-rpc-runtime-api"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/elections-phragmen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-elections-phragmen"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-evm"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/evm/precompile/contracts/blake2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-evm-precompile-blake2"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"


[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion frame/evm/precompile/contracts/bn128/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-evm-precompile-bn128"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"


[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion frame/evm/precompile/contracts/curve25519/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-evm-precompile-curve25519"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
2 changes: 1 addition & 1 deletion frame/evm/precompile/contracts/dispatch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-evm-precompile-dispatch"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"


[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion frame/evm/precompile/contracts/ed25519/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = "GPL-3.0"
name = "darwinia-evm-precompile-ed25519"
readme = "README.md"
repository = "https://github.com/darwinia-network/darwinia-common/"
version = "2.6.0"
version = "2.6.1"

[dependencies]
# crates.io
Expand Down
Loading

0 comments on commit 0a943a5

Please sign in to comment.