lighthouse/validator_client/src
Jimmy Chen 33c942ff03 Add support for updating validator graffiti (#4417)
## Issue Addressed

#4386 

## Proposed Changes

The original proposal described in the issue adds a new endpoint to support updating validator graffiti, but I realized we already have an endpoint that we use for updating various validator fields in memory and in the validator definitions file, so I think that would be the best place to add this to.

### API endpoint

`PATCH lighthouse/validators/{validator_pubkey}` 

This endpoint updates the graffiti in both the [ validator definition file](https://lighthouse-book.sigmaprime.io/graffiti.html#2-setting-the-graffiti-in-the-validator_definitionsyml) and the in memory `InitializedValidators`. In the next block proposal, the new graffiti will be used.

Note that the [`--graffiti-file`](https://lighthouse-book.sigmaprime.io/graffiti.html#1-using-the---graffiti-file-flag-on-the-validator-client) flag has a priority over the validator definitions file, so if the caller attempts to update the graffiti while the `--graffiti-file` flag is present, the endpoint will return an error (Bad request 400).

## Tasks

- [x] Add graffiti update support to `PATCH lighthouse/validators/{validator_pubkey}` 
- [x] Return error if user tries to update graffiti while the `--graffiti-flag` is set
- [x] Update Lighthouse book
2023-06-22 02:14:57 +00:00
..
duties_service Implement el_offline and use it in the VC (#4295) 2023-05-17 05:51:56 +00:00
http_api Add support for updating validator graffiti (#4417) 2023-06-22 02:14:57 +00:00
http_metrics Add new validator API for voluntary exit (#4119) 2023-04-03 03:02:56 +00:00
signing_method Split common crates out into their own repos (#3890) 2023-04-28 01:15:40 +00:00
attestation_service.rs Validator registration request failures do not cause us to mark BNs offline (#3488) 2022-08-29 11:35:59 +00:00
beacon_node_fallback.rs Avoid excessive logging of BN online status (#4315) 2023-05-22 02:36:43 +00:00
block_service.rs Downgrade a CRIT in the VC for builder timeouts (#4366) 2023-06-07 01:50:34 +00:00
check_synced.rs Implement el_offline and use it in the VC (#4295) 2023-05-17 05:51:56 +00:00
cli.rs Configure the validator/register_validator batch size via the CLI (#4399) 2023-06-22 02:14:56 +00:00
config.rs Configure the validator/register_validator batch size via the CLI (#4399) 2023-06-22 02:14:56 +00:00
doppelganger_service.rs Clippy lints for rust 1.66 (#3810) 2022-12-16 04:04:00 +00:00
duties_service.rs Implement el_offline and use it in the VC (#4295) 2023-05-17 05:51:56 +00:00
graffiti_file.rs Rust 1.54.0 lints (#2483) 2021-07-30 01:11:47 +00:00
initialized_validators.rs Add support for updating validator graffiti (#4417) 2023-06-22 02:14:57 +00:00
key_cache.rs Clippy lints for rust 1.66 (#3810) 2022-12-16 04:04:00 +00:00
latency.rs Add VC metric for primary BN latency (#4051) 2023-03-06 04:08:49 +00:00
lib.rs Configure the validator/register_validator batch size via the CLI (#4399) 2023-06-22 02:14:56 +00:00
notifier.rs Add new VC metrics for beacon node availability (#3193) 2022-05-26 02:05:16 +00:00
preparation_service.rs Configure the validator/register_validator batch size via the CLI (#4399) 2023-06-22 02:14:56 +00:00
signing_method.rs Add new validator API for voluntary exit (#4119) 2023-04-03 03:02:56 +00:00
sync_committee_service.rs Implement el_offline and use it in the VC (#4295) 2023-05-17 05:51:56 +00:00
validator_store.rs Add new validator API for voluntary exit (#4119) 2023-04-03 03:02:56 +00:00