Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(op-node): support multi clients to fetch blobs #199

Merged
merged 19 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions op-node/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ var (
EnvVars: prefixEnvVars("L1_BEACON"),
Category: RollupCategory,
}
L1BlobRpcAddr = &cli.StringFlag{
Name: "l1.blob-rpc",
Usage: "Address of L1 blob endpoint to use. Multiple alternative addresses are supported, separated by commas, and will rotate when error",
EnvVars: prefixEnvVars("L1_BLOB_RPC"),
Category: RollupCategory,
}
/* Optional Flags */
BeaconHeader = &cli.StringFlag{
Name: "l1.beacon-header",
Expand Down Expand Up @@ -193,17 +187,24 @@ var (
Value: time.Second * 3,
Category: L1RPCCategory,
}
L1BlobRPCRateLimit = &cli.Float64Flag{
Name: "l1.blob-rpc-rate-limit",
Usage: "Optional self-imposed global rate-limit on L1 blob RPC requests, specified in requests / second. Disabled if set to 0.",
EnvVars: prefixEnvVars("L1_BLOB_RPC_RATE_LIMIT"),
L1ArchiveBlobRpcAddr = &cli.StringFlag{
Name: "l1.archive-blob-rpc",
Usage: "Optional address of L1 archive blob endpoint to use. Multiple alternative addresses are supported, separated by commas, and will rotate when error",
Required: false,
EnvVars: prefixEnvVars("L1_ARCHIVE_BLOB_RPC"),
Category: RollupCategory,
}
L1ArchiveBlobRpcRateLimit = &cli.Float64Flag{
owen-reorg marked this conversation as resolved.
Show resolved Hide resolved
Name: "l1.archive-blob-rpc-rate-limit",
Usage: "Optional self-imposed global rate-limit on L1 archive blob RPC requests, specified in requests / second. Disabled if set to 0.",
EnvVars: prefixEnvVars("L1_ARCHIVE_BLOB_RPC_RATE_LIMIT"),
Value: 0,
Category: L1RPCCategory,
}
L1BlobRPCMaxBatchSize = &cli.IntFlag{
Name: "l1.blob-rpc-max-batch-size",
Usage: "Maximum number of RPC requests to bundle",
EnvVars: prefixEnvVars("L1_BLOB_RPC_MAX_BATCH_SIZE"),
L1ArchiveBlobRpcMaxBatchSize = &cli.IntFlag{
Name: "l1.archive-blob-rpc-max-batch-size",
Usage: "Optional maximum number of L1 archive blob RPC requests to bundle",
EnvVars: prefixEnvVars("L1_ARCHIVE_BLOB_RPC_MAX_BATCH_SIZE"),
Value: 20,
Category: L1RPCCategory,
}
Expand Down Expand Up @@ -383,7 +384,6 @@ var (

var requiredFlags = []cli.Flag{
L1NodeAddr,
L1BlobRpcAddr,
L2EngineAddr,
L2EngineJWTSecret,
}
Expand All @@ -403,8 +403,9 @@ var optionalFlags = []cli.Flag{
L1RPCMaxBatchSize,
L1RPCMaxConcurrency,
L1HTTPPollInterval,
L1BlobRPCRateLimit,
L1BlobRPCMaxBatchSize,
L1ArchiveBlobRpcAddr,
L1ArchiveBlobRpcRateLimit,
L1ArchiveBlobRpcMaxBatchSize,
VerifierL1Confs,
SequencerEnabledFlag,
SequencerStoppedFlag,
Expand Down
6 changes: 3 additions & 3 deletions op-node/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ func NewConfig(ctx *cli.Context, log log.Logger) (*node.Config, error) {

func NewL1BlobEndpointConfig(ctx *cli.Context) node.L1BlobEndpointSetup {
return &node.L1BlobEndpointConfig{
NodeAddrs: ctx.String(flags.L1BlobRpcAddr.Name),
RateLimit: ctx.Float64(flags.L1BlobRPCRateLimit.Name),
BatchSize: ctx.Int(flags.L1BlobRPCMaxBatchSize.Name),
NodeAddrs: ctx.String(flags.L1NodeAddr.Name) + "," + ctx.String(flags.L1ArchiveBlobRpcAddr.Name),
RateLimit: ctx.Float64(flags.L1ArchiveBlobRpcRateLimit.Name),
BatchSize: ctx.Int(flags.L1ArchiveBlobRpcMaxBatchSize.Name),
}
}

Expand Down
Loading