Skip to main content
Version: v1.7.0

Transaction Manager

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 pending in a mempool, onchain in a block, or rolledback from a block. Capturing these state transition in real-time is challenging and can lead to corrupted data in your application.

info

Possible transaction states:

  • 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
  • Timedout: [coming soon] transaction is in the mempool but has exceeded its configured time-to-live
  • Onchain: transaction is part of a minted block
  • Rolledback: transaction has been removed from the chain due to a network rollback

Maestro’s Transaction Monitoring & Webhook Notification System

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

1. On-submit transaction information

  • Automatic retries: Submitted transaction that fail due to network issues will automatically be resubmitted.
  • Rejection error parsing: [coming soon] Transactions rejected by the node will return precise error messages, such as in the case of missing UTxOs or malformed Tx body.
  • Pending transaction: Successfully submitted transaction into a mempool with be classified as Pending.

2. On-chain webhook notifications

  • Onchain: As soon as a Pending transaction is minted into a block, an Onchain webhook notification is sent.
  • Rolledback: As soon as an Onchain transaction gets dropped because of a block rollback, a Rollback webhook notification is sent.
  • Timeouts: [coming soon] A transaction in the mempool has exceeded its configured time-to-live is rejected.

Transaction State Machine

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

caution

Notice the state machine contains loops. That means a transaction can cycle through the same state multiple times before reaching its 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 with POST /txmanager will be recorded and tracked by the Transaction Manager and have the following response codes:

Response CodeDescriptionState Transistion
200Valid submissionStart --> Pending
400Invalid submissionStart --> Rejected
500Network failureStart --> Start (retry) --> Failed
tip

Learn how to submit a transaction in the User Guide

Common use-cases

Webhooks are well-suited for continuously changing states of data, such as in transactions.

Maestro's transaction notification system provides an efficient way for an applications to "react" to on-chain events and thereby improve the user's experience. This is especially critical for time-sensitive applications where real-time user interaction is important.

info

Examples of time-sensitive Web3 applications

  • Submitting a trade on a DEX
  • Placing a bid for a 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.

tip

Where to next?


Turbo Transactions

The Turbo Transaction service is designed to supercharge your transaction submission process on the Cardano network. It is a specialized system that employes a variety of strategies in order to get your transaction onchain as fast as possible. Whether the network is under heavy load or operating under normal conditions, Turbo Transactions ensures your transactions are added to the blockchain with utmost reliability and speed.

Benefits a transaction propagation system

The key benefit are three-fold.

  1. Outcompete transactions trying to consume highly sought-after UTxOs, particularly within intensive DeFi applications.

  2. Enhance the reliability of transaction submissions, particularly during periods of high network load.

  3. Accelerate transaction onchain confirmation and finality, providing an edge in time-sensitive operations.

Common use-cases

Use-cases are vast, ranging from DeFi applications, where transaction speed can significantly impact financial outcomes, to gaming platforms, where swift transactions can enhance user experience dramatically. In essence, any application demanding fast, reliable transaction execution can substantially benefit from Turbo Transactions.

Subscription level

This API is only included in subscriptions above the Artist tier.

Get to know Maestro subscription details here

tip

Where to next?