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

Problem broadcasting DAO proposal tx #2639

Closed
oscarguindzberg opened this issue Apr 4, 2019 · 7 comments · Fixed by bisq-network/bitcoinj#32
Closed

Problem broadcasting DAO proposal tx #2639

oscarguindzberg opened this issue Apr 4, 2019 · 7 comments · Fixed by bisq-network/bitcoinj#32
Assignees

Comments

@oscarguindzberg
Copy link
Contributor

When broadcasting a dao proposal tx, I see this line on the log:
Broadcast of tx xxx not completed after 30 sec.

I can reproduce it on testnet and on regtest (regtest with 2 bitcoin core peer nodes).

The problem seems to be with bsq txs.
Sending a pure btc withdrawal tx works fine.

Assuming we have 12 peers, bitcoinj sends the tx to 6 peers and then waits for another 3 peers to broadcast the tx back to us to make us believe the tx was fully broadcasted to the entire btc network.
We don't hear back from peers when sending the bsq txs.

The tx is in fact broadcasted to the network, we see it included in a block when testing on testnet.

When testing on regtest, I see the tx sometimes takes 20 seconds to be relayed from one btc peer to the other - I need to investigate more why that is the case.

I am investigating this problem and I don't need help so far, just writing here to document what I am doing.

@ManfredKarrer
Copy link
Member

Maybe we miss the BSQ wallet keys in the bloomfilter. As all BSQ tx have BTC we still hear from the network but maybe not that call back at sending?

I just tried with changing the way who we clone and on which wallet we do the broadcast but that did not had any influence, got the timeout again. Referred to WalletManager.publishAndCommitBsqTx...

What is weird is that we get from one peer a lot of messages after the broadcast. I saw this 2 times now with a diff. peer. I think the first one was with getAddr calls. At another try I did not get those msg again... so prob. not related but still weird....

Apr-04 09:52:25.666 [NioClientManager] INFO org.bitcoinj.core.Peer: [46.101.199.114]:18333: Received getdata message: org.bitcoinj.core.GetDataMessage@4c96160b
Apr-04 09:52:25.666 [NioClientManager] INFO org.bitcoinj.core.Peer: [46.101.199.114]:18333: Sending 1 items gathered from listeners to peer
Apr-04 09:52:26.056 [NioClientManager] INFO org.bitcoinj.core.Peer: [46.101.199.114]:18333: Received getdata message: org.bitcoinj.core.GetDataMessage@e496f6a
Apr-04 09:52:26.056 [NioClientManager] INFO org.bitcoinj.core.Peer: [46.101.199.114]:18333: Sending 2 items gathered from listeners to peer
Apr-04 09:52:26.253 [NioClientManager] INFO org.bitcoinj.core.Peer: [46.101.199.114]:18333: Received getdata message: org.bitcoinj.core.GetDataMessage@400f2cb6
Apr-04 09:52:26.253 [NioClientManager] INFO org.bitcoinj.core.Peer: [46.101.199.114]:18333: Sending 2 items gathered from listeners to peer
Apr-04 09:52:26.449 [NioClientManager] INFO org.bitcoinj.core.Peer: [46.101.199.114]:18333: Received getdata message: org.bitcoinj.core.GetDataMessage@f29df925
Apr-04 09:52:26.449 [NioClientManager] INFO org.bitcoinj.core.Peer: [46.101.199.114]:18333: Sending 1 items gathered from listeners to peer
Apr-04 09:52:26.638 [NioClientManager] INFO org.bitcoinj.core.Peer: [46.101.199.114]:18333: Received getdata message: org.bitcoinj.core.GetDataMessage@a338db17

@devinbileck
Copy link
Member

Related to #2082

@oscarguindzberg
Copy link
Contributor Author

@devinbileck I would say this is a duplicate of #2082

@oscarguindzberg
Copy link
Contributor Author

I found the cause for the bug (will explain soon), I have to think a solution now.

@oscarguindzberg
Copy link
Contributor Author

Update:
The cause for the problem is described here: bitcoinj/bitcoinj#1769
This PR seems like a possible solution bisq-network/bitcoinj#32 . Problems for the solution: It is incomplete (maybe bisq use case is not affected by that) and would require me to think a bit more whether it could create new bugs.

@oscarguindzberg
Copy link
Contributor Author

Side note: During testing, I did some tests with 2 local bitcoin-core regtest nodes. I noticed sometimes, tx took up to 20 seconds to be relayed from one bitcoin-core node to the other.

@ManfredKarrer
Copy link
Member

Good find!!!!

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

Successfully merging a pull request may close this issue.

3 participants