Skip to content

Commit

Permalink
integration-tests/smoke/ccip: increase batch size (#15444)
Browse files Browse the repository at this point in the history
* integration-tests/smoke/ccip: increase batch size

* bump balance of sender

* bump cl-ccip to main

* deployment/ccip/changeset: conform to ChangeSet iface

* Revert "deployment/ccip/changeset: conform to ChangeSet iface"

This reverts commit 449a77d.

* changes

* split into separate tests

* fix lint

* rm comment

* const

* bump to a million
  • Loading branch information
makramkd authored Dec 6, 2024
1 parent 2ed0c03 commit 83a36e9
Show file tree
Hide file tree
Showing 7 changed files with 312 additions and 310 deletions.
13 changes: 0 additions & 13 deletions .github/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -948,19 +948,6 @@ runner-test-matrix:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2
E2E_JD_VERSION: 0.6.0

- id: smoke/ccip/ccip_batching_test.go:*
path: integration-tests/smoke/ccip/ccip_batching_test.go
test_env_type: docker
runs_on: ubuntu-latest
triggers:
- PR E2E Core Tests
- Nightly E2E Tests
test_cmd: cd integration-tests/ && go test smoke/ccip/ccip_batching_test.go -timeout 12m -test.parallel=1 -count=1 -json
pyroscope_env: ci-smoke-ccipv1_6-evm-simulated
test_env_vars:
E2E_TEST_SELECTED_NETWORK: SIMULATED_1,SIMULATED_2,SIMULATED_3
E2E_JD_VERSION: 0.6.0

- id: smoke/ccip/ccip_token_transfer_test.go:*
path: integration-tests/smoke/ccip/ccip_token_transfer_test.go
test_env_type: docker
Expand Down
8 changes: 8 additions & 0 deletions .github/integration-in-memory-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ runner-test-matrix:
triggers:
- PR Integration CCIP Tests
test_cmd: cd integration-tests/smoke/ccip && go test ccip_fee_boosting_test.go -timeout 12m -test.parallel=2 -count=1 -json

- id: smoke/ccip/ccip_batching_test.go:*
path: integration-tests/smoke/ccip/ccip_batching_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
test_cmd: cd integration-tests/smoke/ccip && go test ccip_batching_test.go -timeout 12m -test.parallel=2 -count=1 -json

- id: contracts/ccipreader_test.go:*
path: integration-tests/contracts/ccipreader_test.go
Expand Down
13 changes: 10 additions & 3 deletions deployment/ccip/changeset/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,15 @@ func NewMemoryEnvironmentWithJobsAndContracts(t *testing.T, lggr logger.Logger,
TimelockMinDelay: big.NewInt(0),
}
}
var usdcChains []uint64
if tCfg != nil && tCfg.IsUSDC {
usdcChains = allChains
var (
usdcChains []uint64
isMulticall3 bool
)
if tCfg != nil {
if tCfg.IsUSDC {
usdcChains = allChains
}
isMulticall3 = tCfg.IsMultiCall3
}
// Need to deploy prerequisites first so that we can form the USDC config
// no proposals to be made, timelock can be passed as nil here
Expand All @@ -303,6 +309,7 @@ func NewMemoryEnvironmentWithJobsAndContracts(t *testing.T, lggr logger.Logger,
ChainSelectors: allChains,
Opts: []PrerequisiteOpt{
WithUSDCChains(usdcChains),
WithMulticall3(isMulticall3),
},
},
},
Expand Down
3 changes: 3 additions & 0 deletions deployment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ type Chain struct {
// Note the Sign function can be abstract supporting a variety of key storage mechanisms (e.g. KMS etc).
DeployerKey *bind.TransactOpts
Confirm func(tx *types.Transaction) (uint64, error)
// Users are a set of keys that can be used to interact with the chain.
// These are distinct from the deployer key.
Users []*bind.TransactOpts
}

// Environment represents an instance of a deployed product
Expand Down
6 changes: 3 additions & 3 deletions deployment/environment/memory/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethclient/simulated"
"github.com/ethereum/go-ethereum/params"
"github.com/stretchr/testify/require"

chainsel "github.com/smartcontractkit/chain-selectors"

"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets"
)

type EVMChain struct {
Expand Down Expand Up @@ -66,7 +66,7 @@ func evmChain(t *testing.T, numUsers int) EVMChain {
owner, err := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
require.NoError(t, err)
genesis := types.GenesisAlloc{
owner.From: {Balance: big.NewInt(0).Mul(big.NewInt(700000), big.NewInt(params.Ether))}}
owner.From: {Balance: assets.Ether(1_000_000).ToInt()}}
// create a set of user keys
var users []*bind.TransactOpts
for j := 0; j < numUsers; j++ {
Expand All @@ -75,7 +75,7 @@ func evmChain(t *testing.T, numUsers int) EVMChain {
user, err := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337))
require.NoError(t, err)
users = append(users, user)
genesis[user.From] = types.Account{Balance: big.NewInt(0).Mul(big.NewInt(700000), big.NewInt(params.Ether))}
genesis[user.From] = types.Account{Balance: assets.Ether(1_000_000).ToInt()}
}
// there have to be enough initial funds on each chain to allocate for all the nodes that share the given chain in the test
backend := simulated.NewBackend(genesis, simulated.WithBlockGasLimit(50000000))
Expand Down
1 change: 1 addition & 0 deletions deployment/environment/memory/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func generateMemoryChain(t *testing.T, inputs map[uint64]EVMChain) map[uint64]de
return receipt.BlockNumber.Uint64(), nil
}
},
Users: chain.Users,
}
}
return chains
Expand Down
Loading

0 comments on commit 83a36e9

Please sign in to comment.