Skip to content

Commit

Permalink
Merge branch 'master' into redis-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
anodar authored Apr 15, 2024
2 parents 92a7e3d + 9b3ebb4 commit ef0f40a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
7 changes: 3 additions & 4 deletions arbnode/batch_poster.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,8 @@ var DefaultBatchPosterConfig = BatchPosterConfig{
Enable: false,
DisableDasFallbackStoreDataOnChain: false,
// This default is overridden for L3 chains in applyChainParameters in cmd/nitro/nitro.go
MaxSize: 100000,
// TODO: is 1000 bytes an appropriate margin for error vs blob space efficiency?
Max4844BatchSize: blobs.BlobEncodableData*(params.MaxBlobGasPerBlock/params.BlobTxBlobGasPerBlob) - 1000,
MaxSize: 100000,
Max4844BatchSize: blobs.BlobEncodableData*(params.MaxBlobGasPerBlock/params.BlobTxBlobGasPerBlob) - 2000,
PollInterval: time.Second * 10,
ErrorDelay: time.Second * 10,
MaxDelay: time.Hour,
Expand Down Expand Up @@ -1278,7 +1277,7 @@ func (b *BatchPoster) maybePostSequencerBatch(ctx context.Context) (bool, error)
return false, err
}
if len(kzgBlobs)*params.BlobTxBlobGasPerBlob > params.MaxBlobGasPerBlock {
return false, fmt.Errorf("produced %v blobs for batch but a block can only hold %v", len(kzgBlobs), params.MaxBlobGasPerBlock/params.BlobTxBlobGasPerBlob)
return false, fmt.Errorf("produced %v blobs for batch but a block can only hold %v (compressed batch was %v bytes long)", len(kzgBlobs), params.MaxBlobGasPerBlock/params.BlobTxBlobGasPerBlob, len(sequencerMsg))
}
accessList := b.accessList(int(batchPosition.NextSeqNum), int(b.building.segments.delayedMsg))
// On restart, we may be trying to estimate gas for a batch whose successor has
Expand Down
19 changes: 13 additions & 6 deletions execution/gethexec/sync_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,23 @@ func NewSyncMonitor(config *SyncMonitorConfig, exec *ExecutionEngine) *SyncMonit

func (s *SyncMonitor) FullSyncProgressMap() map[string]interface{} {
res := s.consensus.FullSyncProgressMap()
consensusSyncTarget := s.consensus.SyncTargetMessageCount()

built, err := s.exec.HeadMessageNumber()
res["consensusSyncTarget"] = s.consensus.SyncTargetMessageCount()

header, err := s.exec.getCurrentHeader()
if err != nil {
res["headMsgNumberError"] = err
res["currentHeaderError"] = err
} else {
blockNum := header.Number.Uint64()
res["blockNum"] = blockNum
messageNum, err := s.exec.BlockNumberToMessageIndex(blockNum)
if err != nil {
res["messageOfLastBlockError"] = err
} else {
res["messageOfLastBlock"] = messageNum
}
}

res["builtBlock"] = built
res["consensusSyncTarget"] = consensusSyncTarget

return res
}

Expand Down

0 comments on commit ef0f40a

Please sign in to comment.