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

chore(fusdc): settle ForwardFailed and Advancing txs #10729

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

0xpatrickdev
Copy link
Member

closes: #10625

Description

Security Considerations

Scaling Considerations

Documentation Considerations

Testing Considerations

Upgrade Considerations

Copy link

cloudflare-workers-and-pages bot commented Dec 18, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 066f108
Status: ✅  Deploy successful!
Preview URL: https://d1dad169.agoric-sdk.pages.dev
Branch Preview URL: https://pc-10625-forward-failed.agoric-sdk.pages.dev

View logs

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

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

a couple notes before our chat

Comment on lines 167 to 175
} catch (e) {
// settlement already received; tx will Forward.
Copy link
Member

Choose a reason for hiding this comment

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

assuming all exceptions have this meaning seems inconsistent with https://github.com/Agoric/agoric-sdk/wiki/Errors-and-Control-Flow

if (mintedEarly.has(key)) {
mintedEarly.delete(key);
void this.facets.self.forward(txHash, fullValue, destination.value);
throw Fail`${q(txHash)} minted before Observed`;
Copy link
Member

Choose a reason for hiding this comment

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

This should be "raising a non-error" per house style on Errors and Control Flow

@0xpatrickdev 0xpatrickdev force-pushed the pc/10625-forward-failed branch from d044624 to 28e969b Compare December 18, 2024 19:22
- tx to Forward will always have `txHash`
- `Advancing` txs can be dequeued and added to `mintedEarly`
- handle "minted before Observed" by adding to `mintedEarly` store
- `Advancer` checks if tx is in `mintedEarly` store
- use `notifyFacet` is used to simulate Advance
- test that "minted early" forwards if evidence eventually reported
- test `ForwardFailed` state (slow `.forward` transfer fails)
- test "minted while `Advancing`" scenarios (`Advanced`, `AdvanceFailed`)
@0xpatrickdev 0xpatrickdev force-pushed the pc/10625-forward-failed branch from 28e969b to f5df91a Compare December 19, 2024 04:55
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.

fusdc: ForwardFailed state
2 participants