Skip to content

Conversation

sdaftuar
Copy link
Member

Previously we would assert that if every block in vBlockHashesToAnnounce is in
chainActive, then the blocks to be announced must connect. However, there are
edge cases where this assumption could be violated (eg using invalidateblock /
reconsiderblock), so just check for this case and revert to inv-announcement
instead.

FYI I encountered this bug once while running mempool_packages.py, and was able to reproduce reliably by repeatedly invoking invalidateblock/reconsiderblock on the tip.

Perhaps we should backport this to 0.12 as well?

Previously we would assert that if every block in vBlockHashesToAnnounce is in
chainActive, then the blocks to be announced must connect.  However, there are
edge cases where this assumption could be violated (eg using invalidateblock /
reconsiderblock), so just check for this case and revert to inv-announcement
instead.
@morcos
Copy link
Contributor

morcos commented Apr 20, 2016

utACK

@jonasschnelli
Copy link
Contributor

utACK 3a99fb2

@sipa
Copy link
Member

sipa commented Apr 21, 2016

utACK 3a99fb2

@paveljanik
Copy link
Contributor

utACK 3a99fb2

@TheBlueMatt
Copy link
Contributor

utACK 3a99fb2

On April 20, 2016 11:26:28 AM PDT, Suhas Daftuar notifications@github.com wrote:

Previously we would assert that if every block in
vBlockHashesToAnnounce is in
chainActive, then the blocks to be announced must connect. However,
there are
edge cases where this assumption could be violated (eg using
invalidateblock /
reconsiderblock), so just check for this case and revert to
inv-announcement
instead.

FYI I encountered this bug once while running mempool_packages.py,
and was able to reproduce reliably by repeatedly invoking
invalidateblock/reconsiderblock on the tip.

Perhaps we should backport this to 0.12 as well?
You can view, comment on, or merge this pull request online at:

#7919

-- Commit Summary --

  • Fix headers announcements edge case

-- File Changes --

M src/main.cpp (16)

-- Patch Links --

https://github.com/bitcoin/bitcoin/pull/7919.patch
https://github.com/bitcoin/bitcoin/pull/7919.diff


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#7919

@laanwj laanwj merged commit 3a99fb2 into bitcoin:master Apr 22, 2016
laanwj added a commit that referenced this pull request Apr 22, 2016
3a99fb2 Fix headers announcements edge case (Suhas Daftuar)
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Apr 27, 2016
Previously we would assert that if every block in vBlockHashesToAnnounce is in
chainActive, then the blocks to be announced must connect.  However, there are
edge cases where this assumption could be violated (eg using invalidateblock /
reconsiderblock), so just check for this case and revert to inv-announcement
instead.

Github-Pull: bitcoin#7919
Rebased-From: 3a99fb2
@maflcko
Copy link
Member

maflcko commented Jun 9, 2016

Backported as part of #7938. Removing label 'Needs backport'.

thokon00 pushed a commit to faircoin/faircoin that referenced this pull request Jun 28, 2016
Previously we would assert that if every block in vBlockHashesToAnnounce is in
chainActive, then the blocks to be announced must connect.  However, there are
edge cases where this assumption could be violated (eg using invalidateblock /
reconsiderblock), so just check for this case and revert to inv-announcement
instead.

Github-Pull: bitcoin#7919
Rebased-From: 3a99fb2
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants