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

Share data reads when several headers are imported at once #117

Closed
svyatonik opened this issue Jun 1, 2020 · 2 comments
Closed

Share data reads when several headers are imported at once #117

svyatonik opened this issue Jun 1, 2020 · 2 comments
Labels
A-feat New feature or request Good First Issue Good for newcomers P-Runtime

Comments

@svyatonik
Copy link
Contributor

Now when we're importing several PoA headers in single call, every header import starts from the scratch - i.e. we're creating ImportContext, ValidatorsSet and FinalityVotes (see #116 ). But we actually may reuse FinalityVotes from the parent' header import (if parent is imported in the same call) + construct ImportContext and ValidatorsSet after parent is imported (without any additional reads). This will decrease number of redundant storage reads significantly, because relay is now configured to submit 32 headers in single transaction.

@svyatonik svyatonik added A-feat New feature or request PoA to Substrate labels Jun 1, 2020
@tomusdrw
Copy link
Contributor

tomusdrw commented Jun 1, 2020

The storage reads are going to be cached anyway (coming from the overlay), so I don't think this optimization is critical. We would for sure minimize the number of host calls though.

It sounds to me like it's a "good first issue" as well, so tagging as such.

@acatangiu
Copy link
Collaborator

Made obsolete by #1210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-feat New feature or request Good First Issue Good for newcomers P-Runtime
Projects
None yet
Development

No branches or pull requests

3 participants