Skip to content
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

AccountTrace Serialization was done in the wrong order #544

Merged
merged 29 commits into from
Dec 17, 2024

Conversation

Kayanski
Copy link
Contributor

@Kayanski Kayanski commented Nov 21, 2024

This Pr aims at correcting the display and parsing of account traces that was done in the wrong order.

It also changes the way accounts are serialized as keys.
Rationale:
The way Prefixer and KeyDeserialize was implemented is not compatible with cosmwasm-std 2, especially for composite keys. This implementation, didn't take into account the fact that the length of Vec used during serialization needs to be fixed for composite keys to be correctly usable for ranging.
In this Breaking PR, we fix this issue.

This PR is breaking on the account structure. Everything will break (see module migration testing for instance)

Checklist

  • CI is green.
  • Changelog updated.

@Kayanski Kayanski requested a review from Buckram123 November 21, 2024 09:11
Copy link

cloudflare-workers-and-pages bot commented Nov 21, 2024

Deploying abstract-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 10738e3
Status:⚡️  Build in progress...

View logs

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 95.55556% with 4 lines in your changes missing coverage. Please review.

Project coverage is 74.7%. Comparing base (bf989a9) to head (9f7bc8f).
Report is 78 commits behind head on main.

Files with missing lines Patch % Lines
...ges/abstract-std/src/objects/account/account_id.rs 94.4% 2 Missing ⚠️
.../abstract-std/src/objects/account/account_trace.rs 96.1% 2 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...mework/contracts/native/ibc-client/src/contract.rs 95.9% <ø> (-0.6%) ⬇️
framework/contracts/native/ibc-client/src/ibc.rs 100.0% <100.0%> (ø)
...amework/contracts/native/ibc-client/src/queries.rs 89.1% <ø> (-1.0%) ⬇️
framework/contracts/native/registry/src/queries.rs 88.1% <100.0%> (+<0.1%) ⬆️
...ages/abstract-std/src/objects/entry/asset_entry.rs 90.9% <ø> (-7.3%) ⬇️
...es/abstract-std/src/objects/entry/channel_entry.rs 88.0% <ø> (ø)
...s/abstract-std/src/objects/entry/contract_entry.rs 91.6% <ø> (ø)
...bstract-std/src/objects/entry/dex_asset_pairing.rs 97.9% <ø> (-2.1%) ⬇️
...mework/packages/abstract-std/src/objects/module.rs 81.0% <ø> (-0.1%) ⬇️
...ges/abstract-std/src/objects/account/account_id.rs 78.1% <94.4%> (+8.0%) ⬆️
... and 1 more

... and 87 files with indirect coverage changes

Copy link
Collaborator

@Buckram123 Buckram123 left a comment

Choose a reason for hiding this comment

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

LGTM. But it is state breaking, right? I'm surprised to not see a snapshot file changed here

@Kayanski
Copy link
Contributor Author

LGTM. But it is state breaking, right? I'm surprised to not see a snapshot file changed here

Because we haven't used multi-hop accounts for now in the repo.
And I think it's fine to push that as a patch because we haven't used it yet

@Kayanski Kayanski requested a review from adairrr November 22, 2024 09:14
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 17, 2024
@Kayanski Kayanski force-pushed the fix/account-trace-serialization branch from d376891 to 84927ed Compare December 17, 2024 10:02
@Kayanski Kayanski merged commit 7d431d7 into main Dec 17, 2024
14 of 18 checks passed
@Kayanski Kayanski deleted the fix/account-trace-serialization branch December 17, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants