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: tx statuses in vstorage #10750

Closed

Conversation

0xpatrickdev
Copy link
Member

refs: #10625

Description

  • ensure "minted before observed" Observe statuses are recorded in vstorage
  • ensure "minted while Advancing" Advanced and AdvanceFailed statuses are recorded in vstorage

Security Considerations

None, improves observability off chain.

Scaling Considerations

None

Documentation Considerations

None

Testing Considerations

Updates existing tests

Upgrade Considerations

Targeting initial FUSDC release

- Advancing txs are dequeueable so `case PendingTxStatus.Advancing:` is reachable
- update Settler tests to use `notifyAdvancing` result to simulate an advance
- add Settler test for minting while advancing (Advanced + AdvanceFailed paths)
- if Forward (slow transfer) fails, capture the state to distinguish from successful forwards
- Advancer calls `forwardIfMinted` to check for an early matching mint
- if found, no Advance occurs and the minted funds are forwarded
- ensure "minted before observed" `Observe` statuses are recorded in vstorage
- ensure "minted while Advancing" `Advanced` and `AdvanceFailed` statuses are recorded in vstorage
Copy link

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: c7db794
Status: ✅  Deploy successful!
Preview URL: https://f763db2a.agoric-sdk.pages.dev
Branch Preview URL: https://pc-10625-vstorage-writes.agoric-sdk.pages.dev

View logs

* @param {EvmHash} txHash
* @param {boolean} success whether the Transfer succeeded
*/
notifyAdvanceOutcome(txHash, success) {
Copy link
Member

Choose a reason for hiding this comment

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

This name is awkward since advanceOutcome is already "notifying".

I get that the existing one is keyed by (nfa, amount) and this is keyed by txHash. So the existing one is for "pending" transactions and this new one is for settled.

Line two of your comment draws the contrast being "settled". Let's just use that in the name. Something like,

Suggested change
notifyAdvanceOutcome(txHash, success) {
advanceOutcomeForSettled(txHash, success) {

@0xpatrickdev 0xpatrickdev force-pushed the pc/10625-forward-failed branch 2 times, most recently from 08bf844 to 3a0afe7 Compare December 20, 2024 17:27
@0xpatrickdev
Copy link
Member Author

Closing in favor of #10729

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