Append client version info to user graffiti by default (#9313)

Closes issue #9287


  


Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io>

Co-Authored-By: chonghe <44791194+chong-he@users.noreply.github.com>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
chonghe
2026-06-15 14:03:13 +08:00
committed by GitHub
parent 378f01670b
commit d8e406b6ac
10 changed files with 203 additions and 41 deletions

View File

@@ -227,10 +227,10 @@ Flags:
automatically enabled for <= 64 validators. Enabling this metric for
higher validator counts will lead to higher volume of prometheus
metrics being collected.
--graffiti-append
When used, client version info will be prepended to user custom
graffiti, with a space in between. This should only be used with a
Lighthouse beacon node.
--graffiti-append [<GRAFFITI_APPEND>]
Client version info will be appended to user custom graffiti, with a
space in between. This should only be set to false when using a
Lighthouse beacon node. [default: true] [possible values: true, false]
-h, --help
Prints help information
--http

View File

@@ -60,7 +60,7 @@ Usage: `lighthouse vc --graffiti example`
## 4. Using the "--graffiti" flag on the beacon node
Users can also specify a common graffiti using the `--graffiti` flag on the beacon node as a common graffiti for all validators.
Users can also specify a common graffiti using the `--graffiti` flag on the beacon node as a common graffiti for all validators.
Usage: `lighthouse bn --graffiti fortytwo`
@@ -93,3 +93,39 @@ curl -X PATCH "http://localhost:5062/lighthouse/validators/0xb0148e6348264131bf4
```
A `null` response indicates that the request is successful.
## Automatically append client version info to user graffiti
> Note: this feature only works when a Lighthouse validator client is connected to a Lighthouse beacon node.
In the interest of obtaining client diversity data, Lighthouse will by default automatically append client version info
to user graffiti in proposed blocks.
For example, you set the graffiti in the validator client as `This is my graffiti`. You are using Lighthouse (`LH`) v8.1.3
with commit hash `176cce5` and Reth (`RH`) v2.2.0 with commit hash `88505c7`. The appended graffiti will include:
- Execution layer client code
- First two bytes of the execution layer commit hash
- Consensus layer client code
- First two bytes of the consensus layer commit hash
When the user graffiti is less than 20 characters, as in the above example, the appended graffiti when proposing a block
will be: `This is my graffiti RH8850LH176c`.
Given that the total size of the graffiti is 32 bytes, if the appended graffiti exceeds the size, the appended
client version info will automatically be shortened. Some examples are as follows, where the last part of the graffiti is the
appended client version info.
When the user graffiti is between 20-23 characters:
`This is my graffiti yo RH88LH17`
When the user graffiti is between 24-27 characters:
`This is my graffiti string RHLH`
When the user graffiti is between 28-29 characters:
`This is my graffiti string yo RH`
When the user graffiti is between 30-32 characters, no client version info will be appended:
`This is my graffiti string yo yo`
To opt out from this, when using a Lighthouse beacon node, use the flag `--graffiti-append false` on the validator client. This will retain your own graffiti when proposing a block, without appending any client version info.