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

In subscription channel, topic proposed_transaction keeps inactive #4521

Open
code-monad opened this issue Jul 16, 2024 · 5 comments
Open

In subscription channel, topic proposed_transaction keeps inactive #4521

code-monad opened this issue Jul 16, 2024 · 5 comments
Labels
b:rpc Break RPC interface t:bug Type: This doesn't seem right.

Comments

@code-monad
Copy link

code-monad commented Jul 16, 2024

Bug Report

Current Behavior

When using rpc's subscription, topic proposed_transaction has no notify at all. https://github.com/nervosnetwork/ckb/tree/develop/rpc#proposed_transaction
It all returns a successful subscription id when sub to these two topic(new_transaction, proposed_transaction); but only topic new_transaction has notification pushes

Expected Behavior

Proposed transaction will also push notification followed by the status of txpool

Environment

  • CKB version: [0.116.1 (b2e36e7 2024-05-11)]
  • Chain: [testnet, mainnet]
  • Operating system: [Linux, Windows 11]
  • Arch: x86_64 [the output of uname -a]
  • Installation: GitHub Release

Additional context/Screenshots

What I'm implementing is as follows:
I want to be notified when a specific rule of transactions is posted to nodes. I will then perform certain actions and determine when the transaction is committed to the block. Depending on the different statuses of the transaction, I will trigger different business logic branches.

It might be more convenient to add a new topic like "transaction packed." Currently, we can only poll results from get_transaction to get status updates.

@code-monad code-monad added the t:bug Type: This doesn't seem right. label Jul 16, 2024
@eval-exec eval-exec added the b:rpc Break RPC interface label Jul 16, 2024
@chenyukang
Copy link
Collaborator

how large is the number of transactions, it may related to this performance issue:
#4489

117 is release with a fix for it.

@gpBlockchain
Copy link
Collaborator

If you want to subscribe to a proposed_transaction, you need to open the miner module
ckb.toml

 [block_assembler]
 code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8"
 args = "ckb-cli util blake2b --prefix-160 <compressed-pubkey>"
 hash_type = "type"
 message = "A 0x-prefixed hex string"

@code-monad
Copy link
Author

how large is the number of transactions, it may related to this performance issue: #4489

117 is release with a fix for it.

just the same as the online chains; we do not push pressure directly on it. currently is like 20/min according to the explorer

If you want to subscribe to a proposed_transaction, you need to open the miner module ckb.toml

 [block_assembler]
 code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8"
 args = "ckb-cli util blake2b --prefix-160 <compressed-pubkey>"
 hash_type = "type"
 message = "A 0x-prefixed hex string"

this might be the problem. will add it and do a re-test

@code-monad
Copy link
Author

Additional context/Screenshots

What I'm implementing is as follows: I want to be notified when a specific rule of transactions is posted to nodes. I will then perform certain actions and determine when the transaction is committed to the block. Depending on the different statuses of the transaction, I will trigger different business logic branches.

It might be more convenient to add a new topic like "transaction packed." Currently, we can only poll results from get_transaction to get status updates.

I have added my context. maybe we can add a new subscription topic to get notice of transaction packed?

@code-monad
Copy link
Author

If you want to subscribe to a proposed_transaction, you need to open the miner module ckb.toml

 [block_assembler]
 code_hash = "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8"
 args = "ckb-cli util blake2b --prefix-160 <compressed-pubkey>"
 hash_type = "type"
 message = "A 0x-prefixed hex string"

after following this, the proposed_transaction subscription works as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:rpc Break RPC interface t:bug Type: This doesn't seem right.
Projects
None yet
Development

No branches or pull requests

4 participants