mirror of
https://github.com/filecoin-project/lotus.git
synced 2025-08-26 02:38:58 +08:00
fix: sealing: improve gasEstimate logging (#11840)
* improve gasEstimate logging * use fmt for hex
This commit is contained in:
@ -449,9 +449,9 @@ func (b *CommitBatcher) processBatchV2(cfg sealiface.Config, sectors []abi.Secto
|
||||
_, err = simulateMsgGas(b.mctx, b.api, from, b.maddr, builtin.MethodsMiner.ProveCommitSectors3, needFunds, maxFee, enc.Bytes())
|
||||
|
||||
if err != nil && (!api.ErrorIsIn(err, []error{&api.ErrOutOfGas{}}) || len(sectors) < miner.MinAggregatedSectors*2) {
|
||||
log.Errorf("simulating CommitBatch message failed (%x): %s", enc.Bytes(), err)
|
||||
log.Errorf("simulating CommitBatch %s", err)
|
||||
res.Error = err.Error()
|
||||
return []sealiface.CommitBatchRes{res}, xerrors.Errorf("simulating CommitBatch message failed: %w", err)
|
||||
return []sealiface.CommitBatchRes{res}, xerrors.Errorf("simulating CommitBatch %w", err)
|
||||
}
|
||||
|
||||
msgTooLarge := len(enc.Bytes()) > (messagepool.MaxMessageSize - 128)
|
||||
@ -590,9 +590,9 @@ func (b *CommitBatcher) processBatchV1(cfg sealiface.Config, sectors []abi.Secto
|
||||
_, err = simulateMsgGas(b.mctx, b.api, from, b.maddr, builtin.MethodsMiner.ProveCommitAggregate, needFunds, maxFee, enc.Bytes())
|
||||
|
||||
if err != nil && (!api.ErrorIsIn(err, []error{&api.ErrOutOfGas{}}) || len(sectors) < miner.MinAggregatedSectors*2) {
|
||||
log.Errorf("simulating CommitBatch message failed (%x): %s", enc.Bytes(), err)
|
||||
log.Errorf("simulating CommitBatch %s", err)
|
||||
res.Error = err.Error()
|
||||
return []sealiface.CommitBatchRes{res}, xerrors.Errorf("simulating CommitBatch message failed: %w", err)
|
||||
return []sealiface.CommitBatchRes{res}, xerrors.Errorf("simulating CommitBatch %w", err)
|
||||
}
|
||||
|
||||
// If we're out of gas, split the batch in half and evaluate again
|
||||
|
Reference in New Issue
Block a user