Skip to content

Commit

Permalink
Merge branch 'ccip-develop' into ccip-4408
Browse files Browse the repository at this point in the history
  • Loading branch information
b-gopalswami authored Dec 13, 2024
2 parents e2b7247 + 001a2a4 commit 75d2fad
Show file tree
Hide file tree
Showing 10 changed files with 408 additions and 54 deletions.
8 changes: 3 additions & 5 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Most of the contracts are licensed under the [MIT](https://choosealicense.com/licenses/mit/) license.
An exception to this is the ccip folder, which defaults to be licensed under the [BUSL-1.1](./src/v0.8/ccip/LICENSE.md) license, however, there are a few exceptions

The CCIP repo is licensed under the [BUSL-1.1](./src/v0.8/ccip/LICENSE.md) license, however, there are a few exceptions

- `src/v0.8/ccip/applications/*` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license
- `src/v0.8/ccip/interfaces/*` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license
- `src/v0.8/ccip/libraries/{Client.sol, Internal.sol}` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license
- `src/v0.8/ccip/applications/*` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license
- `src/v0.8/ccip/interfaces/*` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license
- `src/v0.8/ccip/libraries/{Client.sol, Internal.sol}` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license
1 change: 0 additions & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"src/v0.8/vendor/Pausable.sol",
"abi/v0.8/",
"src/v0.8/ccip/LICENSE.md",
"src/v0.8/ccip/LICENSE-MIT.md",
"src/v0.8/ccip/v1.5-CCIP-License-grants.md",
"!src/v0.8/ccip/test/**/*",
"src/v0.8/ccip/test/mocks/**/*",
Expand Down
21 changes: 0 additions & 21 deletions contracts/src/v0.8/ccip/LICENSE-MIT.md

This file was deleted.

8 changes: 5 additions & 3 deletions core/chains/evm/client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,11 @@ var aStar = ClientErrors{
}

var mantle = ClientErrors{
InsufficientEth: regexp.MustCompile(`(: |^)'*insufficient funds for gas \* price \+ value`),
Fatal: regexp.MustCompile(`(: |^)'*invalid sender`),
NonceTooLow: regexp.MustCompile(`(: |^)'*nonce too low`),
InsufficientEth: regexp.MustCompile(`(: |^)'*insufficient funds for gas \* price \+ value`),
Fatal: regexp.MustCompile(`(: |^)'*invalid sender`),
NonceTooLow: regexp.MustCompile(`(: |^)'*nonce too low`),
ReplacementTransactionUnderpriced: regexp.MustCompile(`(: |^)'*replacement transaction underpriced`),
TransactionAlreadyInMempool: regexp.MustCompile(`(: |^)'*already known`),
}

var hederaFatal = regexp.MustCompile(`(: |^)(execution reverted)(:|$) | ^Transaction gas limit '(\d+)' exceeds block gas limit '(\d+)' | ^Transaction gas limit provided '(\d+)' is insufficient of intrinsic gas required '(\d+)' | ^Oversized data:|status INVALID_SIGNATURE`)
Expand Down
2 changes: 2 additions & 0 deletions core/chains/evm/client/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func Test_Eth_Errors(t *testing.T) {
{"gas price too low", false, "Arbitrum"},
{"client error replacement underpriced", true, "tomlConfig"},
{"", false, "tomlConfig"},
{"failed to forward tx to sequencer, please try again. Error message: 'replacement transaction underpriced'", true, "Mantle"},
}

for _, test := range tests {
Expand Down Expand Up @@ -142,6 +143,7 @@ func Test_Eth_Errors(t *testing.T) {
{"ErrorObject { code: ServerError(3), message: \\\"known transaction. transaction with hash 0xf016…ad63 is already in the system\\\", data: Some(RawValue(\\\"0x\\\")) }", true, "zkSync"},
{"client error transaction already in mempool", true, "tomlConfig"},
{"alreadyknown", true, "Gnosis"},
{"failed to forward tx to sequencer, please try again. Error message: 'already known'", true, "Mantle"},
}
for _, test := range tests {
err = evmclient.NewSendErrorS(test.message)
Expand Down
11 changes: 11 additions & 0 deletions core/chains/evm/config/toml/defaults/Bitlayer_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ChainID = '200901'
FinalityTagEnabled = false
FinalityDepth = 21 # confirmed with Bitlayer team and recommended by docs: https://docs.bitlayer.org/docs/Learn/BitlayerNetwork/AboutFinality/#about-finality-at-stage-bitlayer-pos-bitlayer-mainnet-v1

[GasEstimator]
Mode = 'FeeHistory'
EIP1559DynamicFees = false
PriceMax = '1 gwei' # DS&A recommended value
PriceMin = '40 mwei' # During testing, we saw minimum gas prices ~50 mwei
PriceDefault = '1 gwei' # As we set PriceMax to '1 gwei' and PriceDefault must be less than or equal to PriceMax
FeeCapDefault = '1 gwei' # As we set PriceMax to '1 gwei' and FeeCapDefault must be less than or equal to PriceMax
11 changes: 11 additions & 0 deletions core/chains/evm/config/toml/defaults/Bitlayer_Testnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ChainID = '200810'
FinalityTagEnabled = false
FinalityDepth = 21 # confirmed with Bitlayer team and recommended by docs: https://docs.bitlayer.org/docs/Learn/BitlayerNetwork/AboutFinality/#about-finality-at-stage-bitlayer-pos-bitlayer-mainnet-v1

[GasEstimator]
Mode='FeeHistory'
EIP1559DynamicFees = false
PriceMax = '1 gwei' # DS&A recommended value
PriceMin = '40 mwei' # During testing, we saw minimum gas prices ~50 mwei
PriceDefault = '1 gwei' # As we set PriceMax to '1 gwei' and PriceDefault must be less than or equal to PriceMax
FeeCapDefault = '1 gwei' # As we set PriceMax to '1 gwei' and FeeCapDefault must be less than or equal to PriceMax
33 changes: 33 additions & 0 deletions core/chains/evm/config/toml/defaults/Mantle_Mainnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ChainID = '5000'
FinalityTagEnabled = true
FinalityDepth = 1200
ChainType = 'optimismBedrock'
LogPollInterval = '2s'
MinIncomingConfirmations = 1
NoNewFinalizedHeadsThreshold = '40m0s'

[HeadTracker]
HistoryDepth = 1250

[GasEstimator]
PriceMax = '120 gwei'
# Limit values are high as Mantle's GasPrice is in native token (MNT) instead of ETH. Their proprietary TokenRatio parameter is used to adjust fees
LimitDefault = 80_000_000_000
LimitMax = 100_000_000_000
BumpMin = '100 wei'
BumpThreshold = 60
EIP1559DynamicFees = true
FeeCapDefault = '120 gwei'
# Mantle recommends setting Priority Fee to 0 in their docs linked here: https://docs-v2.mantle.xyz/devs/concepts/tx-fee/eip-1559#application-of-eip-1559-in-mantle-v2-tectonic
TipCapDefault = '0 wei'
TipCapMin = '0 wei'

[GasEstimator.BlockHistory]
# Default is 24, which leads to bumpy gas prices. In CCIP
# we want to smooth out the gas prices, so we increase the sample size.
BlockHistorySize = 200
# The formula for FeeCap is (current block base fee * (1.125 ^ EIP1559FeeCapBufferBlocks) + tipcap)
# where tipcap is managed by the block history estimators. In the context of CCIP,
# the gas price is relayed to other changes for quotes so we want accurate/avg not pessimistic values.
# So we set this to zero so FeeCap = baseFee + tipcap.
EIP1559FeeCapBufferBlocks = 0
33 changes: 22 additions & 11 deletions core/chains/evm/config/toml/defaults/Mantle_Sepolia.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
ChainID = '5003'
ChainType = 'optimismBedrock'
# FT and FD are both present here because the dev effort rely only on FinalityTagEnabled are still in progress.
# We expect to be able to rely only on FinalityTagEnabled=true in the short future.
# https://chainlink-core.slack.com/archives/C05CS33N08N/p1715102940763339?thread_ts=1715102478.537529&cid=C05CS33N08N
FinalityDepth = 1200
FinalityTagEnabled = true
FinalityDepth = 1200
ChainType = 'optimismBedrock'
LogPollInterval = '2s'
NoNewHeadsThreshold = '0'
MinIncomingConfirmations = 1
NoNewFinalizedHeadsThreshold = '60m0s'

[HeadTracker]
HistoryDepth = 600
HistoryDepth = 1250

[GasEstimator]
Mode = 'L2Suggested'
PriceMax = '200 gwei'
LimitDefault = 100000000
FeeCapDefault = '200 gwei'
PriceMax = '120 gwei'
# Limit values are high as Mantle's GasPrice is in native token (MNT) instead of ETH. Their proprietary TokenRatio parameter is used to adjust fees
LimitDefault = 80000000000
LimitMax = 100000000000
BumpMin = '100 wei'
BumpPercent = 20
BumpThreshold = 60
EIP1559DynamicFees = true
FeeCapDefault = '120 gwei'
# Mantle reccomends setting Priority Fee to 0 in their docs linked here: https://docs-v2.mantle.xyz/devs/concepts/tx-fee/eip-1559#application-of-eip-1559-in-mantle-v2-tectonic
TipCapDefault = '0 wei'
TipCapMin = '0 wei'

[GasEstimator.BlockHistory]
# Default is 24, which leads to bumpy gas prices. In CCIP
# we want to smooth out the gas prices, so we increase the sample size.
BlockHistorySize = 200
# The formula for FeeCap is (current block base fee * (1.125 ^ EIP1559FeeCapBufferBlocks) + tipcap)
# where tipcap is managed by the block history estimators. In the context of CCIP,
# the gas price is relayed to other changes for quotes so we want accurate/avg not pessimistic values.
# So we set this to zero so FeeCap = baseFee + tipcap.
EIP1559FeeCapBufferBlocks = 0
Loading

0 comments on commit 75d2fad

Please sign in to comment.