8

I started working from the substrate-parachain-template and added the pallet_contracts to the runtime. When I open the Contracts UI, I'm getting the error message that states the node does not support WeightV2. I can't find any documentation related to this or how to modify the runtime to upgrade the weight. Here is the parachain-contracts-node.

Unsupported node version WeightV2

1 Answer 1

2

If your node is still using the old Weights format you still can deploy your smart contract using this link: https://weightv1--contracts-ui.netlify.app/

See this previous answer on StackExchange: Problem adding a smart contract into a Substrate node

If you want to update to Weights V2, check this old question on StackExchange: Prepare pallets for Weights v2 or check how the weigths are calculate in the node-template: benchmarking.rs

11
  • I looked through all the links you sent me regarding upgrading a node to use WeightsV2, but have no idea what I need to change in my project. I have verified that I have the same runtime implementation as substrate-contracts-node related to weight configuration. Since you can configure each pallet with its own weight configuration, how does Contracts UI determine if you are using WeightsV2 or V1?
    – Snowmead
    May 25, 2023 at 19:12
  • I check your code and I don't see the difference between the substrate-contracts-node github.com/paritytech/substrate-contracts-node/blob/main/…. If you run the substrate-contracts-node instead of yours it works?
    – Alex Bean
    May 26, 2023 at 8:19
  • Yes substrate contracts node works with WeightV2. While we investigate, are there any more technical documentation related to pallets and how the runtime handles weights, and maybe how Contracts UI determines if the node uses WeightV2 or not?
    – Snowmead
    May 26, 2023 at 13:36
  • It checks that the Weight type of your chain has the WeightsV2 format (It contains the proofSize filed), see the code: github.com/paritytech/contracts-ui/blob/master/src/ui/contexts/…
    – Alex Bean
    May 26, 2023 at 14:17
  • Here is the error you see: github.com/paritytech/contracts-ui/blob/master/src/ui/…
    – Alex Bean
    May 26, 2023 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.