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

Draft
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
@krish-nr krish-nr requested a review from owen-reorg January 5, 2024 08:00
@joeylichang
Copy link
Contributor

Have you ever tested it in PBSS mode?

sunny2022da referenced this pull request in sunny2022da/op-geth Jul 25, 2024
…ng; (#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
sunny2022da referenced this pull request in sunny2022da/op-geth Jul 29, 2024
…ng; (#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
sunny2022da referenced this pull request in sunny2022da/op-geth Aug 7, 2024
…ng; (#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
sunny2022da referenced this pull request in sunny2022da/op-geth Aug 13, 2024
…ng; (#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
sunny2022da referenced this pull request in sunny2022da/op-geth Sep 25, 2024
…ng; (#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
sunny2022da referenced this pull request in sunny2022da/op-geth Oct 11, 2024
…ng; (#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 referenced this pull request in andyzhang2023/op-geth 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 referenced this pull request in sunny2022da/op-geth Nov 14, 2024
…ng; (#10)

* txdag: support txdag transfer in extra;

* txdag: support txdag transfer in extra;

---------

Co-authored-by: galaio <[email protected]>
@krish-nr krish-nr marked this pull request as draft December 5, 2024 01:13
sunny2022da referenced this pull request in sunny2022da/op-geth Dec 11, 2024
…ng; (#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