diff --git a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix.go b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix.go index 87b91d46d..c7baa85b3 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix.go +++ b/beacon-chain/rpc/prysm/v1alpha1/validator/proposer_bellatrix.go @@ -27,11 +27,20 @@ import ( "go.opencensus.io/trace" ) -// builderGetPayloadMissCount tracks the number of misses when validator tries to get a payload from builder -var builderGetPayloadMissCount = promauto.NewCounter(prometheus.CounterOpts{ - Name: "builder_get_payload_miss_count", - Help: "The number of get payload misses for validator requests to builder", -}) +var ( + builderValueGweiGauge = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "builder_value_gwei", + Help: "Builder payload value in gwei", + }) + localValueGweiGauge = promauto.NewGauge(prometheus.GaugeOpts{ + Name: "local_value_gwei", + Help: "Local payload value in gwei", + }) + builderGetPayloadMissCount = promauto.NewCounter(prometheus.CounterOpts{ + Name: "builder_get_payload_miss_count", + Help: "The number of get payload misses for validator requests to builder", + }) +) // emptyTransactionsRoot represents the returned value of ssz.TransactionsRoot([][]byte{}) and // can be used as a constant to avoid recomputing this value in every call. @@ -92,6 +101,8 @@ func setExecutionData(ctx context.Context, blk interfaces.SignedBeaconBlock, loc "builderBoostFactor": builderBoostFactor, }).Warn("Proposer: both local boost and builder boost are using non default values") } + builderValueGweiGauge.Set(float64(builderValueGwei)) + localValueGweiGauge.Set(float64(localValueGwei)) // If we can't get the builder value, just use local block. if higherValueBuilder && withdrawalsMatched { // Builder value is higher and withdrawals match.