mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2026-03-01 04:28:51 +00:00
Improve KeepOnlyLatestState/RemoveUntraceableBlocks/P2PStateExchangeExtensions behaviour #931
Labels
No labels
I1
I2
I3
I4
S1
S2
S3
S4
U0
U1
U2
U3
U3
U4
blocked
bug
bug
cli
compiler
config
config
consensus
dependencies
discussion
documentation
enhancement
epic
feature
go
good first issue
help wanted
neotest
network
oracle
performance
question
rpc
security
smartcontract
task
task
task
test
vm
wallet
windows
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neo-go#931
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @roman-khimov on GitHub (Jun 9, 2022).
We've got all the functionality needed, but I think we can improve the way users interact with it. There are two different worlds, public networks and private ones with P2PStateExchangeExtensions enabled and they have slightly different requirements. We can always strip all of the MPT data on non-P2PStateExchangeExtensions-enabled networks while we can't with this extensions enabled. The behavior we have now doesn't take P2PStateExchangeExtensions into account at all:
This true/true combination is where the main problem is. While it's appropriate for P2PStateExchangeExtensions=true (otherwise other nodes won't be able to synchronize and we technically can't keep just three MPTs, all intermediate ones must also be kept); it's not exactly the best thing for public networks. They can be slightly more aggressive and store just one MPT while removing all of the other data wrt the MaxTraceableBlocks setting. This will optimize the data stored significantly (we know MPT is a huge part of the overall data set).
But KeepOnlyLatestState=true with RemoveUntraceableBlocks=false combination can also be improved for P2PStateExchangeExtensions=true, we can store MaxTraceableBlocks number of MPTs while keeping any other data.
Related to #2152.
@roman-khimov commented on GitHub (Jan 10, 2025):
It's specific to
P2PStateExchangeExtensionsand the extension itself may become irrelevant after https://github.com/neo-project/neo/issues/3463.