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

lbry-sdk not making progress during initial address sync when connecting to herald.go #77

Open
moodyjon opened this issue Nov 18, 2022 · 2 comments
Assignees

Comments

@moodyjon
Copy link
Contributor

This data was gathered with some local changes plus my published branch herald.go/blockchain_tx_rpc1:

failure.txt

It's not completing, even though some messages are emitted like these:

2022-11-18 17:12:30,189 - lbry.wallet.ledger - INFO - subscribed to 15/15 addresses on 127.0.0.1:50002
2022-11-18 17:12:30,189 - lbry.wallet.ledger - INFO - finished subscribing to 15 addresses on 127.0.0.1:50002

It just keeps spinning in some loop alternating between address.get_history and transaction.get_batch. It's also only mentioning a couple of specific transactions -- one at height=0 and one at height=1

I will continue investigating this, but maybe @eukreign, @jackrobison, or @shyba could point me in the right direction.

Herald.go is not generating address notifications and header notifications at this time AFAICT. That's one difference in behavior between herald.go and python herald that may be relevant.

@moodyjon moodyjon self-assigned this Nov 18, 2022
@moodyjon
Copy link
Contributor Author

Lbry-sdk <-> Herald RPCs sent & responses:
Baseline: a.txt
Herald.go: b.txt

It's starting to diverge at the point of blockchain.address.subcribe (Python hub returns None a lot of the time) and later at blockchain.address.get_history (Herald.go returns 2 different transactions at height 0 and height 1, Python returns same transaction at height -1 and later height 201).

@moodyjon
Copy link
Contributor Author

moodyjon commented Dec 6, 2022

Found a problem with address.get_history. The interpretation of IncludeStop iteration option was confusing me. Hence I was finding an extra record following the desired hashX when no matching record existed.

Secondly, I have narrowed down where it's stuck. Test setup sequence is now at the stage (send_to_address_and_wait) where mempool TXs must generate notifications and be reportable. The existing mechanism detectChanges() is only monitoring height in DBStateValue. But there can't be a change in height until send_to_address_and_wait moves on to generate blocks.

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

No branches or pull requests

1 participant