timewave-computer / valence-services

Other
3 stars 0 forks source link

What to do on failed message on valence account? #5

Closed Art3miX closed 10 months ago

Art3miX commented 11 months ago

When the rebalancer is finished, its sending a messages to be executed by the valence account (send funds to auctions)

There are several reason this message can fail:

  1. The user is not a valence account, and doesn't implement the message we try to execute
  2. The user is not a contract, we can't execute a message on it (a wallet)
  3. Sending the funds to an auction failed because of an error
  4. A bug on our part in constructing the message
  5. Random bug we missed

Doing #4 will avoid reaching the 1 and 2 errors, so they should never happen.

Because our errors are failing gracefully, and doesn't fail the whole TX, we will never actually know of errors unless we track them some way (either in storage, or an indexer that tells us if an error event happened)

Of course 3 and 4 are detectable during tests, and we should discover them early, but mistakes happen and we still want a way to see errors in production.

Thoughts?

uditvira commented 11 months ago
Art3miX commented 11 months ago

Can we not validate for 1 and 2?

Here is a much better way of verifying this: https://github.com/timewave-computer/valence-services/issues/4#issuecomment-1783011576

Art3miX commented 10 months ago

Closing in favor of #16