nervosnetwork / ckb

The Nervos CKB is a public permissionless blockchain, and the layer 1 of Nervos network.
https://www.nervos.org
MIT License
1.14k stars 224 forks source link

Simplify resolving the dependencies of a transaction #4476

Open doitian opened 1 month ago

doitian commented 1 month ago

Feature Request

Is your feature request related to a problem? Please describe.

Given a transaction, clients must use get_transaction and get_header to fetch each input, cell dep, and header dep.

Describe the solution you'd like

Add a high level RPC method to simplify resolving the dependencies of a transaction. The RPC method may accept a tx hash of an existing a transaction, or a full tx payload.

Describe alternatives you've considered

N/A

doitian commented 1 month ago

Performance concerns

CKB does not index history dead cells for performance restrictions. Internally, CKB still needs to get the whole transaction from the database to get a single dead cell from its outputs.

doitian commented 1 month ago

Workarounds

doitian commented 1 month ago

Related

It's a common requirement to handle tx in CKB. For example: