Observable Transaction Status #751
LayneHaber
started this conversation in
Archive
Replies: 3 comments 4 replies
-
I don't we need Empty should be when variantTransactionData is "0x" for an Invariant digest. |
Beta Was this translation helpful? Give feedback.
4 replies
-
Updated onchain, we no longer need an |
Beta Was this translation helpful? Give feedback.
0 replies
-
No longer relevant, subgraph + cache can accomplish this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Ability to tell if transaction is fulfilled or cancelled onchain is not currently possible, instead the
TransactionManager
will only indicate if a transaction is fully completed. This leads to some annoying sanitation checks needed in the router. Instead, the status should be hashed with the transaction when stored onchain to disambiguate between the two end states.Motivation
In v0, the
TransactionManager
stores a hash of theVariantTransactionData
onchain. When the transaction isPrepared
, the truepreparedBlockNumber
is stored. When the transaction is eitherFulfilled
orCancelled
thepreparedBlockNumber
is set to0
and then stored onchain as part of theVariantTransactionData
. This accomplishes the onchain task of determining if a transaction can be completed, but makes offchain validation of transaction actions difficult. Since there is no indication of how a transaction was completed, special logic has to be created to determine the status of a completed transaction.Proposed Solution
Instead, the status should be stored onchain. This is especially important as nomad can complicate message tracking. Additionally, the nomad token bridge is restricted in the information it will pass through.
Store the
status
as part of theFulfilledTransaction
:Should also include a
getTransactionStatus(bytes32 transactionId)
helper function.Test Cases
The following should be implemented:
NOTE The above assertions can also be included in the assertions for normal happy case tests
Outstanding Questions
Beta Was this translation helpful? Give feedback.
All reactions