lighthouse/beacon_node
Paul Hauner a2969ba7de Improve debugging experience for builder proposals (#3725)
## Issue Addressed

NA

## Proposed Changes

This PR sets out to improve the logging/metrics experience when interacting with the builder. Namely, it:

- Adds/changes metrics (see "Metrics Changes" section).
- Adds new logs which show the duration of requests to the builder/local EL.
- Refactors existing logs for consistency and so that the `parent_hash` is include in all relevant logs (we can grep for this field when trying to trace the flow of block production).


Additionally, when I was implementing this PR I noticed that we skip some verification of the builder payload in the scenario where the builder return `Ok` but the local EL returns with `Err`. Namely, we were skipping the bid signature and other values like parent hash and prev randao. In this PR I've changed it so we *always* check these values and reject the bid if they're incorrect. With these changes, we'll sometimes choose to skip a proposal rather than propose something invalid -- that's the only side-effect to the changes that I can see.

## Metrics Changes

- Changed: `execution_layer_request_times`:
    - `method = "get_blinded_payload_local"`: time taken to get a payload from a local EE.
    - `method = "get_blinded_payload_builder"`: time taken to get a blinded payload from a builder.
    - `method = "post_blinded_payload_builder"`: time taken to get a builder to reveal a payload they've previously supplied us.
- `execution_layer_get_payload_outcome`
    - `outcome = "success"`: we successfully produced a payload from a builder or local EE.
    - `outcome = "failure"`: we were unable to get a payload from a builder or local EE.
- New: `execution_layer_builder_reveal_payload_outcome`
    - `outcome = "success"`: a builder revealed a payload from a signed, blinded block.
    - `outcome = "failure"`: the builder did not reveal the payload.
- New: `execution_layer_get_payload_source`
    - `type = "builder"`: we used a payload from a builder to produce a block.
    - `type = "local"`: we used a payload from a local EE to produce a block.
- New: `execution_layer_get_payload_builder_rejections` has a `reason` field to describe why we rejected a payload from a builder.
- New: `execution_layer_payload_bids` tracks the bid (in gwei) from the builder or local EE (local EE not yet supported, waiting on EEs to expose the value). Can only record values that fit inside an i64 (roughly 9 million ETH).
## Additional Info

NA
2022-11-29 05:51:42 +00:00
..
beacon_chain Added LightClientBootstrap V1 (#3711) 2022-11-25 05:19:00 +00:00
builder_client Builder Specs v0.2.0 (#3134) 2022-07-30 00:22:37 +00:00
client Health Endpoints for UI (#3668) 2022-11-15 05:21:26 +00:00
eth1 Lower deposit finalization error to warning (#3739) 2022-11-21 06:29:03 +00:00
execution_layer Improve debugging experience for builder proposals (#3725) 2022-11-29 05:51:42 +00:00
genesis Super small improvement: Remove unnecessary mut (#3736) 2022-11-21 03:15:54 +00:00
http_api Health Endpoints for UI (#3668) 2022-11-15 05:21:26 +00:00
http_metrics Support IPv6 in BN and VC HTTP APIs (#3104) 2022-03-24 00:04:49 +00:00
lighthouse_network Gossipsub fast message id change (#3755) 2022-11-28 07:36:52 +00:00
network remove commas from comma-separated kv pairs (#3737) 2022-11-25 07:57:10 +00:00
operation_pool Fix rust 1.65 lints (#3682) 2022-11-04 07:43:43 +00:00
src Add CLI flag for gui requirements (#3731) 2022-11-28 00:22:53 +00:00
store Deposit Cache Finalization & Fast WS Sync (#2915) 2022-10-30 04:04:24 +00:00
tests Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
timer Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
Cargo.toml v3.3.0 (#3741) 2022-11-23 23:38:32 +00:00