|
| 1 | +--- |
| 2 | +section: developers |
| 3 | +date: Last Modified |
| 4 | +title: "Checking Transaction Journey Guide" |
| 5 | +lang: "en" |
| 6 | +permalink: "developers/guides/checking-transaction-journey" |
| 7 | +excerpt: "This guide contains instructions on how you can check your transaction's journey." |
| 8 | +--- |
| 9 | + |
| 10 | +import Aside from "../../../../../components/Aside.astro" |
| 11 | +import ClickToZoom from "../../../../../components/ClickToZoom.astro" |
| 12 | +import ToggleElement from "../../../../../components/ToggleElement.astro" |
| 13 | +import txJourneyDiagram from "../_images/txJourneyDiagram.png" |
| 14 | + |
| 15 | +This guide will help you to check the journey of a transaction through the **Scroll network**, how to inspect it via the `/tx/journeys` API, and interpret its lifecycle. |
| 16 | + |
| 17 | +### Architecture Summary |
| 18 | + |
| 19 | +<ClickToZoom src={txJourneyDiagram} /> |
| 20 | +_Diagram of Scroll transaction journey_ |
| 21 | + |
| 22 | +| Component | Role | |
| 23 | +|-----------------------|---------------------------------------------------| |
| 24 | +| Backend | Submits transaction. | |
| 25 | +| Monitoring Service | Tracks transaction progress and logs events. | |
| 26 | +| Scroll Internal Nodes | Handle transaction validation and mempool logic. | |
| 27 | +| Scroll Sequencer | Orders transactions into blocks. | |
| 28 | +| Axiom Logging | Receives logs for external visibility/analysis. | |
| 29 | + |
| 30 | +--- |
| 31 | + |
| 32 | +### Endpoint |
| 33 | + |
| 34 | +POST https://venus.scroll.io/v1/tx/journeys |
| 35 | + |
| 36 | +### Request Example |
| 37 | + |
| 38 | +```bash |
| 39 | +curl -X POST "https://venus.scroll.io/v1/tx/journeys" \ |
| 40 | + -H "Content-Type: application/json" \ |
| 41 | + -d '{ |
| 42 | + "tx_hashes": [ |
| 43 | + "0xcf0982782692a521e6bcbf4f6c5d1db6ac1f2049b7c7304dd89a9522a61406f9" |
| 44 | + ] |
| 45 | + }' | jq |
| 46 | +``` |
| 47 | + |
| 48 | +#### Response Fields |
| 49 | + |
| 50 | +| Field | Description | |
| 51 | +|-------------------|-------------| |
| 52 | +| `tx_hash` | Transaction hash queried. | |
| 53 | +| `current_status` | Final status (`queued`,`pending`,`executed`,`dropped`,`reorged`,`replaced`). | |
| 54 | +| `execution_status`| Result of execution (`successful`,`reverted`,`unknown`,`error`). | |
| 55 | +| `first_seen_at` | First time the network detected this transaction. | |
| 56 | +| `last_updated_at` | Most recent status update time. | |
| 57 | +| `journey` | Detailed list of state transitions for the transaction. | |
| 58 | + |
| 59 | +#### Current Status |
| 60 | + |
| 61 | +| Stage | Description | |
| 62 | +|-----------|-------------| |
| 63 | +| `queued` | Transaction not yet executable, e.g. nonce gap or awaiting prior txs. | |
| 64 | +| `pending` | Transaction valid and executable in mempool. | |
| 65 | +| `executed` | Transaction included in a block. | |
| 66 | +| `dropped` | Transaction removed due to expiration, mempool overflow, or invalid parameters. | |
| 67 | +| `reorged` | Transaction was removed from the canonical chain after a chain reorganization. | |
| 68 | +| `replaced` | Transaction replaced by a new transaction (same sender & nonce, higher gas price). | |
| 69 | + |
| 70 | +#### Execution Status |
| 71 | + |
| 72 | +| Status | Meaning | |
| 73 | +|------------|---------| |
| 74 | +| `successful`| Transaction executed successfully and included in a block. | |
| 75 | +| `reverted` | Transaction failed during execution. | |
| 76 | +| `unknown` | Transaction not yet executed. | |
| 77 | +| `error` | Unexpected error in query node. Should rarely occur. | |
| 78 | + |
| 79 | +### Journey Field Example |
| 80 | + |
| 81 | +#### Queued |
| 82 | +```json |
| 83 | +{ |
| 84 | + "event_type": "queued", |
| 85 | + "timestamp": "2025-04-10T09:55:29.73Z", |
| 86 | + "node_type": "l2geth-bootnode-0", |
| 87 | + "event_detail": "Pooled new future transaction (into non-executable queues)" |
| 88 | +} |
| 89 | +``` |
| 90 | + |
| 91 | +#### Pending |
| 92 | +```json |
| 93 | +{ |
| 94 | + "event_type": "pending", |
| 95 | + "timestamp": "2025-04-10T09:55:29.73Z", |
| 96 | + "node_type": "l2geth-bootnode-0", |
| 97 | + "event_detail": "Transaction promoted from future queue to pending" |
| 98 | +} |
| 99 | +``` |
| 100 | + |
| 101 | +#### Executed |
| 102 | +```json |
| 103 | +{ |
| 104 | + "event_type": "executed", |
| 105 | + "timestamp": "2025-04-10T09:55:31.02Z", |
| 106 | + "node_type": "l2geth-bootnode-0", |
| 107 | + "event_detail": "TX is included in a block" |
| 108 | +} |
| 109 | +``` |
| 110 | + |
| 111 | +#### Dropped |
| 112 | +```json |
| 113 | +{ |
| 114 | + "event_type": "dropped", |
| 115 | + "timestamp": "2025-04-12T15:33:23.142Z", |
| 116 | + "node_type": "l2geth-bootnode-0", |
| 117 | + "event_detail": "Discarding invalid transaction when adding the transaction" |
| 118 | +} |
| 119 | +``` |
| 120 | + |
| 121 | +1. `Queued`: Transaction waiting for execution (e.g., nonce gap) |
| 122 | +2. `Pending`: Transaction ready for inclusion by Scroll Sequencer. |
| 123 | +3. `Executed`: Transaction included in a block. |
| 124 | +4. (Optional) `Reorged`: Transaction may get reorged based on network conditions. |
| 125 | +5. `Dropped` or `Replaced`: Transaction invalidated or replaced before execution. |
| 126 | + |
| 127 | +### Common Failure Reasons |
| 128 | + |
| 129 | +**Dropped:** |
| 130 | +- Timeout: Stuck too long in queue. |
| 131 | +- Mempool full. |
| 132 | +- Invalid parameters (e.g., nonce too low, fee cap below block base fee). |
| 133 | + |
| 134 | +**Replaced:** |
| 135 | +- Same nonce transaction with higher gas price replaces previous. |
| 136 | + |
| 137 | +**Reorged:** |
| 138 | +- Block containing tx removed due to L2 chain reorganization. |
0 commit comments