Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

RPC nodes must run new node after nara runtime upgrade #4907

Closed mnaamani closed 11 months ago

mnaamani commented 11 months ago

After runtime upgrade to nara, a node that is used as an RPC endpoint to submit extrinsics MUST update to new binary otherwise polkadot-js api will have issues processing the dispatch result with errors that look like this:

2023-10-03 10:46:19        RPC-CORE: queryInfo(extrinsic: Bytes, at?: BlockHash): RuntimeDispatchInfo:: 1: Unable to query dispatch info.: Failed to decode return value of query_info
2023-10-03 10:46:19        RPC-CORE: queryInfo(extrinsic: Bytes, at?: BlockHash): RuntimeDispatchInfo:: 1: Unable to query dispatch info.: Failed to decode return value of query_info
2023-10-03 10:46:19        RPC-CORE: queryInfo(extrinsic: Bytes, at?: BlockHash): RuntimeDispatchInfo:: 1: Unable to query dispatch info.: Failed to decode return value of query_info
2023-10-03 10:46:19        RPC-CORE: queryInfo(extrinsic: Bytes, at?: BlockHash): RuntimeDispatchInfo:: 1: Unable to query dispatch info.: Failed to decode return value of query_info

This is because of the difference between the node and runtime expectation of the structure of RuntimeDispatchInfo type.

If we run the new version of the node ahead of the upgrade, would we get the same problem (when submitting transactions before the runtime upgrade?) or will handle this case better. Would a newer version of polkadot-js api handle this edge case better? (Ie using runtime call instead of rpc call for queryInfo)?

ref https://substrate.stackexchange.com/questions/5634/rpc-payment-queryfeeinfo-fails-on-westend-9310

┆Issue is synchronized with this Asana task by Unito

mnaamani commented 11 months ago

If we run the new version of the node ahead of the upgrade, would we get the same problem (when submitting transactions before the runtime upgrade?) or will handle this case better.

Yes tested, works flawlessly.

So the general recommendation should be for all node runners to run new version ahead of runtime upgrade for smooth operations.