Open rockbmb opened 3 weeks ago
@acatangiu certainly.
Thanks for the review!
In writing those tests, I was unable to use XCM to test
pallet_identity::{kill_identity/add_username_authority/remove_username_authority}
.
Why?
Review required! Latest push from author must always be reviewed
Review required! Latest push from author must always be reviewed
In writing those tests, I was unable to use XCM to test
pallet_identity::{kill_identity/add_username_authority/remove_username_authority}
.Why?
To test the following example, you'll need to:
cd chopsticks
npx @acala-network/chopsticks@latest xcm -r configs/polkadot.yml -p configs/polkadot-people.yml
Consider the following encoded call: 0x630004000100b10f040406020700aea68f0282841e008c320a0078a302c5370300ab2bd8a65469a5061220cd07b3b3a17e5e3233d283e2ad46f0
.
Transact
instruction, to be sent to the people chain with a SuperUser
origin, containing the encoded call: 0x320a0078a302c5370300ab2bd8a65469a5061220cd07b3b3a17e5e3233d283e2ad46f0
.pallet_identity::kill_identity
call on 13jBAtYJar4xujPaEx41FxjSt9PqU7LqJRbySJiVdMtuWN42
, which is my DOT address. There should be an associated identity.Now either
Alice
development account, orconst call = '0x630004000100b10f040406020700aea68f0282841e008c320a0078a302c5370300ab2bd8a65469a5061220cd07b3b3a17e5e3233d283e2ad46f0'
const number = (await api.rpc.chain.getHeader()).number.toNumber()
await api.rpc('dev_setStorage', {
scheduler: {
agenda: [
[
[number + 1], [
{
call: {
Inline: call
},
origin: {
system: 'Root'
}
}
]
]
]
}
})
// Make a block to include the extrinsic
await api.rpc('dev_newBlock', { count: 1 })
In either instance, you will find, in the people chain's "recent events" list, messageQueue.ProcessingFailed
.
@bkchr in conclusion, and to answer your question: I don't know why this happens, but I suspect it shouldn't.
The above process is exactly how I tested add_registrar
in https://github.com/open-web3-stack/polkadot-ecosystem-tests/pull/63, and it worked then.
I've been working to understand why, and this PR, as well as https://github.com/paritytech/polkadot-sdk/pull/6377#issuecomment-2469394201 are how.
@seadanda also, apologies for the delay: the above comment contains the snippet I mentioned in DMs.
My identity should exist when you fork the chain.
https://github.com/open-web3-stack/polkadot-ecosystem-tests relies on chopsticks to create E2E tests using periodically (roughly daily) obtained runtimes from production relay chains/system parachains.
In particular, https://github.com/open-web3-stack/polkadot-ecosystem-tests/pull/63 does this for the People chains. In writing those tests, I was unable to use XCM to test
pallet_identity::{kill_identity/add_username_authority/remove_username_authority}
. I wrote this PR to replicate those tests at this layer, whose passing status falsify the hypothesis that there may have been an issue with the runtimes, and confirm that it was a problem with the way I wrote those tests.