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

Address subscription does not scan blocks or transactions. #147

Closed
santoslluis opened this issue Jan 20, 2016 · 10 comments
Closed

Address subscription does not scan blocks or transactions. #147

santoslluis opened this issue Jan 20, 2016 · 10 comments
Assignees
Labels
Milestone

Comments

@santoslluis
Copy link

Hello,

I tried to do bx watch-address with libbitcoin-explorer (bx) and with my own implementation in PHP against the ZMQ API, but I didn't receive any update from the server when there is a transaction.

perhaps is a bug, can anyone confirm this?

L.

@evoskuil
Copy link
Member

There may be an issue with the server. Address subscription is not part of the network test matrix and as such a regression may evade detection. I plan to look into this shortly, as another person has reported a similar problem.

@evoskuil evoskuil added the bug label Jan 21, 2016
@evoskuil evoskuil self-assigned this Jan 21, 2016
@evoskuil
Copy link
Member

Are you running BX against your own server (BS)? Is the server configured to respond to queries (it isn't by default)?

@santoslluis
Copy link
Author

Yes, I tried with my own server, with obelisk.airbitz.co and another from the dark wallet team.

the other commands are working properly, the only that doesn't work is address.subscribe

I have the parameter 'queries_enabled' set to true.

@evoskuil
Copy link
Member

OK, forgot to mention that you would also need to have set:

[network]
# Request that peers relay transactions, defaults to false.
relay_transactions = true

@santoslluis
Copy link
Author

I've set this parameter to true and is still not working the address.subscribe command

@evoskuil
Copy link
Member

I've made a couple of fixes and improvements to the client-server API subscription implementation in the server. I'm in the process of merging from my repo in the various affected repo version2 branches. I'll be tagging a release in the next couple of days. Thanks for reporting this issue!

@evoskuil evoskuil added this to the 2.4 milestone Jan 23, 2016
@evoskuil
Copy link
Member

Fixed in #148 and dependent repo version2 branches.

@evoskuil evoskuil changed the title can't receive updates from address.subscribe Address subscription does not scan blocks or transactions. Jan 23, 2016
@evoskuil
Copy link
Member

Analysis:

Transactions that are discovered via block acceptance are not processed. This may have been a regression and was a simple fix. Block accept notifications are in addition to what may have previously been sent via mempool acceptance, so typically you should get 1 mempool notification and 1 block acceptance notification. Reorgs and mempool overflow with tx resend can of course cause variations.

Notification from mempool txs is inconsistent. I believe this was a regression stemming from an incorrect virtual method override. It seems that in some builds it works as expected and in others, not at all. I've changed this technique from virtual handler override to mempool acceptance subscription. This will mirror the block acceptance technique (reorg subscription).

@santoslluis
Copy link
Author

Well, I've recompiled, tested and now address.subscribe works fine.

Thanks!

@evoskuil
Copy link
Member

Great, thanks for the feedback and for reporting the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants