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

Should encodePassable format "compactOrdered" not use "~" as an encoding prefix? #2600

Open
gibson042 opened this issue Oct 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@gibson042
Copy link
Contributor

Describe the bug

As implied at

* In addition, `|` is the remotable->ordinal mapping prefix:
* This is not used in covers but it is
* reserved from the same set of strings. Note that the prefix is > any
* prefix used by any cover so that ordinal mapping keys are always outside
* the range of valid collection entry keys.
and noted explicitly in Agoric/agoric-sdk#2589 (comment) , agoric-sdk liveslots expects | to be a prefix that sorts after all encoded values. But that assumption would no longer hold if ~-prefixed compactOrdered encodings were stored as-is. Here in endo, we can either assume that agoric-sdk will find a suitable workaround, or switch to a different prefix that does not suffer from this issue. The initial choice of ~ was mostly arbitrary, but did strive to avoid overloading any existing special character. Were we to stick with that goal, we'd be looking at candidates like

  • U+0020 SPACE (which sorts before any other encoding but suffers from invisibility)
  • { (which sorts after any other encoding but overloads the JSON begin-object token)
  • " (which overloads the JSON string quote)
  • # (which overloads the CapData body smallcaps prefix and smallcaps special-constant prefix)
  • $/%/&/+/- (which overload smallcaps type prefixes)
  • '/)/*/, (which are reserved by smallcaps but not currently used)
  • .///;/</=/>/@/\/]/_/` (no known conflicts other than sorting in between legacy passable encodings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant