Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit 75d2fad

Browse files
authored
Merge branch 'ccip-develop' into ccip-4408
2 parents e2b7247 + 001a2a4 commit 75d2fad

File tree

10 files changed

+408
-54
lines changed

10 files changed

+408
-54
lines changed

contracts/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4747
Most of the contracts are licensed under the [MIT](https://choosealicense.com/licenses/mit/) license.
4848
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
4949

50-
The CCIP repo is licensed under the [BUSL-1.1](./src/v0.8/ccip/LICENSE.md) license, however, there are a few exceptions
51-
52-
- `src/v0.8/ccip/applications/*` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license
53-
- `src/v0.8/ccip/interfaces/*` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license
54-
- `src/v0.8/ccip/libraries/{Client.sol, Internal.sol}` is licensed under the [MIT](./src/v0.8/ccip/LICENSE-MIT.md) license
50+
- `src/v0.8/ccip/applications/*` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license
51+
- `src/v0.8/ccip/interfaces/*` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license
52+
- `src/v0.8/ccip/libraries/{Client.sol, Internal.sol}` is licensed under the [MIT](https://choosealicense.com/licenses/mit/) license

contracts/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"src/v0.8/vendor/Pausable.sol",
4848
"abi/v0.8/",
4949
"src/v0.8/ccip/LICENSE.md",
50-
"src/v0.8/ccip/LICENSE-MIT.md",
5150
"src/v0.8/ccip/v1.5-CCIP-License-grants.md",
5251
"!src/v0.8/ccip/test/**/*",
5352
"src/v0.8/ccip/test/mocks/**/*",

contracts/src/v0.8/ccip/LICENSE-MIT.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

core/chains/evm/client/errors.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,11 @@ var aStar = ClientErrors{
263263
}
264264

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

271273
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`)

core/chains/evm/client/errors_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ func Test_Eth_Errors(t *testing.T) {
110110
{"gas price too low", false, "Arbitrum"},
111111
{"client error replacement underpriced", true, "tomlConfig"},
112112
{"", false, "tomlConfig"},
113+
{"failed to forward tx to sequencer, please try again. Error message: 'replacement transaction underpriced'", true, "Mantle"},
113114
}
114115

115116
for _, test := range tests {
@@ -142,6 +143,7 @@ func Test_Eth_Errors(t *testing.T) {
142143
{"ErrorObject { code: ServerError(3), message: \\\"known transaction. transaction with hash 0xf016…ad63 is already in the system\\\", data: Some(RawValue(\\\"0x\\\")) }", true, "zkSync"},
143144
{"client error transaction already in mempool", true, "tomlConfig"},
144145
{"alreadyknown", true, "Gnosis"},
146+
{"failed to forward tx to sequencer, please try again. Error message: 'already known'", true, "Mantle"},
145147
}
146148
for _, test := range tests {
147149
err = evmclient.NewSendErrorS(test.message)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ChainID = '200901'
2+
FinalityTagEnabled = false
3+
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
4+
5+
[GasEstimator]
6+
Mode = 'FeeHistory'
7+
EIP1559DynamicFees = false
8+
PriceMax = '1 gwei' # DS&A recommended value
9+
PriceMin = '40 mwei' # During testing, we saw minimum gas prices ~50 mwei
10+
PriceDefault = '1 gwei' # As we set PriceMax to '1 gwei' and PriceDefault must be less than or equal to PriceMax
11+
FeeCapDefault = '1 gwei' # As we set PriceMax to '1 gwei' and FeeCapDefault must be less than or equal to PriceMax
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ChainID = '200810'
2+
FinalityTagEnabled = false
3+
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
4+
5+
[GasEstimator]
6+
Mode='FeeHistory'
7+
EIP1559DynamicFees = false
8+
PriceMax = '1 gwei' # DS&A recommended value
9+
PriceMin = '40 mwei' # During testing, we saw minimum gas prices ~50 mwei
10+
PriceDefault = '1 gwei' # As we set PriceMax to '1 gwei' and PriceDefault must be less than or equal to PriceMax
11+
FeeCapDefault = '1 gwei' # As we set PriceMax to '1 gwei' and FeeCapDefault must be less than or equal to PriceMax
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
ChainID = '5000'
2+
FinalityTagEnabled = true
3+
FinalityDepth = 1200
4+
ChainType = 'optimismBedrock'
5+
LogPollInterval = '2s'
6+
MinIncomingConfirmations = 1
7+
NoNewFinalizedHeadsThreshold = '40m0s'
8+
9+
[HeadTracker]
10+
HistoryDepth = 1250
11+
12+
[GasEstimator]
13+
PriceMax = '120 gwei'
14+
# 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
15+
LimitDefault = 80_000_000_000
16+
LimitMax = 100_000_000_000
17+
BumpMin = '100 wei'
18+
BumpThreshold = 60
19+
EIP1559DynamicFees = true
20+
FeeCapDefault = '120 gwei'
21+
# 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
22+
TipCapDefault = '0 wei'
23+
TipCapMin = '0 wei'
24+
25+
[GasEstimator.BlockHistory]
26+
# Default is 24, which leads to bumpy gas prices. In CCIP
27+
# we want to smooth out the gas prices, so we increase the sample size.
28+
BlockHistorySize = 200
29+
# The formula for FeeCap is (current block base fee * (1.125 ^ EIP1559FeeCapBufferBlocks) + tipcap)
30+
# where tipcap is managed by the block history estimators. In the context of CCIP,
31+
# the gas price is relayed to other changes for quotes so we want accurate/avg not pessimistic values.
32+
# So we set this to zero so FeeCap = baseFee + tipcap.
33+
EIP1559FeeCapBufferBlocks = 0
Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
11
ChainID = '5003'
2-
ChainType = 'optimismBedrock'
3-
# FT and FD are both present here because the dev effort rely only on FinalityTagEnabled are still in progress.
4-
# We expect to be able to rely only on FinalityTagEnabled=true in the short future.
5-
# https://chainlink-core.slack.com/archives/C05CS33N08N/p1715102940763339?thread_ts=1715102478.537529&cid=C05CS33N08N
6-
FinalityDepth = 1200
72
FinalityTagEnabled = true
3+
FinalityDepth = 1200
4+
ChainType = 'optimismBedrock'
85
LogPollInterval = '2s'
9-
NoNewHeadsThreshold = '0'
106
MinIncomingConfirmations = 1
7+
NoNewFinalizedHeadsThreshold = '60m0s'
118

129
[HeadTracker]
13-
HistoryDepth = 600
10+
HistoryDepth = 1250
1411

1512
[GasEstimator]
16-
Mode = 'L2Suggested'
17-
PriceMax = '200 gwei'
18-
LimitDefault = 100000000
19-
FeeCapDefault = '200 gwei'
13+
PriceMax = '120 gwei'
14+
# 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
15+
LimitDefault = 80000000000
16+
LimitMax = 100000000000
17+
BumpMin = '100 wei'
18+
BumpPercent = 20
19+
BumpThreshold = 60
20+
EIP1559DynamicFees = true
21+
FeeCapDefault = '120 gwei'
22+
# 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
23+
TipCapDefault = '0 wei'
24+
TipCapMin = '0 wei'
2025

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

0 commit comments

Comments
 (0)