diff --git a/cumulus/parachains/integration-tests/e2e/collectives/README.md b/cumulus/parachains/integration-tests/e2e/collectives/README.md new file mode 100644 index 0000000000000000000000000000000000000000..98ea77aac60642ac7001297bc5d3024124cd7822 --- /dev/null +++ b/cumulus/parachains/integration-tests/e2e/collectives/README.md @@ -0,0 +1,22 @@ +E2E tests concerning Polkadot Governance and the Collectives Parachain. The tests run by the Parachain Integration Tests [tool](https://github.com/paritytech/parachains-integration-tests/). + +## Requirements +The tests require some changes to the regular production runtime builds: + +RelayChain runtime: +1. Alice has SUDO +2. Public Referenda `StakingAdmin`, `FellowshipAdmin` tracks settings (see the corresponding keys of the `TRACKS_DATA` constant in the `governance::tracks` module of the Relay Chain runtime crate): +``` yaml +prepare_period: 5 Block, +decision_period: 1 Block, +confirm_period: 1 Block, +min_enactment_period: 1 Block, +``` +Collectives runtime: +1. Fellowship Referenda `Fellows` track settings (see the corresponding key of the `TRACKS_DATA` constant in the `fellowship::tracks` module of the Collectives runtime crate): +``` yaml +prepare_period: 5 Block, +decision_period: 1 Block, +confirm_period: 1 Block, +min_enactment_period: 1 Block, +``` diff --git a/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/0_xcm/0_init.yml b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/0_xcm/0_init.yml index 20ec003771542c1270c76038ea6b1eee33fc2595..33f4d603e2a74b1275186fd5f237099d0c531648 100644 --- a/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/0_xcm/0_init.yml +++ b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/0_xcm/0_init.yml @@ -6,6 +6,9 @@ settings: collectives_parachain: &collectives_parachain wsPort: 9710 paraId: &cp_id 1001 + assethub_parachain: &assethub_parachain + wsPort: 9810 + paraId: &sp_id 1000 variables: xcm_version: &xcm_version 3 weight_threshold: &weight_threshold { refTime: [10, 10], proofSize: [10, 10] } @@ -13,7 +16,7 @@ settings: accounts: alice_signer: &alice_signer //Alice decodedCalls: - cp_force_xcm_version: + ap_force_xcm_version: chain: *collectives_parachain pallet: polkadotXcm call: forceXcmVersion @@ -64,7 +67,7 @@ tests: v3: [ # message { UnpaidExecution: { - weightLimit: { + weightLimit: { limited: { refTime: 2200000000, # 2_200_000_000 proofSize: 200000, # 200_000 @@ -79,7 +82,7 @@ tests: refTime: 200000000, # 200_000_000 proofSize: 0, }, - call: $cp_force_xcm_version + call: $ap_force_xcm_version } } ] @@ -89,10 +92,75 @@ tests: - name: sudo.Sudid result: { sudoResult: Ok } - name: xcmPallet.Sent + - name: polkadotXcm.SupportedVersionChanged + chain: *collectives_parachain + result: { location: { parents: 1, interior: Here }, version: *xcm_version } - name: dmpQueue.ExecutedDownward chain: *collectives_parachain threshold: *weight_threshold result: { outcome: { Complete: { refTime: '2,200,000,000', proofSize: 0 }}} + - extrinsics: # Relay Chain sets supported version for AssetHub Parachain + - chain: *relay_chain + sudo: true + signer: *alice_signer + pallet: xcmPallet + call: forceXcmVersion + args: [ + { # location + parents: 0, + interior: { + X1: { + Parachain: *sp_id + } + } + }, + *xcm_version + ] + events: + - name: sudo.Sudid + result: { sudoResult: Ok } + - name: xcmPallet.SupportedVersionChanged + result: { location: { parents: 0, interior: { X1: { Parachain: *sp_id } } }, version: *xcm_version } + - extrinsics: # AssetHub Parachain sets supported version for Relay Chain through it + - chain: *relay_chain + signer: *alice_signer + sudo: true + pallet: xcmPallet + call: send + args: [ + { v3: { 0, interior: { x1: { parachain: *sp_id }}}}, # destination + { + v3: [ # message + { + UnpaidExecution: { + weightLimit: { + limited: { + refTime: 2200000000, # 2_200_000_000 + proofSize: 200000, # 200_000 + }, + } + } + }, + { + Transact: { + originKind: Superuser, + requireWeightAtMost: { + refTime: 200000000, # 200_000_000 + proofSize: 0, + }, + call: $ap_force_xcm_version + } + } + ] + } + ] + events: + - name: sudo.Sudid + result: { sudoResult: Ok } + - name: xcmPallet.Sent - name: polkadotXcm.SupportedVersionChanged - chain: *collectives_parachain + chain: *assethub_parachain result: { location: { parents: 1, interior: Here }, version: *xcm_version } + - name: dmpQueue.ExecutedDownward + chain: *assethub_parachain + result: { outcome: { Complete: {} } } diff --git a/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/0_xcm/1_teleport.yml b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/0_xcm/1_teleport.yml index 5f477f799d8a17e4f8992ff45c79c0b44eb4eb89..cda04859b195a6158f7ca97a0d34721d3287de76 100644 --- a/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/0_xcm/1_teleport.yml +++ b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/0_xcm/1_teleport.yml @@ -14,7 +14,6 @@ settings: alice_ss58: &acc_alice_ss58 '15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5' checking_account: &checking_account '13UVJyLnbVp9x5XDyJv8g8r3UddNwBrdaH7AADCmw9XQWvYW' - tests: - name: Teleport assets from Relay Chain to Collectives Parachain successful. before: @@ -131,7 +130,7 @@ tests: - name: messageQueue.Processed chain: *relay_chain threshold: *weight_threshold - result: { origin: { Ump: { Para: '1,001' } }, weightUsed: { refTime: '4,000,000,000', proofSize: '0' }, success: true } + result: { origin: { Ump: { Para: *cp_id } }, weightUsed: { refTime: '4,000,000,000', proofSize: '0' }, success: true } - queries: balance_rc_alice_3: chain: *relay_chain diff --git a/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/0_xcm/3_hrmp-open-channels.yml b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/0_xcm/3_hrmp-open-channels.yml new file mode 100644 index 0000000000000000000000000000000000000000..1038ec8dc42b314e4d46d744aeba9afde5de38a4 --- /dev/null +++ b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/0_xcm/3_hrmp-open-channels.yml @@ -0,0 +1,59 @@ +--- +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: &sp_id 1000 + variables: + chains: + accounts: + alice_signer: &alice_signer //Alice + hrmp: + proposed_max_capacity: &hrmp_proposed_max_capacity 8 + proposed_max_message_size: &hrmp_proposed_max_message_size 8192 +tests: + - name: HRMP + describes: + - name: Force Open HRMP Channel From Collectives Parachain → AssetHub Parachain + its: + - name: Alice calls hrmp.forceOpenHrmpChannel + actions: + - extrinsics: + - chain: *relay_chain + signer: *alice_signer + sudo: true + pallet: hrmp + call: forceOpenHrmpChannel + args: [ + *cp_id, # sender + *sp_id, # recipient + *hrmp_proposed_max_capacity, # proposedMaxCapacity + *hrmp_proposed_max_message_size # proposedMaxMessageSize + ] + events: + - name: hrmp.HrmpChannelForceOpened + result: [*cp_id, *sp_id, *hrmp_proposed_max_capacity, *hrmp_proposed_max_message_size] + - name: Force Open HRMP Channel From AssetHub Parachain → Collectives Parachain + its: + - name: Alice calls hrmp.forceOpenHrmpChannel + actions: + - extrinsics: + - chain: *relay_chain + signer: *alice_signer + sudo: true + pallet: hrmp + call: forceOpenHrmpChannel + args: [ + *sp_id, # sender + *cp_id, # recipient + *hrmp_proposed_max_capacity, # proposedMaxCapacity + *hrmp_proposed_max_message_size # proposedMaxMessageSize + ] + events: + - name: hrmp.HrmpChannelForceOpened + result: [*sp_id, *cp_id, *hrmp_proposed_max_capacity, *hrmp_proposed_max_message_size] diff --git a/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/1_alliance/1_init_alliance.yml b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/1_alliance/1_init_alliance.yml index a455335fedc2ca787a614e496c3b424b861a8a0d..1e01c701744a82cfb6ff1ad716bd1bcb91351108 100644 --- a/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/1_alliance/1_init_alliance.yml +++ b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/1_alliance/1_init_alliance.yml @@ -104,6 +104,7 @@ tests: - name: sudo.Sudid result: { sudoResult: Ok } - name: xcmPallet.Sent + result: { origin: { parents: 0, interior: Here }, destination: { parents: 0, interior: { X1: { Parachain: *coll_para_id }}}} - name: alliance.MembersInitialized chain: *collectives_parachain - name: dmpQueue.ExecutedDownward @@ -154,6 +155,7 @@ tests: - name: sudo.Sudid result: { sudoResult: Ok } - name: xcmPallet.Sent + result: { origin: { parents: 0, interior: Here }, destination: { parents: 0, interior: { X1: { Parachain: *coll_para_id }}}} - name: dmpQueue.ExecutedDownward chain: *collectives_parachain threshold: *weight_threshold @@ -198,6 +200,7 @@ tests: - name: sudo.Sudid result: { sudoResult: Ok } - name: xcmPallet.Sent + result: { origin: { parents: 0, interior: Here }, destination: { parents: 0, interior: { X1: { Parachain: *coll_para_id }}}} - name: alliance.AllianceDisbanded chain: *collectives_parachain result: { fellowMembers: 6, allyMembers: 1, unreserved: 0 } @@ -244,6 +247,7 @@ tests: - name: sudo.Sudid result: { sudoResult: Ok } - name: xcmPallet.Sent + result: { origin: { parents: 0, interior: Here }, destination: { parents: 0, interior: { X1: { Parachain: *coll_para_id }}}} - name: alliance.MembersInitialized chain: *collectives_parachain - name: dmpQueue.ExecutedDownward diff --git a/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/1_alliance/3_kick_member.yml b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/1_alliance/3_kick_member.yml index 0c07a281e14fb5eb908f02c20ce90faaa370297b..a5941cb47234ee2866a095feb7198ed7b88f6860 100644 --- a/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/1_alliance/3_kick_member.yml +++ b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/1_alliance/3_kick_member.yml @@ -43,10 +43,12 @@ tests: events: - name: xcmPallet.Attempted threshold: *weight_threshold - result: [{ Complete: { refTime: '3,000,000,000', proofSize: 0 }}] + result: { + outcome: { Complete: { refTime: '3,000,000,000', proofSize: 0 }} + } - name: balances.Deposit chain: *collectives_parachain - result: { who: *acc_alice_ss58 } + result: { who: *acc_alice_ss58 } - name: dmpQueue.ExecutedDownward chain: *collectives_parachain threshold: *weight_threshold @@ -78,9 +80,9 @@ tests: events: - name: balances.Reserved chain: *collectives_parachain - result: { who: *acc_alice_ss58, amount: '10,000,000,000,000' } + result: { who: *acc_alice_ss58, amount: 10000000000000 } - name: alliance.NewAllyJoined - result: { ally: *acc_alice_ss58 } + result: {ally: *acc_alice_ss58, reserved: 10000000000000 } - queries: balance_cp_alice_after: chain: *collectives_parachain @@ -139,15 +141,18 @@ tests: - name: sudo.Sudid result: { sudoResult: Ok } - name: xcmPallet.Sent + result: { origin: { parents: 0, interior: Here }, destination: { parents: 0, interior: { X1: { Parachain: *cp_id }}}} - name: alliance.MemberKicked chain: *collectives_parachain - result: { member: *acc_alice_ss58 } + result: { member: *acc_alice_ss58, slashed: 10000000000000 } - name: dmpQueue.ExecutedDownward chain: *collectives_parachain threshold: *weight_threshold result: { outcome: { Complete: { refTime: '4,000,000,000', proofSize: '1,000,000' }} } + - name: messageQueue.Processed + result: { origin: { Ump: { Para: *cp_id }}, success: true } - queries: balance_rc_treasury_after: diff --git a/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/2_opengov/0_assethub.yml b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/2_opengov/0_assethub.yml new file mode 100644 index 0000000000000000000000000000000000000000..c53efff51fbfb218bd8bf57d4876084bbaccb30d --- /dev/null +++ b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/2_opengov/0_assethub.yml @@ -0,0 +1,149 @@ +--- +settings: + chains: + relay_chain: &relay_chain + wsPort: 9700 + assethub_parachain: &assethub_parachain + wsPort: 9810 + paraId: &ap_id 1000 + variables: + proposal_index: &proposal_index 0 + chains: + accounts: + alice_signer: &alice_signer //Alice + bob_signer: &bob_signer //Bob + decodedCalls: + set_candidates_ap: + chain: *assethub_parachain + encode: true + pallet: collatorSelection + call: setDesiredCandidates + args: [ + 3 + ] + send_set_candidates_rc: + chain: *relay_chain + encode: false + pallet: xcmPallet + call: send + args: [ + { v3: { parents: 0, interior: { x1: { parachain: *ap_id }}}}, # destination + { + v3: [ #message + { + UnpaidExecution: { + weightLimit: Unlimited + } + }, + { + Transact: { + originKind: Xcm, + requireWeightAtMost: { + refTime: 200000000, # 200_000_000 + proofSize: 100000, # 100_000 + }, + call: $set_candidates_ap + } + } + ] + } + ] +tests: + - name: OpenGov + describes: + - name: Set desired candidates on AssetHub from Relay Chain OpenGov Staking track + its: + - name: Note preimage from xcm send set_desired_candidates call + actions: + - extrinsics: + - chain: *relay_chain + signer: *alice_signer + pallet: preimage + call: notePreimage + args: [ + $send_set_candidates_rc + ] + events: + - name: preimage.Noted + result: {hash_: $send_set_candidates_rc.hash } + - name: Submit a proposal to set desired candidates + actions: + - extrinsics: + - chain: *relay_chain + signer: *alice_signer + pallet: referenda + call: submit + args: [ + { + "Origins": "StakingAdmin", + }, + { + "Lookup": { + "hash_": $send_set_candidates_rc.hash, + "len": $send_set_candidates_rc.len, + }, + }, + { + "After": 1, + }, + ] + events: + - name: referenda.Submitted + result: { + index: *proposal_index, + proposal: { Lookup: { hash_: $send_set_candidates_rc.hash, len: $send_set_candidates_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 event to catch https://github.com/paritytech/substrate/issues/14687 + - 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 event to catch https://github.com/paritytech/substrate/issues/14687 + - 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: collatorSelection.NewDesiredCandidates + chain: *assethub_parachain + result: { desiredCandidates: 3 } diff --git a/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/3_fellowship/0_init.yml b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/3_fellowship/0_init.yml new file mode 100644 index 0000000000000000000000000000000000000000..1e4b2dabe21178d3b7c1bd6087c9015665ae93e0 --- /dev/null +++ b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/3_fellowship/0_init.yml @@ -0,0 +1,209 @@ +--- +settings: + chains: + relay_chain: &relay_chain + wsPort: 9700 + collectives_parachain: &collectives_parachain + wsPort: 9710 + paraId: &cp_id 1001 + variables: + 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: { + refTime: 1500000000, # 1_500_000_000 + proofSize: 10000, # 10_000 + }, + call: $fellowship_induct_alice_cp + } + }, + { + Transact: { + originKind: Xcm, + requireWeightAtMost: { + refTime: 1500000000, # 1_500_000_000 + proofSize: 10000, # 10_000 + }, + call: $fellowship_promote_1_alice_cp + } + }, + { + Transact: { + originKind: Xcm, + requireWeightAtMost: { + refTime: 1500000000, # 1_500_000_000 + proofSize: 10000, # 10_000 + }, + call: $fellowship_promote_2_alice_cp + } + }, + { + Transact: { + originKind: Xcm, + requireWeightAtMost: { + refTime: 1500000000, # 1_500_000_000 + proofSize: 10000, # 10_000 + }, + 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 https://github.com/paritytech/substrate/issues/14687 + - 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 https://github.com/paritytech/substrate/issues/14687 + - 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/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/3_fellowship/1_whitelist_call.yml b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/3_fellowship/1_whitelist_call.yml new file mode 100644 index 0000000000000000000000000000000000000000..5991c7ae2f8a2d44c87ab7d4bf8d8501b790f254 --- /dev/null +++ b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/3_fellowship/1_whitelist_call.yml @@ -0,0 +1,146 @@ +--- +settings: + chains: + relay_chain: &relay_chain + wsPort: 9700 + collectives_parachain: &collectives_parachain + wsPort: 9710 + paraId: &cp_id 1001 + variables: + 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: { + refTime: 500000000, # 500_000_000 + proofSize: 20000, # 20_000 + }, + 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": { + "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/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/3_fellowship/2_assethub.yml b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/3_fellowship/2_assethub.yml new file mode 100644 index 0000000000000000000000000000000000000000..c0805594808cfe6cc900080953122f12174ad528 --- /dev/null +++ b/cumulus/parachains/integration-tests/e2e/collectives/collectives-polkadot/3_fellowship/2_assethub.yml @@ -0,0 +1,126 @@ +--- +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: + 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: { + refTime: 300000000, # 300_000_000 + proofSize: 10000, # 10_000 + }, + 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