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

Update nep-0508.md #517

Merged
merged 6 commits into from
Nov 14, 2023
Merged

Update nep-0508.md #517

merged 6 commits into from
Nov 14, 2023

Conversation

shreyan-gupta
Copy link

@shreyan-gupta shreyan-gupta commented Nov 14, 2023

Creating a PR so that we can discuss changes...

Creating a PR so that we can discuss changes...
This only covers additions upto `Reference Implementation` section.
@shreyan-gupta shreyan-gupta requested a review from a team as a code owner November 14, 2023 08:45
@shreyan-gupta shreyan-gupta changed the title Part 1: Update nep-0508.md Update nep-0508.md Nov 14, 2023
Copy link
Contributor

@wacban wacban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, thanks!

neps/nep-0508.md Outdated
* Merkle Patricia Trie is the undelying data structure for the protocol state.
* Minimal epoch gap between two resharding events is X.
* Epoch is atleast 6 hrs long for resharding to complete.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: at least

neps/nep-0508.md Outdated
* A validator should be able to recover in case they go offline during resharding.
* For now, our aim is at least allowing a validator to join back after resharding is finished.
* Resharding should work efficiently within the limits of the current hardware requirements for nodes.
* Resharding should be fault tolerant. A validator should be able to recover in case they go offline during resharding.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add that recovery will be a manual process requiring attention from the node operator?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the fault tolerant point here

neps/nep-0508.md Outdated

### New shard layout

The first release of the resharding v2 will contain a new shard layout where one of the existing shard will be split into two smaller shards. Furthermore additional reshardings can be scheduled in subsequent neard releases without additional NEPs unless the need for it arises. A new shard layout will be determined and will be scheduled and executed in the production networks. Resharding will typically happen by splitting one of the existing shards into two smaller shards. The new shard layout will be created by adding a new boundary account. The new boundary account will be determined by analysing the storage and gas usage within the shard and selecting a point that will divide the shard roughly in half in accordance to the mentioned metrics. Other metrics can also be used.
The first release of the resharding v2 will contain a new shard layout where shard 3 will be split into two smaller shards. We chose shard 3 for this purpose as that was the largest of the 4 shards. Furthermore additional reshardings can be scheduled in subsequent neard releases without additional NEPs unless the need for it arises. A new shard layout can be determined and will be scheduled and executed with the next protocol upgrade. Resharding will typically happen by splitting one of the existing shards into two smaller shards. The new shard layout will be created by adding a new boundary account that will be determined by analysing the storage and gas usage metrics within the shard and selecting a point that will divide the shard roughly in half in accordance to the mentioned metrics. Other metrics can also be used based on requirements.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@walnut-the-cat suggested earlier to not specify which shard we'll be splitting in the NEP

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted to original

Copy link
Contributor

@wacban wacban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

neps/nep-0508.md Outdated
* When generating proofs for incoming receipts. The proof for each of the children shards contains only the receipts of the shard but it's generated on the parent shard layout and so may not be verified.

In this NEP we propose that resharding should be rolled out first, before any real dependency on state sync is added. We can then safely roll out the resharding logic and solve the abovementioned issues separately.
In this NEP we propose that resharding should be rolled out first, before any real dependency on state sync is added. We can then safely roll out the resharding logic and solve the above mentioned issues separately. We believe atleast some of the issues can be mitigated by the new implementation of post-state root and chunk execution design.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not longer post state root, it's "new pre state root" :D

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What? We went back to pre state root?

neps/nep-0508.md Outdated
* The resharding process is still not fully automated. Analyzing shard data, determining the split boundary, and triggering an actual shard split all need to be manually curated by a person.
* During resharding, a node is expected to do more work as it will first need to copy a lot of data around the then will have to apply changes twice (for the current shard and the future shard).
* The resharding process, as of now, is not fully automated. Analyzing shard data, determining the split boundary, and triggering an actual shard split all need to be manually curated and tracked.
* During resharding, a node is expected to require more resources as it will first need to copy state data from the parent shard to the child shard, the then will have to apply trie and flat state changes twice, once for the parent shard and once for the child shards.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the then

neps/nep-0508.md Outdated

[The changelog section provides historical context for how the NEP developed over time. Initial NEP submission should start with version 1.0.0, and all subsequent NEP extensions must follow [Semantic Versioning](https://semver.org/). Every version should have the benefits and concerns raised during the review. The author does not need to fill out this section for the initial draft. Instead, the assigned reviewers (Subject Matter Experts) should create the first version during the first technical review. After the final public call, the author should then finalize the last version of the decision context.]

### 1.0.0 - Initial Version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this should stay here and be filled in when reviewed. No clue if that is how it works actually.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, sorry, I just took a look at some other NEPs and they didn't have this, so maybe I thought it shouldn't be there. My bad, will add in

@shreyan-gupta shreyan-gupta merged commit 0c3b123 into resharding Nov 14, 2023
1 check passed
@shreyan-gupta shreyan-gupta deleted the shreyan-gupta-patch-1 branch November 14, 2023 15:08
@frol frol added WG-protocol Protocol Standards Work Group should be accountable S-approved A NEP that was approved by a working group. A-NEP-GrammarFix A grammar/typo fix proposal to existing NEP. Once the original author merges changes, we close this. labels Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-NEP-GrammarFix A grammar/typo fix proposal to existing NEP. Once the original author merges changes, we close this. S-approved A NEP that was approved by a working group. WG-protocol Protocol Standards Work Group should be accountable
Projects
Status: APPROVED FIXES
Development

Successfully merging this pull request may close these issues.

3 participants