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

Commit 83eb366

Browse files
authored
Merge branch 'ccip-develop' into disable_compat_pipeline
2 parents c0992c0 + 3b50e16 commit 83eb366

File tree

39 files changed

+3868
-80
lines changed

39 files changed

+3868
-80
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

ccip/config/evm/Avalanche_Fuji.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ RPCBlockQueryDelay = 2
1010
NoNewFinalizedHeadsThreshold = '1m'
1111

1212
[GasEstimator]
13-
PriceDefault = '25 gwei'
14-
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
15-
PriceMin = '25 gwei'
13+
PriceMin = '1 gwei'
14+
PriceDefault = '1 gwei'
1615

1716
[GasEstimator.BlockHistory]
1817
BlockHistorySize = 24

ccip/config/evm/Avalanche_Mainnet.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ RPCBlockQueryDelay = 2
1010
NoNewFinalizedHeadsThreshold = '1m'
1111

1212
[GasEstimator]
13-
PriceDefault = '25 gwei'
14-
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
15-
PriceMin = '25 gwei'
13+
PriceMin = '1 gwei'
14+
PriceDefault = '1 gwei'
1615

1716
[GasEstimator.BlockHistory]
1817
# Average block time of 2s

contracts/scripts/native_solc_compile_all_ccip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ compileContract ccip/test/helpers/receivers/MaybeRevertMessageReceiver.sol
9292
compileContract ccip/test/helpers/MultiOCR3Helper.sol
9393
compileContract ccip/test/mocks/MockE2EUSDCTokenMessenger.sol
9494
compileContract ccip/test/mocks/MockE2EUSDCTransmitter.sol
95+
compileContract ccip/test/mocks/MockLBTCTokenPool.sol
9596
compileContract ccip/test/WETH9.sol
9697

9798

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, 8, 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 {
@@ -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)

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ RPCBlockQueryDelay = 2
1010
NoNewFinalizedHeadsThreshold = '1m'
1111

1212
[GasEstimator]
13-
PriceDefault = '25 gwei'
14-
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
15-
PriceMin = '25 gwei'
13+
PriceMin = '1 gwei'
14+
PriceDefault = '1 gwei'
1615

1716
[GasEstimator.BlockHistory]
1817
BlockHistorySize = 24

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ RPCBlockQueryDelay = 2
1010
NoNewFinalizedHeadsThreshold = '1m'
1111

1212
[GasEstimator]
13-
PriceDefault = '25 gwei'
14-
PriceMax = '115792089237316195423570985008687907853269984665.640564039457584007913129639935 tether'
15-
PriceMin = '25 gwei'
13+
PriceMin = '1 gwei'
14+
PriceDefault = '1 gwei'
1615

1716
[GasEstimator.BlockHistory]
1817
# Average block time of 2s
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

0 commit comments

Comments
 (0)