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(ertp,zoe): minimal want patterns using M.containerHas(el,n) #10952

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erights
Copy link
Member

@erights erights commented Feb 5, 2025

#endo-branch: markm-clickable-stack-lines

Built on endojs/endo#2747

closes: #XXXX
refs: endojs/endo#2710 #1905 #1913 #1915 #2155 #2156 #2230 #4212 #4217 #10951

Description

Implements minimal want patterns, where the only supported pattern is M.containerHas

  • Zoe-level changes to accept want patterns

Security Considerations

none

Scaling Considerations

By allowing want patterns, might this make the processing of wants more expensive?

Documentation Considerations

Need to update ERTP docs to explain the use of M.has patterns in AmountMath.isGTE and AmountMath.subtract.

Testing Considerations

ERTP tests already added.

  • Need to add Zoe tests once the Zoe changes are in

Upgrade Considerations

None

  • Need to update NEWS.md for ERTP and Zoe

Copy link

cloudflare-workers-and-pages bot commented Feb 5, 2025

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6d08dcc
Status:🚫  Build failed.

View logs

@erights erights force-pushed the markm-min-want-patterns-3 branch 5 times, most recently from ffd5cdd to b2b30dc Compare February 11, 2025 01:38
@erights erights force-pushed the markm-min-want-patterns-3 branch 2 times, most recently from a2c8801 to b8ebc19 Compare March 13, 2025 21:39
@erights erights force-pushed the markm-min-want-patterns-3 branch 2 times, most recently from c1fbfcf to 3698a77 Compare March 14, 2025 21:01
@erights erights changed the title feat(ertp,zoe): minimal want patterns using M.has(el,n) feat(ertp,zoe): minimal want patterns using M.containerHas(el,n) Mar 18, 2025
@erights erights force-pushed the markm-min-want-patterns-3 branch from a04ee47 to 20b287d Compare March 18, 2025 18:46
erights added a commit to endojs/endo that referenced this pull request Mar 19, 2025
Closes: #XXXX
Refs: #2002 #2008 #2113 #1739
Agoric/agoric-sdk#10952

## Description

This PR adds a new `M.containerHas(elementPatt, positiveBigint)`
matcher, and exported `containerHasSplit` function. This is motivated to
support Agoric/agoric-sdk#10952 , which
introduces a minimal form of want pattern in terms of `M.containerHas`.

- [x] Actually merging this must happen only after we've decided either
to move forward with #2008 or to give up on it. Once a decision is made,
and even before it is acted on, then this PR can move forward. (Any
decision to move forward or not with #2008 should also consider changing
the default of the feature flag introduced by #2002 .)

### Security Considerations

none

### Scaling Considerations

Might help due to early termination of the split operations, which
Agoric/agoric-sdk#10952 uses for
`AmountMath.isGTE`.

### Documentation Considerations

Already doc-documents `M.containerHas` in the types.js file for `M`.
That's probably good enough for this PR. The interesting documentation
will be explaining want patterns in
Agoric/agoric-sdk#10952

### Testing Considerations

Added tests for `M.containerHas`

### Compatibility Considerations

The reason to postpone merging this PR until decisions are made on #2008
is that this PR will further expose `rankOrder` in the API, amplifying
the danger that changing the string order will cause surprising
observable changes.

### Upgrade Considerations

This PR itself does not introduce any BREAKING changes or Upgrade
issues.

- [x] Update `NEWS.md` for user-facing changes.
@erights erights force-pushed the markm-min-want-patterns-3 branch from 1efc171 to 27b3006 Compare March 22, 2025 16:10
@erights erights changed the base branch from master to markm-zoe-types-gardening March 22, 2025 16:11
@erights erights force-pushed the markm-zoe-types-gardening branch from bc8b038 to bbd4873 Compare March 22, 2025 17:03
Base automatically changed from markm-zoe-types-gardening to master March 22, 2025 19:35
Copy link

Base branch is changed to master. Please re-run the integration tests by adding 'force:integration' label.

@erights erights force-pushed the markm-min-want-patterns-3 branch from 27b3006 to 6d08dcc Compare March 22, 2025 22:11
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.

1 participant