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

feat(board)!: migrate to smallCaps for boardMarshaller, vstorage, smartWallet #7013

Closed
wants to merge 3 commits into from

Conversation

dckc
Copy link
Member

@dckc dckc commented Feb 16, 2023

refs: #6822, #6646

Description

An exploration into using smallcaps for the board marshaller and hence vstorage and the smart wallet.

Security Considerations

Clients expecting the @qclass format could get confused.

Scaling Considerations

smallCaps is quite a bit more concise. (#6646 is a nearby optimization)

IOU measurements, I suppose

Documentation Considerations

This represents a burden on clients to support smallCaps.

It also puts a burden on clients that want to read data before this gets deployed to support both formats. I suggest that it's better to put this burden on clients that want to read data from the pre-bulldozer era than migrating after the bulldozer upgrade (#6644).

Testing Considerations

  • update test-lib-board.js
  • update any smartWallet tests that are sensitive to marshal format
  • update dapps / clients that have their own implementation of @agoric/marshal

cc @michaelfig @warner @ivanlei

@erights
Copy link
Member

erights commented Feb 17, 2023

It also puts a burden on clients that want to read data before this gets deployed to support both formats.

Any client that uses marshal unserialize to read the data will already read both formats.

Comment on lines +202 to +206
/** @type {import('@endo/marshal').MakeMarshalOptions} */
const useSmallCaps = harden({
serializeBodyFormat: 'smallcaps',
});

Copy link
Member

Choose a reason for hiding this comment

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

I prefer that you not factor this out, but rather repeat the object literal inline in both call sites. The reason is that this is an options bag, and each call site could in theory want to add their own options over time. Think of the options like serializeBodyFormat as approximating name-based parameters as opposed to positional parameters.

@erights erights self-requested a review February 17, 2023 00:14
Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

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

Do you understand the 2 CI failures?

@dckc
Copy link
Member Author

dckc commented Feb 19, 2023

Do you understand the 2 CI failures?

presumably we got away with not hardening some mocked object but smallCaps is more strict somehow

cd packages/governance && yarn test
...
not ok 53 - unitTests › committee › committee-open question:one %ava-dur=15898ms
          message: 'Cannot pass non-frozen objects like {"iface":"Alleged: ManualTimer"}. Use harden()',

not ok 54 - unitTests › committee › committee-open question:mixed %ava-dur=18120ms
Error#2: Cannot pass non-frozen objects like { iface: 'Alleged: ManualTimer' } . Use harden()

@dckc
Copy link
Member Author

dckc commented Apr 7, 2023

@turadg notes makeAgoricNamesRemotesFromFakeStorage doesn’t undestand smallcaps.

@dckc
Copy link
Member Author

dckc commented May 1, 2023

closing in favor of #7565

@warner note makeAgoricNamesRemotesFromFakeStorage and the dapp-inter-jumper thing above.

@dckc dckc closed this May 1, 2023
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.

2 participants