difftreelog
Update runtime types
in: master
2 files changed
README.mddiffbeforeafterboth--- a/README.md
+++ b/README.md
@@ -133,6 +133,81 @@
Additional CLI usage options are available and may be shown by running `cargo run -- --help`.
+## Building and Running as Parachain locally
+
+Rust toolchain: nightly-2021-04-23
+Note: checkout this project and polkadot project (see below) in the sibling folders (both under the same folder)
+
+### Parachain Code and Other Configurations
+
+Some changes need to be made in the parachain code depending on the relay chain it connects to
+
+1. Chain Spec (incl. chain_spec.rs)
+```
+Extensions {
+ relay_chain: "rococo".into(),
+ para_id: PARA_ID,
+}
+```
+
+2. All collators need to have at least existential balance
+
+
+
+
+### Build relay
+
+```
+git clone https://github.com/paritytech/polkadot.git
+cd polkadot
+git checkout aa386760
+cargo build --release
+```
+
+### Build parachain
+
+Run in the root of this project:
+```
+cargo --build
+```
+
+### Run 4-node Relay
+
+1. Download `rococo-custom-4.json` chain spec here: https://substrate.dev/cumulus-workshop/shared/chainspecs/rococo-custom-4.json
+2. Use these instructions to launch 4 nodes: https://substrate.dev/cumulus-workshop/#/en/2-relay-chain/1-launch
+
+Example (Run in polkadot folder. Replace `12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on` with output from Alice node):
+```
+./target/release/polkadot --alice --validator --base-path ./cumulus_relay0 --chain rococo-custom-4.json --port 50555 --ws-port 9944
+./target/release/polkadot --bob --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50556 --ws-port 9945
+./target/release/polkadot --charlie --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50557 --ws-port 9946
+./target/release/polkadot --dave --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50558 --ws-port 9947
+
+```
+
+3. Export genesis state and runtime wasm from NFT parachain:
+
+Run from this project root:
+```
+./target/release/nft export-genesis-state --parachain-id 2000 > ./resources/para-2000-genesis
+./target/release/nft export-genesis-wasm > ./resources/para-2000-wasm
+```
+
+4. Run two parachain nodes:
+
+Replace `12D3KooWN1ah2bFQSysEFnwZqcmcVpDDR8UedXyo6xfzV1zDNMNg` with Alice or Bob relay ID
+
+Run from this project root:
+```
+./target/release/nft --alice --collator --force-authoring --base-path ./tmp/parachain-alice --parachain-id 2000 --port 40333 --ws-port 9844 -- --execution wasm --chain ../polkadot/rococo-custom-4.json --port 30343 --ws-port 9977
+./target/release/nft --bob --collator --force-authoring --parachain-id 2000 --base-path ./tmp/parachain/bob --port 40334 --ws-port 9845 -- --execution wasm --chain ../polkadot/rococo-custom-4.json --port 30344 --ws-port 9978 --bootnodes /ip4/127.0.0.1/tcp/50556/p2p/12D3KooWN1ah2bFQSysEFnwZqcmcVpDDR8UedXyo6xfzV1zDNMNg
+```
+
+4. Reserve parachain ID as described here: https://substrate.dev/cumulus-workshop/#/en/2-relay-chain/2-reserve
+
+5. Register parachain in relay as described here: https://substrate.dev/cumulus-workshop/#/en/3-parachains/2-register
+
+
## Run Integration Tests
1. Install all needed dependecies
runtime_types.jsondiffbeforeafterboth1{2 "AccessMode": {3 "_enum": [4 "Normal",5 "WhiteList"6 ]7 },8 "DecimalPoints": "u8",9 "CollectionMode": {10 "_enum": {11 "Invalid": null,12 "NFT": null,13 "Fungible": "DecimalPoints",14 "ReFungible": null15 }16 },17 "Ownership": {18 "Owner": "AccountId",19 "Fraction": "u128"20 },21 "FungibleItemType": {22 "Value": "u128"23 },24 "NftItemType": {25 "Owner": "AccountId",26 "ConstData": "Vec<u8>",27 "VariableData": "Vec<u8>"28 },29 "ReFungibleItemType": {30 "Owner": "Vec<Ownership<AccountId>>",31 "ConstData": "Vec<u8>",32 "VariableData": "Vec<u8>"33 },34 "SponsorshipState": {35 "_enum": {36 "Disabled": null,37 "Unconfirmed": "AccountId",38 "Confirmed": "AccountId"39 }40 },41 "Collection": {42 "Owner": "AccountId",43 "Mode": "CollectionMode",44 "Access": "AccessMode",45 "DecimalPoints": "DecimalPoints",46 "Name": "Vec<u16>",47 "Description": "Vec<u16>",48 "TokenPrefix": "Vec<u8>",49 "MintMode": "bool",50 "OffchainSchema": "Vec<u8>",51 "SchemaVersion": "SchemaVersion",52 "Sponsorship": "SponsorshipState",53 "Limits": "CollectionLimits",54 "VariableOnChainSchema": "Vec<u8>",55 "ConstOnChainSchema": "Vec<u8>"56 },57 "RawData": "Vec<u8>",58 "Address": "AccountId",59 "LookupSource": "AccountId",60 "Weight": "u64",61 "CreateNftData": {62 "const_data": "Vec<u8>",63 "variable_data": "Vec<u8>" 64 },65 "CreateFungibleData": {66 "value": "u128"67 },68 "CreateReFungibleData": {69 "const_data": "Vec<u8>",70 "variable_data": "Vec<u8>",71 "pieces": "u128"72 },73 "CreateItemData": {74 "_enum": {75 "NFT": "CreateNftData",76 "Fungible": "CreateFungibleData",77 "ReFungible": "CreateReFungibleData"78 }79 },80 "SchemaVersion": {81 "_enum": [82 "ImageURL",83 "Unique"84 ]85 },86 "CollectionId": "u32",87 "TokenId": "u32",88 "ChainLimits": {89 "CollectionNumbersLimit": "u32",90 "AccountTokenOwnershipLimit": "u32",91 "CollectionAdminsLimit": "u64",92 "CustomDataLimit": "u32",93 "NftSponsorTimeout": "u32",94 "FungibleSponsorTimeout": "u32",95 "RefungibleSponsorTimeout": "u32",96 "OffchainSchemaLimit": "u32",97 "VariableOnChainSchemaLimit": "u32",98 "ConstOnChainSchemaLimit": "u32"99 },100 "CollectionLimits": {101 "AccountTokenOwnershipLimit": "u32",102 "SponsoredDataSize": "u32",103 "SponsoredDataRateLimit": "Option<BlockNumber>",104 "TokenLimit": "u32",105 "SponsorTimeout": "u32",106 "OwnerCanTransfer": "bool",107 "OwnerCanDestroy": "bool"108 }109}1{2 "AccessMode": {3 "_enum": [4 "Normal",5 "WhiteList"6 ]7 },8 "DecimalPoints": "u8",9 "CollectionMode": {10 "_enum": {11 "Invalid": null,12 "NFT": null,13 "Fungible": "DecimalPoints",14 "ReFungible": null15 }16 },17 "Ownership": {18 "Owner": "AccountId",19 "Fraction": "u128"20 },21 "FungibleItemType": {22 "Value": "u128"23 },24 "NftItemType": {25 "Owner": "AccountId",26 "ConstData": "Vec<u8>",27 "VariableData": "Vec<u8>"28 },29 "ReFungibleItemType": {30 "Owner": "Vec<Ownership<AccountId>>",31 "ConstData": "Vec<u8>",32 "VariableData": "Vec<u8>"33 },34 "Collection": {35 "Owner": "AccountId",36 "Mode": "CollectionMode",37 "Access": "AccessMode",38 "DecimalPoints": "DecimalPoints",39 "Name": "Vec<u16>",40 "Description": "Vec<u16>",41 "TokenPrefix": "Vec<u8>",42 "MintMode": "bool",43 "OffchainSchema": "Vec<u8>",44 "SchemaVersion": "SchemaVersion",45 "Sponsor": "AccountId",46 "SponsorConfirmed": "bool",47 "Limits": "CollectionLimits",48 "VariableOnChainSchema": "Vec<u8>",49 "ConstOnChainSchema": "Vec<u8>"50 },51 "RawData": "Vec<u8>",52 "Address": "AccountId",53 "LookupSource": "AccountId",54 "Weight": "u64",55 "CreateNftData": {56 "const_data": "Vec<u8>",57 "variable_data": "Vec<u8>" 58 },59 "CreateFungibleData": {60 "value": "u128"61 },62 "CreateReFungibleData": {63 "const_data": "Vec<u8>",64 "variable_data": "Vec<u8>",65 "pieces": "u128"66 },67 "CreateItemData": {68 "_enum": {69 "NFT": "CreateNftData",70 "Fungible": "CreateFungibleData",71 "ReFungible": "CreateReFungibleData"72 }73 },74 "SchemaVersion": {75 "_enum": [76 "ImageURL",77 "Unique"78 ]79 },80 "CollectionId": "u32",81 "TokenId": "u32",82 "ChainLimits": {83 "CollectionNumbersLimit": "u32",84 "AccountTokenOwnershipLimit": "u32",85 "CollectionAdminsLimit": "u64",86 "CustomDataLimit": "u32",87 "NftSponsorTimeout": "u32",88 "FungibleSponsorTimeout": "u32",89 "RefungibleSponsorTimeout": "u32",90 "OffchainSchemaLimit": "u32",91 "VariableOnChainSchemaLimit": "u32",92 "ConstOnChainSchemaLimit": "u32"93 },94 "CollectionLimits": {95 "AccountTokenOwnershipLimit": "u32",96 "SponsoredMintSize": "u32",97 "TokenLimit": "u32",98 "SponsorTimeout": "u32",99 "OwnerCanTransfer": "bool",100 "OwnerCanDestroy": "bool"101 },102 "AccountInfo": "AccountInfoWithDualRefCount"103}