Skip to content

WIP temporarily add policySwitchoverTime - #9

Draft
dbzguy56 wants to merge 2 commits into
dpak/cip-0105-lifetime-rewards-trackingfrom
dpak/cip-0105-sv-locking-activation-time
Draft

WIP temporarily add policySwitchoverTime#9
dbzguy56 wants to merge 2 commits into
dpak/cip-0105-lifetime-rewards-trackingfrom
dpak/cip-0105-sv-locking-activation-time

Conversation

@dbzguy56

Copy link
Copy Markdown

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

@meiersi-da meiersi-da left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks.

summary <- summarizeTransfer t.sender csum.openRoundNumber csum.amuletPrice csum.config isum osum

case isum.mintedSvRewardMap of
currentRound <- getIssuingMiningRound csum csum.openRoundNumber

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This won't work. A round is never both in the open and issuing state.

I suggest to push the evaluation of activation time to the SvRewardCoupon minting, and only populate mintedSvRewardMap when minting receipts need to be created.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@meiersi-da I guess what we're trying to do here is get a transaction time to compare against the policySwitchoverTime, any idea where we could get the time of when the transfer is effective?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

answered in the call. I'd suggest to use the opensAt of the IssuingMiningRound that is used to collect the SvRewardCoupon.

amuletPrice = externalPartyConfigState.amuletPrice
rewardCalculationVersion = externalPartyConfigState.rewardCalculationVersion
eventLogCid = Some (toInterfaceContractId context.externalPartyConfigState)
, externalPartyConfigState.policySwitchoverTimes

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

push this as a field into TransferContextSummaryV2 so its available everywhere.


transferPreapprovalBaseDuration = None

policySwitchoverTimes = Some TextMap.empty

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
policySwitchoverTimes = Some TextMap.empty
defaultPolicySwitchoverTimes = Some TextMap.empty

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@meiersi-da This function seems to return an AmuletConfig, are you saying we should change the field name in general?

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.

2 participants