diff --git a/integration-tests/smoke/ccip/ccip_message_limitations_test.go b/integration-tests/smoke/ccip/ccip_message_limitations_test.go index 14f63f4cda9..6b7e8a5c6cb 100644 --- a/integration-tests/smoke/ccip/ccip_message_limitations_test.go +++ b/integration-tests/smoke/ccip/ccip_message_limitations_test.go @@ -54,19 +54,52 @@ func Test_CCIPMessageLimitations(t *testing.T) { expRevert bool }{ { - name: "hit limit on maxDataBytes, tokens, gasLimit should succeed", + name: "hit limit on data", fromChain: chains[0], toChain: chains[1], msg: router.ClientEVM2AnyMessage{ Receiver: common.LeftPadBytes(onChainState.Chains[chains[1]].Receiver.Address().Bytes(), 32), Data: []byte(strings.Repeat("0", int(chain0DestConfig.MaxDataBytes))), + FeeToken: common.HexToAddress("0x0"), + }, + }, + { + name: "hit limit on tokens", + fromChain: chains[0], + toChain: chains[1], + msg: router.ClientEVM2AnyMessage{ + Receiver: common.LeftPadBytes(onChainState.Chains[chains[1]].Receiver.Address().Bytes(), 32), TokenAmounts: slices.Repeat([]router.ClientEVMTokenAmount{ {Token: srcToken.Address(), Amount: big.NewInt(1)}, }, int(chain0DestConfig.MaxNumberOfTokensPerMsg)), + FeeToken: common.HexToAddress("0x0"), + }, + }, + { + name: "hit limit on gas limit", + fromChain: chains[0], + toChain: chains[1], + msg: router.ClientEVM2AnyMessage{ + Receiver: common.LeftPadBytes(onChainState.Chains[chains[1]].Receiver.Address().Bytes(), 32), + Data: []byte(strings.Repeat("0", int(chain0DestConfig.MaxDataBytes))), FeeToken: common.HexToAddress("0x0"), ExtraArgs: changeset.MakeEVMExtraArgsV2(uint64(chain0DestConfig.MaxPerMsgGasLimit), true), }, }, + //{ // TODO: exec plugin never executed this message. + // name: "hit limit on maxDataBytes, tokens, gasLimit should succeed", + // fromChain: chains[0], + // toChain: chains[1], + // msg: router.ClientEVM2AnyMessage{ + // Receiver: common.LeftPadBytes(onChainState.Chains[chains[1]].Receiver.Address().Bytes(), 32), + // Data: []byte(strings.Repeat("0", int(chain0DestConfig.MaxDataBytes))), + // TokenAmounts: slices.Repeat([]router.ClientEVMTokenAmount{ + // {Token: srcToken.Address(), Amount: big.NewInt(1)}, + // }, int(chain0DestConfig.MaxNumberOfTokensPerMsg)), + // FeeToken: common.HexToAddress("0x0"), + // ExtraArgs: changeset.MakeEVMExtraArgsV2(uint64(chain0DestConfig.MaxPerMsgGasLimit), true), + // }, + //}, { name: "exceeding maxDataBytes", fromChain: chains[0], @@ -116,18 +149,22 @@ func Test_CCIPMessageLimitations(t *testing.T) { expectedSeqNum := make(map[changeset.SourceDestPair]uint64) expectedSeqNumExec := make(map[changeset.SourceDestPair][]uint64) for _, msg := range testMsgs { + t.Logf("Sending msg: %s", msg.name) require.NotEqual(t, msg.fromChain, msg.toChain, "fromChain and toChain cannot be the same") startBlocks[msg.toChain] = nil msgSentEvent, err := changeset.DoSendRequest( t, testEnv.Env, onChainState, msg.fromChain, msg.toChain, false, msg.msg) if msg.expRevert { + t.Logf("Message reverted as expected") require.Error(t, err) require.Contains(t, err.Error(), "execution reverted") continue } require.NoError(t, err) + t.Logf("Message not reverted as expected") + expectedSeqNum[changeset.SourceDestPair{ SourceChainSelector: msg.fromChain, DestChainSelector: msg.toChain, @@ -141,16 +178,6 @@ func Test_CCIPMessageLimitations(t *testing.T) { // Wait for all commit reports to land. changeset.ConfirmCommitForAllWithExpectedSeqNums(t, testEnv.Env, onChainState, expectedSeqNum, startBlocks) - - // After commit is reported on all chains, token prices should be updated in FeeQuoter. - for dest := range testEnv.Env.Chains { - linkAddress := onChainState.Chains[dest].LinkToken.Address() - feeQuoter := onChainState.Chains[dest].FeeQuoter - timestampedPrice, err := feeQuoter.GetTokenPrice(nil, linkAddress) - require.NoError(t, err) - require.Equal(t, changeset.MockLinkPrice, timestampedPrice.Value) - } - // Wait for all exec reports to land changeset.ConfirmExecWithSeqNrsForAll(t, testEnv.Env, onChainState, expectedSeqNumExec, startBlocks) }