Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,300 changes: 1,130 additions & 1,170 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ KEYSTORE_PATH := keystore
SURI := //Alice
LAUNCH_CONFIG := config.yml
DOCKER_TAG := latest
RELAY_DOCKER_TAG := v0.9.12
RELAY_DOCKER_TAG := v0.9.13

.PHONY: init
init: submodules
Expand Down Expand Up @@ -83,7 +83,7 @@ fmt:

.PHONY: resources
resources:
docker run --rm parallelfinance/parallel:$(DOCKER_TAG) export-genesis-state --chain $(CHAIN) --parachain-id $(PARA_ID) > ./resources/para-$(PARA_ID)-genesis
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job

docker run --rm parallelfinance/parallel:$(DOCKER_TAG) export-genesis-state --chain $(CHAIN) > ./resources/para-$(PARA_ID)-genesis
docker run --rm parallelfinance/parallel:$(DOCKER_TAG) export-genesis-wasm --chain $(CHAIN) > ./resources/para-$(PARA_ID).wasm

.PHONY: shutdown
Expand Down
6 changes: 4 additions & 2 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
relaychain:
image: parallelfinance/polkadot:v0.9.12-1
image: parallelfinance/polkadot:v0.9.13
chain: kusama-local
runtimeGenesisConfig:
configuration:
Expand Down Expand Up @@ -46,6 +46,8 @@ parachains:
- --execution=wasm
- -lxcm=trace
- -lloans=trace
- -lliquidstaking=trace
- -lcrowdloans=trace
relaychainFlags:
- --wasm-execution=compiled
- --execution=wasm
Expand All @@ -58,7 +60,7 @@ parachains:
- flags:
- --charlie

- image: parallelfinance/karura:v0.9.12
- image: parallelfinance/karura:v0.9.13
chain:
base: karura-dev
collators:
Expand Down
6 changes: 3 additions & 3 deletions docs/DEVELOPER-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ make help

### Local Testnet

Polkadot (v0.9.12 branch)
Polkadot (v0.9.13 branch)

```
cargo build --release
Expand Down Expand Up @@ -59,7 +59,7 @@ In order to produce blocks you will need to register the parachain as detailed i

Developer -> sudo -> paraSudoWrapper -> sudoScheduleParaInitialize(id, genesis)

Ensure you set the `ParaId` to `2085` and the `parachain: Bool` to `Yes`.
<!-- Ensure you set the `ParaId` to `2085` and the `parachain: Bool` to `Yes`. -->

The files you will need are in the `./resources` folder, if you need to build them because you modified the code you can use the following commands

Expand All @@ -72,7 +72,7 @@ cargo build --release


# export genesis state and wasm
./target/release/parallel export-genesis-state --chain heiko-dev --parachain-id 2085 > ./resources/para-2085-genesis
./target/release/parallel export-genesis-state --chain heiko-dev > ./resources/para-2085-genesis
./target/release/parallel export-genesis-wasm --chain heiko-dev > ./resources/para-2085.wasm
```

Expand Down
6 changes: 3 additions & 3 deletions launch/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const config = {
{
paraId: 2013,
derivativeIndex: 0,
image: 'parallelfinance/polkadot-collator:v0.9.12',
image: 'parallelfinance/polkadot-collator:v0.9.13',
chain: 'shell',
ctokenId: 4000,
cap: '100000000000000',
Expand All @@ -190,7 +190,7 @@ const config = {
{
paraId: 2016,
derivativeIndex: 1,
image: 'parallelfinance/polkadot-collator:v0.9.12',
image: 'parallelfinance/polkadot-collator:v0.9.13',
chain: 'shell',
ctokenId: 4001,
cap: '1000000000000000',
Expand All @@ -202,7 +202,7 @@ const config = {
{
paraId: 2100,
derivativeIndex: 2,
image: 'parallelfinance/polkadot-collator:v0.9.12',
image: 'parallelfinance/polkadot-collator:v0.9.13',
chain: 'shell',
ctokenId: 4002,
cap: '10000000000000000',
Expand Down
100 changes: 50 additions & 50 deletions node/parallel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ['Parallel Team']
build = 'build.rs'
description = 'A decentralized lending protocol which allow users to earn "double interests" from staking and lending'
edition = '2018'
edition = '2021'
homepage = 'https://parallel.fi'
license = 'Apache'
name = 'parallel'
Expand All @@ -15,8 +15,8 @@ targets = ['x86_64-unknown-linux-gnu']
[dependencies]
codec = { package = 'parity-scale-codec', version = '2.3.1' }
derive_more = '0.15.0'
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
frame-benchmarking-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
hex-literal = '0.3.3'
jsonrpc-core = '18.0.0'
log = '0.4.13'
Expand All @@ -25,68 +25,68 @@ primitives = { package = 'parallel-primitives', path = '../../primitives' }

heiko-runtime = { path = '../../runtime/heiko' }
pallet-loans-rpc = { path = '../../pallets/loans/rpc' }
pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
pallet-transaction-payment-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
pallet-transaction-payment-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
parallel-runtime = { path = '../../runtime/parallel' }
vanilla-runtime = { path = '../../runtime/vanilla' }

sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12', features = ['wasmtime'] }
sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12', features = ['wasmtime'] }
sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12', features = ['wasmtime'] }
sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sc-basic-authorship = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sc-chain-spec = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sc-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', features = ['wasmtime'] }
sc-client-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sc-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sc-executor = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', features = ['wasmtime'] }
sc-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sc-rpc = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sc-rpc-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sc-service = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', features = ['wasmtime'] }
sc-telemetry = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sc-tracing = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sc-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sc-transaction-pool-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }

frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
try-runtime-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12', optional = true }
frame-system-rpc-runtime-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
try-runtime-cli = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', optional = true }

serde = { version = '1.0.119', features = ['derive'] }
serde_json = '1.0.64'
structopt = '0.3.8'

orml-oracle-rpc = { git = 'https://github.com/open-web3-stack/open-runtime-module-library.git', default-features = false }
substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
substrate-frame-rpc-system = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }

sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12', default-features = false }
sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-trie = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-api = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-block-builder = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-blockchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-consensus = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-consensus-aura = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-core = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-inherents = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-keystore = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-offchain = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-runtime = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-session = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13', default-features = false }
sp-storage = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-timestamp = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-transaction-pool = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }
sp-trie = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }

cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.12' }
cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.12' }
cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.12' }
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.12' }
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.12' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.12' }
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.12' }
cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.13' }
cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.13' }
cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.13' }
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.13' }
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.13' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.13' }
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus.git', branch = 'polkadot-v0.9.13' }

polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.12' }
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.12' }
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.12' }
polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.12' }
polkadot-cli = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.13' }
polkadot-parachain = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.13' }
polkadot-primitives = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.13' }
polkadot-service = { git = 'https://github.com/paritytech/polkadot.git', branch = 'release-v0.9.13' }

[build-dependencies]
substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
substrate-build-script-utils = { git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.13' }

[[bin]]
name = 'parallel'
Expand Down
6 changes: 2 additions & 4 deletions node/parallel/src/chain_spec/heiko.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ fn heiko_genesis(
code: WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
changes_trie_config: Default::default(),
},
balances: BalancesConfig {
balances: initial_allocation,
Expand All @@ -236,7 +235,6 @@ fn heiko_genesis(
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: Zero::zero(),
desired_candidates: 16,
..Default::default()
},
session: SessionConfig {
keys: invulnerables
Expand All @@ -245,7 +243,7 @@ fn heiko_genesis(
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc.clone(), // validator id
acc, // validator id
SessionKeys { aura }, // session keys
)
})
Expand All @@ -257,7 +255,7 @@ fn heiko_genesis(
sudo: SudoConfig { key: root_key },
parachain_info: ParachainInfoConfig { parachain_id: id },
liquid_staking: LiquidStakingConfig {
exchange_rate: Rate::saturating_from_rational(100, 100), // 1
exchange_rate: Rate::saturating_from_rational(100_u32, 100_u32), // 1
reserve_factor: Ratio::from_perthousand(5),
},
democracy: DemocracyConfig::default(),
Expand Down
1 change: 1 addition & 0 deletions node/parallel/src/chain_spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pub fn accumulate(
}

/// set default ss58 crypto
#[allow(clippy::borrowed_box)]
pub fn set_default_ss58_version(spec: &Box<dyn sc_service::ChainSpec>) {
use sp_core::crypto::Ss58AddressFormatRegistry;

Expand Down
8 changes: 3 additions & 5 deletions node/parallel/src/chain_spec/parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,14 @@ fn parallel_genesis(
code: WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
changes_trie_config: Default::default(),
},
balances: BalancesConfig {
balances: initial_allocation.clone(),
balances: initial_allocation,
},
collator_selection: CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
candidacy_bond: Zero::zero(),
desired_candidates: 16,
..Default::default()
},
session: SessionConfig {
keys: invulnerables
Expand All @@ -254,7 +252,7 @@ fn parallel_genesis(
.map(|(acc, aura)| {
(
acc.clone(), // account id
acc.clone(), // validator id
acc, // validator id
SessionKeys { aura }, // session keys
)
})
Expand All @@ -266,7 +264,7 @@ fn parallel_genesis(
sudo: SudoConfig { key: root_key },
parachain_info: ParachainInfoConfig { parachain_id: id },
liquid_staking: LiquidStakingConfig {
exchange_rate: Rate::saturating_from_rational(100, 100), // 1
exchange_rate: Rate::saturating_from_rational(100_u32, 100_u32), // 1
reserve_factor: Ratio::from_perthousand(5),
},
democracy: DemocracyConfig::default(),
Expand Down
Loading