-
Notifications
You must be signed in to change notification settings - Fork 246
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
Remove invalid bundles in the process of compiling bundles to extrinsics #1700
Conversation
Rename `should_select_tx()` to `is_within_tx_range()` and handle the case of unsigned transactions within `is_within_tx_range()`.
This commit is a pure refactoring to make the tx range check reusable in domain-block-preprocessor later. The sortition module in domain-operator is now not useful and deleted.
… bundles - Make compile_own_domain_bundles() as a method of DomainBlockPreprocessor - Remove invalid bundles in the process of compiling bundles to extrinsics
No logical changes
c668afc
to
335751b
Compare
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.
make sense overall in the first pass. Will look again
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.
Make sense overall! just a few nits.
@@ -331,23 +359,23 @@ where | |||
>, | |||
consensus_block_hash: CBlock::Hash, | |||
at: Block::Hash, | |||
) -> sp_blockchain::Result<bool> { | |||
) -> Result<bool, sp_api::ApiError> { |
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.
If we return Option<Vec<Block::Extrinsic>>
instead of bool
then we won't need to decode the extrinsic a second time, it may hurt readability though, non-blocker.
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.
Yeah, thought about avoiding the decoding again, but unsure if it's worth the readability comprise.
This PR introduces the invalid bundles in the bundles to extrinsics processing, each invalid bundle will be removed if any problematic tx is found in it. There are a few refactorings down the road, recommended to review commit by commit.
Close #1695
Code contributor checklist: