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

remove dead code #2238

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions go/enclave/nodetype/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,16 +414,8 @@ func (s *sequencer) OnL1Fork(ctx context.Context, fork *common.ChainFork) error
return fmt.Errorf("could not duplicate batches. Cause %w", err)
}

rollup, err := s.storage.FetchReorgedRollup(ctx, fork.NonCanonicalPath)
if err == nil {
s.logger.Error("Reissue rollup", log.RollupHashKey, rollup)
// todo - tudor - finalise the logic to reissue a rollup when the block used for compression was reorged
return nil
}
if !errors.Is(err, errutil.ErrNotFound) {
return fmt.Errorf("could not call FetchReorgedRollup. Cause: %w", err)
}

// note: there is no need to do anything about Rollups that were published against re-orged blocks
// because the state machine in the host will detect that case
return nil
}

Expand Down
4 changes: 0 additions & 4 deletions go/enclave/storage/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ type BlockResolver interface {
StoreBlock(ctx context.Context, block *types.Header, fork *common.ChainFork) error
// IsAncestor returns true if maybeAncestor is an ancestor of the L1 BlockHeader, and false otherwise
IsAncestor(ctx context.Context, block *types.Header, maybeAncestor *types.Header) bool
// IsBlockAncestor returns true if maybeAncestor is an ancestor of the L1 BlockHeader, and false otherwise
// Takes into consideration that the BlockHeader to verify might be on a branch we haven't received yet
// todo (low priority) - this is super confusing, analyze the usage
IsBlockAncestor(ctx context.Context, block *types.Header, maybeAncestor common.L1BlockHash) bool
}

type BatchResolver interface {
Expand Down
9 changes: 0 additions & 9 deletions go/enclave/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,6 @@ func (s *storageImpl) IsAncestor(ctx context.Context, block *types.Header, maybe
return s.IsAncestor(ctx, p, maybeAncestor)
}

func (s *storageImpl) IsBlockAncestor(ctx context.Context, block *types.Header, maybeAncestor common.L1BlockHash) bool {
defer s.logDuration("IsBlockAncestor", measure.NewStopwatch())
resolvedBlock, err := s.FetchBlock(ctx, maybeAncestor)
if err != nil {
return false
}
return s.IsAncestor(ctx, block, resolvedBlock)
}

func (s *storageImpl) HealthCheck(ctx context.Context) (bool, error) {
defer s.logDuration("HealthCheck", measure.NewStopwatch())
seqNo, err := s.FetchCurrentSequencerNo(ctx)
Expand Down
Loading