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

can't build bundles compatible with mainnet due to endo patterns breaking change #8826

Closed
dckc opened this issue Jan 26, 2024 · 11 comments · Fixed by endojs/endo#2038 or #8872
Closed
Labels
bug Something isn't working technical-debt

Comments

@dckc
Copy link
Member

dckc commented Jan 26, 2024

Describe the bug

I ran into SwingSet: xsnap: v11: RangeError#1: Expected undefined is same as Interface, asked for help, and learned in discussion with @Chris-Hibbert, @kriskowal , @mhofman that it's due to a breaking change in @endo/patterns, and that as a result, I wouldn't be able to test the upgrade fix for #8311 on master; I'd have to do development in the release branch, which (presumably) doesn't include the breaking change to patterns.

1.0.0 (2023-12-12)
⚠ BREAKING CHANGES
patterns: tag and retype guards
-- patterns/CHANGELOG

To Reproduce

  1. check out 8826-wip-repro (683733d as of this writing)
  2. cd agoric-sdk; yarn
  3. cd a3p-integration; corepack enable; yarn
  4. yarn test
  5. lots of stuff happens that's cached, up thru => CACHED [test-names-by-addr test-names-by-addr 4/4]
  6. Running test image for proposal upgrade-14 runs ok
  7. Running test image for proposal names-by-addr starts; goes ok thru v1: upgradeProvisioningVat..., but then
  8. fail with v1: Error: vat-upgrade failure
stack for v1: Error: vat-upgrade failure
2024-01-26T22:32:05.111Z SwingSet: vat: v1: evaluateBundleCap { manifestBundleRef: { bundleID: 'b1-ae1949442574923fc03f229d529644ded41a2dbdc6336f6bf1496fdd7f557b1fcad2d1bfa59a2f0a2241f66a8f864dcbbeddd3abf0afcf0ac7879d26d0821994' }, manifestGetterName: 'getManifestForProvisioning', vatAdminSvc: Promise [Promise] {} }
2024-01-26T22:32:05.171Z SwingSet: vat: v1: execute { manifestGetterName: 'getManifestForProvisioning', bundleExports: [ 'getManifestForProvisioning', 'upgradeProvisioningVat' ] }
2024-01-26T22:32:05.171Z SwingSet: vat: v1: coreProposal: upgradeProvisioningVat
2024-01-26T22:32:05.171Z SwingSet: vat: v1: upgradeProvisioningVat...
2024-01-26T22:32:05.172Z SwingSet: vat: v1: provisioning { adminNode: Object [Alleged: adminNode] {}, root: Object [Alleged: undefined] {} } b1-10d640ccc3f09d37719d87bf33b4cf2cf950da2a5daf7b2c927e5b4569e65e03950fa36be3591e33250906a98e6c39f79fd4cfb5fe1b38f5aff8a115ccfe3846
2024-01-26T22:32:05.174Z SwingSet: vat: v1: CORE_EVAL failed: (RemoteError(error:liveSlots:v2#70001)#3)
2024-01-26T22:32:05.174Z SwingSet: vat: v1: RemoteError(error:liveSlots:v2#70001)#3: vat-upgrade failure
2024-01-26T22:32:05.174Z SwingSet: vat: v1: Error: vat-upgrade failure
 at construct ()
 at Error (/bundled-source/.../node_modules/ses/src/error/tame-error-constructor.js:56)
 at makeError (/bundled-source/.../node_modules/ses/src/error/assert.js:243)
 at decodeErrorCommon (/bundled-source/.../node_modules/@endo/marshal/src/marshal.js:281)
 at decodeFromSmallcaps (/bundled-source/.../node_modules/@endo/marshal/src/encodeToSmallcaps.js:434)
 at fromCapData (/bundled-source/.../node_modules/@endo/marshal/src/marshal.js:356)
 at notifyOnePromise (/bundled-source/.../packages/swingset-liveslots/src/liveslots.js:1225)
 at notify (/bundled-source/.../packages/swingset-liveslots/src/liveslots.js:1249)
 at dispatchToUserspace (/bundled-source/.../packages/swingset-liveslots/src/liveslots.js:1514)
 at runWithoutMetering (/bundled-source/.../packages/swingset-xsnap-supervisor/lib/supervisor-subprocess-xsnap.js:60)
 at ()

Expected behavior

The upgrade should work just as well as on the release branch (#8786).

Platform Environment

IOU

  • what OS are you using? what version of Node.js?
  • is there anything special/unusual about your platform?
  • what version of the Agoric-SDK are you using? (run git describe --tags --always)

Additional context

was working on #8311

Screenshots / Stack trace

earlier stack from 2024-01-22
ag-power-tools-agd-1  | 2024-01-22T17:19:40.483Z SwingSet: vat: v1: provisioning { adminNode: Object [Alleged: adminNode] {}, root: Object [Alleged: undefined] {} } b1-10d640ccc3f09d37719d87bf33b4cf2cf950da2a5daf7b2c927e5b4569e65e03950fa36be3591e33250906a98e6c39f79fd4cfb5fe1b38f5aff8a115ccfe3846
ag-power-tools-agd-1  | 2024-01-22T17:19:41.117Z SwingSet: xsnap: v11: error during vat dispatch() of startVat,[object Object] (RangeError#1)
ag-power-tools-agd-1  | 2024-01-22T17:19:41.117Z SwingSet: xsnap: v11: RangeError#1: Expected undefined is same as Interface
ag-power-tools-agd-1  | 2024-01-22T17:19:41.118Z SwingSet: xsnap: v11: RangeError: Expected (an undefined) is same as (a string)
ag-power-tools-agd-1  |  at makeError (/bundled-source/.../node_modules/ses/src/error/assert.js:243)
ag-power-tools-agd-1  |  at fail (/bundled-source/.../node_modules/ses/src/error/assert.js:357)
ag-power-tools-agd-1  |  at equal (/bundled-source/.../node_modules/ses/src/error/assert.js:390)
ag-power-tools-agd-1  |  at defendPrototype (/bundled-source/.../node_modules/@endo/exo/src/exo-tools.js:238)
ag-power-tools-agd-1  |  at defineKindInternal (/bundled-source/.../packages/swingset-liveslots/src/virtualObjectManager.js:957)
ag-power-tools-agd-1  |  at defineDurableKind (/bundled-source/.../packages/swingset-liveslots/src/virtualObjectManager.js:1155)
ag-power-tools-agd-1  |  at prepareAttenuator (.../internal/src/callback.js:300)
ag-power-tools-agd-1  |  at prepareGuardedAttenuator (.../internal/src/callback.js:319)
ag-power-tools-agd-1  |  at prepareMixinMyAddress (.../vats/src/nameHub.js:58)
ag-power-tools-agd-1  |  at prepareSpecializedNameAdmin (.../vats/src/vat-provisioning.js:20)
ag-power-tools-agd-1  |  at buildRootObject (.../vats/src/vat-provisioning.js:91)
@dckc dckc added the bug Something isn't working label Jan 26, 2024
@mhofman
Copy link
Member

mhofman commented Jan 26, 2024

@erights might have some insights

@dckc
Copy link
Member Author

dckc commented Jan 26, 2024

I wonder if I'm jumping to conclusions about patterns... the stack trace doesn't show any patterns code.
It shows defendPrototype in @endo/exo as where an assert fails.

@dckc
Copy link
Member Author

dckc commented Jan 26, 2024

@erights I think the steps to reproduce above are complete now. Please try it and let me know.

@erights
Copy link
Member

erights commented Jan 29, 2024

Hi @gibson042 , I co-assigned this to myself. Before starting on a fix for this, we should talk.

@mhofman
Copy link
Member

mhofman commented Jan 29, 2024

This is part of the larger effort to handle versioning, and should be included in that effort's design, where we should decide what the fix looks like.

@dckc
Copy link
Member Author

dckc commented Jan 29, 2024

This is part of the larger effort to handle versioning, and should be included in that effort's design

Got a pointer to 1 or 2 of the relevant issues? Maybe worth a label?

@mhofman
Copy link
Member

mhofman commented Jan 29, 2024

I think @warner is drafting notes from out meeting last week. Part of the effort to have a plan upgrading endo, XS, liveslots, etc.

@dckc
Copy link
Member Author

dckc commented Feb 6, 2024

$ docker images|grep unreleased
ghcr.io/agoric/agoric-sdk           unreleased              1503a39cee8e   12 days ago    2.22GB

and

$ docker run -ti --rm --entrypoint /bin/bash ghcr.io/agoric/agoric-sdk:unreleased
root@bbb113d72760:~# ls -l /usr/local/bin/agd
lrwxrwxrwx 1 root root 27 Jan 25 19:56 /usr/local/bin/agd -> /usr/src/agoric-sdk/bin/agd

and

$ docker run -ti --rm --entrypoint /usr/local/bin/agd ghcr.io/agoric/agoric-sdk:unreleased version --long
name: agoriccosmos
server_name: agd
version: 0.35.0-u13.0
commit: ""
build_tags: ledger
go: go version go1.20.13 linux/amd64
build_deps:
- cosmossdk.io/[email protected]
- cosmossdk.io/[email protected]
- cosmossdk.io/[email protected]
- filippo.io/[email protected]
- github.com/99designs/[email protected] => github.com/cosmos/[email protected]
- github.com/ChainSafe/[email protected]
- github.com/Workiva/[email protected]
- github.com/armon/[email protected]
- github.com/beorn7/[email protected]
- github.com/bgentry/[email protected]
- github.com/btcsuite/btcd/btcec/[email protected]
- github.com/cespare/xxhash/[email protected]
- github.com/coinbase/[email protected]
- github.com/cometbft/[email protected]
- github.com/confio/ics23/[email protected] => github.com/agoric-labs/cosmos-sdk/ics23/[email protected]
- github.com/cosmos/[email protected]
- github.com/cosmos/[email protected]
- github.com/cosmos/[email protected]
- github.com/cosmos/[email protected] => github.com/agoric-labs/[email protected]
- github.com/cosmos/[email protected]
- github.com/cosmos/[email protected]
- github.com/cosmos/ibc-go/[email protected]
- github.com/cosmos/[email protected]
- github.com/creachadair/[email protected]
- github.com/davecgh/[email protected]
- github.com/decred/dcrd/dcrec/secp256k1/[email protected]
- github.com/desertbit/[email protected]
- github.com/dvsekhvalnov/[email protected]
- github.com/felixge/[email protected]
- github.com/fsnotify/[email protected]
- github.com/go-kit/[email protected]
- github.com/go-kit/[email protected]
- github.com/go-logfmt/[email protected]
- github.com/godbus/[email protected]
- github.com/gogo/[email protected]
- github.com/gogo/[email protected] => github.com/regen-network/[email protected]
- github.com/golang/[email protected]
- github.com/golang/[email protected]
- github.com/google/[email protected]
- github.com/google/[email protected]
- github.com/gorilla/[email protected]
- github.com/gorilla/[email protected]
- github.com/gorilla/[email protected]
- github.com/grpc-ecosystem/[email protected]
- github.com/grpc-ecosystem/[email protected]
- github.com/gsterjov/[email protected]
- github.com/gtank/[email protected]
- github.com/gtank/[email protected]
- github.com/hashicorp/[email protected]
- github.com/hashicorp/[email protected]
- github.com/hashicorp/[email protected]
- github.com/hdevalence/[email protected]
- github.com/improbable-eng/[email protected]
- github.com/klauspost/[email protected]
- github.com/lib/[email protected]
- github.com/libp2p/[email protected]
- github.com/magiconair/[email protected]
- github.com/mattn/[email protected]
- github.com/mattn/[email protected]
- github.com/matttproud/[email protected]
- github.com/mimoo/[email protected]
- github.com/minio/[email protected]
- github.com/mitchellh/[email protected]
- github.com/mtibben/[email protected]
- github.com/pelletier/go-toml/[email protected]
- github.com/pkg/[email protected]
- github.com/pmezard/[email protected]
- github.com/prometheus/[email protected]
- github.com/prometheus/[email protected]
- github.com/prometheus/[email protected]
- github.com/prometheus/[email protected]
- github.com/rakyll/[email protected]
- github.com/rcrowley/[email protected]
- github.com/regen-network/[email protected]
- github.com/rs/[email protected]
- github.com/rs/[email protected]
- github.com/spf13/[email protected]
- github.com/spf13/[email protected]
- github.com/spf13/[email protected]
- github.com/spf13/[email protected]
- github.com/spf13/[email protected]
- github.com/spf13/[email protected]
- github.com/stretchr/[email protected]
- github.com/subosito/[email protected]
- github.com/syndtr/[email protected]
- github.com/tendermint/[email protected]
- github.com/tendermint/[email protected] => github.com/agoric-labs/[email protected]
- github.com/tendermint/[email protected]
- github.com/tidwall/[email protected]
- github.com/zondax/[email protected] => github.com/zondax/[email protected]
- github.com/zondax/[email protected]
- golang.org/x/[email protected]
- golang.org/x/[email protected]
- golang.org/x/[email protected]
- golang.org/x/[email protected]
- golang.org/x/[email protected]
- golang.org/x/[email protected]
- google.golang.org/[email protected]
- google.golang.org/[email protected] => google.golang.org/[email protected]
- google.golang.org/[email protected]
- gopkg.in/[email protected]
- gopkg.in/[email protected]
- gopkg.in/[email protected]
- nhooyr.io/[email protected]
cosmos_sdk_version: v0.45.16

@dckc
Copy link
Member Author

dckc commented Feb 6, 2024

my version of ghcr.io/agoric/agoric-sdk:unreleased was evidently not the one that was supposed to be used.

@mhofman plans to try to reproduce a couple things, though the timing might be complicated by upgrade-14

@erights
Copy link
Member

erights commented Feb 7, 2024

Some progress at endojs/endo#2038

@mhofman
Copy link
Member

mhofman commented Feb 7, 2024

Reopening to track integration in agoric-sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working technical-debt
Projects
None yet
4 participants