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

No-kind-info-for-15 Error upgrading PSM contract #6207

Closed
kriskowal opened this issue Sep 15, 2022 · 3 comments
Closed

No-kind-info-for-15 Error upgrading PSM contract #6207

kriskowal opened this issue Sep 15, 2022 · 3 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request Inter-protocol Overarching Inter Protocol vaults_triage DO NOT USE

Comments

@kriskowal
Copy link
Member

kriskowal commented Sep 15, 2022

Describe the bug

This is a journal of the first attempt to upgrade the PSM contract in local chain and an account of the tragedy that followed.

2022-09-14T23:44:54.980Z SwingSet: vat: v1: Upgrading PSM for [object Alleged: AUSD brand]
2022-09-14T23:44:57.119Z SwingSet: xsnap: v18: error during vat dispatch() of startVat,[object Object] (Error#1)
2022-09-14T23:44:57.120Z SwingSet: xsnap: v18: Error#1: no kind info for 15, call defineDurableKind
2022-09-14T23:44:57.120Z SwingSet: xsnap: v18: Error: no kind info for 15, call defineDurableKind

https://gist.github.com/kriskowal/ed5d085c497c5e3cdf5a04fb3b8392ea

To Reproduce

Steps to reproduce the behavior:

  • install psm

    cd packages/cosmic-swingset
    make scenario2-setup
    make scenario2-run-chain-psm
    
  • fund an account

    ACCT_ADDR=$(cat t1/8000/ag-cosmos-helper-address)
    make ACCT_ADDR=$ACCT_ADDR fund-acct
    
  • create a bundle

    cd ../inter-protocol
    yarn bundle-source --cache-json bundles src/psm/psm.js psm
    
  • publish bundle

    cd ../cosmic-swingset
    agoric publish -h t1/8000 -n localhost:26657 ../inter-protocol/bundle-cache/bundle-psm.json > bundle-cache/bundle-psm-hash.json
    
    jq -r .endoZipBase64Sha512 bundle-cache/bundle-psm-hash.json
    

    Note the hash of the contract, as this is the bulk of the bundle ID for upgrade.

  • verify publish, hashes should match

    agd query vstorage data bundles
    
    agoric follow :bundles
    (^C)
    
    jq -r .endoZipBase64Sha512 ../inter-protocol/bundles/bundle-psm-hash.json
    
  • vote early (or within 45 seconds of proposal)

    make VOTE_PROPOSAL=1 scenario2-vote
    

    Increment proposal number after each proposal

  • propose upgrade

    make \
      EVAL_PERMIT=gov-upgrade-psm-permit.json \
      EVAL_CODE=gov-upgrade-psm.js \
      scenario2-core-eval
    

    Using the attached governance proposal, and amending the hash in the bundle ID to match the published version above:

    https://gist.github.com/kriskowal/1b56be904f89b079fd861325aa02cbca

Expected behavior

Should see PSM Upgraded for brand IST after PSM Upgrading for brand IST.

Platform Environment

  • what OS are you using? what version of Node.js?

    uname -a
    Darwin kmkmbp2021 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64 x86_64
    
    node --version
    v14.19.0
    
  • is there anything special/unusual about your platform?

    There are many like it but this one’s mine
    
  • what version of the Agoric-SDK are you using? (run git describe --tags --always )

    agoricxnet-7-1011-g69f02bba3
    
@Chris-Hibbert
Copy link
Contributor

Chris-Hibbert commented Sep 15, 2022

Did you make a copy of the psm.js contract with start replaced with vivify? Did you make other changes?

[This isn't the error message I'd expect if that mistake were made, but I don't see indication that there was an upgradeable contract in use.]

@Chris-Hibbert
Copy link
Contributor

The error message comes from virtualReferences.js, and indicates that there's no kindInfoTable for the vat being upgraded. psm.js calls vivifyFarInstance, so it should have a table.

@Tartuffo Tartuffo modified the milestone: Mainnet 1 RC0 Sep 15, 2022
@dckc dckc added Inter-protocol Overarching Inter Protocol vaults-release labels Dec 7, 2022
@ivanlei ivanlei added enhancement New feature or request vaults_triage DO NOT USE and removed vaults-release labels Jan 4, 2023
@ivanlei ivanlei removed this from the Vaults EVP milestone Apr 17, 2023
@turadg
Copy link
Member

turadg commented Apr 19, 2023

This looks to be an artifact of the contract's kind ordering. We have other tickets for ensuring PSM upgrade works so if this or a similar symptom rears again it won't be missed.

@turadg turadg closed this as completed Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request Inter-protocol Overarching Inter Protocol vaults_triage DO NOT USE
Projects
None yet
Development

No branches or pull requests

7 participants