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

[light-client] remove pending parentchain tx-inclusion check #1455

Merged
merged 8 commits into from
Sep 29, 2023

Conversation

clangenb
Copy link
Contributor

@clangenb clangenb commented Sep 19, 2023

This PR removes the parentchain tx-inclusion check, which didn't work. This led to an infinitely growing list of extrinsics with pending inclusion check in the light-client, which slowed down the block import tremendously. As the light-client was never the correct place to do that, I just removed the feature, and added a tracking issue for proper re-introduction: #1457.

@clangenb clangenb changed the title [light-client [light-client] remove pending parentchain inclusion check Sep 19, 2023
Comment on lines -171 to -177
block.extrinsics().iter().for_each(|xt| {
if let Some(index) = relay.verify_tx_inclusion.iter().position(|xt_opaque| {
<HashingFor<Block>>::hash_of(xt) == <HashingFor<Block>>::hash_of(xt_opaque)
}) {
found_xts.push(index);
}
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the piece of code that didn't work and that caused a delay in block import.

self.last_finalized_block_header.number(),
self.current_validator_set,
self.current_validator_set_id,
self.verify_tx_inclusion.len()
self.unjustified_headers.len()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should always be 0, but I still want to log this, just in case.

@clangenb clangenb added A0-core Affects a core part B1-releasenotes C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing labels Sep 19, 2023
@clangenb clangenb changed the title [light-client] remove pending parentchain inclusion check [light-client] remove pending parentchain tx-inclusion check Sep 19, 2023
Copy link
Collaborator

@brenzi brenzi left a comment

Choose a reason for hiding this comment

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

this PR actually removes functionality. Please describe this loss of functionality in the PR description, along with the follow up issues to get the functionality again.
My understanding: We can no longer verify that an extrinsic which was sent by the enclave has actually been successfully included in the parentchain. Is that so?

@clangenb
Copy link
Contributor Author

clangenb commented Sep 25, 2023

I have updated the PR description. Yes, you are right that this feature is removed, but it was never complete. Because we have checked in the light-client that the extrinsic was included, but we did not check there whether the extrinsic was a success or not, nor did we have some kind of reaction implemented if the extrinsic was found or if it hasn't been found for a long time.

So we should probably integrate these checks somewhere else in the business logic, like in the indirect executor, where we are currently starting to implement checks if parentchain transfers were successful for the privacy sidechain case.

@clangenb clangenb merged commit 39cdc0d into master Sep 29, 2023
20 of 21 checks passed
This was referenced Sep 29, 2023
@clangenb clangenb deleted the cl/avoid-growing-unfinalized-header-queue branch September 29, 2023 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-core Affects a core part B1-releasenotes C1-low 📌 Does not elevate a release containing this beyond "low priority" E0-breaksnothing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

slow parentchain block import because of tx inclusion check
2 participants