-
Notifications
You must be signed in to change notification settings - Fork 59
Daml: Fix ClaimExpiredRewards for ValidatorLicense weight #3181
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
Daml: Fix ClaimExpiredRewards for ValidatorLicense weight #3181
Conversation
|
@dfordivam apologies, I clicked the wrong CI approve button. Closing and reopening your PR in an attempt to fix this... |
Oh nvm, there is nothing to approve here because your merge target is not splice main... apologies for the confusion... |
1a27ddd to
2adf6e1
Compare
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.
Thanks a lot. I'm inclined to go for the fetch-based solution to keep the code change more local. wdyt?
| expiredValidatorLivenessActivityRecords <- forA (fromOptional [] optValidatorLivenessActivityRecordCids) $ \validatorLivenessActivityRecordCid -> do | ||
| expireResult <- exercise validatorLivenessActivityRecordCid ValidatorLivenessActivityRecord_DsoExpire_V2 with closedRoundCid | ||
| return expireResult.weight |
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 know the original code is alrady duplicated. However, if we go for the fetch solution, then it would be quite nice if we shared that code between AmuletRules and DsoRules.
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.
The TODO in DsoRules says that AmuletRules should be deprecated, since we are going to update splice-amulet, this may be a good opportunity to do this.
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 code had to make use of fetchUncheckedButArchiveLater, due to the reasons specified in comment.
-- We need to fetch the weight, and would also prefer doing DsoExpire
-- We can't do checked fetch as the owner is the validator
-- hence can't use either fetchAndArchive or fetchUncheckedAndArchive
|
The static check failed with this error, so I will make fixes to PR then request another CI run |
Ugh! @isegall-da are we leaking storage? |
I don't think "leaking" per-se, as this is ephemeral storage for each runner, but definitely looks like we're exhausting the storage that we're allocating. I'll take a look. |
|
@dfordivam you might have just given me a clue to some mysterious CI failures we've been having recently, maybe they're all just "out of disk space" materializing in different ways... |
The good news is that I found the other issue. The bad news is that it's unrelated to your out-of-space issue. The problem with the latter is that it's on a github-hosted runner, so honestly I'm unsure if and what we can do about that running out of space 🤔 |
PR reviewed in hyperledger-labs#2903 CI run hyperledger-labs#3093 Squash commit created by rebasing 5e8d90e7f over f47f017 Signed-off-by: Divam <dfordivam@gmail.com>
Signed-off-by: Divam <dfordivam@gmail.com>
…wards Signed-off-by: Divam <dfordivam@gmail.com>
Signed-off-by: Divam <dfordivam@gmail.com>
Signed-off-by: Divam <dfordivam@gmail.com>
Signed-off-by: Divam <dfordivam@gmail.com>
Signed-off-by: Divam <dfordivam@gmail.com>
Signed-off-by: Divam <dfordivam@gmail.com>
2adf6e1 to
5612a48
Compare
2c829da to
0f126e6
Compare
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.
Thanks! Looks great!
Signed-off-by: Divam <dfordivam@gmail.com>
Signed-off-by: Divam <dfordivam@gmail.com>
And deprecate AmuletRules_ClaimExpiredRewards PR reviewed in hyperledger-labs#3181 CI run hyperledger-labs#3191 Squashed commit created from 9d61519~18ce4659 Signed-off-by: Divam <dfordivam@gmail.com>
0f126e6 to
4864f05
Compare
|
Closing as this has now been merged into the integration branch |
And deprecate AmuletRules_ClaimExpiredRewards PR reviewed in hyperledger-labs#3181 CI run hyperledger-labs#3191 Squashed commit created from 9d61519~18ce4659 Signed-off-by: Divam <dfordivam@gmail.com>
Fixes : #2902
This contains fixes to
DsoRules_ClaimExpiredRewardsnecessary with the introduction of weight to theValidatorLicense.The
AmuletRules_ClaimExpiredRewardschoice has been deprecated as it was already marked for deprecation.The unit tests for
DsoRules_ClaimExpiredRewardswere missing insplice-dso-governance-test, so they have been added