Pieter Wuille

Results 554 comments of Pieter Wuille

The dump file contains these fields: - block height - (start,end) time (in the current implementation both are just equal to the block timestamp) - difficulty - weight (in the...

Interesting use case! Depending on how closely you want the output to match the input grammar, that may be easy or hard to do. The output of `gramc` is a...

In some cases ambiguous grammars will be rejected, actually, but indeed - it's not guaranteed.

@luke-jr The DoS concern is primarily about memory usage: filling mapBlockIndex and other data structures with low-difficulty headers before a checkpoint is reached. Bandwidth is a concern for sure, but:...

Here is the script to compute the optimal parameters used, with lots of explanation: https://gist.github.com/sipa/016ae445c132cdf65a2791534dfb7ae1 (it takes around 20s for me in `pypy3`, though over 2 minutes in `python3`). It...

@luke-jr I think that's a potentially useful but orthogonal improvement, though there is probably much less need for it after this PR.

@glozow > > It may make sense to include the script in the repository (as I can imagine it being re-run to tune things occasionally, but there should not be...

I've pushed a branch to https://github.com/sipa/bitcoin/commits/pr25717b with some suggested changes: * Switch to randomized commitment offset (which the simulation script shows reduces the attacker's power a bit, permitting lower per-peer...

@Sjors Cool, that abort/restart of peer=3 at the same height was surprising to me, but I've reproduced it.

@Sjors Fixed it in both branches. The problem was that when asking for the initial headers from a peer (outside of the HeadersSyncState logic), we ask for one block earlier...