-
Notifications
You must be signed in to change notification settings - Fork 40
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
Feature: core version and metadata cache #1391
Conversation
5bda630
to
2958405
Compare
Codecov Report
@@ Coverage Diff @@
## master #1391 +/- ##
=======================================
Coverage 24.44% 24.45%
=======================================
Files 633 638 +5
Lines 24035 24084 +49
Branches 12470 12492 +22
=======================================
+ Hits 5875 5889 +14
- Misses 12904 12938 +34
- Partials 5256 5257 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
e7c760e
to
09fe339
Compare
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
09fe339
to
efb26c8
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.
👍
external project test has failed on CI
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
: env_{std::move(env)}, | ||
rei_{std::move(rei)}, | ||
parent_{std::move(parent)}, | ||
code_hash_(code_hash), |
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.
hm, is this new field is even used in this class?
RuntimePropertiesCacheImpl() = default; | ||
|
||
outcome::result<primitives::Version> getVersion( | ||
const common::Hash256 &hash, |
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.
it could be either hash of block or hash of state, please give this variable more meaningful name
override; | ||
|
||
outcome::result<primitives::OpaqueMetadata> getMetadata( | ||
const common::Hash256 &hash, |
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.
same
Referenced issues
Resolves #1374
Description of the Change
Cache by code hash for calls "Core_version" and "Metadata_metadata"
Benefits
Avoid runtime using for some idempotent calls
Usage Examples or Tests
Existing tests adapted