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

CLI error state handling and retries #72

Closed
0xean opened this issue Jun 17, 2024 · 0 comments · Fixed by #78 or #74
Closed

CLI error state handling and retries #72

0xean opened this issue Jun 17, 2024 · 0 comments · Fixed by #78 or #74
Assignees

Comments

@0xean
Copy link
Contributor

0xean commented Jun 17, 2024

Files:

  • Store all files in a common location in users home directory
  • Handle error writing file (exit with data logged to console for recovery/manual save)
  • Create all files as read-only to reduce the chance of accidental deletion

Mnemonic:

  • Handle password match on create (retry 3 times -> exit on error)
  • Warn user for redundant backup (keystore + manual recovery mechanism via mnemonic)
  • Handle recovery from keystore (default location), keystore (manual file location), mnemonic (retry 3 times -> exit on error)

Wallet:

  • Handle hot wallet funded state for distributions that have not started, partial distributions, or complete distributions
  • Handle mismatch state between number of transactions in distribution vs number of txs signed/broadcasted.
  • Sign transaction are all or nothing (ie. we won't write state file unless all txs have been signed successfully)
  • Handle picking up from completed sign transaction step (begin broadcasting transactions)
  • Handle transaction broadcasting:
    • Write all success txids for each run (allow partial broadcast)
    • Pick up from partial broadcast and continue attempting to broadcast remaining txs
    • Handle error broadcasting transaction

IPFS:

  • Handle invalid epoch IPFS hash (exit on error)
  • Handle invalid epoch IPFS contents (exit on error)
  • Handle invalid metadata IPFS hash (exit on error)
  • Handle invalid metadata IPFS contents (exit on error)
  • Confirm metadata update of existing epoch ipfs hash

General:

  • Re-running the script after an error will pick up from the existing state files (wallet recovery, funding step, distribution step)
  • Attempt to start a new distribution for the same epoch if an in progress distribution is detected will throw a waning requiring action before continuing
@kaladinlight kaladinlight self-assigned this Jul 8, 2024
@kaladinlight kaladinlight linked a pull request Jul 8, 2024 that will close this issue
@kaladinlight kaladinlight closed this as completed by moving to Done in ShapeShift Dashboard Jul 8, 2024
@kaladinlight kaladinlight linked a pull request Jul 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants