1

What I thought I should do

I implemented this functionality with Bitcoin Core through zmq support.

  1. Keep "my transactions" through zmq's rawtx topic.
  2. When received zmq's rawblock, decode the raw block, get transaction ids from it, compare them with 1's transaction id, and confirm them if matched.

So I thought I should be doing

  1. Find something like Bitcoin Core.
  2. Find some TCP interface.
  3. Do the above 1-2.

What I tried so far

So first of all I chose to use geth, which is one of the most popular Ethereum-implementing node, and looked for RPC-PUB-SUB docs. I found that its newPendingTransactions subscription corresponds to zmq's rawtx. But I couldn't seem to find what corresponds to zmq's rawblock. Of course there's a newHeads subscription, but for what the API returns, I don't see any hint to decode which transactions are mined by that block.

Some library like ethereumjs-block does seem to create a block from raw Buffer though.

What I'm trying to do

Be independent as much as possible from what geth's wallet system offers. The best thing is to only use that PUB-SUB functionality. (Get a raw block, decode it, get transactions, and so on.)

If I go one step back, I may do polling via, like, eth_blocknumber and eth_getBlockByNumber, but that's not what I want for now.

If there's other way around for this, please give me some rough idea. I don't mind using other Ethereum client.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.