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 pre-dispatch PoV underweight for ParasInherent #7378

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

ordian
Copy link
Member

@ordian ordian commented Jan 29, 2025

This should fix the error log related to PoV pre-dispatch weight being lower than post-dispatch for ParasInherent:

ERROR tokio-runtime-worker runtime::frame-support: Post dispatch weight is greater than pre dispatch weight. Pre dispatch weight may underestimating the actual weight. Greater post dispatch weight components are ignored.
                                        Pre dispatch weight: Weight { ref_time: 47793353978, proof_size: 1019 },
                                        Post dispatch weight: Weight { ref_time: 5030321719, proof_size: 135395 }

@ordian ordian added the T8-polkadot This PR/Issue is related to/affects the Polkadot network. label Jan 29, 2025
@ordian
Copy link
Member Author

ordian commented Jan 29, 2025

/cmd prdoc --audience runtime_dev --bump patch

Copy link
Contributor

@alindima alindima left a comment

Choose a reason for hiding this comment

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

Thank you!

Just to make sure, it's ok to do this because we rely on the post-dispatch measured weight being correct?

@gui1117
Copy link
Contributor

gui1117 commented Jan 29, 2025

Thank you!

Just to make sure, it's ok to do this because we rely on the post-dispatch measured weight being correct?

I think the reason is that this is only used in polkadot relay chain. In polkadot relay the usage for PoV doesn't matter.

@ordian
Copy link
Member Author

ordian commented Jan 30, 2025

Just to make sure, it's ok to do this because we rely on the post-dispatch measured weight being correct?

I think the reason is that this is only used in polkadot relay chain. In polkadot relay the usage for PoV doesn't matter.

Yes, both are true. Post-dispatch should correct the actually used weight and relay chain PoV limit is set to u64::MAX anyway, so we should be constrained by block size only.

With AHM and ParasInherent eventually being the only extrinsic, the weight limitation and filtering should matter even less. We should be able to fit all bitfields and maybe limiting disputes by some number should suffice.

@ordian ordian added this pull request to the merge queue Jan 30, 2025
Merged via the queue into master with commit 0d35be7 Jan 30, 2025
200 of 206 checks passed
@ordian ordian deleted the ao-fix-pre-dispatch-paras-inherent-weight branch January 30, 2025 14:53
ordian added a commit that referenced this pull request Feb 3, 2025
* master:
  Remove warnings by cleaning up the `Cargo.toml` (#7416)
  [Backport] Version bumps from stable2412-1 + prdocs reorg (#7401)
  fix pre-dispatch PoV underweight for ParasInherent (#7378)
  malus-collator: implement malicious collator submitting same collation to all backing groups (#6924)
  `fatxpool`: use tracing for logging (#6897)
  Improvements for Weekly bench (#7390)
  Replace derivative dependency with derive-where (#7324)
  Add support for feature `pallet_balances/insecure_zero_ed` in benchmarks and testing (#7379)
  Fix Snowbridge benchmark tests (#7296)
  Bridges small nits/improvements (#7383)
  Migrating cumulus-pallet-session-benchmarking to Benchmarking V2  (#6564)
  [pallet-revive] implement the block author API  (#7198)
  Use checked math in frame-balances named_reserve (#7365)
  move installation of frame-omni-bencher into a cmd.py itself (#7372)
  remove old bench & revert the frame-weight-template (#7362)
  ci: fix workflow permissions (#7366)
  [net/libp2p] Use raw `Identify` observed addresses to discover external addresses (#7338)
  Improve `set_validation_data` error message. (#7359)
  Implement pallet view function queries (#4722)
Ank4n pushed a commit that referenced this pull request Feb 6, 2025
This should fix the error log related to PoV pre-dispatch weight being
lower than post-dispatch for `ParasInherent`:
```
ERROR tokio-runtime-worker runtime::frame-support: Post dispatch weight is greater than pre dispatch weight. Pre dispatch weight may underestimating the actual weight. Greater post dispatch weight components are ignored.
                                        Pre dispatch weight: Weight { ref_time: 47793353978, proof_size: 1019 },
                                        Post dispatch weight: Weight { ref_time: 5030321719, proof_size: 135395 }
```

---------

Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants