Skip to content

feat: when a user schedules a commit we should provide progress reports until the tx is final on chain #100

@thlorenz

Description

@thlorenz

Communicating Commit Outcome

  • in order to provide feedback if a commit could not be realized on chain we should add another
    transaction that logs commit outcome, i.e. ScheduledCommitResult
  • as with the ScheduledCommitSent we can use the register pattern and thus are able to log
    the signature of that transaction at the time of schedule
  • users can then query the logs of the program to learn about the outcome of their commit
  • this transaction is similar to the sent transaction

This was first mentioned in this PR #96 as described above, but after discussing this it seems we could have a string of transactions each logging the signature of the next one, i.e.

  1. User schedules commit, we create a sent commit transaction in log its signature
  2. Commit is processed, we send the tx created in 1., which will include the following signatures:
  • the chain transaction we are about to send
  • another transaction we create which we will use to provide the next progress update
  1. Sending to chain fails, we send the ephem tx created in 2. and include the following:
  • the chain transaction we are about to send to retry
  • another transaction we create which we will use to provide the next progress update
  1. The chain transaction succeeds and we send the tx created in 3. to report that final outcome

As part of this address

// NOTE: when we address https://github.com/magicblock-labs/magicblock-validator/issues/100

Metadata

Metadata

Assignees

Labels

P2Medium priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions