Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linea_getTransactionExclusionStatusV1 API reference #739

Merged
merged 26 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f85c696
Initial draft
jlwllmr Sep 12, 2024
824cb13
Rename file and add to sidebar
jlwllmr Sep 12, 2024
04a8c39
Update txRejectionStage string descriptions
jlwllmr Sep 12, 2024
5e3f099
Update formatting and minor adjustments
jlwllmr Sep 16, 2024
016019a
Merge branch 'main' into tx-exclusion-api
jlwllmr Sep 16, 2024
ba6c869
Typos
jlwllmr Sep 16, 2024
79cf5ff
Adjust wording
jlwllmr Sep 16, 2024
e6a8255
Address comments
jlwllmr Sep 17, 2024
9cc865b
Add null result
jlwllmr Sep 17, 2024
f0dcc18
Merge branch 'main' into tx-exclusion-api
jlwllmr Sep 17, 2024
9c560a6
Merge branch 'main' into tx-exclusion-api
jlwllmr Sep 18, 2024
b609dac
Amendments
jlwllmr Sep 18, 2024
750e3e2
Update docs/developers/reference/api/linea-gettransactionexclusionsta…
m4sterbunny Sep 18, 2024
82ee07a
Address comments
jlwllmr Sep 18, 2024
952fafc
Add callout
jlwllmr Sep 19, 2024
afd8284
Merge branch 'main' into tx-exclusion-api
jlwllmr Sep 19, 2024
6cfc684
Amend timeframe and correct typo
jlwllmr Sep 19, 2024
19ad189
Merge branch 'main' into tx-exclusion-api
jlwllmr Sep 25, 2024
8d4ea8a
Amend timeframe to 7 days
jlwllmr Sep 25, 2024
0112e86
Address some changes
jlwllmr Sep 26, 2024
ed983b1
Merge branch 'main' into tx-exclusion-api
jlwllmr Sep 26, 2024
88a6c44
Clarify null results for old transactions
jlwllmr Sep 26, 2024
2f53a4a
Update RPC endpoint to Infura
jlwllmr Sep 26, 2024
b0c37ee
Merge branch 'main' into tx-exclusion-api
jlwllmr Sep 27, 2024
c8a04db
Remove callout about entitlements
jlwllmr Sep 27, 2024
6db177e
Merge branch 'main' into tx-exclusion-api
jlwllmr Sep 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: linea_getTransactionExclusionStatusV1
description: Reference content for the linea_getTransactionExclusionStatusV1 method.
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# `linea_getTransactionExclusionStatusV1`

Queries a database maintained by the transaction exclusion API service to check if a transaction
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved
was rejected because it exceeded data line limits that would prevent the prover from generating a
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved
proof for the block. The database is updated by a parallel write API endpoint called by the
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved
sequencer, edge nodes, or RPC nodes.

If the transaction was rejected, the API call will be successful and provide the reason.

Transactions that were not rejected for this reason will return `null` as the `result`.
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved

:::warning
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved
Transactions older than 24 hours cannot be checked.
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved
:::

## Parameters

`txHash`: [Required] The hash of the subject transaction.

## Returns

- `txHash`: The hash of the subject transaction.
- `from`: The public address of the account that sent the transaction.
- `nonce`: The transaction nonce, hexadecimal.
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved
- `txRejectionStage`: A string detailing the point at which the transaction was rejected. One of:
- `SEQUENCER`: Rejected by the sequencer.
- `RPC`: Rejected by an RPC node (e.g. `https://rpc.linea.build`).
- `P2P`: Rejected by a P2P-connected node (e.g. an edge node).
- `reasonMessage`: Explains why the transaction was rejected.
- `blockNumber`: The block that the transaction was rejected from, in hexadecimal format. Only
returned for transactions rejected by the sequencer.
- `timestamp`: Time of rejection, in ISO8601 format.
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved

## Example

### Request

<Tabs>
<TabItem value="cURL">
```bash
curl https://rpc.linea.build \
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved
-X POST
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "1",
"method": "linea_getTransactionExclusionStatusV1",
"params": ["0x526e56101cf39c1e717cef9cedf6fdddb42684711abda35bae51136dbb350ad7"],
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved
}'
```
</TabItem>
</Tabs>

### Response

<Tabs>
<TabItem value="JSON">
```json
{
"jsonrpc": "2.0",
"id": "1",
"result": {
"txHash": "0x526e56101cf39c1e717cef9cedf6fdddb42684711abda35bae51136dbb350ad7",
"from": "0x4d144d7b9c96b26361d6ac74dd1d8267edca4fc2",
"nonce": "0x64",
"txRejectionStage": "SEQUENCER",
"reasonMessage": "Transaction line count for module ADD=402 is above the limit 70",
"blockNumber": "0x3039",
"timestamp": "2024-08-22T09:18:51Z"
}
}
```
</TabItem>
</Tabs>

If the transaction was not rejected for exceeding line limits, the transaction will not be found
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved
in the database, and return a `null` result. For example:
jlwllmr marked this conversation as resolved.
Show resolved Hide resolved

```json
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
```
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ const sidebars = {
items: [
"developers/reference/api/eth-sendrawtransaction",
"developers/reference/api/linea-estimategas",
"developers/reference/api/linea-gettransactionexclusionstatusv1",
"developers/reference/api/linea-getproof",
],
},
Expand Down
Loading