-
Notifications
You must be signed in to change notification settings - Fork 46
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
Failed parentchain extrinsic submission would block subsequent extrinsic execution #970
Comments
I believe that's a serious issue. I haven't had the time to look into this yet, but we should do so soon. Not sure if it's a bug, but marking it as such until we know better. Thanks for investigating! |
Thanks for looking! |
send_extrinsic
The extrinsic error is in the return message. In your case here https://github.com/scs/substrate-api-client/blob/b91d78b53fdc3a05b3c1d1e7fe0fd6b8cfc0dd17/src/std/rpc/ws_client/mod.rs#L265. As you have already stated, subsequent extrinsics are unable to get executed because of their wrong nonce. They all land in the future pool and will not be executed. The nonce is set when the extrinsic is created :
To fix this bug we need more investigation. |
This will be solved by #1027. I will close this issue for now. |
Hey @echevrier @haerdib! It seems #1027 doesn't solve this issue. We'd better reopen this one. What do you think? Thanks! |
Yes, I actually don't see how #1027 should have solved the issue. |
Some news from the api-client side: Can you check if this issue still persists with the new polkadot branch version? |
I believe this issue still persist.
|
As long as the sending of the xt happens on the untrusted side, a redesign will be hard. A callback sounds more doable. It will require quite some design though, as the following needs to be covered:
|
We are prioritizing #1238 over this one. |
Hi, we encountered this problem during our development where we mistakenly used i32 instead of u8 type when building the call indexes that should be sent to the parentchain.
Then we saw an error upon sending to the parentchain, which is expected:
However, all subsequent extrinsics after this couldn't be executed on the parentchain anymore, e.g. no more

ProposedSidechainBlock
event since then:We dig the code a bit and reckon there might be more than one problem here:
send_extrinsic would never return
Err(_)
, is that a bug?worker/service/src/ocall_bridge/worker_on_chain_ocall.rs
Line 92 in cc49785
Our extrinsic should have failed but no error was returned. If we look further into the substrate-api-client code, the
res
is not respected and we always returnOk(None)
in any case: https://github.com/scs/substrate-api-client/blob/70c8864d8fe215b1c74e6a610ced177f8cdc53db/src/std/rpc/ws_client/client.rs#L71-L73since the failed extrinsic is silently ignored all subsequent extrinsics will still be signed as usual with incremental nonces. From our perspective it looks like that the subsequent extrinsics are sent to the parentchain tx pool successfully, but are unable to get executed due to the failure of the previous extrinsic. We are wondering if we'd need extra error handling regarding nonces.
The ticket in our repo: litentry/heima#1036
It doesn't matter if we use
ocall_api
directly orextrinsic_callbacks
, they are routed to use send_extrinsic eventually.The text was updated successfully, but these errors were encountered: