Skip to content

Commit

Permalink
[SHIP-2813] Align FinalityTagEnabled chain config between CCIP and Co…
Browse files Browse the repository at this point in the history
…re (#14530)

* set FinalityTagEnabled = true for testnets to match ccip config

* Same changes on mainnets

* Add changeset

* generate config docs

* Apply suggestions from code review

Thanks for suggestions, I'll accept and replicate

Co-authored-by: amit-momin <108959691+amit-momin@users.noreply.github.com>

---------

Co-authored-by: amit-momin <108959691+amit-momin@users.noreply.github.com>
  • Loading branch information
Madalosso and amit-momin authored Sep 27, 2024
1 parent bfc5952 commit 2c16f46
Show file tree
Hide file tree
Showing 34 changed files with 62 additions and 38 deletions.
5 changes: 5 additions & 0 deletions .changeset/ninety-feet-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#updated default config values for FinalityTagEnabled to match CCIP configs
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Arbitrum_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Arbitrum is an L2 chain. Pending proper L2 support, for now we rely on their sequencer
ChainID = '42161'
ChainType = 'arbitrum'
FinalityTagEnabled = true
LinkContractAddress = "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4"
LogPollInterval = '1s'
# Arbitrum only emits blocks when a new tx is received, so this method of liveness detection is not useful
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Arbitrum_Sepolia.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ChainID = '421614'
ChainType = 'arbitrum'
FinalityTagEnabled = true
NoNewHeadsThreshold = '0'
OCR.ContractConfirmations = 1
LogPollInterval = '1s'
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Avalanche_Fuji.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ChainID = '43113'
FinalityDepth = 10
FinalityTagEnabled = true
LinkContractAddress = '0x0b9d5D9136855f6FEc3c0993feE6E9CE8a297846'
LogPollInterval = '3s'
MinIncomingConfirmations = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ChainID = '43114'
FinalityDepth = 10
FinalityTagEnabled = true
LinkContractAddress = '0x5947BB275c521040051D82396192181b413227A3'
LogPollInterval = '3s'
MinIncomingConfirmations = 1
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/BSC_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Clique offers finality within (N/2)+1 blocks where N is number of signers
# There are 21 BSC validators so theoretically finality should occur after 21/2+1 = 11 blocks
ChainID = '56'
FinalityTagEnabled = true
LinkContractAddress = '0x404460C6A5EdE2D891e8297795264fDe62ADBB75'
LogPollInterval = '3s'
NoNewHeadsThreshold = '30s'
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/BSC_Testnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Clique offers finality within (N/2)+1 blocks where N is number of signers
# There are 21 BSC validators so theoretically finality should occur after 21/2+1 = 11 blocks
ChainID = '97'
FinalityTagEnabled = true
LinkContractAddress = '0x84b9B910527Ad5C03A9Ca831909E21e236EA7b06'
LogPollInterval = '3s'
NoNewHeadsThreshold = '30s'
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Base_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ChainID = '8453'
ChainType = 'optimismBedrock'
FinalityDepth = 200
FinalityTagEnabled = true
LogPollInterval = '2s'
NoNewHeadsThreshold = '40s'
MinIncomingConfirmations = 1
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Base_Sepolia.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ChainID = '84532'
ChainType = 'optimismBedrock'
FinalityDepth = 200
FinalityTagEnabled = true
LogPollInterval = '2s'
NoNewHeadsThreshold = '40s'
MinIncomingConfirmations = 1
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Ethereum_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ChainID = '1'
FinalityTagEnabled = true
LinkContractAddress = '0x514910771AF9Ca656af840dff83E8264EcF986CA'
MinContractPayment = '0.1 link'
OperatorFactoryAddress = '0x3E64Cd889482443324F91bFA9c84fE72A511f48A'
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Ethereum_Sepolia.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ChainID = '11155111'
FinalityTagEnabled = true
LinkContractAddress = '0x779877A7B0D9E8603169DdbD7836e478b4624789'
MinContractPayment = '0.1 link'

Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Kroma_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ChainID = '255'
ChainType = 'kroma' # Kroma is based on the Optimism Bedrock architechture
FinalityDepth = 400
FinalityTagEnabled = true
LogPollInterval = '2s'
NoNewHeadsThreshold = '40s'
MinIncomingConfirmations = 1
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Kroma_Sepolia.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ChainID = '2358'
ChainType = 'kroma' # Kroma is based on the Optimism Bedrock architechture
FinalityDepth = 400
FinalityTagEnabled = true
LogPollInterval = '2s'
NoNewHeadsThreshold = '40s'
MinIncomingConfirmations = 1
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Metis_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ChainID = '1088'
ChainType = 'metis'
# Sequencer offers absolute finality
FinalityDepth = 10
FinalityTagEnabled = true
MinIncomingConfirmations = 1
NoNewHeadsThreshold = '0'
OCR.ContractConfirmations = 1
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Metis_Sepolia.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ChainID = '59902'
ChainType = 'metis'
FinalityDepth = 10
FinalityTagEnabled = true
MinIncomingConfirmations = 1
NoNewHeadsThreshold = '0'
OCR.ContractConfirmations = 1
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Optimism_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ChainID = '10'
ChainType = 'optimismBedrock'
FinalityDepth = 200
FinalityTagEnabled = true
LinkContractAddress = '0x350a791Bfc2C21F9Ed5d10980Dad2e2638ffa7f6'
LogPollInterval = '2s'
NoNewHeadsThreshold = '40s'
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Optimism_Sepolia.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ChainID = '11155420'
ChainType = 'optimismBedrock'
FinalityDepth = 200
FinalityTagEnabled = true
LogPollInterval = '2s'
NoNewHeadsThreshold = '40s'
MinIncomingConfirmations = 1
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/Polygon_Mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ChainID = '137'
# It is quite common to see re-orgs on polygon go several hundred blocks deep. See: https://polygonscan.com/blocks_forked
FinalityDepth = 500
FinalityTagEnabled = true
LinkContractAddress = '0xb0897686c545045aFc77CF20eC7A532E3120E0F1'
LogPollInterval = '1s'
MinIncomingConfirmations = 5
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/WeMix_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ChainID = '1111'
ChainType = 'wemix'
FinalityDepth = 10
FinalityTagEnabled = true
MinIncomingConfirmations = 1
# WeMix emits a block every 1 second, regardless of transactions
LogPollInterval = '3s'
Expand Down
1 change: 1 addition & 0 deletions core/chains/evm/config/toml/defaults/WeMix_Testnet.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ChainID = '1112'
ChainType = 'wemix'
FinalityDepth = 10
FinalityTagEnabled = true
MinIncomingConfirmations = 1
# WeMix emits a block every 1 second, regardless of transactions
LogPollInterval = '3s'
Expand Down
6 changes: 3 additions & 3 deletions core/services/chainlink/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ var (
ChainID: ubig.NewI(1),
Chain: evmcfg.Chain{
FinalityDepth: ptr[uint32](26),
FinalityTagEnabled: ptr[bool](false),
FinalityTagEnabled: ptr[bool](true),
FinalizedBlockOffset: ptr[uint32](12),
},
Nodes: []*evmcfg.Node{
Expand Down Expand Up @@ -534,7 +534,7 @@ func TestConfig_Marshal(t *testing.T) {
BlockBackfillSkip: ptr(true),
ChainType: chaintype.NewConfig("Optimism"),
FinalityDepth: ptr[uint32](42),
FinalityTagEnabled: ptr[bool](false),
FinalityTagEnabled: ptr[bool](true),
FlagsContractAddress: mustAddress("0xae4E781a6218A8031764928E88d457937A954fC3"),
FinalizedBlockOffset: ptr[uint32](16),

Expand Down Expand Up @@ -1024,7 +1024,7 @@ BlockBackfillDepth = 100
BlockBackfillSkip = true
ChainType = 'Optimism'
FinalityDepth = 42
FinalityTagEnabled = false
FinalityTagEnabled = true
FlagsContractAddress = '0xae4E781a6218A8031764928E88d457937A954fC3'
LinkContractAddress = '0x538aAaB4ea120b2bC2fe5D296852D948F07D849e'
LogBackfillBatchSize = 17
Expand Down
2 changes: 1 addition & 1 deletion core/services/chainlink/testdata/config-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ BlockBackfillDepth = 100
BlockBackfillSkip = true
ChainType = 'Optimism'
FinalityDepth = 42
FinalityTagEnabled = false
FinalityTagEnabled = true
FlagsContractAddress = '0xae4E781a6218A8031764928E88d457937A954fC3'
LinkContractAddress = '0x538aAaB4ea120b2bC2fe5D296852D948F07D849e'
LogBackfillBatchSize = 17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ AutoCreateKey = true
BlockBackfillDepth = 10
BlockBackfillSkip = false
FinalityDepth = 26
FinalityTagEnabled = false
FinalityTagEnabled = true
LinkContractAddress = '0x514910771AF9Ca656af840dff83E8264EcF986CA'
LogBackfillBatchSize = 1000
LogPollInterval = '15s'
Expand Down Expand Up @@ -506,7 +506,7 @@ AutoCreateKey = true
BlockBackfillDepth = 10
BlockBackfillSkip = false
FinalityDepth = 500
FinalityTagEnabled = false
FinalityTagEnabled = true
LinkContractAddress = '0xb0897686c545045aFc77CF20eC7A532E3120E0F1'
LogBackfillBatchSize = 1000
LogPollInterval = '1s'
Expand Down
2 changes: 1 addition & 1 deletion core/services/chainlink/testdata/config-multi-chain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CPUProfileRate = 7
[[EVM]]
ChainID = '1'
FinalityDepth = 26
FinalityTagEnabled = false
FinalityTagEnabled = true
FinalizedBlockOffset = 12

[[EVM.Nodes]]
Expand Down
2 changes: 1 addition & 1 deletion core/web/resolver/testdata/config-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ BlockBackfillDepth = 100
BlockBackfillSkip = true
ChainType = 'Optimism'
FinalityDepth = 42
FinalityTagEnabled = false
FinalityTagEnabled = true
FlagsContractAddress = '0xae4E781a6218A8031764928E88d457937A954fC3'
LinkContractAddress = '0x538aAaB4ea120b2bC2fe5D296852D948F07D849e'
LogBackfillBatchSize = 17
Expand Down
4 changes: 2 additions & 2 deletions core/web/resolver/testdata/config-multi-chain-effective.toml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ AutoCreateKey = true
BlockBackfillDepth = 10
BlockBackfillSkip = false
FinalityDepth = 26
FinalityTagEnabled = false
FinalityTagEnabled = true
LinkContractAddress = '0x514910771AF9Ca656af840dff83E8264EcF986CA'
LogBackfillBatchSize = 1000
LogPollInterval = '15s'
Expand Down Expand Up @@ -506,7 +506,7 @@ AutoCreateKey = true
BlockBackfillDepth = 10
BlockBackfillSkip = false
FinalityDepth = 500
FinalityTagEnabled = false
FinalityTagEnabled = true
LinkContractAddress = '0xb0897686c545045aFc77CF20eC7A532E3120E0F1'
LogBackfillBatchSize = 1000
LogPollInterval = '1s'
Expand Down
2 changes: 1 addition & 1 deletion core/web/resolver/testdata/config-multi-chain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CPUProfileRate = 7
[[EVM]]
ChainID = '1'
FinalityDepth = 26
FinalityTagEnabled = false
FinalityTagEnabled = true
FinalizedBlockOffset = 0

[EVM.OCR2]
Expand Down
Loading

0 comments on commit 2c16f46

Please sign in to comment.