Skip to content

Append client version info to graffiti #7558

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

Open
wants to merge 8 commits into
base: unstable
Choose a base branch
from

Conversation

chong-he
Copy link
Member

@chong-he chong-he commented Jun 4, 2025

Issue Addressed

Additional Info

Thank you @ethDreamer and @michaelsproul for the help and guidance

@chong-he chong-he added work-in-progress PR is a work-in-progress val-client Relates to the validator client binary UX-and-logs labels Jun 4, 2025
.await,
),
};

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the wrong place to do this. This function will call produce_block_with_verification() which will call produce_block_on_state() which will call the graffiti_calculator.get_graffiti() again. I would suggest you pass this argument down the function calls along with the graffiti. So maybe (inside graffiti_calculator.rs) create some new enum:

enum GraffitiSettings {
    Unspecified,
    Specified {
        graffiti: Graffiti,
        policy: GraffitiPolicy,
    }
}

impl GraffitiSettings {
    fn new(validator_graffiti: Option<Graffiti>, policy: GraffitiPolicy) {
        validator_graffiti.map(|graffiti| Self::Specified {
            graffiti,
            policy,
        })
        .unwrap_or(Self::Unspecified)
    }
}

and pass that down through the functions. Then you'd want to change get_graffiti to:

pub async fn get_graffiti(&self, graffiti_settings: GraffitiSettings) -> Graffiti

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for the comment, made some amendment based on your comment. If you have some time to spare, will appreciate for another look to see if this is on the right track @ethDreamer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX-and-logs val-client Relates to the validator client binary work-in-progress PR is a work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants