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

Commit ce6f48f

Browse files
authored
Merge branch 'release/2.17.0-ccip1.5' into sish/log-index-cherrypick
2 parents 0229ca9 + 30e5f71 commit ce6f48f

File tree

43 files changed

+4414
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+4414
-133
lines changed

.github/e2e-tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,32 @@ runner-test-matrix:
962962
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
963963
test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/usdc_mock_deployment.toml
964964

965+
- id: ccip-smoke-lbtc-32bytes-destination-pool-data
966+
path: integration-tests/ccip-tests/smoke/ccip_test.go
967+
test_env_type: docker
968+
runs_on: ubuntu-latest
969+
triggers:
970+
- PR E2E CCIP Tests
971+
- Merge Queue E2E CCIP Tests
972+
- Nightly E2E Tests
973+
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPForBidirectionalLane$ -timeout 30m -count=1 -test.parallel=1 -json
974+
test_env_vars:
975+
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
976+
test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/lbtc_mock_deployment_with_32bytes_data.toml
977+
978+
- id: ccip-smoke-lbtc-non32bytes-destination-pool-data
979+
path: integration-tests/ccip-tests/smoke/ccip_test.go
980+
test_env_type: docker
981+
runs_on: ubuntu-latest
982+
triggers:
983+
- PR E2E CCIP Tests
984+
- Merge Queue E2E CCIP Tests
985+
- Nightly E2E Tests
986+
test_cmd: cd integration-tests/ccip-tests/smoke && go test ccip_test.go -test.run ^TestSmokeCCIPForBidirectionalLane$ -timeout 30m -count=1 -test.parallel=1 -json
987+
test_env_vars:
988+
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
989+
test_config_override_path: integration-tests/ccip-tests/testconfig/tomls/lbtc_mock_deployment_with_non32bytes_data.toml
990+
965991
- id: ccip-smoke-db-compatibility
966992
path: integration-tests/ccip-tests/smoke/ccip_test.go
967993
test_env_type: docker

contracts/scripts/native_solc_compile_all_ccip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ compileContract ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol
9696
compileContract ccip/test/helpers/MultiOCR3Helper.sol
9797
compileContract ccip/test/mocks/MockE2EUSDCTokenMessenger.sol
9898
compileContract ccip/test/mocks/MockE2EUSDCTransmitter.sol
99+
compileContract ccip/test/mocks/MockLBTCTokenPool.sol
99100
compileContract ccip/test/WETH9.sol
100101

101102

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// SPDX-License-Identifier: BUSL-1.1
2+
pragma solidity 0.8.24;
3+
4+
import {ITypeAndVersion} from "../../../shared/interfaces/ITypeAndVersion.sol";
5+
import {IBurnMintERC20} from "../../../shared/token/ERC20/IBurnMintERC20.sol";
6+
7+
import {Pool} from "../../libraries/Pool.sol";
8+
import {TokenPool} from "../../pools/TokenPool.sol";
9+
10+
import {IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol";
11+
import {SafeERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol";
12+
13+
/// @notice This mock contract facilitates testing of LBTC token transfers by burning and minting tokens.
14+
contract MockLBTCTokenPool is TokenPool, ITypeAndVersion {
15+
using SafeERC20 for IERC20;
16+
17+
string public constant override typeAndVersion = "MockLBTCTokenPool 1.5.1";
18+
19+
// This variable i_destPoolData will have either a 32-byte or non-32-byte value, which will change the off-chain behavior.
20+
// If it is 32 bytes, the off-chain will consider it as attestation enabled and call the attestation API.
21+
// If it is non-32 bytes, the off-chain will consider it as attestation disabled.
22+
bytes public i_destPoolData;
23+
24+
constructor(
25+
IERC20 token,
26+
address[] memory allowlist,
27+
address rmnProxy,
28+
address router,
29+
bytes memory destPoolData
30+
) TokenPool(token, allowlist, rmnProxy, router) {
31+
i_destPoolData = destPoolData;
32+
}
33+
34+
function lockOrBurn(
35+
Pool.LockOrBurnInV1 calldata lockOrBurnIn
36+
) public virtual override returns (Pool.LockOrBurnOutV1 memory) {
37+
IBurnMintERC20(address(i_token)).burn(lockOrBurnIn.amount);
38+
emit Burned(msg.sender, lockOrBurnIn.amount);
39+
40+
return
41+
Pool.LockOrBurnOutV1({
42+
destTokenAddress: getRemoteToken(
43+
lockOrBurnIn.remoteChainSelector
44+
),
45+
destPoolData: i_destPoolData
46+
});
47+
}
48+
49+
function releaseOrMint(
50+
Pool.ReleaseOrMintInV1 calldata releaseOrMintIn
51+
) public virtual override returns (Pool.ReleaseOrMintOutV1 memory) {
52+
IBurnMintERC20(address(i_token)).mint(releaseOrMintIn.receiver, releaseOrMintIn.amount);
53+
54+
emit Minted(
55+
msg.sender,
56+
releaseOrMintIn.receiver,
57+
releaseOrMintIn.amount
58+
);
59+
60+
return
61+
Pool.ReleaseOrMintOutV1({
62+
destinationAmount: releaseOrMintIn.amount
63+
});
64+
}
65+
}
66+

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 {
@@ -143,6 +144,7 @@ func Test_Eth_Errors(t *testing.T) {
143144
{"client error transaction already in mempool", true, "tomlConfig"},
144145
{"alreadyknown", true, "Gnosis"},
145146
{"tx already exists in cache", true, "Sei"},
147+
{"failed to forward tx to sequencer, please try again. Error message: 'already known'", true, "Mantle"},
146148
}
147149
for _, test := range tests {
148150
err = evmclient.NewSendErrorS(test.message)

core/chains/evm/config/toml/defaults/BOB_Testnet.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ChainID = '808813'
22
# OP stack https://docs.gobob.xyz/learn/introduction/stack-overview#rollup-layer
33
ChainType = 'optimismBedrock'
4-
# finality_depth was: ~850
5-
FinalityDepth = 900
4+
# FinalityDepth in mainnet showed more than 3k
5+
FinalityDepth = 3150
66
# block_time was: 2s, adding 1 second buffer
77
LogPollInterval = '3s'
88

9-
# finality_depth * block_time / 60 secs = ~30 min (finality time)
10-
NoNewFinalizedHeadsThreshold = '35m'
9+
# finality_depth * block_time / 60 secs = ~105 min (finality time)
10+
NoNewFinalizedHeadsThreshold = '110m'
1111

1212
FinalityTagEnabled = true
1313

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)