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

fix: use cache first when get StorageTrie/Trie #10

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

krish-nr
Copy link
Contributor

@krish-nr krish-nr commented Sep 22, 2023

Description
In core/state/database.go , the CacheAccount() and CacheStorage() functions call Add() on accountTrieCache and storageTrieCache but not used when getting them.

Rationale
Add cache getting first logic in OpenTrie() and OpenStorageTrie

Changes
try to get cache first when access Account and Storage, and update cache after that.

core/state/database.go Outdated Show resolved Hide resolved
core/state/database.go Outdated Show resolved Hide resolved
bendanzhentan
bendanzhentan previously approved these changes Oct 10, 2023
Copy link
Contributor

@bendanzhentan bendanzhentan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@krish-nr krish-nr marked this pull request as ready for review October 10, 2023 01:55
@krish-nr krish-nr requested a review from j75689 October 10, 2023 01:55
core/state/database.go Show resolved Hide resolved
core/state/database.go Show resolved Hide resolved
core/state/database.go Outdated Show resolved Hide resolved
core/state/database.go Outdated Show resolved Hide resolved
@joeylichang
Copy link
Contributor

Have you ever tested it in PBSS mode?

sunny2022da pushed a commit to sunny2022da/op-geth that referenced this pull request Jul 25, 2024
…ng; (bnb-chain#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
sunny2022da pushed a commit to sunny2022da/op-geth that referenced this pull request Jul 29, 2024
…ng; (bnb-chain#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
sunny2022da pushed a commit to sunny2022da/op-geth that referenced this pull request Aug 7, 2024
…ng; (bnb-chain#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
sunny2022da pushed a commit to sunny2022da/op-geth that referenced this pull request Aug 13, 2024
…ng; (bnb-chain#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
sunny2022da pushed a commit to sunny2022da/op-geth that referenced this pull request Sep 25, 2024
…ng; (bnb-chain#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
sunny2022da pushed a commit to sunny2022da/op-geth that referenced this pull request Oct 11, 2024
…ng; (bnb-chain#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
welkin22 pushed a commit that referenced this pull request Oct 22, 2024
…ng; (#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
andyzhang2023 added a commit to andyzhang2023/op-geth that referenced this pull request Oct 31, 2024
* revert: txpool pending cache optimization

* Revert "fix ut"

This reverts commit 8d4302b.

* Revert "fix ut"

This reverts commit 06d810d.

* Revert "fix ut"

This reverts commit 4ba1d24.

---------

Co-authored-by: andyzhang2023 <[email protected]>
sunny2022da pushed a commit to sunny2022da/op-geth that referenced this pull request Nov 14, 2024
…ng; (bnb-chain#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants