Skip to content

Conversation

l0r1s
Copy link
Collaborator

@l0r1s l0r1s commented Sep 11, 2025

Description

Fix the weights mismatch from pre/post DispatchInfo in the logs.

Utility/Proxy pallets are upgraded.

Issue with non accounted weight is fixed while still allowing Pays::No call to passthrough (here and here)

Related Issue(s)

  • Closes #[issue number]

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run cargo fmt and cargo clippy to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

Please provide any additional information or context that may be helpful for reviewers.

@l0r1s l0r1s added skip-cargo-audit This PR fails cargo audit but needs to be merged anyway apply-benchmark-patch and removed apply-benchmark-patch labels Sep 11, 2025
Comment on lines +608 to +612
let pays = if dispatch_infos.clone().any(|di| di.pays_fee == Pays::No) {
Pays::No
} else {
Pays::Yes
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This part matters to have Pays::No propagated

// AccountData for inner call origin accountdata.
.saturating_add(T::DbWeight::get().reads_writes(1, 1))
.saturating_add(di.call_weight),
di.class, di.pays_fee)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here we use the pays_fee from the inner call, that way if it's Pays::No, this is propagated to the proxy call

@sam0x17 sam0x17 merged commit db6f47e into devnet-ready Sep 17, 2025
55 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-cargo-audit This PR fails cargo audit but needs to be merged anyway
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants