-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/BCFR-1086-finality-violation
# Conflicts: # core/scripts/go.sum # deployment/go.mod # deployment/go.sum # go.mod # go.sum # integration-tests/go.mod # integration-tests/go.sum # integration-tests/load/go.sum
- Loading branch information
Showing
37 changed files
with
970 additions
and
1,240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"chainlink": patch | ||
--- | ||
|
||
#added Lens Sepolia config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"chainlink": patch | ||
--- | ||
|
||
Added new fatal error cases for transactions to the Solana TXM. #added |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
ChainID = "37111" | ||
ChainType = "zksync" | ||
# finality depth for this chain is very inconsistent due to low network traffic. in testing blocks every ~1-2minutes were seen | ||
# confirmed this value with product | ||
FinalityDepth = 40 | ||
FinalityTagEnabled = false | ||
# block rate is dynamic, have seen block times as low as 1s | ||
LogPollInterval = "5s" | ||
# sufficient time for RPC to be labelled out of sync | ||
NoNewHeadsThreshold = "10m" | ||
|
||
[GasEstimator] | ||
EIP1559DynamicFees = false | ||
# limit default set for zk based chains | ||
LimitDefault = 2_500_000_000 | ||
# value given by ds&a | ||
FeeCapDefault = "2000 gwei" | ||
# estimators typically estimated with min of 75 with median of 86 | ||
PriceDefault = "70 gwei" | ||
PriceMax = "2000 gwei" | ||
PriceMin = "70 gwei" | ||
# bump gas aggressively to avoid high amounts of transmit errors | ||
BumpThreshold = 1 | ||
BumpPercent = 40 | ||
|
||
[GasEstimator.DAOracle] | ||
OracleType = 'zksync' | ||
|
||
[Transactions] | ||
ResendAfterThreshold = '7m0s' | ||
|
||
[HeadTracker] | ||
# l1 batching is done every 8hrs with low network activity setting this value to a rough calculation of ~1tx / 2min * 8hrs | ||
HistoryDepth = 250 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ChainID = '2020' | ||
FinalityTagEnabled = true | ||
# Ronin produces blocks every 3 seconds | ||
LogPollInterval = "3s" | ||
NoNewHeadsThreshold = "3m" | ||
LinkContractAddress = '0x3902228D6A3d2Dc44731fD9d45FeE6a61c722D0b' | ||
|
||
[GasEstimator] | ||
# Ronin uses default gas price of 20 gwei https://docs.skymavis.com/mavis/mpc/guides/estimate-gas#overview | ||
Mode = 'FeeHistory' | ||
PriceMax = "1000 gwei" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ChainID = '2021' | ||
FinalityTagEnabled = true | ||
# Ronin produces blocks every 3 seconds | ||
LogPollInterval = "3s" | ||
NoNewHeadsThreshold = "3m" | ||
LinkContractAddress = '0x5bB50A6888ee6a67E22afFDFD9513be7740F1c15' | ||
|
||
[GasEstimator] | ||
# Ronin uses default gas price of 20 gwei https://docs.skymavis.com/mavis/mpc/guides/estimate-gas#overview | ||
Mode = 'FeeHistory' | ||
PriceMax = "1000 gwei" |
1,126 changes: 0 additions & 1,126 deletions
1,126
core/gethwrappers/ccip/generated/ccip_config/ccip_config.go
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package v1_2 | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/ethereum/go-ethereum/common" | ||
|
||
"github.com/smartcontractkit/chainlink/deployment/common/view/types" | ||
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/price_registry_1_2_0" | ||
) | ||
|
||
type PriceRegistryView struct { | ||
types.ContractMetaData | ||
FeeTokens []common.Address `json:"feeTokens"` | ||
StalenessThreshold string `json:"stalenessThreshold"` | ||
Updaters []common.Address `json:"updaters"` | ||
} | ||
|
||
func GeneratePriceRegistryView(pr *price_registry_1_2_0.PriceRegistry) (PriceRegistryView, error) { | ||
if pr == nil { | ||
return PriceRegistryView{}, fmt.Errorf("cannot generate view for nil PriceRegistry") | ||
} | ||
meta, err := types.NewContractMetaData(pr, pr.Address()) | ||
if err != nil { | ||
return PriceRegistryView{}, fmt.Errorf("failed to generate contract metadata for PriceRegistry %s: %w", pr.Address(), err) | ||
} | ||
ft, err := pr.GetFeeTokens(nil) | ||
if err != nil { | ||
return PriceRegistryView{}, fmt.Errorf("failed to get fee tokens %s: %w", pr.Address(), err) | ||
} | ||
st, err := pr.GetStalenessThreshold(nil) | ||
if err != nil { | ||
return PriceRegistryView{}, fmt.Errorf("failed to get staleness threshold %s: %w", pr.Address(), err) | ||
} | ||
updaters, err := pr.GetPriceUpdaters(nil) | ||
if err != nil { | ||
return PriceRegistryView{}, fmt.Errorf("failed to get price updaters %s: %w", pr.Address(), err) | ||
} | ||
return PriceRegistryView{ | ||
ContractMetaData: meta, | ||
FeeTokens: ft, | ||
StalenessThreshold: st.String(), | ||
Updaters: updaters, | ||
}, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package v1_2 | ||
|
||
import ( | ||
"encoding/json" | ||
"testing" | ||
|
||
"github.com/ethereum/go-ethereum/common" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
"go.uber.org/zap/zapcore" | ||
|
||
"github.com/smartcontractkit/chainlink/deployment" | ||
"github.com/smartcontractkit/chainlink/deployment/environment/memory" | ||
"github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/price_registry_1_2_0" | ||
"github.com/smartcontractkit/chainlink/v2/core/logger" | ||
) | ||
|
||
func TestGeneratePriceRegistryView(t *testing.T) { | ||
e := memory.NewMemoryEnvironment(t, logger.TestLogger(t), zapcore.InfoLevel, memory.MemoryEnvironmentConfig{ | ||
Chains: 1, | ||
}) | ||
chain := e.Chains[e.AllChainSelectors()[0]] | ||
f1, f2 := common.HexToAddress("0x1"), common.HexToAddress("0x2") | ||
_, tx, c, err := price_registry_1_2_0.DeployPriceRegistry( | ||
chain.DeployerKey, chain.Client, []common.Address{chain.DeployerKey.From}, []common.Address{f1, f2}, uint32(10)) | ||
_, err = deployment.ConfirmIfNoError(chain, tx, err) | ||
require.NoError(t, err) | ||
|
||
v, err := GeneratePriceRegistryView(c) | ||
require.NoError(t, err) | ||
assert.Equal(t, v.Owner, chain.DeployerKey.From) | ||
assert.Equal(t, v.TypeAndVersion, "PriceRegistry 1.2.0") | ||
assert.Equal(t, v.FeeTokens, []common.Address{f1, f2}) | ||
assert.Equal(t, v.StalenessThreshold, "10") | ||
assert.Equal(t, v.Updaters, []common.Address{chain.DeployerKey.From}) | ||
_, err = json.MarshalIndent(v, "", " ") | ||
require.NoError(t, err) | ||
} |
Oops, something went wrong.