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

GetBlocksResponse lower chunk size (was 6000 now 4000). #6282

Merged
merged 1 commit into from Jul 13, 2022
Merged

GetBlocksResponse lower chunk size (was 6000 now 4000). #6282

merged 1 commit into from Jul 13, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jul 6, 2022

We lower the number of BSQ blocks delivered in a message to avoid: ruleViolation MAX_MSG_SIZE_EXCEEDED

PRE:
Jul-05 16:57:35.234 [InputHandler-wizseed3d376esppbmbjxk2fhk2jg5fpucddrzj2kxtbxbx4vrnwclad.onion:8000] INFO  b.c.d.n.m.GetBlocksResponse: Received a GetBlocksResponse with 6000 blocks and 10959.631 kB size 
Jul-05 16:57:36.618 [InputHandler-wizseed3d376esppbmbjxk2fhk2jg5fpucddrzj2kxtbxbx4vrnwclad.onion:8000] WARN  b.n.p2p.network.Connection: size > MAX_MSG_SIZE. size=10959639; object=message_version: 10get_blocks_response {  raw_blocks {    height: 733921    time: 1651129515000    hash: "00000000000000000004f18df78917b81ae8dc7c684f7f0ec5e41ee893c23fca"    previous_block_h... 
Jul-05 16:57:36.618 [InputHandler-wizseed3d376esppbmbjxk2fhk2jg5fpucddrzj2kxtbxbx4vrnwclad.onion:8000] WARN  b.n.p2p.network.Connection: We got reported the ruleViolation MAX_MSG_SIZE_EXCEEDED at connection Connection{peerAddress=Optional[wizseed3d376esppbmbjxk2fhk2jg5fpucddrzj2kxtbxbx4vrnwclad.onion:8000], connectionState=ConnectionState{,
     peerType=INITIAL_DATA_EXCHANGE,
     numInitialDataRequests=2,
     numInitialDataResponses=1,
     lastInitialDataMsgTimeStamp=1657058236571,
     isSeedNode=true,
     expectedRequests=5
}, connectionType=OutboundConnection, uid='842e2dba-01f6-4246-8909-e1e7db9203d0'} 
Jul-05 16:57:36.619 [JavaFX Application Thread] INFO  b.c.d.n.l.n.RequestBlocksHandler: We received from peer wizseed3d376esppbmbjxk2fhk2jg5fpucddrzj2kxtbxbx4vrnwclad.onion:8000 a BlocksResponse with 6000 blocks 
Jul-05 16:57:36.619 [JavaFX Application Thread] INFO  b.c.d.n.l.n.LiteNodeNetworkService: requestBlocksHandler to wizseed3d376esppbmbjxk2fhk2jg5fpucddrzj2kxtbxbx4vrnwclad.onion:8000 completed 
Jul-05 16:57:36.619 [JavaFX Application Thread] INFO  b.core.dao.node.lite.LiteNode: We received blocks from height 733921 to 739920 
POST:
Jul-06 07:43:50.649 [JavaFX Application Thread] INFO  b.c.d.n.l.n.RequestBlocksHandler: We request blocks from peer xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000 from block height 733921. 
Jul-06 07:44:26.597 [InputHandler-xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000] INFO  b.c.d.n.m.GetBlocksResponse: Received a GetBlocksResponse with 4000 blocks and 8160.412 kB size 
Jul-06 07:44:26.598 [JavaFX Application Thread] INFO  b.c.d.n.l.n.RequestBlocksHandler: We received from peer xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000 a BlocksResponse with 4000 blocks 
Jul-06 07:44:26.598 [JavaFX Application Thread] INFO  b.c.d.n.l.n.LiteNodeNetworkService: requestBlocksHandler to xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000 completed 
Jul-06 07:44:26.599 [JavaFX Application Thread] INFO  b.core.dao.node.lite.LiteNode: We received blocks from height 733921 to 737920 

Jul-06 07:44:35.527 [JavaFX Application Thread] INFO  b.c.d.n.l.n.RequestBlocksHandler: We request blocks from peer xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000 from block height 737921. 
Jul-06 07:45:14.817 [InputHandler-xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000] INFO  b.c.d.n.m.GetBlocksResponse: Received a GetBlocksResponse with 4000 blocks and 6929.397 kB size 
Jul-06 07:45:14.818 [JavaFX Application Thread] INFO  b.c.d.n.l.n.RequestBlocksHandler: We received from peer xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000 a BlocksResponse with 4000 blocks 
Jul-06 07:45:14.818 [JavaFX Application Thread] INFO  b.c.d.n.l.n.LiteNodeNetworkService: requestBlocksHandler to xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000 completed 
Jul-06 07:45:14.818 [JavaFX Application Thread] INFO  b.core.dao.node.lite.LiteNode: We received blocks from height 737921 to 741920 

Jul-06 07:45:16.382 [JavaFX Application Thread] INFO  b.c.d.n.l.n.RequestBlocksHandler: We request blocks from peer xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000 from block height 741921. 
Jul-06 07:45:28.053 [InputHandler-xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000] INFO  b.c.d.n.m.GetBlocksResponse: Received a GetBlocksResponse with 1923 blocks and 2721.872 kB size 
Jul-06 07:45:28.053 [JavaFX Application Thread] INFO  b.c.d.n.l.n.RequestBlocksHandler: We received from peer xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000 a BlocksResponse with 1923 blocks 
Jul-06 07:45:28.054 [JavaFX Application Thread] INFO  b.c.d.n.l.n.LiteNodeNetworkService: requestBlocksHandler to xzvkyuodp5wb633ku7ysbjxjb3bctzjxmmetsgyphjphj7aqel6oxzad.onion:8000 completed 
Jul-06 07:45:28.054 [JavaFX Application Thread] INFO  b.core.dao.node.lite.LiteNode: We received blocks from height 741921 to 743843 

Jul-06 07:45:29.131 [JavaFX Application Thread] INFO  bisq.core.dao.node.BsqNode: onParseBlockChainComplete 
Jul-06 07:45:29.131 [JavaFX Application Thread] INFO  b.c.dao.state.DaoStateService: Parse blockchain completed 

We lower the number of blocks delivered in a message to avoid
exceeding the max network message size.
@ripcurlx
Copy link
Contributor

As by agreement this needs the ACK by @ManfredKarrer as it touches Bisq DAO codebase.

@ManfredKarrer Could you please ACK this PR? Thanks!

@ripcurlx ripcurlx added this to the v1.9.5 milestone Jul 12, 2022
Copy link
Contributor

@ManfredKarrer ManfredKarrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK - based on #6282 (review)

@ripcurlx ripcurlx merged commit ec00c99 into bisq-network:master Jul 13, 2022
@ghost ghost mentioned this pull request Aug 1, 2022
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

Successfully merging this pull request may close these issues.

2 participants