Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Fetch runtime code from storage cache when using proofing backend #9611

Merged
1 commit merged into from
Aug 24, 2021

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Aug 23, 2021

Before we fetched the runtime code from the TrieBackend and this lead
to not using the storage cache. Thus, we recalculated the storage hash
for the runtime code on every call into the runtime and this killed the
performance on parachains block authoring. The solution is to fetch the
runtime code from the storage cache, to make sure we use the cached
storage cache.

Before we fetched the runtime code from the `TrieBackend` and this lead
to not using the storage cache. Thus, we recalculated the storage hash
for the runtime code on every call into the runtime and this killed the
performance on parachains block authoring. The solution is to fetch the
runtime code from the storage cache, to make sure we use the cached
storage cache.
@bkchr bkchr added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Aug 23, 2021
@bkchr bkchr requested a review from arkpar August 23, 2021 22:00
@crystalin
Copy link
Contributor

crystalin commented Aug 23, 2021

I performed some tests, and we moved from an average of ~100tx/block to ~350tx/block using this commit.
Awesome work !

@bkchr
Copy link
Member Author

bkchr commented Aug 24, 2021

bot merge

@ghost
Copy link

ghost commented Aug 24, 2021

Trying merge.

@ghost
Copy link

ghost commented Aug 24, 2021

Bot will approve on the behalf of @bkchr, since they are a team lead, in an attempt to reach the minimum approval count

@ghost ghost merged commit b79e2b9 into master Aug 24, 2021
@ghost ghost deleted the bkchr-storage-hash-caching branch August 24, 2021 09:54
Wizdave97 pushed a commit to Wizdave97/substrate that referenced this pull request Aug 25, 2021
…ritytech#9611)

Before we fetched the runtime code from the `TrieBackend` and this lead
to not using the storage cache. Thus, we recalculated the storage hash
for the runtime code on every call into the runtime and this killed the
performance on parachains block authoring. The solution is to fetch the
runtime code from the storage cache, to make sure we use the cached
storage cache.
crystalin pushed a commit to moonbeam-foundation/substrate that referenced this pull request Sep 10, 2021
…ritytech#9611)

Before we fetched the runtime code from the `TrieBackend` and this lead
to not using the storage cache. Thus, we recalculated the storage hash
for the runtime code on every call into the runtime and this killed the
performance on parachains block authoring. The solution is to fetch the
runtime code from the storage cache, to make sure we use the cached
storage cache.
JoshOrndorff pushed a commit to moonbeam-foundation/substrate that referenced this pull request Sep 16, 2021
…ritytech#9611)

Before we fetched the runtime code from the `TrieBackend` and this lead
to not using the storage cache. Thus, we recalculated the storage hash
for the runtime code on every call into the runtime and this killed the
performance on parachains block authoring. The solution is to fetch the
runtime code from the storage cache, to make sure we use the cached
storage cache.

(cherry picked from commit b79e2b9)
JoshOrndorff pushed a commit to moonbeam-foundation/substrate that referenced this pull request Sep 28, 2021
…ritytech#9611)

Before we fetched the runtime code from the `TrieBackend` and this lead
to not using the storage cache. Thus, we recalculated the storage hash
for the runtime code on every call into the runtime and this killed the
performance on parachains block authoring. The solution is to fetch the
runtime code from the storage cache, to make sure we use the cached
storage cache.

(cherry picked from commit b79e2b9)
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants