-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
chore: add metrics on redundant proof nodes #14969
Conversation
f4282b7
to
53725df
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.
this seems fine,
pending @shekhirin
@@ -260,8 +265,10 @@ impl<F: BlindedProviderFactory> SparseStateTrie<F> { | |||
|
|||
// Reveal the remaining proof nodes. | |||
for (path, bytes) in account_nodes { | |||
self.metrics.increment_total_account_nodes(); |
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 see we can't incr with the len here because this is already an iter
@@ -521,11 +530,17 @@ impl<F: BlindedProviderFactory> SparseStateTrie<F> { | |||
/// | |||
/// If the trie has not been revealed, this function reveals the root node and returns its hash. | |||
pub fn root(&mut self) -> SparseStateTrieResult<B256> { | |||
// record revealed node metrics | |||
self.metrics.record(); |
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.
should be fine to run only at the end of computation, and not on every update_rlp_node_level
53725df
to
67b8183
Compare
This adds some metrics for checking how many proof nodes were already revealed over the life of a sparse state trie. These are some counters and some histograms, that get recorded when we calculate the root.