-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: cherry-pick pbss patch commits from eth repo in v1.13.2 #1916
Conversation
3fea197
to
68722d0
Compare
2d446ba
to
7d9234c
Compare
TestStateChanges can be recovered now, |
6378137
to
674528c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
eth/downloader/downloader.go
Outdated
return err | ||
} | ||
|
||
if localHeight >= remoteHeight { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this is ok? I remember it's used to fix lagging nodes issue
https://github.com/bnb-chain/bsc/pull/1301/files
eth/downloader/downloader.go
Outdated
// If a part of blockchain data has already been written into active store, | ||
// disable the ancient style insertion explicitly. | ||
if origin >= frozen && itemAmountInAncient != 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even frozen!=0
item amount in ancient may be zero
so keep use itemAmountInAncient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert, eth/downloader change will be solved in next PR.
eth/downloader/downloader.go
Outdated
@@ -936,10 +994,6 @@ func (d *Downloader) findAncestorBinarySearch(p *peerConnection, mode SyncMode, | |||
continue | |||
} | |||
header := d.lightchain.GetHeaderByHash(h) // Independent of sync mode, header surely exists | |||
if header == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
eth/downloader/downloader.go
Outdated
rejected []*types.Header | ||
td *big.Int | ||
) | ||
if !beaconMode && ttd != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for bsc, ttd is nil forever
so these codes are useless, but keep them is ok, making code align with go-ethereum
eth/downloader/downloader.go
Outdated
@@ -1712,8 +1829,17 @@ func (d *Downloader) reportSnapSyncProgress(force bool) { | |||
return | |||
} | |||
// Retrieve the current chain head and calculate the ETA | |||
// We're going to cheat for non-merged networks, but that's fine | |||
latest := d.pivotHeader | |||
latest, _, _, err := d.skeleton.Bounds() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skeleton sync is useless for bsc
that‘s why I remove them when big merge
bringing them in is ok, so we can pay lower effort when next pick ups
68db668
to
81b4a1b
Compare
This changes implements faster post-selfdestruct iteration of storage slots for deletion, by using snapshot-storage+stacktrie to recover the trienodes to be deleted. This mechanism is only implemented for path-based schema. For hash-based schema, the entire post-selfdestruct storage iteration is skipped, with this change, since hash-based does not actually perform deletion anyway. --------- Co-authored-by: Martin Holst Swende <martin@swende.se>
core/state: check err for iter.Error
Avoid truncating files, if ancients are opened in readonly mode. With this change, we return error instead of trying (and failing) to repair
…(#28163) * trie: remove internal nodes between shortNode and child in path mode * trie: address comments * core/rawdb, trie: address comments * core/rawdb: delete unused func * trie: change comments * trie: add missing tests * trie: fix lint
f456988
to
0f33eef
Compare
e23bd28
to
a82816c
Compare
Description
This PR cherry-pick go-ethereum(v1.13.2) commits that about PBSS, the commits list:
Rationale
N/A
Example
N/A
Changes
Notable changes:
N/A