pendulum-chain / oracle-pallet

The Unlicense
0 stars 0 forks source link

Bump to Polkadot 1.1.0 #19

Closed gianfra-t closed 2 months ago

gianfra-t commented 5 months ago

Closes #17. This branch polkadot-v1.1.0 should be kept after merging with master.

Aside from the changes required by the upgrade, we removed the runtime and node parts. The intention is to perform the benchmarks directly on the Pendulum repository and use those weights generated, like it is done with our other custom pallets (example)

Before Merging this: we first need to merge this, then made the code modifications to upgrade to 1.1.0 on the runtimes, add this pallet in the benchmark list macro and perform the benchmark.

Once this small fix is merged into this branch, we can finally close the PR, since weights were generated on pendulum.

gianfra-t commented 5 months ago

@pendulum-chain/devs I've selected channel nightly-2023-10-26 for this new version rather arbitrarily, do we have any methodology for selecting the channel?

ebma commented 5 months ago

I've selected channel nightly-2023-10-26 for this new version rather arbitrarily, do we have any methodology for selecting the channel?

I think it's best to always update to the latest nightly channel that still works when we touch that rust-toolchain file. Some nightly versions will result in new compiler errors for some reason but when it comes to versions the later the better I guess.

Before Merging this: we first need to merge https://github.com/pendulum-chain/pendulum/pull/453,

Why do we need to wait for that?

gianfra-t commented 5 months ago

it's best to always update to the latest nightly channel that still works

Good idea, I will try to find a newer one. I took this one from a sibling chain's code using the same version.

Why do we need to wait for that?

Not really need to, but this fixes compiling the runtime with runtime-benchmarks feature. In any case, we still need to perform the update to 1.1.0 on the runtime before we can benchmark this new version of the pallet. I guess we can also merge that branch into the 1.1.0 if it hasn't been merged with main so we can compile and do the benchmark. WDYT?

TorstenStueber commented 5 months ago

I am not an expert on toolchains, but with this PR didn't we decide that we want to use stable now instead of nightly?

gianfra-t commented 5 months ago

I could try with stable also, but we are not using any of the tools that stopped working with nightly right?

ebma commented 5 months ago

but with https://github.com/pendulum-chain/pendulum/issues/444 didn't we decide that we want to use stable now instead of nightly?

Good point. Let's try to define the same version as we are using on Pendulum at the moment. I think generally it wouldn't matter what toolchain version we are defining here as long as all the crates then also compile on the toolchain used in Pendulum. Which we can only 100% guarantee by using the same toolchain here.

gianfra-t commented 5 months ago

I pushed the use of stable 1.77.0 and also fixes for cargo test.

gianfra-t commented 2 months ago

I think we can merge this PR.