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

Blank line at the end of graffiti-file causes error #5880

Open
davidcann opened this issue Jun 3, 2024 · 3 comments
Open

Blank line at the end of graffiti-file causes error #5880

davidcann opened this issue Jun 3, 2024 · 3 comments
Labels
bug Something isn't working val-client Relates to the validator client binary

Comments

@davidcann
Copy link

Description

A blank line at the end of the graffiti-file causes an error and the entire file to be ignored. There is no mention of blank lines being a problem in the documentation here: https://lighthouse-book.sigmaprime.io/graffiti.html

Version

stable (production release)

Present Behaviour

The entire graffiti-file is ignored when there's a blank line at the end of the text file.

error: InvalidLine("Missing delimiter: "), service: block

Expected Behaviour

Blank lines should be ignored. All valid lines should be read.

Steps to resolve

Add a blank line to the end of the file set via --graffiti-file, then wait for a block proposal or restart the validator client.

@davidcann
Copy link
Author

davidcann commented Jun 3, 2024

To solve this, add this before /validator_client/src/graffiti_file.rs line 68:

if line.trim().is_empty() {
    continue;
}

let (pk_opt, graffiti) = read_line(&line)?;

@michaelsproul michaelsproul added bug Something isn't working val-client Relates to the validator client binary labels Jun 3, 2024
@michaelsproul
Copy link
Member

thanks for the bug report

if you'd like to submit a PR with the fix we can merge it!

shayanb added a commit to shayanb/lighthouse that referenced this issue Nov 30, 2024
@shayanb
Copy link

shayanb commented Nov 30, 2024

@michaelsproul I took the liberty of submitting a PR for this issue :)

mergify bot pushed a commit that referenced this issue Dec 13, 2024
* Fix for blank line in graffiti file

Fix as described in #5880

* add graffiti new line tests

* cargo fmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working val-client Relates to the validator client binary
Projects
None yet
Development

No branches or pull requests

3 participants