-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: test the failed parachain extrinsic handling in worker #2543
feat: test the failed parachain extrinsic handling in worker #2543
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naïve question: why not a ts-test? i.e. when should we prefer cli test over ts-test?
A good rule of thumb would be if it is assigned to rust dev, then cli would be preferred xD |
This is actually a good one. Upstream doesn't have ts-test btw, we need that because we want some e2e test and our F/E is ofc in ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
While I understand what the code tries to do, I'm not sure if it meets the test goal. We want to make sure that failed extrinsics don't even get executed - imagine you transfer 1m tokens to someone and it fails as you have insufficient balance, the indirect call executor should detect that the extrinsic fails and never try to parse and execute it.
This PR tests however, when an error is thrown out during the execution of the II dispatcher, it won't write any wrong state - which is something good to test, but not the same as what we wanted to test IMO
I don't think so it is testing the error thrown out during the execution of the
The failed extrinsic gets parsed but is not executed, Let me know if I'm missing something here. |
A more naive question: Have you considered writing unit test for it ? 😂 |
I see, thanks. I missed the delegator on-chain logic part. Kasper's comment makes sense too - I'm happy to have both : ) |
So the idea of this PR was:
link-identity
forBob
link-identity
but use a delegate signer, the extrinsic will fail since the delegate is not authorized