Bootstrap block v3#7337
Conversation
| func (e *epochStartBootstrap) getRootHashToSync( | ||
| header data.HeaderHandler, | ||
| ) []byte { | ||
| rootHashToSync := header.GetRootHash() |
There was a problem hiding this comment.
this is not correct if there are scheduled transactions, should call e.dataSyncerWithScheduled.GetRootHashToSync
so maybe this function can include also line 1210, and remove it from there?
Also metachain does not have scheduled roothash
| hashDst[string(val.Hash)] = val | ||
| miniBlockHeader, ok := val.(*block.MiniBlockHeader) | ||
| if !ok { | ||
| log.Warn("wrong time assertion for mini block header handler", "err", epochStart.ErrWrongTypeAssertion) |
There was a problem hiding this comment.
wrong time assertion -> wrong type assertion?
|
|
||
| for _, val := range metaBlock.MiniBlockHeaders { | ||
| isCrossShardDestMe := (val.ReceiverShardID == destId || val.ReceiverShardID == core.AllShardId) && val.SenderShardID != destId | ||
| for _, val := range metaBlock.GetMiniBlockHeaderHandlers() { |
There was a problem hiding this comment.
If the metablock is a metablockV3, the metablock mini-block header handlers of use in shard should be taken from the execution results instead of the ones directly on the metablock (that is the metablock internal proposal).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/supernova-async-exec #7337 +/- ##
=============================================================
+ Coverage 77.27% 77.28% +0.01%
=============================================================
Files 867 867
Lines 116598 116704 +106
=============================================================
+ Hits 90099 90193 +94
- Misses 20553 20559 +6
- Partials 5946 5952 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| if lastExecutedNonce >= baseHeaderNonce { | ||
| return nil | ||
| } |
There was a problem hiding this comment.
it should'nt happen, but i've added it as an extra check
| hashesToRequest := make([][]byte, 0, len(meta.GetEpochStartHandler().GetLastFinalizedHeaderHandlers())+1) | ||
| shardIds := make([]uint32, 0, len(meta.GetEpochStartHandler().GetLastFinalizedHeaderHandlers())+1) |
There was a problem hiding this comment.
| hashesToRequest := make([][]byte, 0, len(meta.GetEpochStartHandler().GetLastFinalizedHeaderHandlers())+1) | |
| shardIds := make([]uint32, 0, len(meta.GetEpochStartHandler().GetLastFinalizedHeaderHandlers())+1) | |
| hashesToRequest := make([][]byte, 0) | |
| shardIds := make([]uint32, 0) |
| if meta.GetEpoch() == e.startEpoch+1 { | ||
| syncedHeaders[string(meta.GetEpochStartHandler().GetEconomicsHandler().GetPrevEpochStartHash())] = &block.MetaBlock{} | ||
| } |
There was a problem hiding this comment.
can you add a comment here? not clear for me why it is needed
|
|
||
| epochStartProvider, _ := NewEpochStartBootstrap(args) | ||
|
|
||
| expErr := errors.New("expected error") |
There was a problem hiding this comment.
extract a global var and reuse it?
| } | ||
|
|
||
| if headerShard == MetachainShardId { | ||
| metaExecResult, ok := baseExecResult.(data.MetaExecutionResultHandler) |
Reasoning behind the pull request
LastExecutionResultson the headerrootHashwill have to be taken fromLastExecutionResultsProposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
featbranch created?featbranch merging, do all satellite projects have a proper tag insidego.mod?