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

Remove OnceLock from ChainSpec #14469

Closed
emhane opened this issue Feb 13, 2025 · 4 comments · Fixed by #14514
Closed

Remove OnceLock from ChainSpec #14469

emhane opened this issue Feb 13, 2025 · 4 comments · Fixed by #14514
Assignees
Labels
A-op-reth Related to Optimism and op-reth C-debt A clean up/refactor of existing code

Comments

@emhane
Copy link
Member

emhane commented Feb 13, 2025

Describe the feature

Remove OnceLock wrapping SealedHeader in ChainSpec

blocked by #14355

Additional context

No response

@emhane emhane added the C-debt A clean up/refactor of existing code label Feb 13, 2025
@emhane emhane added the S-blocked This cannot more forward until something else changes label Feb 13, 2025
@Ayushdubey86
Copy link
Contributor

I am thinking to take this , once pr closes

@Ayushdubey86
Copy link
Contributor

@emhane

Is this issue about removing the sealed_genesis_header() function from chainspec/src/spec.rs? If so, removing OnceLock from the struct could have widespread impact. Can I get more context on which functionalities should remain unaffected?

pub fn sealed_genesis_header(&self) -> SealedHeader {
SealedHeader::new(self.genesis_header().clone(), self.genesis_hash())
} -->chainspec/src/spec.rs

@emhane
Copy link
Member Author

emhane commented Feb 13, 2025

I have been assigned this issue to complete as one pr with #14355

thanks nonetheless @Ayushdubey86 , welcome to find any other issue. recommend starting with those labelled good first issue regardless of level to get familiarity with codebase. those without that label tend to require some kind of design choice or product context.

@emhane emhane assigned emhane and unassigned Ayushdubey86 Feb 13, 2025
@emhane emhane removed the S-blocked This cannot more forward until something else changes label Feb 13, 2025
@emhane emhane moved this to In Review in Project Tracking Feb 13, 2025
@emhane emhane moved this from In Review to In Progress in Project Tracking Feb 13, 2025
@emhane emhane added the A-op-reth Related to Optimism and op-reth label Feb 13, 2025
@emhane
Copy link
Member Author

emhane commented Feb 14, 2025

@klkvr @mattsse to remove OnceLock requires alloy Sealable::hash_slow to be const, which isn't possible on trait methods. it's also not possible on impl of Sealable for Header anyway because it handles Vec<u8> so we get

destructor of `std::vec::Vec<u8>` cannot be evaluated at compile-time

ref: #14441 (comment)

closing for now, needs higher level design

@emhane emhane closed this as completed Feb 14, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Project Tracking Feb 14, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth C-debt A clean up/refactor of existing code
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants