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

[requirement] any failure in smart-wallet observable in chain storage #7004

Closed
turadg opened this issue Feb 15, 2023 · 1 comment · Fixed by #7135
Closed

[requirement] any failure in smart-wallet observable in chain storage #7004

turadg opened this issue Feb 15, 2023 · 1 comment · Fixed by #7135
Assignees
Labels
enhancement New feature or request vaults_triage DO NOT USE wallet
Milestone

Comments

@turadg
Copy link
Member

turadg commented Feb 15, 2023

What is the Problem Being Solved?

There are some failures in the smart wallet contract (walletFactory.js) that throw or simply log to console. Because of the async nature of of the Cosmos bridge, that rejection don't get back to the initiator.

Description of the Design

Ensure that every failure in the contract is observable, using chain storage.

For errors before the wallet is known, published.wallet.lastError: https://github.com/Agoric/agoric-sdk/blob/master/packages/smart-wallet/src/walletFactory.js#L152-L169

For errors on a wallet before an offer execution can handle it, published.wallet.{addr}.lastError: https://github.com/Agoric/agoric-sdk/blob/master/packages/smart-wallet/src/walletFactory.js#L152-L169

Anything that gets into an offer handler should write to the offerStatus when it fails.

Security Considerations

Scaling Considerations

Test Plan

@turadg turadg added the enhancement New feature or request label Feb 15, 2023
@turadg turadg added this to the Vaults EVP milestone Feb 15, 2023
@turadg turadg self-assigned this Feb 15, 2023
@ivanlei ivanlei added the vaults_triage DO NOT USE label Feb 21, 2023
@mergify mergify bot closed this as completed in #7135 Mar 9, 2023
@dckc dckc added the wallet label Mar 31, 2023
@dckc
Copy link
Member

dckc commented Mar 31, 2023

In #7291 I struggled to diagnose "tryExitOffer requires spend authority" until I got access to validator node logs. Is there a way to see it from RPC/chainStorage/vstorage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vaults_triage DO NOT USE wallet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants