Skip to content

Commit ca5f502

Browse files
committed
refactor: update BlobIndexerConfig
1 parent 73d8df6 commit ca5f502

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

backend/pkg/commons/types/config.go

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,15 @@ type Bigtable struct {
1919

2020
// Config is a struct to hold the configuration data
2121
type Config struct {
22-
JustV2 bool `yaml:"justV2" env:"JUST_V2"` // temp, remove at some point
23-
DeploymentType string `yaml:"deploymentType" env:"DEPLOYMENT_TYPE"`
24-
ReaderDatabase DatabaseConfig `yaml:"readerDatabase" env:", prefix=READER_"`
25-
WriterDatabase DatabaseConfig `yaml:"writerDatabase" env:", prefix=WRITER_"`
26-
AlloyReader DatabaseConfig `yaml:"alloyReader" env:", prefix=ALLOY_READER_"`
27-
AlloyWriter DatabaseConfig `yaml:"alloyWriter" env:", prefix=ALLOY_WRITER_"`
28-
Bigtable Bigtable `yaml:"bigtable" env:", prefix=BIGTABLE_"`
29-
RawBigtable Bigtable `yaml:"rawBigtable" env:", prefix=RAW_BIGTABLE_"`
30-
BlobIndexer struct {
31-
S3 struct {
32-
Endpoint string `yaml:"endpoint" env:"ENDPOINT"` // s3 endpoint
33-
Bucket string `yaml:"bucket" env:"BUCKET"` // s3 bucket
34-
AccessKeyId string `yaml:"accessKeyId" env:"ACCESS_KEY_ID"` // s3 access key id
35-
AccessKeySecret string `yaml:"accessKeySecret" env:"ACCESS_KEY_SECRET"` // s3 access key secret
36-
} `yaml:"s3" env:", prefix=S3_"`
37-
PruneMarginEpochs uint64 `yaml:"pruneMarginEpochs" env:"PRUNE_MARGIN_EPOCHS"` // PruneMarginEpochs helps blobindexer to decide if connected node has pruned too far to have no holes in the data, set it to same value as lighthouse flag --blob-prune-margin-epochs
38-
DisableStatusReports bool `yaml:"disableStatusReports" env:"DISABLE_STATUS_REPORTS"` // disable status reports (no connection to db needed)
39-
} `yaml:"blobIndexer" env:", prefix=BLOB_INDEXER_"`
22+
JustV2 bool `yaml:"justV2" env:"JUST_V2"` // temp, remove at some point
23+
DeploymentType string `yaml:"deploymentType" env:"DEPLOYMENT_TYPE"`
24+
ReaderDatabase DatabaseConfig `yaml:"readerDatabase" env:", prefix=READER_"`
25+
WriterDatabase DatabaseConfig `yaml:"writerDatabase" env:", prefix=WRITER_"`
26+
AlloyReader DatabaseConfig `yaml:"alloyReader" env:", prefix=ALLOY_READER_"`
27+
AlloyWriter DatabaseConfig `yaml:"alloyWriter" env:", prefix=ALLOY_WRITER_"`
28+
Bigtable Bigtable `yaml:"bigtable" env:", prefix=BIGTABLE_"`
29+
RawBigtable Bigtable `yaml:"rawBigtable" env:", prefix=RAW_BIGTABLE_"`
30+
BlobIndexer BlobIndexerConfig `yaml:"blobIndexer" env:", prefix=BLOB_INDEXER_"`
4031
Chain `yaml:"chain"`
4132
Eth1ErigonEndpoint string `yaml:"eth1ErigonEndpoint" env:"ETH1_ERIGON_ENDPOINT"`
4233
Eth1GethEndpoint string `yaml:"eth1GethEndpoint" env:"ETH1_GETH_ENDPOINT"`
@@ -282,3 +273,14 @@ type ServiceMonitoringConfiguration struct {
282273
Name string `yaml:"name" env:"NAME"`
283274
Duration time.Duration `yaml:"duration" env:"DURATION"`
284275
}
276+
277+
type BlobIndexerConfig struct {
278+
S3 struct {
279+
Endpoint string `yaml:"endpoint" env:"ENDPOINT"` // s3 endpoint
280+
Bucket string `yaml:"bucket" env:"BUCKET"` // s3 bucket
281+
AccessKeyId string `yaml:"accessKeyId" env:"ACCESS_KEY_ID"` // s3 access key id
282+
AccessKeySecret string `yaml:"accessKeySecret" env:"ACCESS_KEY_SECRET"` // s3 access key secret
283+
} `yaml:"s3" env:", prefix=S3_"`
284+
PruneMarginEpochs uint64 `yaml:"pruneMarginEpochs" env:"PRUNE_MARGIN_EPOCHS"` // PruneMarginEpochs helps blobindexer to decide if connected node has pruned too far to have no holes in the data, set it to same value as lighthouse flag --blob-prune-margin-epochs
285+
DisableStatusReports bool `yaml:"disableStatusReports" env:"DISABLE_STATUS_REPORTS"` // disable status reports (no connection to db needed)
286+
}

0 commit comments

Comments
 (0)