Traffic-Based App Rewards: Integrate the Reward Computation Trigger with the necessary daml contracts#5119
Conversation
2da39fa to
9a37516
Compare
Signed-off-by: Tim Emiola <[email protected]>
Signed-off-by: Tim Emiola <[email protected]>
…undByNumber Signed-off-by: Tim Emiola <[email protected]>
Signed-off-by: Tim Emiola <[email protected]>
Signed-off-by: Tim Emiola <[email protected]>
Signed-off-by: Tim Emiola <[email protected]>
93367ef to
fd731a7
Compare
Signed-off-by: Divam <[email protected]>
Signed-off-by: Tim Emiola <[email protected]>
Signed-off-by: Tim Emiola <[email protected]>
f1fc9f1 to
eb9c129
Compare
…active Signed-off-by: Tim Emiola <[email protected]>
66999de to
6a390ef
Compare
Signed-off-by: Tim Emiola <[email protected]>
Signed-off-by: Tim Emiola <[email protected]>
5b32f44 to
68c9cb7
Compare
Signed-off-by: Tim Emiola <[email protected]>
| Seq.empty | ||
| case Some(contract) => | ||
| RewardComputationInputs.fromOpenMiningRound(contract.payload) match { | ||
| case None => |
There was a problem hiding this comment.
We have an issue here, the round checked here will actually never get skipped and will block the trigger to process further rounds.
I modified my integ test to add, and then remove rewardConfig from amulet config, and confirmed that trigger gets stuck.
We have to make sure we skip here as the mainnet has been running reward computation, and that will cause latestCompleteO to be Some even in absence of rewardConfig.
There was a problem hiding this comment.
Actually using earliestRoundWithRewardConfig(Some roundNumber, latestCompleteO) here should work right?
Perhaps we could re-structure the code such that finding the correct round with config is done at both places with single generalized API
There was a problem hiding this comment.
Based on response by Simon yesterday on the doc, we dont need to handle this scenario right now. So lets make sure we truncate the tables on feature branch
Contributes to #4383
Stacked on #5060
This integrates the RewardComputationTrigger with the Daml contracts from which it obtains the values it uses in its calculations
Pull Request Checklist
Cluster Testing
/cluster_teston this PR to request it, and ping someone with access to the DA-internal system to approve it./hdm_teston this PR to request it, and ping someone with access to the DA-internal system to approve it./lsu_teston this PR to request it, and ping someone with access to the DA-internal system to approve it.PR Guidelines
Fixes #n, and mention issues worked on using#nMerge Guidelines