There are 2 ways to add root blocks.
-
Synchronizer that download blocks starting from a given header going backward to the latest known block in local db
-
Create Block: adding root block by generated
Each step starts after the previous one completes (i.e. all the RPCs returned). -
If the root block contains shard blocks that are unknown to the root chain, it will ask shards to download and add those missing shard blocks from peer cluster. (SyncMinorBlockListRequest)
-
The root chain validates the block, updating the local root chain, and put the block in db.
-
The root chain broadcast the root block to all the shards making the CrossShardTransactionDeposits available for the destination shard to confirm. (AddRootBlockRequest)
-
Sync Root Blocks Process
-
Create Block Process