Added docs for txm#272
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Deploying happychain with
|
| Latest commit: |
8869e42
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://35904f0a.happychain.pages.dev |
| Branch Preview URL: | https://gabriel-txm-doc.happychain.pages.dev |
c5bddb5 to
2a35bd2
Compare
e20494b to
96c21fc
Compare
17474a2 to
7066f94
Compare
96c21fc to
7a69327
Compare
7066f94 to
6509fe0
Compare
7a69327 to
65b547a
Compare
6509fe0 to
7199d82
Compare
65b547a to
2ecd54a
Compare
7199d82 to
a4d48c9
Compare
2ecd54a to
3c8d970
Compare
caaf521 to
5b00c8c
Compare
| * who have a strict requirement on the block number or timestamp on or after which they should land. | ||
| * | ||
| * For example, in the randomness service, we need to emit the reveal transaction at precisely the right block. | ||
| * This transaction would fail if executed before the correct block, so when you try to simulate it, you'll receive a failure. |
There was a problem hiding this comment.
Would remove this paragraph as the user doesn't necessarily know what the randomness service is.
|
|
||
| export enum TransactionStatus { | ||
| /** | ||
| * The transaction is waiting to be included in a block |
There was a problem hiding this comment.
Right, pending is the default state. Let's explain that. Something like "Default state for new transaction: the transaction is awaiting processing by TXM or has been submitted in the mempool and is waiting to be included in a block."
Maybe we want to split this in two states? "Processing" and "Pending"? "Processing" transactions are never saved to the DB if I'm not mistaken.
| */ | ||
| Expired = "Expired", | ||
| /** | ||
| * The transaction has expired and we are trying to cancel it to save gas |
There was a problem hiding this comment.
Okay, good point. Let's say ".. trying to cancel it to save gas compared to having it land on chain and either revert or do something we no longer care about."
| * The transaction has been successfully executed | ||
| */ | ||
| Success = "Success", | ||
| } |
There was a problem hiding this comment.
Gotcha, so gas estimation will be retried by the tx monitor next time?
We probably ought to have a special kind of feedback for these kind of transactions, I'll enqueue an issue for this.
| * The module must be initialized first. During initialization, it retrieves the transaction count from the RPC, | ||
| * which represents the expected next nonce without considering potential pending transactions in the mempool. | ||
| * To handle this scenario, we check for pending transactions in our database and identify the last nonce of these transactions. | ||
| * We also check for gaps in the pending transactions, aiming to use these gaps before assigning new nonces, thus eliminating nonce gaps. |
There was a problem hiding this comment.
500c1de to
8869e42
Compare

Linked Issues
Description
This PR adds the Transaction Manager documentation to the VOCs repository. In addition, it includes some inline documentation for the Transaction Manager itself
In this link you will have more context about the docs:
https://www.notion.so/happychain/Transaction-Manager-13104b72a58580b185dcde1cf84baa98?pvs=4
Toggle Checklist
Checklist
Basics
norswap/build-system-caching).Reminder: PR review guidelines
Correctness
testnet, mainnet, standalone wallet, ...).
< INDICATE BROWSER, DEMO APP & OTHER ENV DETAILS USED FOR TESTING HERE >
< INDICATE TESTED SCENARIOS (USER INTERFACE INTERACTION, CODE FLOWS) HERE >
and have updated the code & comments accordingly.
Architecture & Documentation
(2) commenting these boundaries correctly, (3) adding inline comments for context when needed.
comments.
in a Markdown document.