Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.
29 changes: 28 additions & 1 deletion deployment/helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,41 @@ releases:
collatorRelayChain:
chainData:
storageClass: do-block-storage
- name: collator2-car
namespace: arrakis-ownership-chain
chart: parity/node
version: 4.7.2
values:
- image:
repository: freeverseio/laos-ownership-node
tag: v0.0.4-dev
- node:
legacyRpcFlags: true
chain: arrakis
command: "parachain-template-node"
replicas: 1
role: authority
chainData:
storageClass: do-block-storage
perNodeServices:
paraP2pService:
enabled: true
type: LoadBalancer
ws:
enabled: true
allowUnsafeRpcMethods: true
isParachain: true
collatorRelayChain:
chainData:
storageClass: do-block-storage
- name: public-node
namespace: arrakis-ownership-chain
chart: parity/node
version: 4.7.2
values:
- image:
repository: freeverseio/laos-ownership-node
tag: v0.0.3-dev
tag: v0.0.4-dev
- node:
chain: arrakis
legacyRpcFlags: true
Expand Down
9 changes: 8 additions & 1 deletion node/src/chain_spec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cumulus_primitives_core::ParaId;
use parachain_template_runtime::{AccountId, AuraId, Signature, EXISTENTIAL_DEPOSIT};
use parachain_template_runtime::{AccountId, AuraId, Signature, EXISTENTIAL_DEPOSIT, SudoConfig};
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -102,6 +102,7 @@ pub fn development_config() -> ChainSpec {
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
],
1000.into(),
get_account_id_from_seed::<sr25519::Public>("Alice"),
)
},
Vec::new(),
Expand Down Expand Up @@ -157,6 +158,7 @@ pub fn local_testnet_config() -> ChainSpec {
get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),
],
1000.into(),
get_account_id_from_seed::<sr25519::Public>("Alice"),
)
},
// Bootnodes
Expand All @@ -181,6 +183,7 @@ fn testnet_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
id: ParaId,
root_key: AccountId,
) -> parachain_template_runtime::GenesisConfig {
parachain_template_runtime::GenesisConfig {
system: parachain_template_runtime::SystemConfig {
Expand Down Expand Up @@ -218,5 +221,9 @@ fn testnet_genesis(
safe_xcm_version: Some(SAFE_XCM_VERSION),
},
transaction_payment: Default::default(),
sudo: SudoConfig {
// Assign network admin rights.
key: Some(root_key),
},
}
}
15 changes: 11 additions & 4 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,12 @@ impl pallet_template::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
}

impl pallet_sudo::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
// type WeightInfo = ();
}

// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
pub enum Runtime where
Expand All @@ -473,26 +479,27 @@ construct_runtime!(
ParachainSystem: cumulus_pallet_parachain_system = 1,
Timestamp: pallet_timestamp = 2,
ParachainInfo: parachain_info = 3,

// Monetary stuff.
Balances: pallet_balances = 10,
TransactionPayment: pallet_transaction_payment = 11,

// Collator support. The order of these 4 are important and shall not change.
Authorship: pallet_authorship = 20,
CollatorSelection: pallet_collator_selection = 21,
Session: pallet_session = 22,
Aura: pallet_aura = 23,
AuraExt: cumulus_pallet_aura_ext = 24,

// XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue = 30,
PolkadotXcm: pallet_xcm = 31,
CumulusXcm: cumulus_pallet_xcm = 32,
DmpQueue: cumulus_pallet_dmp_queue = 33,

// Template
TemplatePallet: pallet_template = 40,
Sudo: pallet_sudo = 41,
}
);

Expand Down
13 changes: 8 additions & 5 deletions specs/arrakis.json

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions zombienet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Zombienet

You will find relay and parachain chain specs are in the [./specs](./specs) folder.

## How to

**Download**

```sh
wget -O zombienet-linux-x64 https://github.com/paritytech/zombienet/releases/download/v1.3.55/zombienet-linux-x64 && chmod +x zombienet-linux-x64
```

**Run**

```sh
./zombienet-linux-x64 spawn native.toml -p native
```
25 changes: 25 additions & 0 deletions zombienet/k8s.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[relaychain]

default_command = "polkadot"
default_args = [ "-lparachain=debug" ]
default_image = "parity/polkadot:v0.9.42"

chain = "rococo-local"

[[relaychain.nodes]]
name = "alice"
validator = true

[[relaychain.nodes]]
name = "bob"
validator = true

[[parachains]]
id = 1000
cumulus_based = true

[parachains.collator]
name = "ownership-collator"
command = "parachain-template-node"
image = "freeverseio/laos-ownership-node:latest"
args = [ "--collator" ]
31 changes: 31 additions & 0 deletions zombienet/native.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[relaychain]
default_command = "../../binaries/polkadot-v0.9.42"
default_args = [ "-lparachain=debug" ]
chain_spec_path = "./specs/rococo-freeverse-chainspec-local.json"

[[relaychain.nodes]]
name = "alice"
validator = true

[[relaychain.nodes]]
name = "bob"
validator = true

[[parachains]]
id = 2000
cumulus_based = true
chain_spec_path = "./specs/arrakis-local.json"

[parachains.collator]
name = "ownership-collator-pandora"
command = "../../binaries/parachain-template-node-pandora-arrakis"
validator = true

[[parachains]]
id = 2002
cumulus_based = true
chain = "arrakis"

[parachains.collator]
name = "ownership-collator-sudo"
command = "../../binaries/parachain-template-node-v0.0.4-dev-local"
60 changes: 60 additions & 0 deletions zombienet/specs/arrakis-local.json

Large diffs are not rendered by default.

232 changes: 232 additions & 0 deletions zombienet/specs/rococo-freeverse-chainspec-local.json

Large diffs are not rendered by default.