diff --git a/examples/asset-hub-kusama/0_xcm/0_init.yml b/examples/asset-hub-kusama/0_xcm/0_init.yml index c93494f..93d4c3f 100644 --- a/examples/asset-hub-kusama/0_xcm/0_init.yml +++ b/examples/asset-hub-kusama/0_xcm/0_init.yml @@ -124,7 +124,8 @@ tests: } - name: polkadotXcm.SupportedVersionChanged chain: *assets_parachain - result: [{ parents: 1, interior: Here }, *xcm_version ] + result: { location: { parents: 1, interior: Here }, version: *xcm_version } + # result: [{ parents: 1, interior: Here }, *xcm_version ] - extrinsics: # Penpal Parachain sets supported version for Relay Chain - chain: *penpal_parachain signer: *pp_signer @@ -142,4 +143,5 @@ tests: - name: sudo.Sudid result: { sudoResult: Ok } - name: polkadotXcm.SupportedVersionChanged - result: [{ parents: 1, interior: Here }, *xcm_version ] + # result: [{ parents: 1, interior: Here }, *xcm_version ] + result: { location: { parents: 1, interior: Here }, version: *xcm_version } diff --git a/examples/asset-hub-kusama/0_xcm/2_ump.yml b/examples/asset-hub-kusama/0_xcm/2_ump.yml index 4f22919..51ff7aa 100644 --- a/examples/asset-hub-kusama/0_xcm/2_ump.yml +++ b/examples/asset-hub-kusama/0_xcm/2_ump.yml @@ -96,7 +96,8 @@ tests: events: - name: polkadotXcm.Attempted threshold: *weight_threshold - result: [{ Complete: { refTime: '539,494,000', proofSize: '7,133' }}] + # result: [{ Complete: { refTime: '539,494,000', proofSize: '7,133' }}] + result: { outcome: { Complete: { refTime: '539,494,000', proofSize: '7,133' }} } - name: paraInclusion.UpwardMessagesReceived chain: *relay_chain result: { from: *ap_id } @@ -197,4 +198,5 @@ tests: ] events: - name: polkadotXcm.Attempted - result: [{ Error: Barrier }] + # result: [{ Error: Barrier }] + result: { outcome: { Error: Barrier } } diff --git a/examples/asset-hub-kusama/0_xcm/4_hrmp.yml b/examples/asset-hub-kusama/0_xcm/4_hrmp.yml index 2caa8a9..1af0e74 100644 --- a/examples/asset-hub-kusama/0_xcm/4_hrmp.yml +++ b/examples/asset-hub-kusama/0_xcm/4_hrmp.yml @@ -182,7 +182,8 @@ tests: events: - name: polkadotXcm.Attempted threshold: *weight_threshold - result: [{ Complete: { refTime: '679,150,000', proofSize: '6,196' }}] + # result: [{ Complete: { refTime: '679,150,000', proofSize: '6,196' }}] + result: { outcome: { Complete: { refTime: '631,531,000', proofSize: '7,186' }} } - name: assets.Transferred result: { assetId: *asset_id, @@ -225,7 +226,8 @@ tests: events: - name: polkadotXcm.Attempted threshold: *weight_threshold - result: [{ Complete: { refTime: '679,150,000', proofSize: '6,196' }}] + # result: [{ Complete: { refTime: '679,150,000', proofSize: '6,196' }}] + result: { outcome: { Complete: { refTime: '631,531,000', proofSize: '7,186' }} } - name: balances.Endowed result: { account: *pp_sovereign_sibl, diff --git a/examples/asset-hub-kusama/config.toml b/examples/asset-hub-kusama/config.toml index f5728d6..800ada8 100644 --- a/examples/asset-hub-kusama/config.toml +++ b/examples/asset-hub-kusama/config.toml @@ -2,7 +2,7 @@ default_command = "./bin/polkadot" default_args = [ "-lparachain=debug", "-lxcm=trace" ] chain = "kusama-local" -chain_spec_path = "./bin/kusama-local-with-chains-raw.json" +chain_spec_command = "./bin/chain-spec-generator {% raw %} {{chainName}} {% endraw %}" [[relaychain.nodes]] name = "alice" @@ -30,8 +30,8 @@ chain_spec_path = "./bin/kusama-local-with-chains-raw.json" [[parachains]] id = 1000 -# chain = "asset-hub-kusama-local" -chain = "statemine-local" +chain = "asset-hub-kusama-local" +chain_spec_command = "./bin/chain-spec-generator --chain {% raw %} {{chainName}} {% endraw %}" cumulus_based = true [[parachains.collators]] @@ -44,7 +44,7 @@ cumulus_based = true name = "collator2" ws_port = 9911 command = "./bin/polkadot-parachain" - args = [ "-lxcm=trace" ] + args = [ "-lxcm=trace", "--state-cache-size=0"] [[parachains]] id = 2000 @@ -61,7 +61,7 @@ cumulus_based = true name = "collator4" ws_port = 9921 command = "./bin/polkadot-parachain" - args = [ "-lxcm=trace" ] + args = [ "-lxcm=trace", "--state-cache-size=0"] # [[hrmp_channels]] # sender = 1000 diff --git a/examples/asset-hub-polkadot/0_xcm/0_init.yml b/examples/asset-hub-polkadot/0_xcm/0_init.yml index b0049c1..25967d7 100644 --- a/examples/asset-hub-polkadot/0_xcm/0_init.yml +++ b/examples/asset-hub-polkadot/0_xcm/0_init.yml @@ -124,7 +124,9 @@ tests: } - name: polkadotXcm.SupportedVersionChanged chain: *assets_parachain - result: [{ parents: 1, interior: Here }, *xcm_version ] + # result: [{ parents: 1, interior: Here }, *xcm_version ] + result: { location: { parents: 1, interior: Here }, version: *xcm_version } + - extrinsics: # Penpal Parachain sets supported version for Relay Chain - chain: *penpal_parachain signer: *pp_signer @@ -142,4 +144,5 @@ tests: - name: sudo.Sudid result: { sudoResult: Ok } - name: polkadotXcm.SupportedVersionChanged - result: [{ parents: 1, interior: Here }, *xcm_version ] + # result: [{ parents: 1, interior: Here }, *xcm_version ] + result: { location: { parents: 1, interior: Here }, version: *xcm_version } diff --git a/examples/asset-hub-polkadot/0_xcm/2_ump.yml b/examples/asset-hub-polkadot/0_xcm/2_ump.yml index bf7e9ad..f3cda45 100644 --- a/examples/asset-hub-polkadot/0_xcm/2_ump.yml +++ b/examples/asset-hub-polkadot/0_xcm/2_ump.yml @@ -97,7 +97,8 @@ tests: events: - name: polkadotXcm.Attempted threshold: *weight_threshold - result: [{ Complete: { refTime: '533,283,000', proofSize: '7,096' }}] + # result: [{ Complete: { refTime: '533,283,000', proofSize: '7,096' }}] + result: { outcome: { Complete: { refTime: '539,494,000', proofSize: '7,133' }} } - name: paraInclusion.UpwardMessagesReceived chain: *relay_chain result: { from: *ap_id } @@ -200,4 +201,5 @@ tests: ] events: - name: polkadotXcm.Attempted - result: [{ Error: Barrier }] + # result: [{ Error: Barrier }] + result: { outcome: { Error: Barrier } } diff --git a/examples/asset-hub-polkadot/0_xcm/4_hrmp.yml b/examples/asset-hub-polkadot/0_xcm/4_hrmp.yml index e75b9e8..2d76270 100644 --- a/examples/asset-hub-polkadot/0_xcm/4_hrmp.yml +++ b/examples/asset-hub-polkadot/0_xcm/4_hrmp.yml @@ -182,7 +182,8 @@ tests: events: - name: polkadotXcm.Attempted threshold: *weight_threshold - result: [{ Complete: { refTime: '673,627,000', proofSize: '6,196' }}] + # result: [{ Complete: { refTime: '673,627,000', proofSize: '6,196' }}] + result: { outcome: { Complete: { refTime: '631,531,000', proofSize: '7,186' }} } - name: assets.Transferred result: { assetId: *asset_id, @@ -225,7 +226,8 @@ tests: events: - name: polkadotXcm.Attempted threshold: *weight_threshold - result: [{ Complete: { refTime: '679,150,000', proofSize: '6,196' }}] + # result: [{ Complete: { refTime: '679,150,000', proofSize: '6,196' }}] + result: { outcome: { Complete: { refTime: '631,531,000', proofSize: '7,186' }} } - name: balances.Endowed result: { account: *pp_sovereign_sibl, diff --git a/examples/asset-hub-polkadot/config.toml b/examples/asset-hub-polkadot/config.toml index 81f1cfd..424ac14 100644 --- a/examples/asset-hub-polkadot/config.toml +++ b/examples/asset-hub-polkadot/config.toml @@ -2,7 +2,7 @@ default_command = "./bin/polkadot" default_args = [ "-lparachain=debug", "-lxcm=trace" ] chain = "polkadot-local" -chain_spec_path = "./bin/polkadot-local-with-asset-chains-raw.json" +chain_spec_command = "./bin/chain-spec-generator {% raw %} {{chainName}} {% endraw %}" [[relaychain.nodes]] name = "alice" @@ -30,8 +30,8 @@ chain_spec_path = "./bin/polkadot-local-with-asset-chains-raw.json" [[parachains]] id = 1000 -# chain = "asset-hub-polkadot-local" -chain = "statemint-local" +chain = "asset-hub-polkadot-local" +chain_spec_command = "./bin/chain-spec-generator {% raw %} {{chainName}} {% endraw %}" cumulus_based = true [[parachains.collators]] @@ -44,7 +44,7 @@ cumulus_based = true name = "collator2" ws_port = 9811 command = "./bin/polkadot-parachain" - args = [ "-lxcm=trace" ] + args = [ "-lxcm=trace", "--state-cache-size=0"] [[parachains]] @@ -62,15 +62,15 @@ cumulus_based = true name = "collator4" ws_port = 9821 command = "./bin/polkadot-parachain" - args = [ "-lxcm=trace" ] + args = [ "-lxcm=trace", "--state-cache-size=0"] -# [[hrmpChannels]] +# [[hrmp_channels]] # sender = 1000 # recipient = 2000 # maxCapacity = 8 # maxMessageSize = 8192 -# [[hrmpChannels]] +# [[hrmp_channels]] # sender = 2000 # recipient = 1000 # maxCapacity = 8 diff --git a/examples/collectives-polkadot/0_xcm/0_init.yml b/examples/collectives-polkadot/0_xcm/0_init.yml index 78de930..9e2ae48 100644 --- a/examples/collectives-polkadot/0_xcm/0_init.yml +++ b/examples/collectives-polkadot/0_xcm/0_init.yml @@ -87,8 +87,8 @@ tests: - name: xcmPallet.Sent - name: polkadotXcm.SupportedVersionChanged chain: *collectives_parachain - # result: { location: { parents: 1, interior: Here }, version: *xcm_version } - result: [{ parents: 1, interior: Here }, *xcm_version ] + result: { location: { parents: 1, interior: Here }, version: *xcm_version } + # result: [{ parents: 1, interior: Here }, *xcm_version ] - name: dmpQueue.ExecutedDownward chain: *collectives_parachain result: { outcome: { Complete: {} } } @@ -145,8 +145,8 @@ tests: - name: xcmPallet.Sent - name: polkadotXcm.SupportedVersionChanged chain: *assethub_parachain - # result: { location: { parents: 1, interior: Here }, version: *xcm_version } - result: [{ parents: 1, interior: Here }, *xcm_version ] + result: { location: { parents: 1, interior: Here }, version: *xcm_version } + # result: [{ parents: 1, interior: Here }, *xcm_version ] - name: dmpQueue.ExecutedDownward chain: *assethub_parachain result: { outcome: { Complete: {} } } diff --git a/examples/collectives-polkadot/0_xcm/1_teleport.yml b/examples/collectives-polkadot/0_xcm/1_teleport.yml index c3f7568..2a23479 100644 --- a/examples/collectives-polkadot/0_xcm/1_teleport.yml +++ b/examples/collectives-polkadot/0_xcm/1_teleport.yml @@ -121,8 +121,8 @@ tests: - name: balances.Withdraw result: { who: *acc_alice_ss58, amount: 10000000000000 } - name: polkadotXcm.Attempted - # result: { outcome: { Complete: {} } } - result: [{ Complete : { refTime: '3,000,000,000', 'proofSize': 0 }}] + result: { outcome: { Complete: {} } } + # result: [{ Complete : { refTime: '3,000,000,000', 'proofSize': 0 }}] - name: messageQueue.Processed chain: *relay_chain result: { origin: { Ump: { Para: *cp_id } }, success: true} diff --git a/examples/collectives-polkadot/1_alliance/3_kick_member.yml b/examples/collectives-polkadot/1_alliance/3_kick_member.yml index 3884cf1..0ff8e86 100644 --- a/examples/collectives-polkadot/1_alliance/3_kick_member.yml +++ b/examples/collectives-polkadot/1_alliance/3_kick_member.yml @@ -136,8 +136,8 @@ tests: chain: *collectives_parachain result: { outcome: { Complete: {}}} # Failing because it is using a not limited teleport when slashing - # - name: messageQueue.Processed - # result: { origin: { Ump: { Para: *cp_id }}, success: true } + - name: messageQueue.Processed + result: { origin: { Ump: { Para: *cp_id }}, success: true } - queries: balance_rc_treasury_after: diff --git a/examples/collectives-polkadot/3_fellowship/0_init.yml b/examples/collectives-polkadot/3_fellowship/0_init.yml index 013ad4d..98a0883 100644 --- a/examples/collectives-polkadot/3_fellowship/0_init.yml +++ b/examples/collectives-polkadot/3_fellowship/0_init.yml @@ -1,199 +1,199 @@ -# --- -# settings: -# chains: -# relay_chain: &relay_chain -# wsPort: 9700 -# collectives_parachain: &collectives_parachain -# wsPort: 9710 -# paraId: &cp_id 1001 -# variables: -# common: -# require_weight_at_most: &weight_at_most {refTime: 100000000000, proofSize: 200000 } -# proposal_index: &proposal_index 1 -# chains: -# accounts: -# alice_signer: &alice_signer //Alice -# bob_signer: &bob_signer //Bob -# alice_account32: &acc_alice_acc32 '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d' -# alice_ss58: &acc_alice_ss58 '15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5' -# decodedCalls: -# fellowship_induct_alice_cp: -# chain: *collectives_parachain -# encode: true -# pallet: fellowshipCore -# call: induct -# args: [ -# *acc_alice_acc32 -# ] -# fellowship_promote_1_alice_cp: -# chain: *collectives_parachain -# encode: true -# pallet: fellowshipCore -# call: promote -# args: [ -# *acc_alice_acc32, -# 1 -# ] -# fellowship_promote_2_alice_cp: -# chain: *collectives_parachain -# encode: true -# pallet: fellowshipCore -# call: promote -# args: [ -# *acc_alice_acc32, -# 2 -# ] -# fellowship_promote_3_alice_cp: -# chain: *collectives_parachain -# encode: true -# pallet: fellowshipCore -# call: promote -# args: [ -# *acc_alice_acc32, -# 3 -# ] -# send_init_fellowship_rc: -# chain: *relay_chain -# encode: false -# pallet: xcmPallet -# call: send -# args: [ -# { v3: { parents: 0, interior: { x1: { parachain: *cp_id }}}}, # destination -# { -# v3: [ #message -# { -# UnpaidExecution: { -# weightLimit: Unlimited -# } -# }, -# { # since batch_all not yet allowed over xcm, we have to send multiple `Transact`. -# Transact: { -# originKind: Xcm, -# requireWeightAtMost: *weight_at_most, -# call: $fellowship_induct_alice_cp -# } -# }, -# { -# Transact: { -# originKind: Xcm, -# requireWeightAtMost: *weight_at_most, -# call: $fellowship_promote_1_alice_cp -# } -# }, -# { -# Transact: { -# originKind: Xcm, -# requireWeightAtMost: *weight_at_most, -# call: $fellowship_promote_2_alice_cp -# } -# }, -# { -# Transact: { -# originKind: Xcm, -# requireWeightAtMost: *weight_at_most, -# call: $fellowship_promote_3_alice_cp -# } -# } -# ] -# } -# ] +--- +settings: + chains: + relay_chain: &relay_chain + wsPort: 9700 + collectives_parachain: &collectives_parachain + wsPort: 9710 + paraId: &cp_id 1001 + variables: + common: + require_weight_at_most: &weight_at_most {refTime: 15000000000, proofSize: 100000 } + proposal_index: &proposal_index 1 + chains: + accounts: + alice_signer: &alice_signer //Alice + bob_signer: &bob_signer //Bob + alice_account32: &acc_alice_acc32 '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d' + alice_ss58: &acc_alice_ss58 '15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5' + decodedCalls: + fellowship_induct_alice_cp: + chain: *collectives_parachain + encode: true + pallet: fellowshipCore + call: induct + args: [ + *acc_alice_acc32 + ] + fellowship_promote_1_alice_cp: + chain: *collectives_parachain + encode: true + pallet: fellowshipCore + call: promote + args: [ + *acc_alice_acc32, + 1 + ] + fellowship_promote_2_alice_cp: + chain: *collectives_parachain + encode: true + pallet: fellowshipCore + call: promote + args: [ + *acc_alice_acc32, + 2 + ] + fellowship_promote_3_alice_cp: + chain: *collectives_parachain + encode: true + pallet: fellowshipCore + call: promote + args: [ + *acc_alice_acc32, + 3 + ] + send_init_fellowship_rc: + chain: *relay_chain + encode: false + pallet: xcmPallet + call: send + args: [ + { v3: { parents: 0, interior: { x1: { parachain: *cp_id }}}}, # destination + { + v3: [ #message + { + UnpaidExecution: { + weightLimit: Unlimited + } + }, + { # since batch_all not yet allowed over xcm, we have to send multiple `Transact`. + Transact: { + originKind: Xcm, + requireWeightAtMost: *weight_at_most, + call: $fellowship_induct_alice_cp + } + }, + { + Transact: { + originKind: Xcm, + requireWeightAtMost: *weight_at_most, + call: $fellowship_promote_1_alice_cp + } + }, + { + Transact: { + originKind: Xcm, + requireWeightAtMost: *weight_at_most, + call: $fellowship_promote_2_alice_cp + } + }, + { + Transact: { + originKind: Xcm, + requireWeightAtMost: *weight_at_most, + call: $fellowship_promote_3_alice_cp + } + } + ] + } + ] -# tests: -# - name: Fellowship -# describes: -# - name: Init the Fellowship -# its: -# - name: Note preimage from init fellowship call -# actions: -# - extrinsics: -# - chain: *relay_chain -# signer: *alice_signer -# pallet: preimage -# call: notePreimage -# args: [ -# $send_init_fellowship_rc -# ] -# events: -# - name: preimage.Noted -# result: { hash_: $send_init_fellowship_rc.hash } -# - name: Submit a proposal to init the Fellowship -# actions: -# - extrinsics: -# - chain: *relay_chain -# signer: *alice_signer -# pallet: referenda -# call: submit -# args: [ -# { -# "Origins": "FellowshipAdmin", -# }, -# { -# "Lookup": { -# "hash_": $send_init_fellowship_rc.hash, -# "len": $send_init_fellowship_rc.len, -# }, -# }, -# { -# "After": 1, -# }, -# ] -# events: -# - name: referenda.Submitted -# result: { -# index: *proposal_index, -# proposal: { Lookup: { hash_: $send_init_fellowship_rc.hash, len: $send_init_fellowship_rc.len }} -# } -# - name: Alice Vote Aye -# actions: -# - extrinsics: -# - chain: *relay_chain -# signer: *alice_signer -# pallet: convictionVoting -# call: vote -# args: [ -# *proposal_index, -# { -# "Standard": { -# "vote": { -# "aye": true, -# "conviction": "Locked1x", -# }, -# "balance": 200000000000000, -# } -# }, -# ] # TODO no Aye event to catch -# - name: Bob Vote Aye -# actions: -# - extrinsics: -# - chain: *relay_chain -# signer: *bob_signer -# pallet: convictionVoting -# call: vote -# args: [ -# *proposal_index, -# { -# "Standard": { -# "vote": { -# "aye": true, -# "conviction": "Locked1x", -# }, -# "balance": 200000000000000, -# } -# }, -# ] # TODO no Aye event to catch -# - name: Submit the decision deposit -# actions: -# - extrinsics: -# - chain: *relay_chain -# signer: *alice_signer -# pallet: referenda -# call: placeDecisionDeposit -# args: [ -# *proposal_index, -# ] -# events: -# - name: referenda.DecisionDepositPlaced -# result: { index: *proposal_index } -# - name: fellowshipCollective.MemberAdded -# chain: *collectives_parachain -# result: { who: *acc_alice_ss58 } +tests: + - name: Fellowship + describes: + - name: Init the Fellowship + its: + - name: Note preimage from init fellowship call + actions: + - extrinsics: + - chain: *relay_chain + signer: *alice_signer + pallet: preimage + call: notePreimage + args: [ + $send_init_fellowship_rc + ] + events: + - name: preimage.Noted + result: { hash_: $send_init_fellowship_rc.hash } + - name: Submit a proposal to init the Fellowship + actions: + - extrinsics: + - chain: *relay_chain + signer: *alice_signer + pallet: referenda + call: submit + args: [ + { + "Origins": "FellowshipAdmin", + }, + { + "Lookup": { + "hash_": $send_init_fellowship_rc.hash, + "len": $send_init_fellowship_rc.len, + }, + }, + { + "After": 1, + }, + ] + events: + - name: referenda.Submitted + result: { + index: *proposal_index, + proposal: { Lookup: { hash_: $send_init_fellowship_rc.hash, len: $send_init_fellowship_rc.len }} + } + - name: Alice Vote Aye + actions: + - extrinsics: + - chain: *relay_chain + signer: *alice_signer + pallet: convictionVoting + call: vote + args: [ + *proposal_index, + { + "Standard": { + "vote": { + "aye": true, + "conviction": "Locked1x", + }, + "balance": 200000000000000, + } + }, + ] # TODO no Aye event to catch + - name: Bob Vote Aye + actions: + - extrinsics: + - chain: *relay_chain + signer: *bob_signer + pallet: convictionVoting + call: vote + args: [ + *proposal_index, + { + "Standard": { + "vote": { + "aye": true, + "conviction": "Locked1x", + }, + "balance": 200000000000000, + } + }, + ] # TODO no Aye event to catch + - name: Submit the decision deposit + actions: + - extrinsics: + - chain: *relay_chain + signer: *alice_signer + pallet: referenda + call: placeDecisionDeposit + args: [ + *proposal_index, + ] + events: + - name: referenda.DecisionDepositPlaced + result: { index: *proposal_index } + - name: fellowshipCollective.MemberAdded + chain: *collectives_parachain + result: { who: *acc_alice_ss58 } diff --git a/examples/collectives-polkadot/3_fellowship/1_whitelist_call.yml b/examples/collectives-polkadot/3_fellowship/1_whitelist_call.yml index 13a1f82..bdce3fa 100644 --- a/examples/collectives-polkadot/3_fellowship/1_whitelist_call.yml +++ b/examples/collectives-polkadot/3_fellowship/1_whitelist_call.yml @@ -1,145 +1,145 @@ -# --- -# settings: -# chains: -# relay_chain: &relay_chain -# wsPort: 9700 -# collectives_parachain: &collectives_parachain -# wsPort: 9710 -# paraId: &cp_id 1001 -# variables: -# common: -# require_weight_at_most: &weight_at_most {refTime: 100000000000000, proofSize: 2000000 } -# fellows_proposal_index: &fellows_proposal_index 0 -# chains: -# accounts: -# alice_signer: &alice_signer //Alice -# decodedCalls: -# remark_rc: -# chain: *relay_chain -# encode: false -# pallet: system -# call: remark -# args: [ -# "0x10" -# ] -# whitelist_remark_rc: -# chain: *relay_chain -# encode: true -# pallet: whitelist -# call: whitelistCall -# args: [ -# $remark_rc.hash -# ] -# send_whitelist_remark_cp: -# chain: *collectives_parachain -# encode: false -# pallet: polkadotXcm -# call: send -# args: [ -# { v3: { parents: 1, interior: { here: true }}}, # destination -# { -# v3: [ #message -# { -# UnpaidExecution: { -# weightLimit: Unlimited -# } -# }, -# { -# Transact: { -# originKind: Xcm, -# requireWeightAtMost: *weight_at_most, -# call: $whitelist_remark_rc -# } -# } -# ] -# } -# ] +--- +settings: + chains: + relay_chain: &relay_chain + wsPort: 9700 + collectives_parachain: &collectives_parachain + wsPort: 9710 + paraId: &cp_id 1001 + variables: + common: + require_weight_at_most: &weight_at_most {refTime: 15000000000, proofSize: 100000 } + fellows_proposal_index: &fellows_proposal_index 0 + chains: + accounts: + alice_signer: &alice_signer //Alice + decodedCalls: + remark_rc: + chain: *relay_chain + encode: false + pallet: system + call: remark + args: [ + "0x10" + ] + whitelist_remark_rc: + chain: *relay_chain + encode: true + pallet: whitelist + call: whitelistCall + args: [ + $remark_rc.hash + ] + send_whitelist_remark_cp: + chain: *collectives_parachain + encode: false + pallet: polkadotXcm + call: send + args: [ + { v3: { parents: 1, interior: { here: true }}}, # destination + { + v3: [ #message + { + UnpaidExecution: { + weightLimit: Unlimited + } + }, + { + Transact: { + originKind: Xcm, + requireWeightAtMost: *weight_at_most, + call: $whitelist_remark_rc + } + } + ] + } + ] -# tests: -# - name: Fellowship -# describes: -# - name: The Fellowship white list the call -# its: -# - name: Note preimage from the whitelist call on the Relay Chain -# actions: -# - extrinsics: -# - chain: *relay_chain -# signer: *alice_signer -# pallet: preimage -# call: notePreimage -# args: [ -# $remark_rc -# ] -# events: -# - name: preimage.Noted -# result: { hash_: $remark_rc.hash } -# - name: Note preimage from the xcm send call to white list the call above -# actions: -# - extrinsics: -# - chain: *collectives_parachain -# signer: *alice_signer -# pallet: preimage -# call: notePreimage -# args: [ -# $send_whitelist_remark_cp, -# ] -# events: -# - name: preimage.Noted -# result: { hash_: $send_whitelist_remark_cp.hash } -# - name: Submit a proposal to while list the call -# actions: -# - extrinsics: -# - chain: *collectives_parachain -# signer: *alice_signer -# pallet: fellowshipReferenda -# call: submit -# args: [ -# { -# "FellowshipOrigins": "Fellows", -# }, -# { -# "Lookup": { # TODO obtain from the call https://github.com/paritytech/parachains-integration-tests/issues/103 -# "hash_": $send_whitelist_remark_cp.hash, -# "len": $send_whitelist_remark_cp.len, -# }, -# }, -# { -# "After": 1, -# }, -# ] -# events: -# - name: fellowshipReferenda.Submitted -# result: { -# index: *fellows_proposal_index, -# proposal: { Lookup: { hash_: $send_whitelist_remark_cp.hash, len: $send_whitelist_remark_cp.len}} -# } -# - name: Vote Aye -# actions: -# - extrinsics: -# - chain: *collectives_parachain -# signer: *alice_signer -# pallet: fellowshipCollective -# call: vote -# args: [ -# *fellows_proposal_index, -# true, -# ] -# events: -# - name: fellowshipCollective.Voted -# result: { poll: *fellows_proposal_index, vote: { Aye: 1 } } -# - name: Submit the decision deposit -# actions: -# - extrinsics: -# - chain: *collectives_parachain -# signer: *alice_signer -# pallet: fellowshipReferenda -# call: placeDecisionDeposit -# args: [ -# *fellows_proposal_index, -# ] -# events: -# - name: fellowshipReferenda.DecisionDepositPlaced -# result: {index: *fellows_proposal_index} -# - name: whitelist.CallWhitelisted -# chain: *relay_chain -# result: { callHash: $remark_rc.hash } +tests: + - name: Fellowship + describes: + - name: The Fellowship white list the call + its: + - name: Note preimage from the whitelist call on the Relay Chain + actions: + - extrinsics: + - chain: *relay_chain + signer: *alice_signer + pallet: preimage + call: notePreimage + args: [ + $remark_rc + ] + events: + - name: preimage.Noted + result: { hash_: $remark_rc.hash } + - name: Note preimage from the xcm send call to white list the call above + actions: + - extrinsics: + - chain: *collectives_parachain + signer: *alice_signer + pallet: preimage + call: notePreimage + args: [ + $send_whitelist_remark_cp, + ] + events: + - name: preimage.Noted + result: { hash_: $send_whitelist_remark_cp.hash } + - name: Submit a proposal to while list the call + actions: + - extrinsics: + - chain: *collectives_parachain + signer: *alice_signer + pallet: fellowshipReferenda + call: submit + args: [ + { + "FellowshipOrigins": "Fellows", + }, + { + "Lookup": { # TODO obtain from the call https://github.com/paritytech/parachains-integration-tests/issues/103 + "hash_": $send_whitelist_remark_cp.hash, + "len": $send_whitelist_remark_cp.len, + }, + }, + { + "After": 1, + }, + ] + events: + - name: fellowshipReferenda.Submitted + result: { + index: *fellows_proposal_index, + proposal: { Lookup: { hash_: $send_whitelist_remark_cp.hash, len: $send_whitelist_remark_cp.len}} + } + - name: Vote Aye + actions: + - extrinsics: + - chain: *collectives_parachain + signer: *alice_signer + pallet: fellowshipCollective + call: vote + args: [ + *fellows_proposal_index, + true, + ] + events: + - name: fellowshipCollective.Voted + result: { poll: *fellows_proposal_index, vote: { Aye: 1 } } + - name: Submit the decision deposit + actions: + - extrinsics: + - chain: *collectives_parachain + signer: *alice_signer + pallet: fellowshipReferenda + call: placeDecisionDeposit + args: [ + *fellows_proposal_index, + ] + events: + - name: fellowshipReferenda.DecisionDepositPlaced + result: {index: *fellows_proposal_index} + - name: whitelist.CallWhitelisted + chain: *relay_chain + result: { callHash: $remark_rc.hash } diff --git a/examples/collectives-polkadot/3_fellowship/2_assethub.yml b/examples/collectives-polkadot/3_fellowship/2_assethub.yml index 5f469ed..66a51c3 100644 --- a/examples/collectives-polkadot/3_fellowship/2_assethub.yml +++ b/examples/collectives-polkadot/3_fellowship/2_assethub.yml @@ -1,125 +1,125 @@ -# --- -# settings: -# chains: -# relay_chain: &relay_chain -# wsPort: 9700 -# collectives_parachain: &collectives_parachain -# wsPort: 9710 -# paraId: &cp_id 1001 -# assethub_parachain: &assethub_parachain -# wsPort: 9810 -# paraId: &ap_id 1000 -# variables: -# common: -# require_weight_at_most: &weight_at_most {refTime: 100000000000, proofSize: 200000 } -# fellows_proposal_index: &fellows_proposal_index 1 -# chains: -# accounts: -# alice_signer: &alice_signer //Alice +--- +settings: + chains: + relay_chain: &relay_chain + wsPort: 9700 + collectives_parachain: &collectives_parachain + wsPort: 9710 + paraId: &cp_id 1001 + assethub_parachain: &assethub_parachain + wsPort: 9810 + paraId: &ap_id 1000 + variables: + common: + require_weight_at_most: &weight_at_most {refTime: 15000000000, proofSize: 100000 } + fellows_proposal_index: &fellows_proposal_index 1 + chains: + accounts: + alice_signer: &alice_signer //Alice -# decodedCalls: -# xcmp_resume_execution_ap: -# chain: *assethub_parachain -# encode: true -# pallet: xcmpQueue -# call: resumeXcmExecution -# args: [] -# send_xcmp_resume_execution_cp: -# chain: *collectives_parachain -# encode: false -# pallet: polkadotXcm -# call: send -# args: [ -# { v3: { parents: 1, interior: { x1: { parachain: *ap_id }}}}, # destination -# { -# v3: [ #message -# { -# UnpaidExecution: { -# weightLimit: Unlimited -# } -# }, -# { -# Transact: { -# originKind: Xcm, -# requireWeightAtMost: *weight_at_most, -# call: $xcmp_resume_execution_ap -# } -# } -# ] -# } -# ] + decodedCalls: + xcmp_resume_execution_ap: + chain: *assethub_parachain + encode: true + pallet: xcmpQueue + call: resumeXcmExecution + args: [] + send_xcmp_resume_execution_cp: + chain: *collectives_parachain + encode: false + pallet: polkadotXcm + call: send + args: [ + { v3: { parents: 1, interior: { x1: { parachain: *ap_id }}}}, # destination + { + v3: [ #message + { + UnpaidExecution: { + weightLimit: Unlimited + } + }, + { + Transact: { + originKind: Xcm, + requireWeightAtMost: *weight_at_most, + call: $xcmp_resume_execution_ap + } + } + ] + } + ] -# tests: -# - name: Fellowship -# describes: -# - name: The Fellowship resume xcm execution for the xcmp queue on AssetHub -# its: -# - name: Note preimage from the xcm send call to suspend_xcm_execution -# actions: -# - extrinsics: -# - chain: *collectives_parachain -# signer: *alice_signer -# pallet: preimage -# call: notePreimage -# args: [ -# $send_xcmp_resume_execution_cp -# ] -# events: -# - name: preimage.Noted -# result: {hash_: $send_xcmp_resume_execution_cp.hash } -# - name: Submit a proposal to resume xcm execution on AssetHub -# actions: -# - extrinsics: -# - chain: *collectives_parachain -# signer: *alice_signer -# pallet: fellowshipReferenda -# call: submit -# args: [ -# { -# "FellowshipOrigins": "Fellows", -# }, -# { -# "Lookup": { -# "hash_": $send_xcmp_resume_execution_cp.hash, -# "len": $send_xcmp_resume_execution_cp.len, -# }, -# }, -# { -# "After": 1, -# }, -# ] -# events: -# - name: fellowshipReferenda.Submitted -# result: { -# index: 1, -# proposal: {Lookup: {hash_: $send_xcmp_resume_execution_cp.hash, len: $send_xcmp_resume_execution_cp.len}} -# } -# - name: Vote Aye -# actions: -# - extrinsics: -# - chain: *collectives_parachain -# signer: *alice_signer -# pallet: fellowshipCollective -# call: vote -# args: [ -# *fellows_proposal_index, -# true, -# ] -# events: -# - name: fellowshipCollective.Voted -# result: { poll: *fellows_proposal_index, vote: { Aye: 1 } } -# - name: Submit the decision deposit -# actions: -# - extrinsics: -# - chain: *collectives_parachain -# signer: *alice_signer -# pallet: fellowshipReferenda -# call: placeDecisionDeposit -# args: [ -# *fellows_proposal_index, -# ] -# events: -# - name: fellowshipReferenda.DecisionDepositPlaced -# result: {index: *fellows_proposal_index} -# - name: xcmpQueue.Success -# chain: *assethub_parachain +tests: + - name: Fellowship + describes: + - name: The Fellowship resume xcm execution for the xcmp queue on AssetHub + its: + - name: Note preimage from the xcm send call to suspend_xcm_execution + actions: + - extrinsics: + - chain: *collectives_parachain + signer: *alice_signer + pallet: preimage + call: notePreimage + args: [ + $send_xcmp_resume_execution_cp + ] + events: + - name: preimage.Noted + result: {hash_: $send_xcmp_resume_execution_cp.hash } + - name: Submit a proposal to resume xcm execution on AssetHub + actions: + - extrinsics: + - chain: *collectives_parachain + signer: *alice_signer + pallet: fellowshipReferenda + call: submit + args: [ + { + "FellowshipOrigins": "Fellows", + }, + { + "Lookup": { + "hash_": $send_xcmp_resume_execution_cp.hash, + "len": $send_xcmp_resume_execution_cp.len, + }, + }, + { + "After": 1, + }, + ] + events: + - name: fellowshipReferenda.Submitted + result: { + index: 1, + proposal: {Lookup: {hash_: $send_xcmp_resume_execution_cp.hash, len: $send_xcmp_resume_execution_cp.len}} + } + - name: Vote Aye + actions: + - extrinsics: + - chain: *collectives_parachain + signer: *alice_signer + pallet: fellowshipCollective + call: vote + args: [ + *fellows_proposal_index, + true, + ] + events: + - name: fellowshipCollective.Voted + result: { poll: *fellows_proposal_index, vote: { Aye: 1 } } + - name: Submit the decision deposit + actions: + - extrinsics: + - chain: *collectives_parachain + signer: *alice_signer + pallet: fellowshipReferenda + call: placeDecisionDeposit + args: [ + *fellows_proposal_index, + ] + events: + - name: fellowshipReferenda.DecisionDepositPlaced + result: {index: *fellows_proposal_index} + - name: xcmpQueue.Success + chain: *assethub_parachain diff --git a/examples/collectives-polkadot/config.toml b/examples/collectives-polkadot/config.toml index 4dfc7d7..23cb17e 100644 --- a/examples/collectives-polkadot/config.toml +++ b/examples/collectives-polkadot/config.toml @@ -2,7 +2,7 @@ default_command = "./bin/polkadot" default_args = [ "-lparachain=trace", "-lxcm=trace" ] chain = "polkadot-local" -chain_spec_path = "./bin/polkadot-local-with-collectives-chains-raw.json" +chain_spec_command = "./bin/chain-spec-generator {% raw %} {{chainName}} {% endraw %}" [[relaychain.nodes]] name = "alice" @@ -23,6 +23,7 @@ chain_spec_path = "./bin/polkadot-local-with-collectives-chains-raw.json" [[parachains]] id = 1001 chain = "collectives-polkadot-local" +chain_spec_command = "./bin/chain-spec-generator {% raw %} {{chainName}} {% endraw %}" cumulus_based = true [[parachains.collators]] @@ -34,21 +35,34 @@ cumulus_based = true [[parachains.collators]] name = "collator2" command = "./bin/polkadot-parachain" - args = ["-lxcm=trace"] + args = ["-lxcm=trace", "--state-cache-size=0"] [[parachains]] id = 1000 -chain = "statemint-local" +chain = "asset-hub-polkadot-local" +chain_spec_command = "./bin/chain-spec-generator {% raw %} {{chainName}} {% endraw %}" cumulus_based = true [[parachains.collators]] name = "collator3" ws_port = 9810 command = "./bin/polkadot-parachain" - args = ["-lxcm=trace", "-lruntime=trace"] + args = ["-lxcm=trace", "--state-cache-size=0"] [[parachains.collators]] name = "collator4" command = "./bin/polkadot-parachain" - args = ["-lxcm=trace", "-lruntime=trace"] + args = ["-lxcm=trace", "--state-cache-size=0"] + +# [[hrmp_channels]] +# sender = 1001 +# recipient = 1000 +# maxCapacity = 8 +# maxMessageSize = 8192 + +# [[hrmp_channels]] +# sender = 1000 +# recipient = 1001 +# maxCapacity = 8 +# maxMessageSize = 8192