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

spv: removed reject on invalid block #189

Merged

Conversation

edtubbs
Copy link
Collaborator

@edtubbs edtubbs commented Jan 23, 2024

This change removes the transmission of a reject message to a node when invalid or out-of-order blocks are received. A reject should not be sent in response to blocks that are valid but out of order.

@edtubbs
Copy link
Collaborator Author

edtubbs commented Jan 23, 2024

w/o reject

Downloaded new block with size 190 at height 500 from Sat Dec  7 22:11:26 2013

DEBUG: Start parsing 1 transactions...
DEBUG: done (took 0 secs)
Sync completed, at height 500
Waiting for new blocks or relevant transactions...
DEBUG: received command from node 23: inv
DEBUG: Get inv request with 1 items
DEBUG: Requesting 1 blocks
DEBUG: sending message to node 23: getdata
DEBUG: received command from node 23: block
DEBUG: Got invalid block (not in sequence) from node 23
DEBUG: received command from node 16: addr
DEBUG: received command from node 16: feefilter
DEBUG: received command from node 9: inv

w/reject

Downloaded new block with size 190 at height 500 from Sat Dec  7 22:11:26 2013

DEBUG: Start parsing 1 transactions...
DEBUG: done (took 0 secs)
Sync completed, at height 500
Waiting for new blocks or relevant transactions...
DEBUG: received command from node 7: inv
DEBUG: Get inv request with 1 items
DEBUG: Requesting 1 blocks
DEBUG: sending message to node 7: getdata
DEBUG: received command from node 23: inv
DEBUG: received command from node 7: block
DEBUG: Got invalid block (not in sequence) from node 7
DEBUG: sending message to node 7: reject
DEBUG: received command from node 14: addr
DEBUG: received command from node 14: feefilter
DEBUG: received command from node 21: version

Copy link
Member

@xanimo xanimo left a comment

Choose a reason for hiding this comment

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

ACK. Did a manual scrape test of this rebased off upstream/0.1.3-dev and arrived at the correct wallet balance/detected no errors or memory leaks. 🚀

@michilumin michilumin merged commit b8598dc into dogecoinfoundation:0.1.3-dev Jan 29, 2024
8 checks passed
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.

3 participants