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

async flow membrane doesn't preserve Brand identity #9780

Closed
dckc opened this issue Jul 25, 2024 · 2 comments
Closed

async flow membrane doesn't preserve Brand identity #9780

dckc opened this issue Jul 25, 2024 · 2 comments
Labels
asyncFlow related to membrane-based replay and upgrade of async functions documentation Improvements or additions to documentation

Comments

@dckc
Copy link
Member

dckc commented Jul 25, 2024

Describe the bug

When a host function returns a Brand, the guest sees a Brand guest wrapper that isn't useful for brand identity comparison.
Issuers likewise, presumably.

To Reproduce

  1. Check out the dc-brand-info branch - currently 8c772e6
  2. cd agoric-sdk/packages/orchestration
  3. yarn test test/facade.test.ts -m 'asset / denom info'
  4. test fails due to difference between brand and brand guest wrapper and
 asset / denom info
  test/facade.test.ts:196

  -   brand: Object @Alleged: Token1 brand guest wrapper { ...  },
  +   brand: Object @Alleged: Token1 brand {},

  1 test failed

Expected behavior

Brand returned in orch.getBrandInfo() can be compared by identity as usual.

Additional context

#9754, #9211

@dckc dckc added the bug Something isn't working label Jul 25, 2024
@dckc dckc added the asyncFlow related to membrane-based replay and upgrade of async functions label Jul 25, 2024
@mhofman
Copy link
Member

mhofman commented Jul 25, 2024

This is "working as intended". The test above attempts to compare a value inside the orchestrated function with a value captured in the context outside of it.

@dckc dckc added documentation Improvements or additions to documentation and removed bug Something isn't working labels Jul 25, 2024
@dckc
Copy link
Member Author

dckc commented Jul 25, 2024

So the problem here was flows that closed over the brand. Following the norms for flows (#9692, #9693) means passing the brand in as an endowment, at which point the identity comparison works.

@dckc dckc closed this as completed Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asyncFlow related to membrane-based replay and upgrade of async functions documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants