-
Notifications
You must be signed in to change notification settings - Fork 701
txpool: add txpool_contentFrom, fix txpool_status hex format, fix txpool_content
#11305
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8f464c8
txpool fixes & tests
svlachakis 3b1eff4
fix hive get_content
svlachakis 9efb428
claude review
svlachakis 66d08fd
checksummed address only in get-content
svlachakis 92e6ebb
build fix
svlachakis 6e0a850
claude review
svlachakis a8662d6
claude review
svlachakis 170c449
format
svlachakis 06b581b
Merge branch 'master' into txpool
svlachakis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 21 additions & 15 deletions
36
src/Nethermind/Nethermind.JsonRpc/Modules/TxPool/ITxPoolRpcModule.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,28 @@ | ||
| // SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited | ||
| // SPDX-License-Identifier: LGPL-3.0-only | ||
|
|
||
| namespace Nethermind.JsonRpc.Modules.TxPool | ||
| using Nethermind.Core; | ||
|
|
||
| namespace Nethermind.JsonRpc.Modules.TxPool; | ||
|
|
||
| [RpcModule(ModuleType.TxPool)] | ||
| public interface ITxPoolRpcModule : IRpcModule | ||
| { | ||
| [RpcModule(ModuleType.TxPool)] | ||
| public interface ITxPoolRpcModule : IRpcModule | ||
| { | ||
| [JsonRpcMethod(Description = "Returns a tx pool status.", IsImplemented = true, ExampleResponse = "{\"pending\":1010,\"queued\":14}")] | ||
| ResultWrapper<TxPoolStatus> txpool_status(); | ||
| [JsonRpcMethod(Description = "Returns a tx pool status.", IsImplemented = true, ExampleResponse = "{\"pending\":\"0x3f2\",\"queued\":\"0xe\"}")] | ||
| ResultWrapper<TxPoolStatus> txpool_status(); | ||
|
|
||
| [JsonRpcMethod(Description = "Returns tx pool content.", | ||
| IsImplemented = true, | ||
| ExampleResponse = "{\"0x0f990ef7ec160f01af7148b74cc8a86fe46c551e\":{\"153\":{\"hash\":\"0x84f6f2e5d24b9a0c25bd7018adbbf4388b2c07842782f73d5ddc389906d5f2c8\",\"nonce\":\"0x99\",\"blockHash\":null,\"blockNumber\":null,\"blockTimestamp\":null,\"transactionIndex\":null,\"from\":\"0x0f990ef7ec160f01af7148b74cc8a86fe46c551e\",\"to\":\"0x1b4e4664de1d57b665b4bf3523cbccf007766de3\",\"value\":\"0xc8\",\"gasPrice\":\"0x3b9aca08\",\"gas\":\"0x1c9c37f\",\"data\":\"0xaeeb89600000000000000000000000000000000000000000000000000000000000000001\",\"input\":\"0xaeeb89600000000000000000000000000000000000000000000000000000000000000001\",\"type\":\"0x0\",\"v\":\"0x2c\",\"s\":\"0x20158ce3f4f9c65f8c657c0d91bbfb43632b2951f6192bca8fb3a25c26dd81d5\",\"r\":\"0x2814d998f2a78dd4f37461485d88158a32ef5dcfa8c57e224b3ea77536df01b1\"}}}")] | ||
|
svlachakis marked this conversation as resolved.
|
||
| ResultWrapper<TxPoolContent> txpool_content(); | ||
|
|
||
| [JsonRpcMethod(Description = "Returns tx pool content.", | ||
| IsImplemented = true, | ||
| ExampleResponse = "{\"0x0f990ef7ec160f01af7148b74cc8a86fe46c551e\":{\"153\":{\"hash\":\"0x84f6f2e5d24b9a0c25bd7018adbbf4388b2c07842782f73d5ddc389906d5f2c8\",\"nonce\":\"0x99\",\"blockHash\":null,\"blockNumber\":null,\"transactionIndex\":null,\"from\":\"0x0f990ef7ec160f01af7148b74cc8a86fe46c551e\",\"to\":\"0x1b4e4664de1d57b665b4bf3523cbccf007766de3\",\"value\":\"0xc8\",\"gasPrice\":\"0x3b9aca08\",\"gas\":\"0x1c9c37f\",\"data\":\"0xaeeb89600000000000000000000000000000000000000000000000000000000000000001\",\"input\":\"0xaeeb89600000000000000000000000000000000000000000000000000000000000000001\",\"type\":\"0x0\",\"v\":\"0x2c\",\"s\":\"0x20158ce3f4f9c65f8c657c0d91bbfb43632b2951f6192bca8fb3a25c26dd81d5\",\"r\":\"0x2814d998f2a78dd4f37461485d88158a32ef5dcfa8c57e224b3ea77536df01b1\"}}}")] | ||
| ResultWrapper<TxPoolContent> txpool_content(); | ||
| [JsonRpcMethod(Description = "Returns tx pool content for a specific sender address.", | ||
| IsImplemented = true, | ||
| ExampleResponse = "{\"pending\":{\"806\":{\"blockHash\":null,\"blockNumber\":null,\"blockTimestamp\":null,\"from\":\"0x0216d5032f356960cd3749c31ab34eeff21b3395\",\"gas\":\"0x5208\",\"gasPrice\":\"0xba43b7400\",\"hash\":\"0xaf953a2d01f55cfe080c0c94150a60105e8ac3d51153058a1f03dd239dd08586\",\"nonce\":\"0x326\",\"to\":\"0x7f69a91a3cf4be60020fb58b893b7cbb65376db8\",\"transactionIndex\":null,\"value\":\"0x19a99f0cf456000\"}},\"queued\":{}}")] | ||
| ResultWrapper<TxPoolContentFrom> txpool_contentFrom(Address address); | ||
|
svlachakis marked this conversation as resolved.
|
||
|
|
||
| [JsonRpcMethod(Description = "Returns a detailed info on tx pool transactions.", | ||
| IsImplemented = true, | ||
| ExampleResponse = "{\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea\":{\"20\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6721975 × 140000000000 gas\",\"21\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6721975 × 140000000000 gas\",\"22\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6721975 × 140000000000 gas\",\"23\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6700000 × 140000000000 gas\",\"24\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6700000 × 140000000000 gas\",\"27\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6700000 × 140000000000 gas\"},\"0xc51db3339a7603f70b347a0b9680554f777d1f3c\":{\"82\":\"0xc51db3339a7603f70b347a0b9680554f777d1f3c: 0 wei + 4500000 × 10000000000 gas\"},\"0x084dd4aefc6853253573fee9f5fcc23e849d164c\":{\"17\":\"0x084dd4aefc6853253573fee9f5fcc23e849d164c: 0 wei + 28472169 × 1000000008 gas\"}}")] | ||
| ResultWrapper<TxPoolInspection> txpool_inspect(); | ||
| } | ||
| [JsonRpcMethod(Description = "Returns a detailed info on tx pool transactions.", | ||
| IsImplemented = true, | ||
| ExampleResponse = "{\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea\":{\"20\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6721975 × 140000000000 gas\",\"21\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6721975 × 140000000000 gas\",\"22\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6721975 × 140000000000 gas\",\"23\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6700000 × 140000000000 gas\",\"24\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6700000 × 140000000000 gas\",\"27\":\"0xb49928fcb10123e451cfe63aa47edcaea0f8aeea: 0 wei + 6700000 × 140000000000 gas\"},\"0xc51db3339a7603f70b347a0b9680554f777d1f3c\":{\"82\":\"0xc51db3339a7603f70b347a0b9680554f777d1f3c: 0 wei + 4500000 × 10000000000 gas\"},\"0x084dd4aefc6853253573fee9f5fcc23e849d164c\":{\"17\":\"0x084dd4aefc6853253573fee9f5fcc23e849d164c: 0 wei + 28472169 × 1000000008 gas\"}}")] | ||
| ResultWrapper<TxPoolInspection> txpool_inspect(); | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.