Skip to content
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

Export more RPC methods to make OTX pool easier #4397

Open
xcshuan opened this issue Apr 1, 2024 · 5 comments
Open

Export more RPC methods to make OTX pool easier #4397

xcshuan opened this issue Apr 1, 2024 · 5 comments
Assignees
Labels
b:rpc Break RPC interface stale To be closed due to a lack of activity t:enhancement Type: Feature, refactoring.

Comments

@xcshuan
Copy link

xcshuan commented Apr 1, 2024

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 xcshuan added the t:enhancement Type: Feature, refactoring. label Apr 1, 2024
@doitian
Copy link
Member

doitian commented Apr 1, 2024

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.

@xcshuan
Copy link
Author

xcshuan commented Apr 1, 2024

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

@zhangsoledad
Copy link
Member

#4433

@doitian
Copy link
Member

doitian commented Apr 26, 2024

#4433

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

@eval-exec eval-exec self-assigned this May 8, 2024
@eval-exec eval-exec added the b:rpc Break RPC interface label May 8, 2024
Copy link

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 github-actions bot added the stale To be closed due to a lack of activity label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:rpc Break RPC interface stale To be closed due to a lack of activity t:enhancement Type: Feature, refactoring.
Projects
None yet
Development

No branches or pull requests

4 participants