Skip to content

Commit 53d7d35

Browse files
committed
Update parameters in headerssync.cpp
1 parent 7899402 commit 53d7d35

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/headerssync.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
#include <util/check.h>
1010
#include <util/vector.h>
1111

12-
// The two constants below are computed using the simulation script on
13-
// https://gist.github.com/sipa/016ae445c132cdf65a2791534dfb7ae1
12+
// The two constants below are computed using the simulation script in
13+
// contrib/devtools/headerssync-params.py.
1414

15-
//! Store a commitment to a header every HEADER_COMMITMENT_PERIOD blocks.
16-
constexpr size_t HEADER_COMMITMENT_PERIOD{584};
15+
//! Store one header commitment per HEADER_COMMITMENT_PERIOD blocks.
16+
constexpr size_t HEADER_COMMITMENT_PERIOD{600};
1717

1818
//! Only feed headers to validation once this many headers on top have been
1919
//! received and validated against commitments.
20-
constexpr size_t REDOWNLOAD_BUFFER_SIZE{13959}; // 13959/584 = ~23.9 commitments
20+
constexpr size_t REDOWNLOAD_BUFFER_SIZE{14308}; // 14308/600 = ~23.8 commitments
2121

2222
// Our memory analysis assumes 48 bytes for a CompressedHeader (so we should
2323
// re-calculate parameters if we compress further)

0 commit comments

Comments
 (0)