Page MenuHomePhabricator

Added empty block fallback to CreateNewBlock
Needs RevisionPublic

Authored by jasonbcox on Sep 9 2019, 20:02.


Group Reviewers
Restricted Project

This provides a damage-control mechanism when invalid blocks are being erroneously generated for a new block template. While this is not bullet-proof against all conceivable bugs, it protects miners against issues with transaction inclusion, ordering, etc.

Test Plan

make check

Diff Detail

rABC Bitcoin ABC
Lint OK
No Unit Test Coverage
Build Status
Buildable 7370
Build 12783: Bitcoin ABC Buildbot (legacy)
Build 12782: arc lint + arc unit

Event Timeline

jasonbcox created this revision.Sep 9 2019, 20:02
jasonbcox planned changes to this revision.Sep 9 2019, 20:05
jasonbcox updated this revision to Diff 11171.Sep 9 2019, 20:28

Changed tests to call CreateNewBlock() with default params in as many places as possible. Improve existing tests so that a fallback empty block will not accidentally pass.

deadalnix requested changes to this revision.Nov 17 2019, 22:01

I don't think the design here is sound. You don't have an error boundary set anywhere, but a parameter that you pass down to ask what's downstream to not error out. This is not solid. The whole point of the maneuver is to not trust what downstream of the error boundary.

This revision now requires changes to proceed.Nov 17 2019, 22:01