Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zjg555543 committed Nov 7, 2024
1 parent 2577840 commit ef7146b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions sequencesender/sequencesender.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ func (s *SequenceSender) batchRetrieval(ctx context.Context) error {
// Try to retrieve batch from RPC
rpcBatch, err := s.rpcClient.GetBatch(currentBatchNumber)
log.Infof("zjg, rpcClient batch: %v, l2 data len:%v, accInputHash:%v,lastL2BlockTimestamp:%v", rpcBatch.BatchNumber(), len(rpcBatch.L2Data()), rpcBatch.AccInputHash(), rpcBatch.LastL2BLockTimestamp())
rpcBatch.Cu
if err != nil {
if errors.Is(err, ethtxmanager.ErrNotFound) {
s.logger.Infof("batch %d not found in RPC", currentBatchNumber)
Expand Down
5 changes: 4 additions & 1 deletion sequencesender/txbuilder/banana_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func getHighestL1InfoIndex(batches []etherman.Batch) uint32 {
func (t *TxBuilderBananaBase) GetCounterL1InfoRoot(ctx context.Context, highestL1IndexInBatch uint32) (uint32, error) {
header, err := t.ethClient.HeaderByNumber(ctx, t.blockFinality)
if err != nil {
log.Infof("zjg, GetCounterL1InfoRoot: error calling HeaderByNumber, with block finality %d: %w", t.blockFinality.Int64(), err)
return 0, fmt.Errorf("error calling HeaderByNumber, with block finality %d: %w", t.blockFinality.Int64(), err)
}
var resL1InfoCounter uint32
Expand All @@ -111,10 +112,11 @@ func (t *TxBuilderBananaBase) GetCounterL1InfoRoot(ctx context.Context, highestL
}
// special case: there are no leaves in L1InfoTree yet
if resL1InfoCounter == 0 && highestL1IndexInBatch == 0 {
log.Infof("No L1 Info tree leaves yet, batch use no leaf")
log.Infof("zjg, GetCounterL1InfoRoot, No L1 Info tree leaves yet, batch use no leaf")
return resL1InfoCounter, nil
}
if resL1InfoCounter > highestL1IndexInBatch {
log.Info("zjg, GetCounterL1InfoRoot, resL1InfoCounter > highestL1IndexInBatch:%v, %v", resL1InfoCounter, highestL1IndexInBatch)
return resL1InfoCounter, nil
}

Expand Down Expand Up @@ -151,6 +153,7 @@ func (t *TxBuilderBananaBase) NewSequence(
if err != nil {
return nil, err
}
log.Infof("zjg, counterL1InfoRoot: %v", counterL1InfoRoot)
sequence.CounterL1InfoRoot = counterL1InfoRoot
l1InfoRoot, err := t.getL1InfoRoot(sequence.CounterL1InfoRoot)
if err != nil {
Expand Down

0 comments on commit ef7146b

Please sign in to comment.