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

Return root result without blocking due to sparse trie Drop #14316

Closed
Rjected opened this issue Feb 8, 2025 · 2 comments · Fixed by ritik4ever/reth#1 or #14333
Closed

Return root result without blocking due to sparse trie Drop #14316

Rjected opened this issue Feb 8, 2025 · 2 comments · Fixed by ritik4ever/reth#1 or #14333
Labels
A-trie Related to Merkle Patricia Trie implementation C-perf A change motivated by improving speed, memory usage or disk footprint

Comments

@Rjected
Copy link
Member

Rjected commented Feb 8, 2025

It would be great if we could return the state root result, without blocking it due to dropping the sparse trie. I noticed this in profiles of the main state root task thread:

Image

Maybe we should send task_tx in run_sparse_trie:

let (tx, rx) = mpsc::channel();
thread_pool.spawn(move || {
debug!(target: "engine::tree", "Starting sparse trie task");
let result = match run_sparse_trie(config, metrics, rx) {
Ok((state_root, trie_updates, iterations)) => {
StateRootMessage::RootCalculated { state_root, trie_updates, iterations }
}
Err(error) => StateRootMessage::RootCalculationError(error),
};
let _ = task_tx.send(result);
});
tx

@Rjected Rjected added A-trie Related to Merkle Patricia Trie implementation C-perf A change motivated by improving speed, memory usage or disk footprint labels Feb 8, 2025
VolodymyrBg added a commit to VolodymyrBg/reth that referenced this issue Feb 8, 2025
@VyuduInc
Copy link

VyuduInc commented Feb 9, 2025

Yo @shekhirin, let me clean this up. These State Root Task DEBUG logs are giving a whole lot of noise but not enough signal, and that’s a problem. Debugging should accelerate solutions, not slow them down. I’ll go in, trim the clutter, enhance the context, and structure logs so they actually tell you what’s going on.

Been engineering backend systems for 15+ years and deep in blockchain since 2017—I know how to turn logs from a headache into a tool. Let me take this, and you’ll get logs that are clean, clear, and actually useful for debugging.

@ritik4ever
Copy link

Would love to tackle this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trie Related to Merkle Patricia Trie implementation C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
Archived in project
3 participants