Closed robin-near closed 3 months ago
Sep 14th
[Note] The tracking issue will stay open throughout the project.
Sep 27th
upcoming October roadmap is as follows:
Resharding v2 is near completion and planned to be released with 1.37.
Couple things that are open at this moment:
Shard: s2.v1
Gas usage: 5709251.48 TGas (54.5% of total)
Number of accounts: 355144
Biggest account: game.hot.tg
Biggest account gas: 2922949.00 TGas (51.2% of shard)
Optimal split:
boundary_account: game.hot.tg
gas(boundary_account): 2922949.00 TGas
Gas distribution (left, boundary_acc, right): (27.8%, 51.2%, 21.0%)
Left (account < boundary_account):
Gas: 1588025.55 TGas (27.8% of shard)
Accounts: 83877
Top 3 accounts:
#1: earn.kaiching
Used gas: 983586.34 TGas (17.2% of shard)
#2: claim.sweat
Used gas: 68254.94 TGas (1.2% of shard)
#3: d08385fb005946d8ee761142123a3dc7610d46787283897c4fcd2584041584ae
Used gas: 24306.55 TGas (0.4% of shard)
Right (account >= boundary_account):
Gas: 4121225.93 TGas (72.2% of shard)
Accounts: 271267
Top 3 accounts:
#1: game.hot.tg
Used gas: 2922949.00 TGas (51.2% of shard)
#2: here.tg
Used gas: 119488.37 TGas (2.1% of shard)
#3: hotwallet.kaiching
Used gas: 49449.18 TGas (0.9% of shard)
The resharding v2 is completed.
Goals
Background
The goal of the resharding project is to implement fast and robust resharding.
Why should NEAR One work on this
Currently, NEAR protocol has four shards. With more partners onboarding, we started seeing that some shards occasionally become over-crowded with respect to total state size and number of transactions. In addition, with state sync and stateless validation, validators will not need to track all shards and validator hardware requirements can be greatly reduced with smaller shard size. With future in-memory tries, it's also important to limit the size of individual shards.
What needs to be accomplished
The implementation should be robust enough so that we can later use it in Phase 2. The implementation should also allow for shard deletion in the future - meaning that any changes to the trie and the storage should support fast deletion.
Main use case
Once the project is completed we should be able to manually schedule a resharding of the largest shards in mainnet and testnet and the resharding should smoothly take place without any disruptions to the network.
Links to external documentations and discussions
Assumptions
Pre-requisites
Out of scope
Task list
mainnet release preparation
mainnet release
implementation
9420
9421
9274
9335
9362
9467
9474
9494
9449
10094
10119
10197
10240
tge-lockup.sweat
is a good boundary from storage point of view and splits the shard 36:30:32token.sweat
is a good boundary from gas usage point of view and splits the shard 27:45:2710143
9345
9373
9402
9467
10052
10179
10296
Operational
10296
10297
10328
10303
Code Quality improvements
10393
Delayed until after the first rollout
BrainstormingCOMPLETED[x] Select the best solutions
'*' - implement or verify existing implementation