Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Polkadot v0.9.31 #1022

Merged
merged 13 commits into from
Nov 10, 2022
Merged

Upgrade to Polkadot v0.9.31 #1022

merged 13 commits into from
Nov 10, 2022

Conversation

jasl
Copy link
Collaborator

@jasl jasl commented Nov 4, 2022

paritytech/substrate@polkadot-v0.9.30...polkadot-v0.9.31

Overall, this version is most focusing on dependencies upgrade.

Prost can't upgrade because > 0.9.0 requires protoc, but Ubuntu APT version too low that Explicit 'optional' labels are disallowed in the Proto3 syntax. To define 'optional' fields in Proto3, simply remove the 'optional' label, as fields are 'optional' by default

Notable upstream changes:

@jasl jasl requested a review from kvinwang November 6, 2022 13:02
@jasl jasl force-pushed the polkadot-v0.9.31 branch 4 times, most recently from 8701b82 to fdaba0e Compare November 7, 2022 13:22
@jasl jasl marked this pull request as ready for review November 7, 2022 14:13
@jasl
Copy link
Collaborator Author

jasl commented Nov 7, 2022

@kvinwang wasmer 3 has released rc.2, you can try upgrade that when you're not busy

@jasl
Copy link
Collaborator Author

jasl commented Nov 7, 2022

  33 passing (4m)
  7 pending
  8 failing

  1) A full stack
       Cluster & Contract
         can create cluster:

      system contract instantiation failed
      + expected - actual

      -false
      +true

      at Context.<anonymous> (src/fullstack.js:523:20)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  2) A full stack
       Cluster & Contract
         can deploy cluster to multiple workers:

      cluster not deployed
      + expected - actual

      -false
      +true

      at Context.<anonymous> (src/fullstack.js:538:20)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  3) A full stack
       Cluster & Contract
         can instantiate contract with access control:

      contract key generation failed
      + expected - actual

      -false
      +true

      at Context.<anonymous> (src/fullstack.js:578:20)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

  4) A full stack
       Cluster & Contract
         can not set hook without admin permission:
     TypeError: Cannot read properties of undefined (reading 'tx')
      at Context.<anonymous> (src/fullstack.js:594:39)
      at processImmediate (node:internal/timers:466:21)

  5) A full stack
       Cluster & Contract
         can set hook with admin permission:
     TypeError: Cannot read properties of undefined (reading 'tx')
      at Context.<anonymous> (src/fullstack.js:605:32)
      at processImmediate (node:internal/timers:466:21)

  6) A full stack
       Cluster & Contract
         tokenomic driver works:
     TypeError: Cannot read properties of undefined (reading 'tx')
      at Context.<anonymous> (src/fullstack.js:620:32)
      at processImmediate (node:internal/timers:466:21)

  7) A full stack
       Cluster & Contract
         can set the sidevm as pending state without code uploaded:
     TypeError: Cannot read properties of undefined (reading 'query')
      at Context.<anonymous> (src/fullstack.js:636:60)
      at processImmediate (node:internal/timers:466:21)

  8) A full stack
       Cluster & Contract
         can upload sidevm code via pRPC:
     TypeError: Cannot read properties of undefined (reading 'address')
      at Context.<anonymous> (src/fullstack.js:645:70)
      at processImmediate (node:internal/timers:466:21)

I guess this relates to PhalaSDK requires upgrade Polkadot.js dependency

Relates to PalletContracts enable WeightV2 paritytech/substrate#12421

Polkadot.js 9.5.1 introduced WeightV2 support https://github.com/polkadot-js/api/releases/tag/v9.5.1

CC @kingsleydon

@kvinwang
Copy link
Collaborator

kvinwang commented Nov 8, 2022

system contract instantiation failed

pruntime0.log shows it out of gas while instantiating the system contract. There are some compilation errors in the cargo test. Let's fix them first.

@kvinwang
Copy link
Collaborator

kvinwang commented Nov 8, 2022

wasmer 3 has released rc.2, you can try upgrade that when you're not busy

#1025

standalone/pherry/src/lib.rs Outdated Show resolved Hide resolved
standalone/pherry/src/lib.rs Show resolved Hide resolved
@jasl
Copy link
Collaborator Author

jasl commented Nov 8, 2022

failures:

---- runtime::detect_parameter_changes stdout ----
thread 'runtime::detect_parameter_changes' panicked at 'We only specify max_total and leave base values as defaults; qed: ValidationErrors { has_errors: true, errors: ["[DispatchClass::Normal] Weight { ref_time: 2000000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 0, proof_size: 0 } (base block) & Weight { ref_time: 0, proof_size: 0 } (base extrinsic)", "[DispatchClass::Normal] Weight { ref_time: 2000000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 0, proof_size: 0 } (base weight)", "[DispatchClass::Operational] Weight { ref_time: 2000000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 0, proof_size: 0 } (base block) & Weight { ref_time: 0, proof_size: 0 } (base extrinsic)", "[DispatchClass::Operational] Weight { ref_time: 2000000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 0, proof_size: 0 } (base weight)", "[DispatchClass::Mandatory] Weight { ref_time: 2000000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 0, proof_size: 0 } (base weight)"] }', /Users/jasl/.cargo/git/checkouts/substrate-7e08433d4c370a21/7a4e516/frame/system/src/limits.rs:314:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- runtime::__construct_runtime_integrity_test::runtime_integrity_tests stdout ----
thread 'runtime::__construct_runtime_integrity_test::runtime_integrity_tests' panicked at 'We only specify max_total and leave base values as defaults; qed: ValidationErrors { has_errors: true, errors: ["[DispatchClass::Normal] Weight { ref_time: 2000000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 0, proof_size: 0 } (base block) & Weight { ref_time: 0, proof_size: 0 } (base extrinsic)", "[DispatchClass::Normal] Weight { ref_time: 2000000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 0, proof_size: 0 } (base weight)", "[DispatchClass::Operational] Weight { ref_time: 2000000000000, proof_size: 0 } (total) has to be greater than Weight { ref_time: 0, proof_size: 0 } (base block) & Weight { ref_time: 0, proof_size: 0 } (base extrinsic)", "[DispatchClass::Operational] Weight { ref_time: 2000000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 0, proof_size: 0 } (base weight)", "[DispatchClass::Mandatory] Weight { ref_time: 2000000000000, proof_size: 0 } (max block) must fit at least one extrinsic Weight { ref_time: 0, proof_size: 0 } (base weight)"] }', /Users/jasl/.cargo/git/checkouts/substrate-7e08433d4c370a21/7a4e516/frame/system/src/limits.rs:314:14

---- runtime::tests::crypto_hashes_test stdout ----
thread 'runtime::tests::crypto_hashes_test' panicked at 'called `Result::unwrap()` on an `Err` value: Module(ModuleError { index: 3, error: [2, 0, 0, 0], message: Some("OutOfGas") })', crates/pink/src/runtime.rs:307:26


failures:
    runtime::__construct_runtime_integrity_test::runtime_integrity_tests
    runtime::detect_parameter_changes
    runtime::tests::crypto_hashes_test

test result: FAILED. 5 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.02s

attach failed log first

@jasl
Copy link
Collaborator Author

jasl commented Nov 8, 2022

FInally

  1 failing

  1) A full stack
       Cluster & Contract
         can set the sidevm as pending state without code uploaded:
     Error: createType(ContractExecResult):: decodeU8aStruct: failed at 0x74800001000000000000000000000000… on storageDeposit (index 3/5): {"_enum":{"Refund":"Balance","Charge":"Balance"}}:: Unable to create Enum via index 116, in Refund, Charge
      at createTypeUnsafe (node_modules/@polkadot/types-create/cjs/create/type.js:67:18)
      at TypeRegistry.createType (node_modules/@polkadot/types/cjs/create/registry.js:288:46)
      at ApiPromise.createType (node_modules/@polkadot/api/cjs/base/Decorate.js:111:27)
      at /home/jasl/Workspaces/Remote/phala-blockchain/e2e/node_modules/@phala/sdk/dist/index.cjs:5914:24
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

Only this one I don't know how to solve, @kingsleydon please help

Copy link
Collaborator

@kvinwang kvinwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jasl jasl merged commit dcf07c7 into master Nov 10, 2022
@jasl jasl deleted the polkadot-v0.9.31 branch November 10, 2022 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants