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

Fix headers announcements edge case #7919

Merged
merged 1 commit into from Apr 22, 2016

Conversation

Projects
None yet
8 participants
@sdaftuar
Member

sdaftuar commented Apr 20, 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.

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?

Fix headers announcements edge case
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

This comment has been minimized.

Show comment
Hide comment
@morcos

morcos Apr 20, 2016

Member

utACK

Member

morcos commented Apr 20, 2016

utACK

@jonasschnelli jonasschnelli added the P2P label Apr 21, 2016

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli
Member

jonasschnelli commented Apr 21, 2016

utACK 3a99fb2

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Apr 21, 2016

Member

utACK 3a99fb2

Member

sipa commented Apr 21, 2016

utACK 3a99fb2

@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Apr 21, 2016

Contributor

utACK 3a99fb2

Contributor

paveljanik commented Apr 21, 2016

utACK 3a99fb2

@TheBlueMatt

This comment has been minimized.

Show comment
Hide comment
@TheBlueMatt

TheBlueMatt Apr 22, 2016

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

Contributor

TheBlueMatt commented Apr 22, 2016

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Apr 22, 2016

Merge #7919: Fix headers announcements edge case
3a99fb2 Fix headers announcements edge case (Suhas Daftuar)

MarcoFalke added a commit to MarcoFalke/bitcoin that referenced this pull request Apr 27, 2016

Fix headers announcements edge case
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: #7919
Rebased-From: 3a99fb2
@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke Jun 9, 2016

Member

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

Member

MarcoFalke commented Jun 9, 2016

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

zander added a commit to zander/bitcoinclassic that referenced this pull request Jun 16, 2016

Fix headers announcements edge case
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: #7919
Rebased-From: 3a99fb2

thokon00 added a commit to faircoin/faircoin that referenced this pull request Jun 28, 2016

Fix headers announcements edge case
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: #7919
Rebased-From: 3a99fb2

nomnombtc added a commit to nomnombtc/bitcoin that referenced this pull request Nov 12, 2016

Fix headers announcements edge case
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: #7919
Rebased-From: 3a99fb2

nomnombtc added a commit to nomnombtc/bitcoin that referenced this pull request Nov 12, 2016

Fix headers announcements edge case
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: #7919
Rebased-From: 3a99fb2

nomnombtc added a commit to nomnombtc/bitcoin that referenced this pull request Nov 13, 2016

Fix headers announcements edge case
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: #7919
Rebased-From: 3a99fb2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment