-
Notifications
You must be signed in to change notification settings - Fork 689
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
pallet epm: add TrimmingStatus
to the mined solution
#1659
Conversation
For tools such that is using the `Miner` it's useful to know whether a solution was trimmed or not.
TrimmingStatus
to solutionTrimmingStatus
to the mined solution
@@ -108,6 +108,27 @@ impl From<FeasibilityError> for MinerError { | |||
} | |||
} | |||
|
|||
/// Reports the trimming result of mined solution | |||
#[derive(Debug, Clone)] | |||
pub struct TrimmingStatus { |
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.
not sure about naming this, could also be TrimmingResult
or something.
could also just be a boolean but I prefer a struct here
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.
LGTM! 👍 Small nit: would be nice to have a test that checks a non-trimmed and a trimmed solution to ensure the numbers are properly propagated. Not sure how easy that is to implement
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
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.
Please find one test that actually does trimming and assert on the output.
bot merge |
@niklasad1 |
* master: (61 commits) OpenGov in Westend and Rococo (#1177) Associated type Hasher for `QueryPreimage`, `StorePreimage` and `Bounded` (#1720) Migrate polkadot-primitives to v6 (#1543) genesis-builder: implemented for all runtimes (#1492) `BlockId` removal: `tx-pool` refactor (#1678) Bump directories from 4.0.1 to 5.0.1 (#1656) Allow debug_assertions in short-benchmarks CI job (#1711) chainHead/storage: Fix storage iteration using the query key (#1665) Implement more useful traits in `Slot` type (#1595) Make downloads in parallel and give more time to complete (#1699) Bump actions/checkout from 4.0.0 to 4.1.0 (#1688) contracts: Fix incorrect storage alias in mirgration (#1687) Fix documentation about justification and `finalized == true` requirement (#1607) tweak pallet macro (genesis_config etc) to cater for RA users as well. (#1689) Uncoupling pallet-xcm from frame-system's RuntimeCall (#1684) Bump aes-gcm from 0.10.2 to 0.10.3 (#1681) docs / Update PR template to reflect monorepo (#1674) update contributing guide and ui-tests scripts (#1668) pallet epm: add `TrimmingStatus` to the mined solution (#1659) Update HRMP pallet benchmarking to use benchmarks v2 (#1676) ...
For tools such that is using the `Miner` it's useful to know whether a solution was trimmed or not and also how much that was trimmed. --------- Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
For tools such that is using the
Miner
it's useful to know whether a solution was trimmed or not and also how much that was trimmed.