-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* enable backfill for devmode * enable backfill * gaz * move to its own package * fix panic * fix bug * gaz * kasey's review
- Loading branch information
Showing
15 changed files
with
96 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
load("@prysm//tools/go:def.bzl", "go_library") | ||
|
||
go_library( | ||
name = "go_default_library", | ||
srcs = ["flags.go"], | ||
importpath = "github.com/prysmaticlabs/prysm/v4/cmd/beacon-chain/sync/backfill/flags", | ||
visibility = ["//visibility:public"], | ||
deps = ["@com_github_urfave_cli_v2//:go_default_library"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package flags | ||
|
||
import ( | ||
"github.com/urfave/cli/v2" | ||
) | ||
|
||
var ( | ||
backfillBatchSizeName = "backfill-batch-size" | ||
backfillWorkerCountName = "backfill-worker-count" | ||
|
||
// EnableExperimentalBackfill enables backfill for checkpoint synced nodes. | ||
// This flag will be removed onced backfill is enabled by default. | ||
EnableExperimentalBackfill = &cli.BoolFlag{ | ||
Name: "enable-experimental-backfill", | ||
Usage: "Backfill is still experimental at this time." + | ||
"It will only be enabled if this flag is specified and the node was started using checkpoint sync.", | ||
} | ||
// BackfillBatchSize allows users to tune block backfill request sizes to maximize network utilization | ||
// at the cost of higher memory. | ||
BackfillBatchSize = &cli.Uint64Flag{ | ||
Name: backfillBatchSizeName, | ||
Usage: "Number of blocks per backfill batch. " + | ||
"A larger number will request more blocks at once from peers, but also consume more system memory to " + | ||
"hold batches in memory during processing. This has a multiplicative effect with " + backfillWorkerCountName, | ||
Value: 64, | ||
} | ||
// BackfillWorkerCount allows users to tune the number of concurrent backfill batches to download, to maximize | ||
// network utilization at the cost of higher memory. | ||
BackfillWorkerCount = &cli.IntFlag{ | ||
Name: backfillWorkerCountName, | ||
Usage: "Number of concurrent backfill batch requests. " + | ||
"A larger number will better utilize network resources, up to a system-dependent limit, but will also " + | ||
"consume more system memory to hold batches in memory during processing. Multiply by backfill-batch-size and " + | ||
"average block size (~2MB before deneb) to find the right number for your system. " + | ||
"This has a multiplicatice effect with " + backfillBatchSizeName, | ||
Value: 2, | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters