diff --git a/integration-tests/common/common.go b/integration-tests/common/common.go index 3ae27f606..220042fd1 100644 --- a/integration-tests/common/common.go +++ b/integration-tests/common/common.go @@ -13,12 +13,10 @@ import ( "github.com/gagliardetto/solana-go" "github.com/google/uuid" "github.com/lib/pq" - "github.com/rs/zerolog/log" "golang.org/x/crypto/curve25519" "gopkg.in/guregu/null.v4" "github.com/smartcontractkit/libocr/offchainreporting2/confighelper" - "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" "github.com/smartcontractkit/libocr/offchainreporting2/types" ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/config" @@ -29,7 +27,6 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/k8s/pkg/helm/sol" "github.com/smartcontractkit/chainlink/integration-tests/client" - "github.com/smartcontractkit/chainlink/integration-tests/contracts" "github.com/smartcontractkit/chainlink/integration-tests/docker/test_env" "github.com/smartcontractkit/chainlink/v2/core/services/job" @@ -242,47 +239,6 @@ func FundOracles(c *solclient.Client, nkb []client.NodeKeysBundle, amount *big.F return nil } -// OffChainConfigParamsFromNodes creates contracts.OffChainAggregatorV2Config -func OffChainConfigParamsFromNodes(nodeCount int, nkb []client.NodeKeysBundle) (contracts.OffChainAggregatorV2Config, error) { - oi, err := createOracleIdentities(nkb) - if err != nil { - return contracts.OffChainAggregatorV2Config{}, err - } - s := make([]int, 0) - for i := 0; i < nodeCount; i++ { - s = append(s, 1) - } - faultyNodes := 0 - if nodeCount > 1 { - faultyNodes = nodeCount/3 - 1 - } - if faultyNodes == 0 { - faultyNodes = 1 - } - log.Debug().Int("Nodes", faultyNodes).Msg("Faulty nodes") - return contracts.OffChainAggregatorV2Config{ - DeltaProgress: 2 * time.Second, - DeltaResend: 5 * time.Second, - DeltaRound: 1 * time.Second, - DeltaGrace: 500 * time.Millisecond, - DeltaStage: 10 * time.Second, - RMax: 3, - S: s, - Oracles: oi, - ReportingPluginConfig: median.OffchainConfig{ - AlphaReportPPB: uint64(0), - AlphaAcceptPPB: uint64(0), - }.Encode(), - MaxDurationQuery: 20 * time.Millisecond, - MaxDurationObservation: 500 * time.Millisecond, - MaxDurationReport: 500 * time.Millisecond, - MaxDurationShouldAcceptFinalizedReport: 500 * time.Millisecond, - MaxDurationShouldTransmitAcceptedReport: 500 * time.Millisecond, - F: faultyNodes, - OnchainConfig: []byte{}, - }, nil -} - func CreateBridges(ContractsIdxMapToContractsNodeInfo map[int]*ContractNodeInfo, mockURL string, isK8s bool) error { for i, nodesInfo := range ContractsIdxMapToContractsNodeInfo { // Bootstrap node first diff --git a/integration-tests/config/ocr2_config.go b/integration-tests/config/ocr2_config.go index 6524257ec..410a72a86 100644 --- a/integration-tests/config/ocr2_config.go +++ b/integration-tests/config/ocr2_config.go @@ -162,22 +162,22 @@ func (o *OCR2Config) Default() { UserSecret: o.Secret, ProposalID: o.ProposalID, OffchainConfig: OffchainConfig{ - DeltaProgressNanoseconds: int64(20000000000), - DeltaResendNanoseconds: int64(50000000000), - DeltaRoundNanoseconds: int64(1000000000), - DeltaGraceNanoseconds: int64(4000000000), - DeltaStageNanoseconds: int64(50000000000), + DeltaProgressNanoseconds: int64(8000000000), // 8s + DeltaResendNanoseconds: int64(5000000000), // 5s + DeltaRoundNanoseconds: int64(3000000000), // 3s + DeltaGraceNanoseconds: int64(400000000), // 400ms + DeltaStageNanoseconds: int64(10000000000), // 10s RMax: 3, S: s, OffchainPublicKeys: offchainPublicKeys, PeerIds: peerIds, ConfigPublicKeys: configPublicKeys, ReportingPluginConfig: o.OffChainConfig.OffchainConfig.ReportingPluginConfig, - MaxDurationQueryNanoseconds: int64(3000000000), - MaxDurationObservationNanoseconds: int64(3000000000), - MaxDurationReportNanoseconds: int64(100000000), - MaxDurationShouldAcceptFinalizedReportNanoseconds: int64(100000000), - MaxDurationShouldTransmitAcceptedReportNanoseconds: int64(100000000), + MaxDurationQueryNanoseconds: int64(0), + MaxDurationObservationNanoseconds: int64(1000000000), // 1s + MaxDurationReportNanoseconds: int64(1000000000), // 1s + MaxDurationShouldAcceptFinalizedReportNanoseconds: int64(1000000000), // 1s + MaxDurationShouldTransmitAcceptedReportNanoseconds: int64(1000000000), // 1s }, } o.PayeeConfig = &PayeeConfig{ diff --git a/integration-tests/smoke/ocr2_test.go b/integration-tests/smoke/ocr2_test.go index 77ca5d0fa..ca989d3b9 100644 --- a/integration-tests/smoke/ocr2_test.go +++ b/integration-tests/smoke/ocr2_test.go @@ -128,6 +128,7 @@ func TestSolanaOCRV2Smoke(t *testing.T) { RoundID: 0, } for successFullRounds < *config.OCR2.Smoke.NumberOfRounds { + time.Sleep(time.Second * 6) require.Less(t, stuck, 10, "Rounds have been stuck for more than 10 iterations") log.Info().Str("Transmission", sg.OcrAddress).Msg("Inspecting transmissions") transmissions, err := sg.FetchTransmissions(sg.OcrAddress) @@ -151,7 +152,6 @@ func TestSolanaOCRV2Smoke(t *testing.T) { require.Less(t, prevRound.RoundID, currentRound.RoundID, fmt.Sprintf("Expected round %d to be less than %d", prevRound.RoundID, currentRound.RoundID)) prevRound = currentRound successFullRounds++ - time.Sleep(time.Second * 6) stuck = 0 } })