HomePhabricator

Add logging for block header receive time

Description

Add logging for block header receive time

Summary:
Prototype implementation, for reference: D1196

Finishes implementation for T208

Some stats from my experiment with selfish mining over a period 753
blocks:

  • min time received compared to header timestamp: -26 sec (so the header timestamp was 26 seconds in the future. lol)
  • max time received compared to header timestamp: 166 sec
  • median: 0
  • mean: 3.34661
  • stddev: 11.896

No apparently selfish blocks were captured during this time period.

The selfish mining threshold is slightly under one standard deviation.
Let me know if you think this value should be larger, just keep in mind
that it's only used for breaking ties.

Test Plan:
make check
and
./test_runner.py reindex.py

Reviewers: deadalnix, #bitcoin_abc, Mengerian

Reviewed By: deadalnix, #bitcoin_abc, Mengerian

Subscribers: matiu, Mengerian, teamcity

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

Details

Provenance
jasonbcoxAuthored on Jun 6 2018, 21:53
jasonbcoxPushed on Jun 14 2018, 20:50
Reviewer
Restricted Project
Differential Revision
D1441: Add logging for block header receive time
Parents
rABCa8f3a799642b: Nits cleanup in CMerkleBlock definition
Branches
Unknown
Tags
Unknown