nervosnetwork / nervosnetwork/ckb
[FR] `get_raw_tx_pool(true)` without **600 KB** overhead
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 266
- Avg merge
- 10d 5h
- Merged PRs (30d)
- 4
Description
## Feature Request
`conflicted` addition to the `get_raw_tx_pool(true)` is a welcomed new addition to the CKB node API, also it creates an issue evident by calling:
`curl -X POST https://mainnet.ckbapp.dev/ -d '{"jsonrpc":"2.0","method":"get_raw_tx_pool","params":[true],"id":42}'`
### Is your feature request related to a problem? Please describe.
`get_raw_tx_pool(true)` in the latest node versions also returns the `conflicted` txs. While generally speaking more information is better, in this case `conflicted` txs seems to have a low utility for most use-cases.
In this case in particular, low utility data is two orders of magnitude bigger than the crucial data:
- **1KB** of `pending` and `proposed` txs
- **80KB** of `conflicted` txs ⚠️ (There may be an issue with the node itself)
### Describe the solution you'd like
Either:
1. Exclude conflicted txs by default from `get_raw_tx_pool(true)` and add a second parameter to include them `get_raw_tx_pool(true, true)`, second parameter which defaults to `false`.
1. Add a parameter to exclude the `conflicted` txs, like `get_raw_tx_pool(true, false)`, second parameter which defaults to `true`.
Contributor guide
Research direction
Start by locating the CKB node API entry point for `get_raw_tx_pool` and reproduce the request with the provided curl example. Decide which optional-parameter behavior is intended, then verify that the chosen default avoids the reported conflicted-transaction overhead while preserving an explicit way to request those transactions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100