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/api@v0.2.6
- cosmossdk.io/core@v0.5.1
- cosmossdk.io/depinject@v1.0.0-alpha.3
- filippo.io/edwards25519@v1.0.0-rc.1
- github.com/99designs/keyring@v1.2.1 => github.com/cosmos/keyring@v1.2.0
- github.com/ChainSafe/go-schnorrkel@v0.0.0-20200405005733-88cbf1b4c40d
- github.com/Workiva/go-datastructures@v1.0.53
- github.com/armon/go-metrics@v0.4.1
- github.com/beorn7/perks@v1.0.1
- github.com/bgentry/speakeasy@v0.1.1-0.20220910012023-760eaf8b6816
- github.com/btcsuite/btcd/btcec/v2@v2.3.2
- github.com/cespare/xxhash/v2@v2.1.2
- github.com/coinbase/rosetta-sdk-go@v0.7.9
- github.com/cometbft/cometbft-db@v0.7.0
- github.com/confio/ics23/go@v0.9.1 => github.com/agoric-labs/cosmos-sdk/ics23/go@v0.8.0-alpha.agoric.1
- github.com/cosmos/btcutil@v1.0.4
- github.com/cosmos/cosmos-db@v0.0.0-20221226095112-f3c38ecb5e32
- github.com/cosmos/cosmos-proto@v1.0.0-beta.1
- github.com/cosmos/cosmos-sdk@v0.45.16 => github.com/agoric-labs/cosmos-sdk@v0.45.16-alpha.agoric.3
- github.com/cosmos/go-bip39@v1.0.0
- github.com/cosmos/iavl@v0.19.5
- github.com/cosmos/ibc-go/v4@v4.5.1
- github.com/cosmos/ledger-cosmos-go@v0.12.2
- github.com/creachadair/taskgroup@v0.3.2
- github.com/davecgh/go-spew@v1.1.1
- github.com/decred/dcrd/dcrec/secp256k1/v4@v4.0.1
- github.com/desertbit/timer@v0.0.0-20180107155436-c41aec40b27f
- github.com/dvsekhvalnov/jose2go@v1.5.0
- github.com/felixge/httpsnoop@v1.0.2
- github.com/fsnotify/fsnotify@v1.6.0
- github.com/go-kit/kit@v0.12.0
- github.com/go-kit/log@v0.2.1
- github.com/go-logfmt/logfmt@v0.5.1
- github.com/godbus/dbus@v0.0.0-20190726142602-4481cbc300e2
- github.com/gogo/gateway@v1.1.0
- github.com/gogo/protobuf@v1.3.3 => github.com/regen-network/protobuf@v1.3.3-alpha.regen.1
- github.com/golang/protobuf@v1.5.2
- github.com/golang/snappy@v0.0.4
- github.com/google/btree@v1.1.2
- github.com/google/orderedcode@v0.0.1
- github.com/gorilla/handlers@v1.5.1
- github.com/gorilla/mux@v1.8.0
- github.com/gorilla/websocket@v1.5.0
- github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0
- github.com/grpc-ecosystem/grpc-gateway@v1.16.0
- github.com/gsterjov/go-libsecret@v0.0.0-20161001094733-a6f4afe4910c
- github.com/gtank/merlin@v0.1.1
- github.com/gtank/ristretto255@v0.1.2
- github.com/hashicorp/go-immutable-radix@v1.3.1
- github.com/hashicorp/golang-lru@v0.5.5-0.20210104140557-80c98217689d
- github.com/hashicorp/hcl@v1.0.0
- github.com/hdevalence/ed25519consensus@v0.0.0-20220222234857-c00d1f31bab3
- github.com/improbable-eng/grpc-web@v0.14.1
- github.com/klauspost/compress@v1.15.11
- github.com/lib/pq@v1.10.6
- github.com/libp2p/go-buffer-pool@v0.1.0
- github.com/magiconair/properties@v1.8.6
- github.com/mattn/go-colorable@v0.1.13
- github.com/mattn/go-isatty@v0.0.16
- github.com/matttproud/golang_protobuf_extensions@v1.0.2-0.20181231171920-c182affec369
- github.com/mimoo/StrobeGo@v0.0.0-20210601165009-122bf33a46e0
- github.com/minio/highwayhash@v1.0.2
- github.com/mitchellh/mapstructure@v1.5.0
- github.com/mtibben/percent@v0.2.1
- github.com/pelletier/go-toml/v2@v2.0.5
- github.com/pkg/errors@v0.9.1
- github.com/pmezard/go-difflib@v1.0.0
- github.com/prometheus/client_golang@v1.14.0
- github.com/prometheus/client_model@v0.3.0
- github.com/prometheus/common@v0.37.0
- github.com/prometheus/procfs@v0.8.0
- github.com/rakyll/statik@v0.1.7
- github.com/rcrowley/go-metrics@v0.0.0-20201227073835-cf1acfcdf475
- github.com/regen-network/cosmos-proto@v0.3.1
- github.com/rs/cors@v1.8.2
- github.com/rs/zerolog@v1.27.0
- github.com/spf13/afero@v1.9.2
- github.com/spf13/cast@v1.5.0
- github.com/spf13/cobra@v1.6.1
- github.com/spf13/jwalterweatherman@v1.1.0
- github.com/spf13/pflag@v1.0.5
- github.com/spf13/viper@v1.14.0
- github.com/stretchr/testify@v1.8.1
- github.com/subosito/gotenv@v1.4.1
- github.com/syndtr/goleveldb@v1.0.1-0.20210819022825-2ae1ddf74ef7
- github.com/tendermint/go-amino@v0.16.0
- github.com/tendermint/tendermint@v0.34.27 => github.com/agoric-labs/cometbft@v0.34.27-alpha.agoric.3
- github.com/tendermint/tm-db@v0.6.7
- github.com/tidwall/btree@v1.5.0
- github.com/zondax/hid@v0.9.1 => github.com/zondax/hid@v0.9.1-0.20220302062450-5552068d2266
- github.com/zondax/ledger-go@v0.14.1
- golang.org/x/crypto@v0.5.0
- golang.org/x/exp@v0.0.0-20221019170559-20944726eadf
- golang.org/x/net@v0.7.0
- golang.org/x/sys@v0.5.0
- golang.org/x/term@v0.5.0
- golang.org/x/text@v0.7.0
- google.golang.org/genproto@v0.0.0-20230125152338-dcaf20b6aeaa
- google.golang.org/grpc@v1.52.3 => google.golang.org/grpc@v1.33.2
- google.golang.org/protobuf@v1.28.2-0.20220831092852-f930b1dc76e8
- gopkg.in/ini.v1@v1.67.0
- gopkg.in/yaml.v2@v2.4.0
- gopkg.in/yaml.v3@v3.0.1
- nhooyr.io/websocket@v1.8.6
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