Page MenuHomePhabricator

add sigChecks counting and a flag that restricts it per-input
Changes PlannedPublic

Authored by markblundeberg on Mon, Dec 2, 19:26.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Maniphest Tasks
T704: sigChecks implementation
Summary

This flag is intended for standardness-only, and the primary goal is to
make is so that malicious super-high-density-SigChecks transactions cannot
get into the mempool, where they would frustrate simple block assembly
algorithms.

A transaction conforming to this rule cannot (overall) exceed a density of
1 sigcheck per 36.666 bytes.

(ref: https://gist.github.com/markblundeberg/becf85ac6ba48bebfeb7871ce2de27a7)

Test Plan
make check
test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Branch
sigchecks
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 8376
Build 14770: Bitcoin ABC Buildbot
Build 14769: arc lint + arc unit

Event Timeline

markblundeberg created this revision.Mon, Dec 2, 19:26
Herald added a reviewer: Restricted Project. · View Herald TranscriptMon, Dec 2, 19:26
markblundeberg added inline comments.Mon, Dec 2, 19:28
src/script/interpreter.cpp
1172

fix "an the"

markblundeberg planned changes to this revision.Mon, Dec 2, 21:54
deadalnix requested changes to this revision.Mon, Dec 2, 22:01

The general direction is good, but there are a few problem with this patch.

First, it implements the counting mechanism and the higher level checks at once. It is better to implement the counting alone and test it, then wire that in in the script verification process thing in another.

Add a test that Run EvalScript on various scripts and get the expected results.

src/script/interpreter.cpp
105

Pass a reference to some metric counter object instead of an int*. If you are worried about verbosity on all callsite, add an overload of EvalScript that doesn't need it.

907
metricCounter.addCheckSig(1);
1814

Move all changes to this in another patch.