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

SHIP-2006 Consolidate All FinalityDepth Settings to default TOML files #1151

Open
wants to merge 22 commits into
base: ccip-develop
Choose a base branch
from

Conversation

adityavadhavkar1215
Copy link

@adityavadhavkar1215 adityavadhavkar1215 commented Jul 8, 2024

Motivation

Ticket

Solution

Updated the values of FinalityDepth setting to make it the same as the values set in infra-k8s repo.

@adityavadhavkar1215 adityavadhavkar1215 marked this pull request as ready for review July 8, 2024 01:15
@adityavadhavkar1215 adityavadhavkar1215 requested a review from a team as a code owner July 8, 2024 01:15
docs/CONFIG.md Outdated Show resolved Hide resolved
docs/CONFIG.md Outdated Show resolved Hide resolved
docs/CONFIG.md Outdated Show resolved Hide resolved
docs/CONFIG.md Outdated Show resolved Hide resolved
@Madalosso
Copy link
Collaborator

@simsonraj @stackman27
While chatting with @friedemannf about these new configs, he noticed that the document created by Aditya used some alpha and beta infra-k8s cluster configs as the source of truth... And raised concerns about this.

What do you guys think? @friedemannf suggested that we should only rely on custom settings from:

For CCIP, the sources should be:
testnet: prod-testnet cluster
mainnet: NOP setup guide

@Madalosso
Copy link
Collaborator

Closing this to prevent reviews.
I'll review CCIP values based on the correct source of truth, make necessary changes and re-open it

@Madalosso Madalosso closed this Sep 30, 2024
@Madalosso
Copy link
Collaborator

Opening with update values for testnet, relying only on prod-testnet infra-k8s overrides

@Madalosso
Copy link
Collaborator

The latest commit added the main net values set by CCIP Node Setup Guide

@@ -1,5 +1,5 @@
ChainID = '59141'
FinalityDepth = 900
FinalityDepth = 200
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 200 on Sepolia but 600 on Mainnet?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

200 is the testnet prod value

200 introduced by @stackman27 at https://github.com/smartcontractkit/infra-k8s/pull/20027

I have no idea why Mainnet is set to 600, I'm following what is oriented on CCIP Node Setup Guide

Maybe the block time is different between testnet and mainnet and that's why?

@@ -2,7 +2,7 @@
ChainID = '1088'
ChainType = 'metis'
# Sequencer offers absolute finality
FinalityDepth = 10
FinalityDepth = 500
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also difference between mainnet & sepolia

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow... nice find. I think Aditya introduced this and slipped my revision.
There is no FinalityDepth value set for Metis (testnet or mainnet)... Do you think I should remove these, then?

@@ -1,23 +1,23 @@
ChainID = '300'
ChainType = 'zksync'
# 200block ~ 20min concurrent with the l1_committed tag
FinalityDepth = 200
FinalityDepth = 200
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt it 1200?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless the block timing is different between mainnet & testnet, can you please also give a pass on all the mainnet configs ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am getting these values from infra-k8s prod-testnet overrides.
Do you think there's a chance that those values are also wrong?
https://github.com/smartcontractkit/infra-k8s/blob/a7e46c641e13a3ae32b62f598f7c49dc913bd0ad/projects/chainlink/files/chainlink-clusters/cl-ccip-testnets-prod/config.yaml#L662

[[EVM]]
      ChainID = '300'
      ChainType = 'zksync'
      FinalityTagEnabled = false
      # 200block ~ 20min concurrent with the l1_committed tag
      FinalityDepth = 200
      # block rate is ~2-5sec, so this ensures blocks are polled correctly
      LogPollInterval = '5s'
      # sufficient time for RPC to be labelled out of sync, since blockRate is pretty fast
      NoNewHeadsThreshold = '1m'

      [EVM.GasEstimator]
      # no EIP1559 to ensure our estimator does not estimate gas with MaxPriorityFee which will break minFunding requirement
      EIP1559DynamicFees = false
      # high LimitDefault for worst case pubdata bytes with BatchGasLimit reduced to 4M in OCR2Config
      LimitDefault = 2_500_000_000
      FeeCapDefault = '500 mwei'
      PriceDefault = '25 mwei'
      # p999 value for gasPrice based on historical data
      PriceMax = '500 mwei'
      # avg gasPrices are at 0.025 gwei
      PriceMin = '25 mwei'

      [EVM.GasEstimator.BlockHistory]
      # increasing this to smooth out gas estimation
      BlockHistorySize = 200

      [EVM.HeadTracker]
      # tracks top N blocks to keep in heads database table. Should store atleast the same # of blocks as finalityDepth
      HistoryDepth = 250

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The finality committee only really signed off on mainnets, but IMO we should set the same values for testnets as well

@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

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.

5 participants