Scan: Reward accounting root-hash and activity-totals return three values#5576
Conversation
Signed-off-by: Divam <dfordivam@gmail.com>
Signed-off-by: Divam <dfordivam@gmail.com>
Signed-off-by: Divam <dfordivam@gmail.com>
|
@meiersi-da This is a small change we discussed last week. I have originally done this as part of my integ test PR, but took this out in this separate PR on The change was in fact necessary to get the CI green by avoiding unnecessary error logging from the |
| ec: ExecutionContext, | ||
| tc: TraceContext, | ||
| ): Future[Option[GetRewardAccountingBatchResponse]] = | ||
| bftCall(_.getRewardAccountingBatch(roundNumber, batchHash)) |
There was a problem hiding this comment.
need to check whether doing BFT calls for this endpoint using the standard code path works as expected, as deviations in the responses are expected. I suspect we might be logging mismatches too aggressively.
Nothing to do right now, but something to be aware of.
There was a problem hiding this comment.
Yes, at the moment this is just to compile the code. When the triggers actually use BFT client, we will have to circle back to these concerns.
Signed-off-by: Divam <dfordivam@gmail.com>
335f110 to
5252d35
Compare
Signed-off-by: Divam <dfordivam@gmail.com>
Modified the following endpoints to return "undetermined" and "cannot-compute" values, in addition to the result.
As discussed last week with Simon and Robert; these are the criterion for the return value selection.
returned if scan does not see any CalculateRewardsContract with a round number <= the queried round
or if the root hash (and associated data) is not found in the store
if scan does not have a complete set of activity records for the round
But in the code the "undetermined" is actually a catch-all case, because even if the
CalculateRewardsV2exist for this round, and the scan is yet to compute the totals, "undetermined" would still work since the sv-app would retry.As these are
internalendpoints, marked as "subject to change", the existing /v0 endpoints have been modified, and PR has no release-notes mention. (original addition of these endpoints also did not have release-notes entry)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