Allow admin to expire V2.Allocations using Allocation_Cancel#5746
Conversation
| case (view alloc).expiresAt of | ||
| None -> fail "Cannot expire allocation without an expiry time" | ||
| Some expiresAt -> do | ||
| assertDeadlineExceeded "allocation.expiresAt" expiresAt |
There was a problem hiding this comment.
I don't understand why you need this check. You say you need this to avoid expiry with DSO party as executor. But then the allocation cancel implementation also checks expiry if executors = dso.
There was a problem hiding this comment.
So what I'm worried about is that an SV calls the DsoRules_ExpireAmuletAllocationsV2 with an allocation that has executors = [dso] before the allocation expires. Without this check that would go through; and would for example be a problem for staking: any SV could cancel a stake of any other SV.
There was a problem hiding this comment.
why would that not hit the check you have in the location cancel implementation here https://github.com/canton-network/splice/pull/5746/changes#diff-5fcca8231f70746ca057f213d59f59e978ffc26d2274c345d84beea43c9cf23eR101
There was a problem hiding this comment.
oh because the if is the wrong way around and this only checks if dso is not the executor, I see
7757ea3 to
015c821
Compare
| import Daml.Script | ||
| import DA.Time | ||
|
|
||
| import Splice.Round() |
There was a problem hiding this comment.
Sorted and grouped imports for easier understanding.
| exerciseCmd dsoRulesCid DsoRules_Amulet_ExpireTransferInstructions with | ||
| amuletRulesCid = amuletRulesCid | ||
| transferInsts = expireBatchChoice | ||
| sv = sv1 |
There was a problem hiding this comment.
Looks like your VS code is not automatically trimming trailing whitespace. Consider turning on https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig
so that your setup follows: https://github.com/canton-network/splice/blob/main/.editorconfig
Fixes #5558 [static] Signed-off-by: Simon Meier <simon@digitalasset.com>
015c821 to
0595404
Compare
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