substrate-api-client icon indicating copy to clipboard operation
substrate-api-client copied to clipboard

Use substrate image, that is kept up-to-date

Open masapr opened this issue 1 year ago • 1 comments

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

masapr avatar Jun 13 '24 13:06 masapr

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.

Niederb avatar Jul 03 '24 11:07 Niederb

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?

haerdib avatar Sep 02 '24 14:09 haerdib

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.

masapr avatar Sep 02 '24 15:09 masapr

I agree: If it is only the staking example that is affected then it is worth the change 👍

Niederb avatar Sep 03 '24 06:09 Niederb