Skip to content

Commit

Permalink
bugfix: wait in dom for the pendingEtx to be generated by the sub
Browse files Browse the repository at this point in the history
  • Loading branch information
gameofpointers committed Jan 25, 2023
1 parent c6c9c8a commit 14bf68c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func (c *Core) InsertChain(blocks types.Blocks) (int, error) {
if err != nil {
if err == consensus.ErrFutureBlock ||
err.Error() == ErrBodyNotFound.Error() ||
err.Error() == ErrPendingEtxNotFound.Error() ||
err.Error() == consensus.ErrPrunedAncestor.Error() ||
err.Error() == consensus.ErrUnknownAncestor.Error() ||
err.Error() == ErrSubNotSyncedToDom.Error() ||
Expand Down
5 changes: 4 additions & 1 deletion core/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@ var (

// ErrBadSubManifest is returned when a block's subordinate manifest does not match the subordinate manifest hash
ErrBadSubManifest = errors.New("subordinate manifest is incorrect")

//ErrAddedFutureCache is returned when a block could not be appended yet and has been added to the future cache to retry later
ErrAddedFutureCache = errors.New("block was added to future cache")

//ErrPendingEtxNotFound is returned when pendingEtxs cannot be found for a hash given in the submanifest
ErrPendingEtxNotFound = errors.New("pending etx not found")
)

// List of evm-call-message pre-checking errors. All state transition messages will
Expand Down
3 changes: 2 additions & 1 deletion core/slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ func (sl *Slice) CollectSubRollups(b *types.Block) ([]types.Transactions, error)
} else if res := rawdb.ReadPendingEtxs(sl.sliceDb, hash); res != nil {
pendingEtxs = res
} else {
return nil, fmt.Errorf("unable to find pending etxs for hash in manifest, hash: %s", hash.String())
log.Warn("unable to find pending etxs for hash in manifest", "hash:", hash.String())
return nil, ErrPendingEtxNotFound
}
for ctx := nodeCtx; ctx < common.HierarchyDepth; ctx++ {
subRollups[ctx] = append(subRollups[ctx], pendingEtxs[ctx]...)
Expand Down

0 comments on commit 14bf68c

Please sign in to comment.