-
Notifications
You must be signed in to change notification settings - Fork 78
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
Fix: Transfer debt #1615
Merged
Merged
Fix: Transfer debt #1615
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hieronx
previously approved these changes
Nov 21, 2023
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.
@lemunozm should approve but LGTM!
lemunozm
previously approved these changes
Nov 21, 2023
pallets/pool-system/src/impls.rs
Outdated
Comment on lines
409
to
411
// NOTE: Essentially, this key-generation allows to override previously | ||
// submitted changes, if they are identical. | ||
let change_id: Self::ChangeId = T::Hashing::hash(&change.encode()); |
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 like it!
wischli
added
I3-annoyance
The code behaves as expected, but "expected" is an issue.
P7-asap
Issue should be addressed in the next days.
D2-notify
Pull request can be merged and notification about changes should be documented.
labels
Nov 21, 2023
lemunozm
previously approved these changes
Nov 21, 2023
hieronx
approved these changes
Nov 21, 2023
mustermeiszer
force-pushed
the
fix/transfer-debt
branch
from
November 21, 2023 12:28
c35d0b7
to
0ff3728
Compare
hieronx
previously approved these changes
Nov 21, 2023
lemunozm
approved these changes
Nov 21, 2023
wischli
pushed a commit
that referenced
this pull request
Nov 22, 2023
* fix: blocking transfer debt by epoch and redemptions. * feat: make change_id deterministic * fix: build
wischli
added a commit
that referenced
this pull request
Dec 7, 2023
* feat: new weights altair * feat: new weights centrifuge * wip * migrations: Add migration for account data * migrations: Adjust pre upgrade logic for accounts * migrations: Log total count for accounts * migrations: Log total count for accounts with frozen and reserved balance * deps: Remove double orml-tokens dep * migrations: Add test account data for balances * fix: account info checks * fix: local docker setup * CI release bug fixes (#1611) * Fix main branch detection for docker build * Try out GHA for Pages deployment * Docker build clean up workflow * publish docker in all non-PR events * fix docs cache (github token) * Deploy docs only from main branch * revert docker build machine size * Fix: Transfer debt (#1615) * fix: blocking transfer debt by epoch and redemptions. * feat: make change_id deterministic * fix: build * chore(deps): bump google-github-actions/auth from 1.1.1 to 1.2.0 (#1614) Bumps [google-github-actions/auth](https://github.com/google-github-actions/auth) from 1.1.1 to 1.2.0. - [Release notes](https://github.com/google-github-actions/auth/releases) - [Changelog](https://github.com/google-github-actions/auth/blob/main/CHANGELOG.md) - [Commits](google-github-actions/auth@35b0e87...f105ef0) --- updated-dependencies: - dependency-name: google-github-actions/auth dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Guillermo Perez <gpmayorga@users.noreply.github.com> * fix: minor stuff balances migration * chore: bump development version, rm dummy migration * chore: bump MaxFeedValues from 10 to 500 * fix: toml versions * fix: remove balance migration from runtimes * refactor: remove balance migration from codebase * chore: update dev weights * chore: update cfg weights * chore: altair weights * fix: enable XCM benches for dev * chore: bump dev to 1035 chore: bump lock * fix: missed renaming fix: weights fix: allowlist weights * chore: bump client to 0.10.35 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: cdamian <17934949+cdamian@users.noreply.github.com> Co-authored-by: William Freudenberger <w.freude@icloud.com> Co-authored-by: Guillermo Perez <gpmayorga@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
D2-notify
Pull request can be merged and notification about changes should be documented.
I3-annoyance
The code behaves as expected, but "expected" is an issue.
P7-asap
Issue should be addressed in the next days.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Issuers need to have the possibility to transfer debt between loans without restrictions. In the future we might add restrictions back, but based on a per pool setup, so investors know for each pool what to expect.
Fixes issues that our issuers are having.
Furthermore, this change allows to deterministically derive a
ChangeId
for a given proposed change, as we exclude the time of submission from the hash. This means, that equal changes will overwrite past onces, but that is fine as it just means we are extending the time of execution for that change.Changes and Descriptions
ChangeId
nowBlake256(Change)
Change::TransferDebt
has no restrictionsChecklist: