feat: cherry-pick pbss patch commits from eth repo in v1.13.2 #1916
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
| return err | ||
| } | ||
|
|
||
| if localHeight >= remoteHeight { |
There was a problem hiding this comment.
delete this is ok? I remember it's used to fix lagging nodes issue
https://github.com/bnb-chain/bsc/pull/1301/files
|
|
||
| // 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.
even frozen!=0
item amount in ancient may be zero
so keep use itemAmountInAncient?
There was a problem hiding this comment.
revert, eth/downloader change will be solved in next PR.
| continue | ||
| } | ||
| header := d.lightchain.GetHeaderByHash(h) // Independent of sync mode, header surely exists | ||
| if header == nil { |
eth/downloader/downloader.go
Outdated
| rejected []*types.Header | ||
| td *big.Int | ||
| ) | ||
| if !beaconMode && ttd != nil { |
There was a problem hiding this comment.
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
| // 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.
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