Skip to content

Commit

Permalink
rename DepositLogBatchSize setting
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Oct 16, 2024
1 parent 64038db commit fffe1c4
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion config/default.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ executionapi:
- name: "local"
url: "http://127.0.0.1:8545"

depositLogBatchSize: 1000
logBatchSize: 1000
depositDeployBlock: 0 # el block number from where to crawl the deposit contract (should be <=, but close to the deposit contract deployment block)
electraDeployBlock: 0 # el block number from where to crawl the electra system contracts (should be <=, but close to electra fork activation block)

Expand Down
2 changes: 1 addition & 1 deletion indexer/execution/consolidation_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type consolidationRequestMatch struct {

// NewConsolidationIndexer creates a new consolidation system contract indexer
func NewConsolidationIndexer(indexer *IndexerCtx) *ConsolidationIndexer {
batchSize := utils.Config.ExecutionApi.DepositLogBatchSize
batchSize := utils.Config.ExecutionApi.LogBatchSize
if batchSize == 0 {
batchSize = 1000
}
Expand Down
6 changes: 0 additions & 6 deletions indexer/execution/contract_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/ethpandaops/dora/clients/execution"
"github.com/ethpandaops/dora/db"
"github.com/ethpandaops/dora/indexer/beacon"
"github.com/ethpandaops/dora/utils"
)

// contractIndexer handles the indexing of contract events for a specific system contract
Expand Down Expand Up @@ -62,11 +61,6 @@ type contractIndexerForkState struct {

// newContractIndexer creates a new contract indexer with the given options
func newContractIndexer[TxType any](indexer *IndexerCtx, logger logrus.FieldLogger, options *contractIndexerOptions[TxType]) *contractIndexer[TxType] {
batchSize := utils.Config.ExecutionApi.DepositLogBatchSize
if batchSize == 0 {
batchSize = 1000
}

ci := &contractIndexer[TxType]{
indexer: indexer,
logger: logger,
Expand Down
2 changes: 1 addition & 1 deletion indexer/execution/deposit_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type DepositIndexer struct {

// NewDepositIndexer creates a new deposit contract indexer
func NewDepositIndexer(indexer *IndexerCtx) *DepositIndexer {
batchSize := utils.Config.ExecutionApi.DepositLogBatchSize
batchSize := utils.Config.ExecutionApi.LogBatchSize
if batchSize == 0 {
batchSize = 1000
}
Expand Down
2 changes: 1 addition & 1 deletion indexer/execution/withdrawal_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type withdrawalRequestMatch struct {

// NewWithdrawalIndexer creates a new withdrawal contract indexer
func NewWithdrawalIndexer(indexer *IndexerCtx) *WithdrawalIndexer {
batchSize := utils.Config.ExecutionApi.DepositLogBatchSize
batchSize := utils.Config.ExecutionApi.LogBatchSize
if batchSize == 0 {
batchSize = 1000
}
Expand Down
2 changes: 1 addition & 1 deletion test-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ executionapi:
- name: "pk01"
url: "http://10.16.71.108:8545"

depositLogBatchSize: 1000
logBatchSize: 1000
depositDeployBlock: 0 # el block number from where to crawl the deposit contract (should be <=, but close to the deposit contract deployment block)
electraDeployBlock: 0 # el block number from where to crawl the electra system contracts (should be <=, but close to electra fork activation block)

Expand Down
6 changes: 3 additions & 3 deletions types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ type Config struct {
Endpoint string `yaml:"endpoint" envconfig:"EXECUTIONAPI_ENDPOINT"`
Endpoints []EndpointConfig `yaml:"endpoints"`

DepositLogBatchSize int `yaml:"depositLogBatchSize" envconfig:"EXECUTIONAPI_DEPOSIT_LOG_BATCH_SIZE"`
DepositDeployBlock int `yaml:"depositDeployBlock" envconfig:"EXECUTIONAPI_DEPOSIT_DEPLOY_BLOCK"` // el block number from where to crawl the deposit system contract (should be <=, but close to deposit contract deployment)
ElectraDeployBlock int `yaml:"electraDeployBlock" envconfig:"EXECUTIONAPI_ELECTRA_DEPLOY_BLOCK"` // el block number from where to crawl the electra system contracts (should be <=, but close to electra fork activation block)
LogBatchSize int `yaml:"logBatchSize" envconfig:"EXECUTIONAPI_LOG_BATCH_SIZE"`
DepositDeployBlock int `yaml:"depositDeployBlock" envconfig:"EXECUTIONAPI_DEPOSIT_DEPLOY_BLOCK"` // el block number from where to crawl the deposit system contract (should be <=, but close to deposit contract deployment)
ElectraDeployBlock int `yaml:"electraDeployBlock" envconfig:"EXECUTIONAPI_ELECTRA_DEPLOY_BLOCK"` // el block number from where to crawl the electra system contracts (should be <=, but close to electra fork activation block)
} `yaml:"executionapi"`

Indexer struct {
Expand Down

0 comments on commit fffe1c4

Please sign in to comment.