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

aggregate token and gas price heartbeat updates into batches #1282

Merged
merged 3 commits into from
Aug 12, 2024

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
103 checks passed
@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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants