fix(async-ccc): print whole block hash and tx hash when failure (#1097)

* fix-async-ccc-print-whole-block-hash-and-tx-hash

* chore: auto version bump [bot]

* chore: auto version bump [bot]

---------

Co-authored-by: colinlyguo <colinlyguo@users.noreply.github.com>
This commit is contained in:
colin 2024-12-06 16:06:35 +07:00 committed by GitHub
parent 17ac3e67a9
commit a5ecce2dc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -202,7 +202,7 @@ func New(stack *node.Node, config *ethconfig.Config, l1Client sync_service.EthCl
if config.CheckCircuitCapacity {
eth.asyncChecker = ccc.NewAsyncChecker(eth.blockchain, config.CCCMaxWorkers, false)
eth.asyncChecker.WithOnFailingBlock(func(b *types.Block, err error) {
log.Warn("block failed CCC check, it will be reorged by the sequencer", "hash", b.Hash(), "err", err)
log.Warn("block failed CCC check, it will be reorged by the sequencer", "hash", b.Hash().Hex(), "err", err)
})
eth.blockchain.Validator().WithAsyncValidator(eth.asyncChecker.Check)
}

View file

@ -24,7 +24,7 @@ import (
const (
VersionMajor = 5 // Major version component of the current release
VersionMinor = 7 // Minor version component of the current release
VersionPatch = 27 // Patch version component of the current release
VersionPatch = 28 // Patch version component of the current release
VersionMeta = "mainnet" // Version metadata to append to the version string
)

View file

@ -439,6 +439,7 @@ func (p *Pipeline) cccStage(candidates <-chan *BlockCandidate, deadline time.Tim
lastTxn := candidate.Txs[candidate.Txs.Len()-1]
cccTimer.UpdateSince(cccStart)
if err != nil {
log.Warn("failed to apply CCC", "txHash", lastTxn.Hash().Hex(), "err", err)
resultCh <- &Result{
OverflowingTx: lastTxn,
OverflowingTrace: candidate.LastTrace,