-
Notifications
You must be signed in to change notification settings - Fork 305
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
shielded-pool: delegate supply tracking to components #4020
Conversation
8189d85
to
7649a8a
Compare
7649a8a
to
b483e30
Compare
This PR leaves the asset metadata tracking in the shielded pool. The reason is that it is useful to have a single RPC capable of serving queries about asset metadata, and the shielded pool crate is a lower level component that all customers of |
crates/core/component/stake/src/component/validator_handler/validator_store.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: katelyn martin <[email protected]> Signed-off-by: Erwan Or <[email protected]>
async fn denom_by_asset(&self, asset_id: &asset::Id) -> Option<Metadata> { | ||
self.get(&state_key::denom_by_asset(asset_id)) | ||
.await | ||
.expect("no deserialization error") |
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.
Q: Will this potentially fail for benign resigns we nevertheless want to throw upstream, e.g. wrong storage path? IDK what the convention here is though.
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.
I don't think so, the failure mode for this is if we have a cache miss that hits storage and fails. The most likely reason this happens is some disk failure that cause storage degradation. Either way, it's irrecoverable for callers and the node should halt.
Merging to get out of the way of #4001, happy to revisit. |
Close #4018