mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 00:27:38 +00:00
Add bid value metrics (#13804)
This commit is contained in:
parent
6de7df6b9d
commit
97edffaff5
@ -27,11 +27,20 @@ import (
|
|||||||
"go.opencensus.io/trace"
|
"go.opencensus.io/trace"
|
||||||
)
|
)
|
||||||
|
|
||||||
// builderGetPayloadMissCount tracks the number of misses when validator tries to get a payload from builder
|
var (
|
||||||
var builderGetPayloadMissCount = promauto.NewCounter(prometheus.CounterOpts{
|
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",
|
Name: "builder_get_payload_miss_count",
|
||||||
Help: "The number of get payload misses for validator requests to builder",
|
Help: "The number of get payload misses for validator requests to builder",
|
||||||
})
|
})
|
||||||
|
)
|
||||||
|
|
||||||
// emptyTransactionsRoot represents the returned value of ssz.TransactionsRoot([][]byte{}) and
|
// emptyTransactionsRoot represents the returned value of ssz.TransactionsRoot([][]byte{}) and
|
||||||
// can be used as a constant to avoid recomputing this value in every call.
|
// 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,
|
"builderBoostFactor": builderBoostFactor,
|
||||||
}).Warn("Proposer: both local boost and builder boost are using non default values")
|
}).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 we can't get the builder value, just use local block.
|
||||||
if higherValueBuilder && withdrawalsMatched { // Builder value is higher and withdrawals match.
|
if higherValueBuilder && withdrawalsMatched { // Builder value is higher and withdrawals match.
|
||||||
|
Loading…
Reference in New Issue
Block a user