Page MenuHomePhabricator

Added empty block fallback to CreateNewBlock
Needs RevisionPublic

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

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

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

Repository
rABC Bitcoin ABC
Branch
empty-block-fallback-gbt-default
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7370
Build 12783: Bitcoin ABC Buildbot (legacy)
Build 12782: arc lint + arc unit

Event Timeline

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