-
Notifications
You must be signed in to change notification settings - Fork 59
Restrict amulet configs to not allow fees #3529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
70beefa to
4c95333
Compare
a30125c to
cbca1ff
Compare
| ) | ||
| } | ||
|
|
||
| "don't collect rewards if their collection is more expensive than they reward in amulets" in { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check does nothing now that you don't pay fees
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to consider adding a check for rewards that are too small probably just some configurable amount that roughly approximates traffic cost. But that seems orthogonal to this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we are lacking the protection wrt spending more traffic to collect the rewards than they are worth. That said: fine to postpone, as that goes away with the app rewards being accumulated directly by the DSO.
cbca1ff to
3e42e23
Compare
| ) | ||
| } | ||
|
|
||
| "don't collect rewards if their collection is more expensive than they reward in amulets" in { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to consider adding a check for rewards that are too small probably just some configurable amount that roughly approximates traffic cost. But that seems orthogonal to this change.
| ) | ||
| } | ||
|
|
||
| "generate app rewards correctly" in { implicit env => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just doesn't make much sense to integration test this and we have daml script tests for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
| } | ||
| } | ||
|
|
||
| "generate rewards for subscriptions" in { implicit env => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no point in integration testing this and it's kind of pointless as a test anyway, who cares if the DSO gets an app reward coupon …
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed.
|
@meiersi-da Finally got all the tests green so should be ready for a review. Not urgent |
meiersi-da
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! What a monumental effort. Thank you! Glad it also burns 2k LoCs 🔥
...ala/org/lfdecentralizedtrust/splice/integration/tests/SplitwellFrontendIntegrationTest.scala
Show resolved
Hide resolved
| ) | ||
| } | ||
|
|
||
| "don't collect rewards if their collection is more expensive than they reward in amulets" in { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we are lacking the protection wrt spending more traffic to collect the rewards than they are worth. That said: fine to postpone, as that goes away with the app rewards being accumulated directly by the DSO.
| ) | ||
| } | ||
|
|
||
| "generate app rewards correctly" in { implicit env => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
| } | ||
| } | ||
|
|
||
| "generate rewards for subscriptions" in { implicit env => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed.
| (unlockedBalance, _) <- userWalletStore.getAmuletBalanceWithHoldingFees( | ||
| round, | ||
| deductHoldingFees = deductHoldingFees, | ||
| deductHoldingFees = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: any reason to not remove the parameter altogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me take a quick look how easy it is to nuke it
3e42e23 to
a9c119f
Compare
[ci] Signed-off-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
a9c119f to
2896359
Compare
[ci]
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.PR Guidelines
Fixes #n, and mention issues worked on using#nMerge Guidelines