Skip to content

Commit 8b6e173

Browse files
authored
fix(operator): reduce polling frecuency and remove newbatchv2 logic (#2080)
1 parent 1822fa9 commit 8b6e173

17 files changed

+48
-332
lines changed

aggregator/pkg/subscriber.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (agg *Aggregator) SubscribeToNewTasks() *chainio.ErrorPair {
2424
}
2525

2626
func (agg *Aggregator) subscribeToNewTasks() *chainio.ErrorPair {
27-
errorPair := agg.avsSubscriber.SubscribeToNewTasksV3(agg.NewBatchChan, agg.taskSubscriber)
27+
errorPair := agg.avsSubscriber.SubscribeToNewTasksV3(agg.NewBatchChan, agg.taskSubscriber, agg.AggregatorConfig.Aggregator.PollLatestBatchInterval)
2828

2929
if errorPair != nil {
3030
agg.AggregatorConfig.BaseConfig.Logger.Info("Failed to create task subscriber", "err", errorPair)

config-files/config-aggregator-docker.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ aggregator:
3838
# The Gas formula is percentage (gas_base_bump_percentage + gas_bump_incremental_percentage * i) / 100) is checked against this value
3939
# If it is higher, it will default to `gas_bump_percentage_limit`
4040
time_to_wait_before_bump: 72s # The time to wait for the receipt when responding to task. Suggested value 72 seconds (6 blocks)
41+
poll_latest_batch_interval: 20s # The interval to poll for latest batches. Default: 20s

config-files/config-aggregator-ethereum-package.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ aggregator:
3434
gas_base_bump_percentage: 10 # How much to bump gas price when responding to task. Suggested value 10%
3535
gas_bump_incremental_percentage: 2 # An extra percentage to bump every retry i*2 when responding to task. Suggested value 2%
3636
time_to_wait_before_bump: 36s # The time to wait for the receipt when responding to task. Suggested value 36 seconds (3 blocks)
37+
poll_latest_batch_interval: 20s # The interval to poll for latest batches. Default: 20s

config-files/config-aggregator.yaml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,4 @@ aggregator:
4545
# The Gas formula is percentage (gas_base_bump_percentage + gas_bump_incremental_percentage * i) / 100) is checked against this value
4646
# If it is higher, it will default to `gas_bump_percentage_limit`
4747
time_to_wait_before_bump: 72s # The time to wait for the receipt when responding to task. Suggested value 72 seconds (6 blocks)
48-
49-
## Operator Configurations
50-
# operator:
51-
# aggregator_rpc_server_ip_port_address: localhost:8090
52-
# address: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
53-
# earnings_receiver_address: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
54-
# delegation_approver_address: "0x0000000000000000000000000000000000000000"
55-
# staker_opt_out_window_blocks: 0
56-
# metadata_url: "https://yetanotherco.github.io/operator_metadata/metadata.json"
57-
# enable_metrics: true
58-
# metrics_ip_port_address: localhost:9092
59-
# max_batch_size: 268435456 # 256 MiB
60-
# # Operators variables needed for register it in EigenLayer
61-
# el_delegation_manager_address: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"
62-
# private_key_store_path: config-files/anvil.ecdsa.key.json
63-
# bls_private_key_store_path: config-files/anvil.bls.key.json
64-
# signer_type: local_keystore
65-
# chain_id: 31337
48+
poll_latest_batch_interval: 20s # The interval to poll for latest batches. Default: 20s

config-files/config-operator-1-ethereum-package.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ operator:
3232
metrics_ip_port_address: localhost:9092
3333
max_batch_size: 268435456 # 256 MiB
3434
last_processed_batch_filepath: 'config-files/operator-1.last_processed_batch.json'
35+
poll_latest_batch_interval: 20s # Optional: The interval to poll for latest batches. Default: 20s if not specified
3536

3637
# Operators variables needed for register it in EigenLayer
3738
el_delegation_manager_address: '0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9'

config-files/config-operator-1.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ operator:
3232
metrics_ip_port_address: localhost:9092
3333
max_batch_size: 268435456 # 256 MiB
3434
last_processed_batch_filepath: 'config-files/operator-1.last_processed_batch.json'
35+
poll_latest_batch_interval: 20s # Optional: The interval to poll for latest batches. Default: 20s if not specified
3536

3637
# Operators variables needed for register it in EigenLayer
3738
el_delegation_manager_address: '0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9'

config-files/config-operator-2.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ operator:
3030
metadata_url: 'https://yetanotherco.github.io/operator_metadata/metadata.json'
3131
max_batch_size: 268435456 # 256 MiB
3232
last_processed_batch_filepath: 'config-files/operator-2.last_processed_batch.json'
33+
poll_latest_batch_interval: 20s # Optional: The interval to poll for latest batches. Default: 20s if not specified
3334

3435
# Operators variables needed for register it in EigenLayer
3536
el_delegation_manager_address: '0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9'

config-files/config-operator-3.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ operator:
3030
metadata_url: 'https://yetanotherco.github.io/operator_metadata/metadata.json'
3131
max_batch_size: 268435456 # 256 MiB
3232
last_processed_batch_filepath: 'config-files/operator-3.last_processed_batch.json'
33+
poll_latest_batch_interval: 20s # Optional: The interval to poll for latest batches. Default: 20s if not specified
3334

3435
# Operators variables needed for register it in EigenLayer
3536
el_delegation_manager_address: '0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9'

config-files/config-operator-docker.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ operator:
3232
metrics_ip_port_address: localhost:9092
3333
max_batch_size: 268435456 # 256 MiB
3434
last_processed_batch_filepath: config-files/operator.last_processed_batch.json
35+
poll_latest_batch_interval: 20s # Optional: The interval to poll for latest batches. Default: 20s if not specified
3536
# Operators variables needed for register it in EigenLayer
3637
el_delegation_manager_address: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"
3738
private_key_store_path: config-files/anvil.ecdsa.key.json

config-files/config-operator-holesky.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ operator:
3232
metrics_ip_port_address: localhost:9092
3333
max_batch_size: 268435456 # 256 MiB
3434
last_processed_batch_filepath: 'config-files/operator.last_processed_batch.json'
35+
poll_latest_batch_interval: 20s # Optional: The interval to poll for latest batches. Default: 20s if not specified

0 commit comments

Comments
 (0)