Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable fee boosting integration test #15704

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions integration-tests/smoke/ccip/ccip_fee_boosting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/pkg/errors"

"github.com/smartcontractkit/chainlink-common/pkg/config"
commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset"
testsetups "github.com/smartcontractkit/chainlink/integration-tests/testsetups/ccip"

Expand All @@ -17,7 +18,6 @@ import (
"github.com/test-go/testify/require"
"golang.org/x/exp/maps"

"github.com/smartcontractkit/chainlink-common/pkg/utils/tests"
"github.com/smartcontractkit/chainlink-testing-framework/lib/utils/testcontext"

"github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipevm"
Expand All @@ -39,20 +39,17 @@ var (
func Test_CCIPFeeBoosting(t *testing.T) {
e, _ := testsetups.NewIntegrationEnvironment(
t,
// TODO check if test should use these overrides
/* changeset.WithOCRConfigOverride(func(params changeset.CCIPOCRParams) changeset.CCIPOCRParams {
// Only 1 boost (=OCR round) is enough to cover the fee
params.ExecuteOffChainConfig.RelativeBoostPerWaitHour = 10
// Disable token price updates
params.CommitOffChainConfig.TokenPriceBatchWriteFrequency = *config.MustNewDuration(1_000_000 * time.Hour)
// Disable gas price updates
params.CommitOffChainConfig.RemoteGasPriceBatchWriteFrequency = *config.MustNewDuration(1_000_000 * time.Hour)
// Disable token price updates
params.CommitOffChainConfig.TokenInfo = nil
return params
}),

*/
changeset.WithOCRConfigOverride(func(params changeset.CCIPOCRParams) changeset.CCIPOCRParams {
// Only 1 boost (=OCR round) is enough to cover the fee
params.ExecuteOffChainConfig.RelativeBoostPerWaitHour = 10
// Disable token price updates
params.CommitOffChainConfig.TokenPriceBatchWriteFrequency = *config.MustNewDuration(1_000_000 * time.Hour)
// Disable gas price updates
params.CommitOffChainConfig.RemoteGasPriceBatchWriteFrequency = *config.MustNewDuration(1_000_000 * time.Hour)
// Disable token price updates
params.CommitOffChainConfig.TokenInfo = nil
return params
}),
)

state, err := changeset.LoadOnchainState(e.Env)
Expand All @@ -69,7 +66,9 @@ func Test_CCIPFeeBoosting(t *testing.T) {
", dest chain selector:", destChain,
)

fetchedGasPriceDest, err := e.Env.Chains[destChain].Client.SuggestGasPrice(tests.Context(t))
// TODO: discrepancy between client and the gas estimator gas price to be fixed - hardcoded for now
// fetchedGasPriceDest, err := e.Env.Chains[destChain].Client.SuggestGasPrice(tests.Context(t))
fetchedGasPriceDest := big.NewInt(20e9) // 20 Gwei = default gas price
require.NoError(t, err)
originalGasPriceDestUSD := new(big.Int).Div(
new(big.Int).Mul(fetchedGasPriceDest, wethPrice),
Expand Down
Loading