From 3a6936f3bb576129e9687713718773fbfe52f408 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Thu, 16 Jul 2026 11:38:51 +0900 Subject: [PATCH 1/3] [ci] Fix calculateRewardsTriggers pause gap in TrafficBasedRewardsTimeBasedIntegrationTest Signed-off-by: Tim Emiola --- ...BasedRewardsTimeBasedIntegrationTest.scala | 75 +++++++++---------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala b/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala index 78309a9912..4c9ea422a9 100644 --- a/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala +++ b/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala @@ -165,40 +165,9 @@ abstract class TrafficBasedRewardsTimeBasedIntegrationTestBase val calculateRewardsDryRunTriggers = activeSvs.map(_.dsoAutomation.trigger[CalculateRewardsDryRunTrigger]) - // 3 initial advances with CalculateRewardsTrigger paused but - // verdict ingestion active, so that the meta row is created and - // bootstrap rounds have activity data available. - setTriggersWithin(triggersToPauseAtStart = - calculateRewardsTriggers ++ calculateRewardsDryRunTriggers - ) { - for (round <- 1 to 3) { - advanceTimeAndWaitForRoundOpening - assertOldestOpenRound(round.toLong) - } - - clue("Bootstrap rounds have zero activity on firstSV (no featured apps yet)") { - assertZeroTotals(sv1ScanBackend, 0L to 2L) - } - - clue("All SVs report zero totals for rounds after bootstrap") { - Seq(sv1ScanBackend, sv2ScanBackend, sv3ScanBackend, sv4ScanBackend).foreach { scan => - assertZeroTotals(scan, 1L to 2L, timeout = 40.seconds) - } - } - } - - // Sequence of actions - // Open rounds | Action - // ------------+-------------------------------------- - // 3, 4 | settle id0, grant venue FAP - // 4, 5 | settle id1, grant alice FAP - // 5, 6 | settle id2, cancel venue FAP - // 6, 7 | settle id3, (total 2 DvP trades) - // 7, 8 | settle id4, (total 3 DvP trades) - // 8, 9 | no-activity - // 9, 10 | settle id5, 1 DvP + 3 direct trades - // 10, 11 | settle id6, (total 5 DvP trades) - // 11, 12 | settle id7, (round not closed) + // CalculateRewardsTrigger is paused for the entire test body so + // that we can confirm CalculateRewardsV2 contracts were created + // for each round before the triggers consume them. val ( updateId0, updateId1, @@ -210,10 +179,40 @@ abstract class TrafficBasedRewardsTimeBasedIntegrationTestBase aliceCreateId, svExpireId, ) = - pauseScanVerdictIngestionWithin(sv1ScanBackend) { - setTriggersWithin(triggersToPauseAtStart = - calculateRewardsTriggers ++ calculateRewardsDryRunTriggers - ) { + setTriggersWithin(triggersToPauseAtStart = + calculateRewardsTriggers ++ calculateRewardsDryRunTriggers + ) { + // 3 initial advances with verdict ingestion active, so that the + // meta row is created and bootstrap rounds have activity data + // available. + for (round <- 1 to 3) { + advanceTimeAndWaitForRoundOpening + assertOldestOpenRound(round.toLong) + } + + clue("Bootstrap rounds have zero activity on firstSV (no featured apps yet)") { + assertZeroTotals(sv1ScanBackend, 0L to 2L) + } + + clue("All SVs report zero totals for rounds after bootstrap") { + Seq(sv1ScanBackend, sv2ScanBackend, sv3ScanBackend, sv4ScanBackend).foreach { scan => + assertZeroTotals(scan, 1L to 2L, timeout = 40.seconds) + } + } + + // Sequence of actions + // Open rounds | Action + // ------------+-------------------------------------- + // 3, 4 | settle id0, grant venue FAP + // 4, 5 | settle id1, grant alice FAP + // 5, 6 | settle id2, cancel venue FAP + // 6, 7 | settle id3, (total 2 DvP trades) + // 7, 8 | settle id4, (total 3 DvP trades) + // 8, 9 | no-activity + // 9, 10 | settle id5, 1 DvP + 3 direct trades + // 10, 11 | settle id6, (total 5 DvP trades) + // 11, 12 | settle id7, (round not closed) + pauseScanVerdictIngestionWithin(sv1ScanBackend) { val id0 = settleTrade(aliceParty, bobParty, venueParty) grantFeaturedAppRight(splitwellWalletClient) From 36c8feb9eb601e567995e9bcccd368c377f636c7 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Thu, 16 Jul 2026 12:18:26 +0900 Subject: [PATCH 2/3] [ci] Use advanceRoundsToNextRoundOpening Signed-off-by: Tim Emiola --- .../tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala b/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala index 4c9ea422a9..f567a346fa 100644 --- a/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala +++ b/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala @@ -186,7 +186,7 @@ abstract class TrafficBasedRewardsTimeBasedIntegrationTestBase // meta row is created and bootstrap rounds have activity data // available. for (round <- 1 to 3) { - advanceTimeAndWaitForRoundOpening + advanceRoundsToNextRoundOpening assertOldestOpenRound(round.toLong) } From a9888e0b4e78043e721c6540d36d8ec35c3d8429 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Thu, 16 Jul 2026 13:17:02 +0900 Subject: [PATCH 3/3] [ci] Switch TrafficBasedRewardsTimeBasedIntegrationTest to 1SV topology Signed-off-by: Tim Emiola --- .../TrafficBasedRewardsTimeBasedIntegrationTest.scala | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala b/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala index f567a346fa..1c9e4944a9 100644 --- a/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala +++ b/apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/TrafficBasedRewardsTimeBasedIntegrationTest.scala @@ -84,7 +84,7 @@ abstract class TrafficBasedRewardsTimeBasedIntegrationTestBase override def environmentDefinition: SpliceEnvironmentDefinition = EnvironmentDefinition - .simpleTopology4SvsWithSimTime(this.getClass.getSimpleName) + .simpleTopology1SvWithSimTime(this.getClass.getSimpleName) .withAdditionalSetup(implicit env => { Seq( sv1ValidatorBackend, @@ -194,12 +194,6 @@ abstract class TrafficBasedRewardsTimeBasedIntegrationTestBase assertZeroTotals(sv1ScanBackend, 0L to 2L) } - clue("All SVs report zero totals for rounds after bootstrap") { - Seq(sv1ScanBackend, sv2ScanBackend, sv3ScanBackend, sv4ScanBackend).foreach { scan => - assertZeroTotals(scan, 1L to 2L, timeout = 40.seconds) - } - } - // Sequence of actions // Open rounds | Action // ------------+--------------------------------------