Use substrate image, that is kept up-to-date
With the current image we use: paritypr/substrate:latest we have the issue, that it is not updated. We should change to parity/polkadot (if possible). This seems to be the official docker image and is currently updated frequently. Also note the current bugreport: #761
We had changed from parity/substrate:latest to paritypr/substrate:latest here: #720
I did a quick test with switching to the parity/polkadot image, but a wide range of tests fail:
https://github.com/scs/substrate-api-client/actions/runs/9776877250
It's not clear to me why this is and unfortunately I have not seen any documentation regarding the docker images and their differences so far.
Switching to a polkadot node requires switching the api-client runtime as well. Otherwise, the api-client will use different types than the node. See the comment in the examples:
https://github.com/scs/substrate-api-client/blob/master/examples/async/examples/get_storage.rs#L28-L31
I did a quick research on the missing pallets of the polkdot node (according to the docker README, it's the westend runtime) The following pallet is missing in the westend runtime, which we currently run examples against:
So we would need to remove this example or at least mark it as untested.
Other than that, Alice still seems to be sudo and the unstable rpc api should be the same as well. So I think the rest should work as is, with very little changes. Haven't tried it yet, though - there might be some hidden caveats. This would also solve https://github.com/scs/substrate-api-client/issues/383
As lots of our user are having trouble with the switching of the runtime (therefore the issue #383), I think it's worth the switch, even though we would lose a (tested) example.
@Niederb @masapr what do you think?
I think it's definitely worth a try to check how many tests will fail. So, I definitely vote for making a PR with the change and looking at the results from our tests. If we only lose the staking tests, I'd be fine with it.
I agree: If it is only the staking example that is affected then it is worth the change 👍