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

Improve KeepOnlyLatestState/RemoveUntraceableBlocks/P2PStateExchangeExtensions behaviour #2550

Open
roman-khimov opened this issue Jun 9, 2022 · 1 comment
Labels
enhancement Improving existing functionality I2 Regular impact S4 Routine U3 Regular

Comments

@roman-khimov
Copy link
Member

roman-khimov commented 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:

  • KeepOnlyLatestState=false with RemoveUntraceableBlocks=false keeps everything
  • KeepOnlyLatestState=true with RemoveUntraceableBlocks=false keeps all block/transfer data dropping all MPT data but the latest one
  • KeepOnlyLatestState=false with RemoveUntraceableBlocks=true keeps MaxTraceableBlocks number of MPTs and block/transfer data
  • KeepOnlyLatestState=true with RemoveUntraceableBlocks=true is essentially the same as KeepOnlyLatestState=false with RemoveUntraceableBlocks=true

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 roman-khimov added this to the v0.99.3 milestone Jun 9, 2022
@roman-khimov roman-khimov modified the milestones: v0.99.3, v0.99.2 Jul 11, 2022
@roman-khimov roman-khimov modified the milestones: v0.99.2, v0.99.3 Aug 1, 2022
@roman-khimov roman-khimov modified the milestones: v0.99.3, v0.99.4 Aug 23, 2022
@roman-khimov roman-khimov added the feature Completely new functionality label Sep 9, 2022
@roman-khimov roman-khimov modified the milestones: v0.99.4, v0.99.5 Sep 19, 2022
@roman-khimov roman-khimov modified the milestones: v0.99.5, v0.99.6 Sep 30, 2022
@roman-khimov roman-khimov modified the milestones: v0.100.0, v0.100.1 Nov 25, 2022
@roman-khimov roman-khimov modified the milestones: v0.100.1, v0.101.2 Dec 12, 2022
@roman-khimov roman-khimov modified the milestones: v0.100.2, v0.100.3 Dec 28, 2022
@roman-khimov roman-khimov modified the milestones: v0.101.1, v0.103.0 Feb 17, 2023
@roman-khimov roman-khimov modified the milestones: v0.103.0, v0.104.0 May 24, 2023
@roman-khimov roman-khimov added I2 Regular impact U4 Nothing urgent S4 Routine labels Dec 21, 2023
@roman-khimov roman-khimov modified the milestones: v0.105.0, v0.106.0 Dec 21, 2023
@roman-khimov roman-khimov modified the milestones: v0.106.0, v0.107.0 Mar 5, 2024
@AnnaShaleva AnnaShaleva removed this from the v0.107.2 milestone Dec 13, 2024
@AnnaShaleva AnnaShaleva added this to the v0.108.0 milestone Dec 13, 2024
@roman-khimov roman-khimov removed this from the v0.108.0 milestone Jan 10, 2025
@roman-khimov
Copy link
Member Author

It's specific to P2PStateExchangeExtensions and the extension itself may become irrelevant after neo-project/neo#3463.

@roman-khimov roman-khimov added the blocked Can't be done because of something label Jan 10, 2025
@roman-khimov roman-khimov removed the blocked Can't be done because of something label Jan 17, 2025
@roman-khimov roman-khimov marked this as a duplicate of #3788 Jan 17, 2025
@roman-khimov roman-khimov added enhancement Improving existing functionality and removed feature Completely new functionality labels Jan 17, 2025
@roman-khimov roman-khimov added this to the v0.108.0 milestone Jan 17, 2025
@roman-khimov roman-khimov added U3 Regular and removed U4 Nothing urgent labels Jan 17, 2025
@roman-khimov roman-khimov modified the milestones: v0.108.0, v0.110.0 Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality I2 Regular impact S4 Routine U3 Regular
Projects
None yet
Development

No branches or pull requests

2 participants