Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

aggregate token and gas price heartbeat updates into batches#1282

Merged
matYang merged 3 commits intoccip-developfrom
heartbeat-driven-batched-price-reports
Aug 12, 2024
Merged

aggregate token and gas price heartbeat updates into batches#1282
matYang merged 3 commits intoccip-developfrom
heartbeat-driven-batched-price-reports

Conversation

@matYang
Copy link
Collaborator

@matYang matYang commented Aug 12, 2024

Motivation

Price reporting frequencies have been turned to following values on Eth mainnet (where most price update costs is)

GasHeartBeat: 2hr
ExecGasPriceDeviation: 400%
DAPriceDeviation: 400%
TokenPriceHeartBeat: 12hr
TokenPriceDeviation: 20%

As a result, updates are mostly heartbeat driven as opposed to deviation driven. A simple trick to improve leader-lane batching is to always batch report all heartbeat prices.

In clam environments where prices are heartbeat driven, this absolutely minimizes number of price reports.

In flux environments where good number of prices are deviation driven while some remain heartbeat driven, e.g. in case of Eth blob base fee spike, the penalty we take for including each additional prices is low (~6k gas) v.s the OCR tx overhead (~110k gas)

@matYang matYang enabled auto-merge (squash) August 12, 2024 13:59
@matYang matYang merged commit a4b734a into ccip-develop Aug 12, 2024
@matYang matYang deleted the heartbeat-driven-batched-price-reports branch August 12, 2024 14:12
@cl-sonarqube-production
Copy link

matYang added a commit that referenced this pull request Aug 12, 2024
## Motivation
Price reporting frequencies have been turned to following values on Eth
mainnet (where most price update costs is)
```
GasHeartBeat: 2hr
ExecGasPriceDeviation: 400%
DAPriceDeviation: 400%
TokenPriceHeartBeat: 12hr
TokenPriceDeviation: 20%
```

As a result, updates are mostly heartbeat driven as opposed to deviation
driven. A simple trick to improve leader-lane batching is to always
batch report all heartbeat prices.

In clam environments where prices are heartbeat driven, this absolutely
minimizes number of price reports.

In flux environments where good number of prices are deviation driven
while some remain heartbeat driven, e.g. in case of Eth blob base fee
spike, the penalty we take for including each additional prices is low
(~6k gas) v.s the OCR tx overhead (~110k gas)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants