Skip to content

Fix VoteRequest created_at to use original proposal time (#3453)#6458

Open
puneetfinoa wants to merge 1 commit into
canton-network:mainfrom
Finoa-Consensus-Services:sv-backend/3453
Open

Fix VoteRequest created_at to use original proposal time (#3453)#6458
puneetfinoa wants to merge 1 commit into
canton-network:mainfrom
Finoa-Consensus-Services:sv-backend/3453

Conversation

@puneetfinoa

Copy link
Copy Markdown
Contributor

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

  • CastVote archives and recreates the VoteRequest, so ACS created_at becomes the latest vote/recreation time instead of the original proposal time.
  • Resolve original create time from Scan update history (update_history_creates) before serializing vote-request HTTP responses.
  • SV operator list proxies Scan’s already-corrected list; do not use ACS lookupDsoRulesVoteRequest or close-only VoteRequestTxLogEntry for open Action Required rows.

Changes

  • Shared correction in HttpVotesHandler when trackingCid ≠ contractId (VoteRequestContractUtil).
  • Scan implements voteRequestOriginalCreatedAt via updateHistory.lookupContractById.
  • SV operator uses history-backed Scan lookup / list; public handler stubs to None.
  • Unit tests for VoteRequestContractUtil.

Pull Request Checklist

Cluster Testing

  • If a cluster test is required, comment /cluster_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If an upgrade test is required, comment /upgrade_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a hard-migration test is required (from the latest release), comment /hdm_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a logical synchronizer upgrade test is required (from canton-3.5), comment /lsu_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.

PR Guidelines

  • Include any change that might be observable by our partners or affect their deployment in the release notes.
  • Specify fixed issues with Fixes #n, and mention issues worked on using #n
  • Include a screenshot for frontend-related PRs - see README or use your favorite screenshot tool

Merge Guidelines

  • Make the git commit message look sensible when squash-merging on GitHub (most likely: just copy your PR description).

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only vote history remains but it will be in a different store. tx log will completely go.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ray-roestenburg-da Thanks for your message, we will update the team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Correct "Created at" field display in governance-beta UI

5 participants