HomePhabricator

rework AcceptToMemoryPoolWorker sigops counting

Description

rework AcceptToMemoryPoolWorker sigops counting

Summary:
As suggested in D5061, we don't really want to be using
STANDARD_SCRIPT_VERIFY_FLAGS for critical checks. In this case it's
not consensus validation-critical, but undercounting of sigops in ATMP
would lead to producing bad block templates (this was precisely the issue
in the May 2019 mining DoS attack).

This consolidates the sigops check into one place, also the comment
was a bit confusing (the per_mb limit is irrelevant).

Test Plan: ninja check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5072

Details

Provenance
Mark Lundeberg <markblundeberg@users.noreply.github.com>Authored on Jan 27 2020, 05:14
markblundebergPushed on Jan 28 2020, 08:05
Reviewer
Restricted Project
Differential Revision
D5072: rework AcceptToMemoryPoolWorker sigops counting
Parents
rABC10bdb7c1cd2d: add test that coinbase sigops are limited
Branches
Unknown
Tags
Unknown

Event Timeline

Mark Lundeberg <markblundeberg@users.noreply.github.com> committed rABC445da7dc7b93: rework AcceptToMemoryPoolWorker sigops counting (authored by Mark Lundeberg <markblundeberg@users.noreply.github.com>).Jan 28 2020, 08:05