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

eth, trie/triedb/pathdb: pbss patches #1956

Closed
wants to merge 14 commits into from
Closed

Conversation

joeylichang
Copy link
Contributor

@joeylichang joeylichang commented Oct 31, 2023

Description

This PR fixes the stability and performance of PBSS, opt the add asyncnodebuffer option for flushing disk(it non-block state commit), fix rewind root hash mismatch.

Rationale

Example

--pathdb.sync use the origin nodebuffer, the defaulte use the asyncnodebuffer.

Changes

Notable changes:

  • trie/triedb/pathdb
  • core

brilliant-lx and others added 6 commits October 24, 2023 21:51
* go.mod: upgrade prysm and the indrect dependency
prysm from v4.0.2 to v4.0.8, and run go mod tidy

* ci: upgrade go version from 1.19 to 1.20
* go-version: upgrade from v1.19 to v1.20
there is some dependency on go v1.20, such as go-libp2p v0.27.8
and also run go mod tidy

* dependency: upgrade docker version for security
it is not a big issue, since docker is only used for test purpose.

* rand: update the usage of math/rand after golang v1.20

2 APIs of math/rand module were deprecated since golang v1.20.
that is: rand.Seed() and rand.Read(), refer: ettps://pkg.go.dev/math/rand

"rand.Seed(seed int64)" has been replaced by: "r := rand.New(rand.NewSource(seed int64))",
need to initialize it with an instance before use

"rand.Read()" has been replaced by "crypto/rand.Read()"

* readme: need golang v1.20+ to build bsc
accountTrieCache and storageTrieCache were introduced in this PR:
#257, which is to improve performance.
Actually the performance gain is quite limited, as there is already dirty
and clean cache for trie node.
And after big merge, these 2 cache can not be used when PBSS is enabled.
So remove these code to simplify the logic.
* fix: GetTransactionReceiptsByBlockNumber &  GetTransactionDataAndReceipt
@joeylichang joeylichang changed the title pbss patches eth, trie/triedb/pathdb : pbss patches Oct 31, 2023
@joeylichang joeylichang changed the title eth, trie/triedb/pathdb : pbss patches eth, trie/triedb/pathdb: pbss patches Oct 31, 2023
@joeylichang joeylichang added the wip work in process label Oct 31, 2023
@joeylichang joeylichang force-pushed the pbss_fix branch 2 times, most recently from bca87a7 to c9a74e2 Compare November 3, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip work in process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants