From bdd7b29e24c93b1019d5625e8d92476b7fb3cdb8 Mon Sep 17 00:00:00 2001 From: Will Hester Date: Thu, 31 Oct 2024 07:52:45 +0000 Subject: [PATCH] add host stopping check to blob fetch --- go/host/l1/publisher.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/go/host/l1/publisher.go b/go/host/l1/publisher.go index 47f8a873f9..c3b3425d7b 100644 --- a/go/host/l1/publisher.go +++ b/go/host/l1/publisher.go @@ -250,7 +250,8 @@ func (p *Publisher) ExtractRelevantTenTransactions(block *types.Block, receipts contractAddressTxs = append(contractAddressTxs, typedTx) case *ethadapter.L1RollupHashes: blobs, err = p.blobResolver.FetchBlobs(p.sendingContext, block.Header(), typedTx.BlobHashes) - if err != nil { + // temporarily add this host stopping check to prevent sim test failures until a more robust solution is implemented + if err != nil && !p.hostStopper.IsStopping() { if errors.Is(err, ethereum.NotFound) { p.logger.Crit("Blobs were not found on beacon chain or archive service", "block", block.Hash(), "error", err) } else { @@ -446,6 +447,10 @@ func (p *Publisher) publishTransaction(tx types.TxData) error { // after unless we're stuck blocking. p.logger.Info("Host preparing to issue L1 tx") + if p.hostStopper.IsStopping() { + return fmt.Errorf("host is stopping, cannot publish transaction") + } + p.sendingLock.Lock() defer p.sendingLock.Unlock()