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

Kusama v0.9.12 runtime upgrade at 9866422 broke mining #550

Closed
h4x3rotab opened this issue Oct 29, 2021 · 2 comments
Closed

Kusama v0.9.12 runtime upgrade at 9866422 broke mining #550

h4x3rotab opened this issue Oct 29, 2021 · 2 comments
Labels
accident An accident affecting the network or some products mining P0 related-substrate-v0.9.11/12 relayer

Comments

@h4x3rotab
Copy link
Contributor

h4x3rotab commented Oct 29, 2021

Symptom

  1. Miners and Gatekeepers relying on pherry are stuck at Kusama block 9866422 with error:
[2021-10-29T16:04:11Z INFO  pherry] bridge() exited with error: Rpc error: Parse error: Decode error: Could not decode DigestItemType, variant doesn't exist

    Caused by:
        0: Parse error: Decode error: Could not decode DigestItemType, variant doesn't exist
        1: Decode error: Could not decode DigestItemType, variant doesn't exist
  1. Even on PRB where the block can be processed, pRuntime will also fail to sync block with error:
[2021-10-29T16:00:14Z INFO  rocket::rocket] Matched: POST /bin_api/sync_combined_headers (sync_combined_headers)
[INFO  phactory::bin_api_service] {"payload":"{\"message\":\"Decode input parameter 

Affected

  • Miners cannot mine (pherry or prb)
  • Gatekeepers are stuck

Root cause

The new Kusama runtime introduces a new Digest Item, which is not decodable by the old block header definition (in both pruntime and subxt). pherry depends on subxt to decode the relay chain block header. pruntime depends on the raw block header definition to decode the inputs. Therefore when they panicked when 9866422 is reached.

Solution

The team is working on a mitigation and a long term solution. The ETA of the mitigation is Oct 30 16:00 (UTC).

The Phala team will release a new quick fix that carry with the new Digest Item.

@h4x3rotab h4x3rotab added accident An accident affecting the network or some products mining P0 relayer labels Oct 29, 2021
@h4x3rotab h4x3rotab changed the title Kusama v0.9.12 runtime upgrade at 9866422 broke pherry (subxt) Kusama v0.9.12 runtime upgrade at 9866422 broke mining Oct 29, 2021
@h4x3rotab
Copy link
Contributor Author

h4x3rotab commented Oct 30, 2021

Short term mitigation

Fortunately the substrate dependency is introduced by a git submodule. So we can cherry-pick the DigestItem commit and update it locally. Then we are going to release a new pherry (based on the master branch), and a new pruntime (based on the last pruntime release, because there are too many changes not well-tested on the master branch), with the digest item commit.

Branches:

  • kusama-9122-quickfix-pherry
  • kusama-9122-quickfix-pruntime

New pruntime hash:

  • 0x199f62feaba1c4ca6b801a9ffaee687206dde93421151f6f02d903b0c88b221a00000000815f42f11cf64430c30bab7816ba596a1da0130c3b028b673133a66cf9a3e0e6
  • Proposed as Motion ? (link?)

@h4x3rotab
Copy link
Contributor Author

Already upgraded v0.9.12(13) and with Metadata V14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accident An accident affecting the network or some products mining P0 related-substrate-v0.9.11/12 relayer
Projects
None yet
Development

No branches or pull requests

1 participant