eth/protocols/snap: move maxTrieRequestCount and batchSizeThreshold to sync_v1.go

This commit is contained in:
jonny rhea 2026-05-13 18:10:22 -05:00
parent e1809a1678
commit 83f32fbaa4
2 changed files with 9 additions and 9 deletions

View file

@ -61,15 +61,6 @@ const (
// size should be maxRequestSize / 24K. Assuming that most contracts do not // size should be maxRequestSize / 24K. Assuming that most contracts do not
// come close to that, requesting 4x should be a good approximation. // come close to that, requesting 4x should be a good approximation.
maxCodeRequestCount = maxRequestSize / (24 * 1024) * 4 maxCodeRequestCount = maxRequestSize / (24 * 1024) * 4
// maxTrieRequestCount is the maximum number of trie node blobs to request in
// a single query. If this number is too low, we're not filling responses fully
// and waste round trip times. If it's too high, we're capping responses and
// waste bandwidth.
maxTrieRequestCount = maxRequestSize / 512
// batchSizeThreshold is the maximum size allowed for gentrie batch.
batchSizeThreshold = 8 * 1024 * 1024
) )
var ( var (

View file

@ -39,6 +39,15 @@ import (
) )
const ( const (
// maxTrieRequestCount is the maximum number of trie node blobs to request in
// a single query. If this number is too low, we're not filling responses fully
// and waste round trip times. If it's too high, we're capping responses and
// waste bandwidth.
maxTrieRequestCount = maxRequestSize / 512
// batchSizeThreshold is the maximum size allowed for gentrie batch.
batchSizeThreshold = 8 * 1024 * 1024
// trienodeHealRateMeasurementImpact is the impact a single measurement has on // trienodeHealRateMeasurementImpact is the impact a single measurement has on
// the local node's trienode processing capacity. A value closer to 0 reacts // the local node's trienode processing capacity. A value closer to 0 reacts
// slower to sudden changes, but it is also more stable against temporary hiccups. // slower to sudden changes, but it is also more stable against temporary hiccups.