ckb icon indicating copy to clipboard operation
ckb copied to clipboard

Export more RPC methods to make OTX pool easier

Open xcshuan opened this issue 1 year ago • 6 comments

Feature Request

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

When designing applications based on open_transaction, the application side may need to determine the validity of the OTX. However, since the OTX is not yet complete at this time, it cannot use the CKB node to verify the correctness of the OTX. Therefore, it is necessary for the CKB node to expose some new rpc methods, allowing the application side to maintain its own OTX Pool.

Describe the solution you'd like

More rpc methods should be added, such as determining whether an outpoint is a live_cell, and whether an outpoint has transactions in the tx pool, what the transaction hash and some transaction information are.

xcshuan avatar Apr 01 '24 06:04 xcshuan

CKB can only verifiy the seal in the OTX.

There are already two RPC methods to dry run a transaction:

Both will run all the script groups. To support OTX, I recommend adding a method to run only selected script groups (by script position (lock or type) and script struct hash), or return the running result for each script group seperately. To verify OTX, we can check whether all the lock script groups pass.

doitian avatar Apr 01 '24 06:04 doitian

In addition, it is also important to know whether an outpoint is live and whether it exists in the memory pool.

xcshuan avatar Apr 01 '24 08:04 xcshuan

https://github.com/nervosnetwork/ckb/pull/4433

zhangsoledad avatar Apr 26 '24 03:04 zhangsoledad

#4433

This is not enough, since for an open tx the type script groups may fail and it's OK they fail.

doitian avatar Apr 26 '24 03:04 doitian

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 26 '24 01:07 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Dec 06 '24 02:12 github-actions[bot]