Skip to content

Conversation

macladson
Copy link
Member

Issue Addressed

Another good candidate for publishing separately from Lighthouse is sensitive_url as it's a general utility crate and not related to Ethereum. This PR prepares it to be spun out into its own crate.

Proposed Changes

I've made the full field on SensitiveUrl private and instead provided an explicit getter called .expose_full(). It's a bit ugly for the diff but I prefer the explicit nature of the getter.
I've also added some extra tests and doc strings along with feature gating Serialize and Deserialize implementations behind the serde feature.

Additional Info

I also removed AsRef<str> as this was previously used quite awkwardly and instead I've implemented a .redacted() getter which I think is cleaner.

@macladson macladson added code-quality dependencies Pull requests that update a dependency file labels Oct 16, 2025
Comment on lines -137 to -138
SensitiveUrl::parse(beacon_url.as_ref())
.map_err(|e| format!("Failed to parse beacon http server: {:?}", e))?,
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure why we were re-parsing beacon_url since it's already a SensitiveUrl so I think we can just clone here instead.

@macladson macladson added the ready-for-review The code is ready for review label Oct 16, 2025
@mergify
Copy link

mergify bot commented Oct 16, 2025

Some required checks have failed. Could you please take a look @macladson? 🙏

@mergify mergify bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Oct 16, 2025
@macladson macladson added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-quality dependencies Pull requests that update a dependency file ready-for-review The code is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant