Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add performance benchmarks for the phase0 block attributes #6145

Merged
merged 15 commits into from
Dec 5, 2023
Merged
354 changes: 353 additions & 1 deletion dashboards/lodestar_block_production.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,358 @@
],
"liveNow": false,
"panels": [
{
"type": "timeseries",
"title": "Full block production avg time with steps",
"gridPos": {
"x": 0,
"y": 1,
"w": 12,
"h": 8
},
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"id": 546,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"refId": "proposerSlashing",
"expr": "rate(beacon_block_production_execution_steps_seconds{step=\"proposerSlashing\"}[$rate_interval])\n/\nrate(beacon_block_production_execution_steps_seconds{step=\"proposerSlashing\"}[$rate_interval])",
"range": true,
"instant": false,
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}",
"exemplar": false
},
{
"refId": "attesterSlashings",
"expr": "rate(beacon_block_production_execution_steps_seconds{step=\"attesterSlashings\"}[$rate_interval])\n/\nrate(beacon_block_production_execution_steps_seconds{step=\"attesterSlashings\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "voluntaryExits",
"expr": "rate(beacon_block_production_execution_steps_seconds{step=\"voluntaryExits\"}[$rate_interval])\n/\nrate(beacon_block_production_execution_steps_seconds{step=\"voluntaryExits\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "blsToExecutionChanges",
"expr": "rate(beacon_block_production_execution_steps_seconds{step=\"blsToExecutionChanges\"}[$rate_interval])\n/\nrate(beacon_block_production_execution_steps_seconds{step=\"blsToExecutionChanges\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "attestations",
"expr": "rate(beacon_block_production_execution_steps_seconds{step=\"attestations\"}[$rate_interval])\n/\nrate(beacon_block_production_execution_steps_seconds{step=\"attestations\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "eth1DataAndDeposits",
"expr": "rate(beacon_block_production_execution_steps_seconds{step=\"eth1DataAndDeposits\"}[$rate_interval])\n/\nrate(beacon_block_production_execution_steps_seconds{step=\"eth1DataAndDeposits\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "syncAggregate",
"expr": "rate(beacon_block_production_execution_steps_seconds{step=\"syncAggregate\"}[$rate_interval])\n/\nrate(beacon_block_production_execution_steps_seconds{step=\"syncAggregate\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "executionPayload",
"expr": "rate(beacon_block_production_execution_steps_seconds{step=\"executionPayload\"}[$rate_interval])\n/\nrate(beacon_block_production_execution_steps_seconds{step=\"executionPayload\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
}
],
"options": {
"tooltip": {
"mode": "multi",
"sort": "none"
},
"legend": {
"showLegend": true,
"displayMode": "list",
"placement": "bottom",
"calcs": []
}
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"barAlignment": 0,
"lineWidth": 1,
"fillOpacity": 30,
"gradientMode": "opacity",
"spanNulls": false,
"insertNulls": false,
"showPoints": "auto",
"pointSize": 5,
"stacking": {
"mode": "normal",
"group": "A"
},
"axisPlacement": "auto",
"axisLabel": "",
"axisColorMode": "text",
"scaleDistribution": {
"type": "linear"
},
"axisCenteredZero": false,
"hideFrom": {
"tooltip": false,
"viz": false,
"legend": false
},
"thresholdsStyle": {
"mode": "off"
}
},
"color": {
"mode": "palette-classic"
},
"mappings": [],
"unit": "s"
},
"overrides": []
},
"transformations": []
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"lineInterpolation": "linear",
"barAlignment": 0,
"lineWidth": 1,
"fillOpacity": 30,
"gradientMode": "opacity",
"spanNulls": false,
"insertNulls": false,
"showPoints": "auto",
"pointSize": 5,
"stacking": {
"mode": "normal",
"group": "A"
},
"axisPlacement": "auto",
"axisLabel": "",
"axisColorMode": "text",
"scaleDistribution": {
"type": "linear"
},
"axisCenteredZero": false,
"hideFrom": {
"tooltip": false,
"viz": false,
"legend": false
},
"thresholdsStyle": {
"mode": "off"
}
},
"color": {
"mode": "palette-classic"
},
"mappings": [],
"unit": "s"
},
"overrides": []
},
"gridPos": {
"x": 12,
"y": 1,
"w": 12,
"h": 8
},
"id": 547,
"options": {
"tooltip": {
"mode": "multi",
"sort": "none"
},
"legend": {
"showLegend": true,
"displayMode": "list",
"placement": "bottom",
"calcs": []
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"refId": "proposerSlashing",
"expr": "rate(beacon_block_production_builder_steps_seconds{step=\"proposerSlashing\"}[$rate_interval])\n/\nrate(beacon_block_production_builder_steps_seconds{step=\"proposerSlashing\"}[$rate_interval])",
"range": true,
"instant": false,
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}",
"exemplar": false
},
{
"refId": "attesterSlashings",
"expr": "rate(beacon_block_production_builder_steps_seconds{step=\"attesterSlashings\"}[$rate_interval])\n/\nrate(beacon_block_production_builder_steps_seconds{step=\"attesterSlashings\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "voluntaryExits",
"expr": "rate(beacon_block_production_builder_steps_seconds{step=\"voluntaryExits\"}[$rate_interval])\n/\nrate(beacon_block_production_builder_steps_seconds{step=\"voluntaryExits\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "blsToExecutionChanges",
"expr": "rate(beacon_block_production_builder_steps_seconds{step=\"blsToExecutionChanges\"}[$rate_interval])\n/\nrate(beacon_block_production_builder_steps_seconds{step=\"blsToExecutionChanges\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "attestations",
"expr": "rate(beacon_block_production_builder_steps_seconds{step=\"attestations\"}[$rate_interval])\n/\nrate(beacon_block_production_builder_steps_seconds{step=\"attestations\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "eth1DataAndDeposits",
"expr": "rate(beacon_block_production_builder_steps_seconds{step=\"eth1DataAndDeposits\"}[$rate_interval])\n/\nrate(beacon_block_production_builder_steps_seconds{step=\"eth1DataAndDeposits\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "syncAggregate",
"expr": "rate(beacon_block_production_builder_steps_seconds{step=\"syncAggregate\"}[$rate_interval])\n/\nrate(beacon_block_production_builder_steps_seconds{step=\"syncAggregate\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
},
{
"refId": "executionPayload",
"expr": "rate(beacon_block_production_builder_steps_seconds{step=\"executionPayload\"}[$rate_interval])\n/\nrate(beacon_block_production_builder_steps_seconds{step=\"executionPayload\"}[$rate_interval])",
"range": true,
"instant": false,
"datasource": {
"uid": "${DS_PROMETHEUS}",
"type": "prometheus"
},
"hide": false,
"editorMode": "code",
"legendFormat": "{{step}}"
}
],
"title": "Blinded block production avg time with steps",
"type": "timeseries",
"transformations": []
},
{
"collapsed": false,
"datasource": {
Expand Down Expand Up @@ -309,7 +661,7 @@
"expr": "rate(beacon_block_production_seconds_sum[$rate_interval])\n/\nrate(beacon_block_production_seconds_count[$rate_interval])",
"format": "heatmap",
"interval": "",
"legendFormat": "time",
"legendFormat": "{{instance}} - {{source}}",
"refId": "A"
}
],
Expand Down
4 changes: 2 additions & 2 deletions packages/beacon-node/src/api/impl/validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const SYNC_TOLERANCE_EPOCHS = 1;
* Cutoff time to wait for execution and builder block production apis to resolve
* Post this time, race execution and builder to pick whatever resolves first
*
* Emprically the builder block resolves in ~1.5+ seconds, and executon should resolve <1 sec.
* Empirically the builder block resolves in ~1.5+ seconds, and execution should resolve <1 sec.
* So lowering the cutoff to 2 sec from 3 seconds to publish faster for successful proposal
* as proposals post 4 seconds into the slot seems to be not being included
*/
Expand Down Expand Up @@ -437,7 +437,7 @@ export function getValidatorApi({
chain.executionBuilder !== undefined &&
builderSelection !== routes.validator.BuilderSelection.ExecutionOnly;

logger.verbose("produceBlockV3 assembling block", {
logger.verbose("Assembling block with produceBlockV3 ", {
fork,
builderSelection,
slot,
Expand Down
Loading
Loading