Page MenuHomePhabricator

rework AcceptToMemoryPoolWorker sigops counting
ClosedPublic

Authored by markblundeberg on Jan 27 2020, 05:21.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
atmp_sigops
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9147
Build 16252: Default Diff Build & Tests
Build 16251: arc lint + arc unit