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

Connect to the CKB RPC and mempool API using WebSockets #136

Open
Flouse opened this issue May 16, 2024 · 3 comments
Open

Connect to the CKB RPC and mempool API using WebSockets #136

Flouse opened this issue May 16, 2024 · 3 comments
Labels
enhancement New feature or request P-Low

Comments

@Flouse
Copy link
Contributor

Flouse commented May 16, 2024

The CKB RPC server and mempool.space support WebSocket connections

@Flouse Flouse added enhancement New feature or request P-Low labels May 16, 2024
@ahonn
Copy link
Collaborator

ahonn commented May 16, 2024

I did think about that before, but I haven't gotten around to making it happen yet.
The websocket on mempool.space seems more suitable for monitoring, and since electrs doesn't have websocket support. So, I haven't thought about adding it for now.
As for the CKB RPC websocket part, we can consider replacing it later on, but that's still up in the air.

@Flouse
Copy link
Contributor Author

Flouse commented May 16, 2024

And this is just my thought after a recent code review. It should only be implemented when the benefits are clear.

The websocket on mempool.space seems more suitable for monitoring, and since electrs doesn't have websocket support. So, I haven't thought about adding it for now.

That makes sense.


When we want to monitor RBF transactions, the websockets of mempool.space might be useful.

@ahonn
Copy link
Collaborator

ahonn commented May 20, 2024

When we want to monitor RBF transactions, the websockets of mempool.space might be useful.

IMO, When tracking RBF transactions, we only need to monitor unconfirmed RGB++ BTC transactions. When processing the RGB++ CKB transaction, I like to use https://mempool.space/testnet/docs/api/rest#get-transaction-rbf-history to access a transaction's RBF history. This way, we can obtain the RBF history of an unconfirmed transaction and queue a new transaction based on the updated RBF transaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P-Low
Projects
None yet
Development

No branches or pull requests

2 participants