Not able to receive all blocks if libbitcoin server is not in a local network #547

Open
opened 2023-05-28 15:21:14 +00:00 by hirunda · 2 comments
hirunda commented 2023-05-28 15:21:14 +00:00 (Migrated from gitlab.com)

If witness node and libbitcoin server are connected remotely, witness node doesn't receive all blocks. This doesn't happen if witness node and libbitcoin server are in the same local network. So the issue couldn't be reproduced if witness node and libbitcoin server run on the same machine.

During mainnet testing of libbitcoin functionality with remote setup (witness node and libbitcoin server are on the different networks) we found that deposit is not processed due the missing block from libbitcoin server. Some blocks are not deployed to the witness end.
Block subscription and block events are using ZMQ sockets which are built on top of TCP protocol. Monitoring with wireshark shows us that in case of too big blocks, libbitcoin server doesn't receive TCP ACK from witness node, after which libbitcoin server enters in the state of block retransmission. The conclusion is that blocks are lost/dropped in case of big blocks.

  1. Instead of subscribing to block event implementation should subscribe to bitcoin address, and monitoring any change related to the bitcoin
    address. If change happens, transaction hash should be used for fetching transaction and proceed with deposit.

  2. Enable mainnet test environment in which libbitcoin server and witness node are in the same local network

If witness node and libbitcoin server are connected remotely, witness node doesn't receive all blocks. This doesn't happen if witness node and libbitcoin server are in the same local network. So the issue couldn't be reproduced if witness node and libbitcoin server run on the same machine. During mainnet testing of libbitcoin functionality with remote setup (witness node and libbitcoin server are on the different networks) we found that deposit is not processed due the missing block from libbitcoin server. Some blocks are not deployed to the witness end. Block subscription and block events are using ZMQ sockets which are built on top of TCP protocol. Monitoring with wireshark shows us that in case of too big blocks, libbitcoin server doesn't receive TCP ACK from witness node, after which libbitcoin server enters in the state of block retransmission. The conclusion is that blocks are lost/dropped in case of big blocks. 1) Instead of subscribing to block event implementation should subscribe to bitcoin address, and monitoring any change related to the bitcoin address. If change happens, transaction hash should be used for fetching transaction and proceed with deposit. 2) Enable mainnet test environment in which libbitcoin server and witness node are in the same local network
hirunda commented 2023-05-28 15:21:14 +00:00 (Migrated from gitlab.com)

assigned to @hirunda and @vampik

assigned to @hirunda and @vampik
hirunda commented 2023-05-31 19:50:38 +00:00 (Migrated from gitlab.com)

The solution with address subscription is implemented and tested with QA env.
MR !227

The solution with address subscription is implemented and tested with QA env. MR !227
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#547
No description provided.