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

tx hash caching in transaction struct #1417

Closed
jchappelow opened this issue Feb 26, 2025 · 1 comment · Fixed by #1422
Closed

tx hash caching in transaction struct #1417

jchappelow opened this issue Feb 26, 2025 · 1 comment · Fixed by #1422
Assignees

Comments

@jchappelow
Copy link
Member

This is a widely used approach, which Brennan has also suggested recently. Based on latest cpu profiles, we should probably do this.

HOWEVER, doing this has drawbacks, including encouraging lazy coding, and putting lots of concurrency primitives to use, which incurs its own expenses. I have seen this come to be regretted in past projects for these reasons.

First we should look carefully about when and if we should even be calling the Hash() method on the hotspots and consider other changes such as passing an existing hash and/or a new type that is simply a vehicle for a hash with it's corresponding transaction a. la the existing node/types.NamedTx.

@charithabandi
Copy link
Contributor

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants