From 9a08cd9fa2c127ae0467ccc60cc20900dfd3c54d Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Wed, 24 Jan 2024 10:25:50 +0000 Subject: [PATCH 1/3] fix crashing log and add new trace --- go/enclave/components/block_processor.go | 2 +- go/enclave/nodetype/sequencer.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/go/enclave/components/block_processor.go b/go/enclave/components/block_processor.go index 13ea6edbcd..b7bf8d0d30 100644 --- a/go/enclave/components/block_processor.go +++ b/go/enclave/components/block_processor.go @@ -99,7 +99,7 @@ func (bp *l1BlockProcessor) tryAndInsertBlock(br *common.BlockAndReceipts) (*Blo return nil, err } bp.logger.Trace("Block inserted successfully", - log.BlockHeightKey, block.NumberU64(), log.BlockHashKey, block.Hash(), "ingestionType", ingestionType) + log.BlockHeightKey, block.NumberU64(), log.BlockHashKey, block.Hash()) err = bp.storage.StoreBlock(block, ingestionType.ChainFork) if err != nil { diff --git a/go/enclave/nodetype/sequencer.go b/go/enclave/nodetype/sequencer.go index c8dd9dc6a0..26771383da 100644 --- a/go/enclave/nodetype/sequencer.go +++ b/go/enclave/nodetype/sequencer.go @@ -399,6 +399,7 @@ func (s *sequencer) duplicateBatches(l1Head *types.Block, nonCanonicalL1Path []c } func (s *sequencer) SubmitTransaction(transaction *common.L2Tx) error { + s.logger.Trace("Submit tx", "tx", transaction, "type", transaction.Type()) return s.mempool.Add(transaction) } From 06ed0a349512d3a8aab85730e4578d9313d5a6a0 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Wed, 24 Jan 2024 17:54:37 +0000 Subject: [PATCH 2/3] better logging --- go/enclave/nodetype/sequencer.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/go/enclave/nodetype/sequencer.go b/go/enclave/nodetype/sequencer.go index 26771383da..c2f1734893 100644 --- a/go/enclave/nodetype/sequencer.go +++ b/go/enclave/nodetype/sequencer.go @@ -399,7 +399,19 @@ func (s *sequencer) duplicateBatches(l1Head *types.Block, nonCanonicalL1Path []c } func (s *sequencer) SubmitTransaction(transaction *common.L2Tx) error { - s.logger.Trace("Submit tx", "tx", transaction, "type", transaction.Type()) + s.logger.Debug("Submit tx", + log.TxKey, transaction.Hash(), + "type", transaction.Type(), + "payload", gethcommon.Bytes2Hex(transaction.Data()), + "time", transaction.Time(), + "to", transaction.To().Hex(), + "value", transaction.Value().Uint64(), + "size", transaction.Size(), + "nonce", transaction.Nonce(), + "gas", transaction.Gas(), + "gasPrice", transaction.GasPrice().Uint64(), + "chainId", transaction.ChainId().Uint64(), + ) return s.mempool.Add(transaction) } From bad17cfa9c785400b5ad53cdc878aa34a7ac8e38 Mon Sep 17 00:00:00 2001 From: Tudor Malene Date: Wed, 24 Jan 2024 22:06:38 +0000 Subject: [PATCH 3/3] remove logging --- go/enclave/nodetype/sequencer.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/go/enclave/nodetype/sequencer.go b/go/enclave/nodetype/sequencer.go index c2f1734893..25b3d71a80 100644 --- a/go/enclave/nodetype/sequencer.go +++ b/go/enclave/nodetype/sequencer.go @@ -399,19 +399,20 @@ func (s *sequencer) duplicateBatches(l1Head *types.Block, nonCanonicalL1Path []c } func (s *sequencer) SubmitTransaction(transaction *common.L2Tx) error { - s.logger.Debug("Submit tx", - log.TxKey, transaction.Hash(), - "type", transaction.Type(), - "payload", gethcommon.Bytes2Hex(transaction.Data()), - "time", transaction.Time(), - "to", transaction.To().Hex(), - "value", transaction.Value().Uint64(), - "size", transaction.Size(), - "nonce", transaction.Nonce(), - "gas", transaction.Gas(), - "gasPrice", transaction.GasPrice().Uint64(), - "chainId", transaction.ChainId().Uint64(), - ) + //if transaction.Type() + //s.logger.Debug("Submit tx", + // log.TxKey, transaction.Hash(), + // "type", transaction.Type(), + // "payload", gethcommon.Bytes2Hex(transaction.Data()), + // "time", transaction.Time(), + // "to", transaction.To().Hex(), + // "value", transaction.Value().Uint64(), + // "size", transaction.Size(), + // "nonce", transaction.Nonce(), + // "gas", transaction.Gas(), + // "gasPrice", transaction.GasPrice().Uint64(), + // "chainId", transaction.ChainId().Uint64(), + //) return s.mempool.Add(transaction) }