Fix VoteRequest created_at to use original proposal time (#3453)#6458
Fix VoteRequest created_at to use original proposal time (#3453)#6458puneetfinoa wants to merge 1 commit into
Conversation
CastVote recreates the ACS contract, so list APIs were returning the latest recreation time. Resolve original create time from Scan update history before serializing vote requests (canton-network#3453). Signed-off-by: Puneet Bharti <puneet.bharti@finoa.io>
| ): Future[Option[java.time.Instant]] = | ||
| // Historical create event — not ACS. ACS lookupDsoRulesVoteRequest returns the current | ||
| // recreated contract after CastVote; VoteRequestTxLogEntry only exists after close. | ||
| updateHistory |
There was a problem hiding this comment.
updateHistory is going to start getting pruned soon(ish).
Can you please check if we have the right information in txLog already, and use it from there instead if so?
(@ray-roestenburg-da the vote history in txLog is planned to remain, i.e. not be pruned, exactly for this purpose, right?)
There was a problem hiding this comment.
only vote history remains but it will be in a different store. tx log will completely go.
There was a problem hiding this comment.
@puneetfinoa Rather not fix this right now. Pruning will change this a lot, it will be easier to fix this once the new votes store is in place in many ways. We'll support the dev fund grant nevertheless, as the investigation effort you have invested already counts.
There was a problem hiding this comment.
Hi @ray-roestenburg-da Thanks for your message, we will update the team.
CastVote recreates the ACS contract, so list APIs were returning the latest recreation time. Resolve original create time from Scan update history before serializing vote requests (#3453).
Fixes #3453
Summary
CastVotearchives and recreates theVoteRequest, so ACScreated_atbecomes the latest vote/recreation time instead of the original proposal time.update_history_creates) before serializing vote-request HTTP responses.lookupDsoRulesVoteRequestor close-onlyVoteRequestTxLogEntryfor open Action Required rows.Changes
HttpVotesHandlerwhentrackingCid ≠ contractId(VoteRequestContractUtil).voteRequestOriginalCreatedAtviaupdateHistory.lookupContractById.None.VoteRequestContractUtil.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./upgrade_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