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

fix: scale encoding skip phantom data #3967

Merged
merged 1 commit into from Sep 7, 2023

Conversation

dandanlen
Copy link
Collaborator

@dandanlen dandanlen commented Sep 7, 2023

Pull Request

Closes: PRO-98

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have updated documentation where appropriate.

Summary

Looks like this was due to phantom data not being skipped. (thanks to @AlastairHolmes for figuring this out)

@linear
Copy link

linear bot commented Sep 7, 2023

PRO-98 Ethereum VaultRotationStatus not parsed in PolkaJS

Description

This is annoying when debugging, it impossible to tell what state the eth vault rotation is in. Oddly enough, it works for Polkadot:

@@ -189,6 +189,7 @@ pub trait CreatePolkadotVault: ApiCall<PolkadotCrypto> {
#[scale_info(skip_type_params(E))]
pub struct OpaqueApiCall<E> {
builder: PolkadotExtrinsicBuilder,
#[codec(skip)]
Copy link
Contributor

Choose a reason for hiding this comment

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

thought that's what the skip_type_params already does? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No that just prevents the T: Encode + Decode from being implicitly inserted (ie. in this case, not adding skip_type_params would silently add E: Encode + Decode).

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Merging #3967 (38543ea) into main (0fdf9e4) will decrease coverage by 0%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

@@          Coverage Diff          @@
##            main   #3967   +/-   ##
=====================================
- Coverage     72%     72%   -0%     
=====================================
  Files        366     366           
  Lines      56790   56791    +1     
  Branches   56790   56791    +1     
=====================================
- Hits       40959   40952    -7     
- Misses     13750   13755    +5     
- Partials    2081    2084    +3     
Files Changed Coverage Δ
state-chain/chains/src/dot/api.rs 1% <ø> (-<1%) ⬇️
...ate-chain/pallets/cf-vaults/src/response_status.rs 97% <ø> (ø)

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dandanlen dandanlen merged commit 2de26be into main Sep 7, 2023
44 checks passed
@dandanlen dandanlen deleted the fix/scale-encoding-skip-phantom branch September 7, 2023 15:50
syan095 added a commit that referenced this pull request Sep 8, 2023
…on-integration

* origin/main:
  fix: scale encoding skip phantom data (#3967)
  chore: make platform team code owner of CI settings.toml and localnet (#3957)
  fix: prefer finalize_signed_extrinsic in engine (#3956)
  fix: CanonicalAssetPair encoding issue (#3958)
  chore(bouncer): Update sdk to 0.0.40 (#3945)
  fix: tweak cli generate-keys output (#3943)
  chore: add `preinst` script unit tests 🧪 (#3942)
  Better LP/Broker API RPC Errors (#3931)
  fix: update substrate ref to use Kademlia fix (#3941)
  doc: update funding readme with redemption restrictions (#3914)
  feat: PRO-474 broadcast safe mode (#3902)
  feat: more forgiving dot address parsing (#3938)
  fix: duplicate logging (#3939)
  feat: new lp interface (#3886)

# Conflicts:
#	Cargo.lock
#	state-chain/cf-integration-tests/Cargo.toml
#	state-chain/cf-integration-tests/src/authorities.rs
dandanlen added a commit that referenced this pull request Sep 18, 2023
dandanlen added a commit that referenced this pull request Sep 28, 2023
dandanlen added a commit that referenced this pull request Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants