Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
avalonche committed Oct 20, 2023
1 parent 4c974fe commit 74cafaa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eth/block-validation/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,20 @@ func (api *BlockValidationAPI) ValidateBuilderSubmissionV3(params *BuilderBlockV
// TODO: fuzztest, make sure the validation is sound
payload := params.ExecutionPayload
blobsBundle := params.BlobsBundle
log.Info("blobs bundle", "blobs", len(blobsBundle.Blobs), "commits", len(blobsBundle.Commitments), "proofs", len(blobsBundle.Proofs))
block, err := engine.ExecutionPayloadV3ToBlock(payload, blobsBundle, params.ParentBeaconBlockRoot)
if err != nil {
return err
}

err = api.validateBlock(block, params.Message, params.RegisteredGasLimit)
if err != nil {
log.Error("invalid payload", "hash", block.Hash, "number", block.NumberU64(), "parentHash", block.ParentHash, "err", err)
return err
}
err = validateBlobsBundle(block.Transactions(), blobsBundle)
if err != nil {
log.Error("invalid blobs bundle", "err", err)
return err
}
return nil
Expand Down Expand Up @@ -277,7 +280,6 @@ func (api *BlockValidationAPI) validateBlock(block *types.Block, msg *builderApi

err := api.eth.BlockChain().ValidatePayload(block, feeRecipient, expectedProfit, registeredGasLimit, vmconfig, api.useBalanceDiffProfit)
if err != nil {
log.Error("invalid payload", "hash", msg.BlockHash.String(), "number", block.NumberU64(), "parentHash", msg.ParentHash.String(), "err", err)
return err
}

Expand Down Expand Up @@ -315,5 +317,6 @@ func validateBlobsBundle(txs types.Transactions, blobsBundle *builderApiDeneb.Bl
return fmt.Errorf("invalid blob %d: %v", i, err)
}
}
log.Info("validated blobs bundle", "blobs", len(blobs), "commits", len(commits), "proofs", len(proofs))
return nil
}

0 comments on commit 74cafaa

Please sign in to comment.