Maestro Platform

Transaction Manager

12min

Transactions are at the center of all interactions on the blockchain. They are responsible for defining the specific ledger state transitions between two consecutive blocks (ie. UTxOs both consumed and created at an address). As a dApp developer, tracking individual states of a transaction is important and complex. A transaction can be pendingin a mempool, onchainin a block, or rolledback from a block. Capturing these state transitions in real-time is challenging and can lead to corrupted data in your application.

Document image



Service Availability

The Transaction Manager service is available on the following blockchains:

Service

Bitcoin

Cardano

Dogecoin

Transaction Manager

Coming Soon

Coming Soon



Possible Transaction States

State

Description

Rejected

Rejected by the block producer due to an invalid transaction.

Pending

Transaction successfully submitted and waiting in a mempool to be accepted on-chain.

Failed

Communication to the node has failed.

Onchain

Transaction is part of a minted block.

Rolledback

Transaction has been removed from the chain due to a network rollback or reorg



Transaction Monitoring & Webhook Notification System

Maestro’s Transaction Manager is a state-of-the-art tool that abstracts away the complexity of managing blockchain transaction states. It provides a transaction monitoring dashboard and webhook notification system to track all transactions submitted with Maestro. This provides applications with the following benefits:

1. On-submit transaction information

  • Automatic Retries: Transactions that fail due to network issues are automatically resubmitted.
  • Rejection Error Parsing: Transactions rejected by the node will return specific error messages, such as missing UTxOs or malformed transaction bodies.
  • Pending Transaction State: Successfully submitted transactions are classified as Pending when entered into the mempool.

2. On-chain webhook notifications

  • Onchain: Once a Pending transaction is included in a block, an Onchain webhook notification is sent.
  • Rolledback: If an Onchain transaction is dropped due to a rollback, a **Rollback **webhook notification is sent.
  • Timeouts: [Coming Soon] A transaction that remains in the mempool beyond its time-to-live will be marked as timed out and rejected.


Transaction State Machine

Transaction state transitions can best be understood with a state machine diagram.

Document image


Note: The state machine contains loops, meaning a transaction can transition through the same state multiple times before reaching an end state.

For example, a rolledback transaction may be included into another block, resulting in three webhook notifications:

Onchain -> Rollback -> Onchain



Transaction Submission

All transactions submitted via Maestro's specialized endpoint are recorded and tracked by the Transaction Manager. Below are the possible response codes:

Response Code

Description

State Transition

200

Valid submission

Start --> Pending

400

Invalid submission

Start --> Rejected

500

Network failure

Start --> Start (retry) --> Failed



Common Use Cases

Webhooks are ideal for tracking continuously changing states of data, such as blockchain transactions. Maestro’s transaction notification system provides an efficient way for applications to react to on-chain events, enhancing user experience—particularly for time-sensitive applications.

Examples of time-sensitive Web3 applications

  • Submitting a trade on a DEX
  • Placing a bid for an NFT auction

Transaction rollback notifications are essential for maintaining data integrity by providing a mechanism to revert in-app operations as soon as a rollback happens on-chain. For example, reverting an onchain DEX order after a block containing that transaction gets rolled back.

Updated 11 Oct 2024
Did this page help you?