From ef7146b5e93b90c3c0a14bcbe0a9d4a016d52cc7 Mon Sep 17 00:00:00 2001 From: jianguo Date: Thu, 7 Nov 2024 18:36:34 +0800 Subject: [PATCH] update --- sequencesender/sequencesender.go | 1 + sequencesender/txbuilder/banana_base.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sequencesender/sequencesender.go b/sequencesender/sequencesender.go index 947a484f..aebe3623 100644 --- a/sequencesender/sequencesender.go +++ b/sequencesender/sequencesender.go @@ -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) diff --git a/sequencesender/txbuilder/banana_base.go b/sequencesender/txbuilder/banana_base.go index abb47c1f..fe794af0 100644 --- a/sequencesender/txbuilder/banana_base.go +++ b/sequencesender/txbuilder/banana_base.go @@ -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 @@ -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 } @@ -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 {