-
Notifications
You must be signed in to change notification settings - Fork 377
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
Standardize 'txpool' namespace #353
base: main
Are you sure you want to change the base?
Changes from all commits
7234967
a79f132
8b85ed8
60bdeb5
1870c1c
a87f507
78e1869
7c4b774
638a270
473c5c7
5ba9ddd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,66 @@ | ||||||
- name: txpool_transactions | ||||||
summary: Returns a list of all transactions that match the supplied filter conditions that are either pending for inclusion in the next block(s) or scheduled for future execution. | ||||||
params: | ||||||
- name: Filter | ||||||
schema: | ||||||
title: txpool filter | ||||||
type: object | ||||||
properties: | ||||||
from: | ||||||
title: from address | ||||||
$ref: '#/components/schemas/address' | ||||||
to: | ||||||
title: to address | ||||||
$ref: '#/components/schemas/address' | ||||||
gas: | ||||||
title: gas limit | ||||||
$ref: '#/components/schemas/FilterOperators' | ||||||
gasPrice: | ||||||
title: gas price | ||||||
$ref: '#/components/schemas/FilterOperators' | ||||||
maxFeePerGas: | ||||||
title: max fee | ||||||
$ref: '#/components/schemas/FilterOperators' | ||||||
maxPriorityFeePerGas: | ||||||
title: max priority fee | ||||||
$ref: '#/components/schemas/FilterOperators' | ||||||
value: | ||||||
title: value | ||||||
$ref: '#/components/schemas/FilterOperators' | ||||||
nonce: | ||||||
title: nonce | ||||||
$ref: '#/components/schemas/FilterOperators' | ||||||
result: | ||||||
name: Result | ||||||
schema: | ||||||
title: Result | ||||||
schema: | ||||||
$ref: '#/components/schemas/TxPoolTransactions' | ||||||
title: transactions | ||||||
type: object | ||||||
properties: | ||||||
pending: | ||||||
title: pending | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If not yet present elsewhere, I think we should define which criteria make a tx pending and queue, to avoid interpretations that could results in different implementations There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know if this is specified somewhere already? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am thinking about the distinction of the two sets, so what makes a tx ready to be included or not.
at the moment I only see these two, but I could miss something. |
||||||
type: array | ||||||
items: | ||||||
$ref: '#/components/schemas/GenericTransaction' | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to start a discussion, since specially with EIP-4844, we could have quite big network representation (that includes blob content) of a tx, so a way to select what to return and/or to limit the amount of data returned should be considered. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my understanding, 4844/blobs will have its own transaction pool and do not use the generic tx pool. So not sure if this should be part of this proposal. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quoting the previous answer, where I think blob txs should be included, setting some kind of limits make sense |
||||||
queued: | ||||||
title: queued | ||||||
type: array | ||||||
items: | ||||||
$ref: '#/components/schemas/GenericTransaction' | ||||||
- name: txpool_statistics | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think introducing But again, no strong opinion |
||||||
summary: Returns statistics about the node's transaction pool. | ||||||
params: [] | ||||||
result: | ||||||
name: Statistics | ||||||
schema: | ||||||
title: statistics | ||||||
type: object | ||||||
properties: | ||||||
pending: | ||||||
title: pending | ||||||
$ref: '#/components/schemas/uint' | ||||||
queued: | ||||||
title: queued | ||||||
$ref: '#/components/schemas/uint' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
>> {"jsonrpc":"2.0","id":31,"method":"txpool_statistics"} | ||
<< {"jsonrpc":"2.0","id":31,"result":{"maxSize":"0x1","pending":"0x1","queued":"0x1"}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
>> {"jsonrpc":"2.0","id":31,"method":"txpool_transactions"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I think what we should here for the tests is have two |
||
<< {"jsonrpc":"2.0","id":31,"result":{"pending":[{"blockHash":null,"blockNumber":null,"from":"0x658bdf435d810c91414ec09147daa6db62406379","gas":"0x5208","gasPrice":"0x342770c1","hash":"0x74e41d593675913d6d5521f46523f1bd396dff1891bdb35f59be47c7e5e0b34b","input":"0x","nonce":"0x0","to":"0x658bdf435d810c91414ec09147daa6db62406379","transactionIndex":"0x0","value":"0x3e8","type":"0x0","chainId":"0x539","v":"0xa95","r":"0xaf5fc351b9e457a31f37c84e5cd99dd3c5de60af3de33c6f4160177a2c786a60","s":"0x201da7a21046af55837330a2c52fc1543cd4d9ead00ddf178dd96935b607ff9b"}],"queued":[{"blockHash":null,"blockNumber":null,"from":"0x658bdf435d810c91414ec09147daa6db62406379","gas":"0x5208","gasPrice":"0x342770c1","hash":"0x74e41d593675913d6d5521f46523f1bd396dff1891bdb35f59be47c7e5e0b34b","input":"0x","nonce":"0x0","to":"0x658bdf435d810c91414ec09147daa6db62406379","transactionIndex":"0x0","value":"0x3e8","type":"0x0","chainId":"0x539","v":"0xa95","r":"0xaf5fc351b9e457a31f37c84e5cd99dd3c5de60af3de33c6f4160177a2c786a60","s":"0x201da7a21046af55837330a2c52fc1543cd4d9ead00ddf178dd96935b607ff9b"}]}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
>> {"jsonrpc":"2.0","id":31,"method":"txpool_transactions"} | ||
<< {"jsonrpc":"2.0","id":31,"result":{"pending":[],"queued":[]}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
>> {"jsonrpc":"2.0","id":31,"method":"txpool_transactions","params":[{"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"}]} | ||
<< {"jsonrpc":"2.0","id":31,"result":{"pending":[{"blockHash":null,"blockNumber":null,"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","gas":"0x5208","gasPrice":"0x342770c1","hash":"0x74e41d593675913d6d5521f46523f1bd396dff1891bdb35f59be47c7e5e0b34b","input":"0x","nonce":"0x0","to":"0x658bdf435d810c91414ec09147daa6db62406379","transactionIndex":"0x0","value":"0x3e8","type":"0x0","chainId":"0x539","v":"0xa95","r":"0xaf5fc351b9e457a31f37c84e5cd99dd3c5de60af3de33c6f4160177a2c786a60","s":"0x201da7a21046af55837330a2c52fc1543cd4d9ead00ddf178dd96935b607ff9b"}],"queued":[{"blockHash":null,"blockNumber":null,"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","gas":"0x5208","gasPrice":"0x342770c1","hash":"0x74e41d593675913d6d5521f46523f1bd396dff1891bdb35f59be47c7e5e0b34b","input":"0x","nonce":"0x0","to":"0x658bdf435d810c91414ec09147daa6db62406379","transactionIndex":"0x0","value":"0x3e8","type":"0x0","chainId":"0x539","v":"0xa95","r":"0xaf5fc351b9e457a31f37c84e5cd99dd3c5de60af3de33c6f4160177a2c786a60","s":"0x201da7a21046af55837330a2c52fc1543cd4d9ead00ddf178dd96935b607ff9b"}]}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
>> {"jsonrpc":"2.0","id":31,"method":"txpool_transactions","params":[{"gas":{"lt":"0x0"}}]} | ||
<< {"jsonrpc":"2.0","id":31,"result":{"pending":[{"blockHash":null,"blockNumber":null,"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","gas":"0x5208","gasPrice":"0x342770c1","hash":"0x74e41d593675913d6d5521f46523f1bd396dff1891bdb35f59be47c7e5e0b34b","input":"0x","nonce":"0x0","to":"0x658bdf435d810c91414ec09147daa6db62406379","transactionIndex":"0x0","value":"0x3e8","type":"0x0","chainId":"0x539","v":"0xa95","r":"0xaf5fc351b9e457a31f37c84e5cd99dd3c5de60af3de33c6f4160177a2c786a60","s":"0x201da7a21046af55837330a2c52fc1543cd4d9ead00ddf178dd96935b607ff9b"}],"queued":[{"blockHash":null,"blockNumber":null,"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","gas":"0x5208","gasPrice":"0x342770c1","hash":"0x74e41d593675913d6d5521f46523f1bd396dff1891bdb35f59be47c7e5e0b34b","input":"0x","nonce":"0x0","to":"0x658bdf435d810c91414ec09147daa6db62406379","transactionIndex":"0x0","value":"0x3e8","type":"0x0","chainId":"0x539","v":"0xa95","r":"0xaf5fc351b9e457a31f37c84e5cd99dd3c5de60af3de33c6f4160177a2c786a60","s":"0x201da7a21046af55837330a2c52fc1543cd4d9ead00ddf178dd96935b607ff9b"}]}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,3 +57,8 @@ randao | |
src | ||
https | ||
forkchoiceupdatedresponsev | ||
txpool | ||
TxPool | ||
eq | ||
lt | ||
gt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having now different kind of txs, probably a
type
filter could be usefulThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean 4844/blobs transactions? if so, also see other comment that from my understanding 4844/blobs will have its own transaction pool and will not be included for this proposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean that the filter could accept a
type
field where you can specify any of the transaction types: Frontier, EIP2930, EIP1559, EIP4844