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

Support custom trusted setups for revm #4649

Closed
mattsse opened this issue Sep 19, 2023 · 2 comments
Closed

Support custom trusted setups for revm #4649

mattsse opened this issue Sep 19, 2023 · 2 comments
Labels
C-discussion A discussion about the direction and design of the project C-enhancement New feature or request M-prevent-stale Prevents old inactive issues/PRs from being closed due to inactivity

Comments

@mattsse
Copy link
Collaborator

mattsse commented Sep 19, 2023

Describe the feature

the cli supports a custom trusted setup file:

/// Overrides the KZG trusted setup by reading from the supplied file.
#[arg(long, value_name = "PATH")]
pub trusted_setup_file: Option<PathBuf>,

the KzgSettings can be configured in revm's CfgEnv, by default it uses mainnet trusted setup

In order to support other trusted setups we need a way to configure CfgEnv, everywhere we're using CfgEnv::default()

This could be solved with a static OnceBox, that holds the KzgSettings that should be used, similar to

/// KZG trusted setup
pub static MAINNET_KZG_TRUSTED_SETUP: Lazy<Arc<KzgSettings>> = Lazy::new(|| {
Arc::new(
load_trusted_setup_from_bytes(TRUSTED_SETUP_RAW).expect("Failed to load trusted setup"),
)
});

TODO

  1. add OnceBox for TargetKzgSettings (naming tbd) (maybe even a static AtomicBool that indicates custom trusted setup)
  2. set during CLI
  3. always configure if custom in CfgEnv

wdyt @Rjected @rakita ?

@Rjected do we even expect that a custom trusted setup is required/useful, if not we could get rid of that option which would make this redundant

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Sep 19, 2023
@mattsse mattsse added C-discussion A discussion about the direction and design of the project and removed S-needs-triage This issue needs to be labelled labels Sep 19, 2023
@github-actions
Copy link
Contributor

This issue is stale because it has been open for 21 days with no activity.

@github-actions github-actions bot added the S-stale This issue/PR is stale and will close with no further activity label Oct 11, 2023
@mattsse mattsse added M-prevent-stale Prevents old inactive issues/PRs from being closed due to inactivity and removed S-stale This issue/PR is stale and will close with no further activity labels Oct 11, 2023
@mattsse
Copy link
Collaborator Author

mattsse commented Oct 18, 2023

there's no more minimal trusted setup
ethereum/c-kzg-4844#377
so this won't be required

@mattsse mattsse closed this as completed Oct 18, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-discussion A discussion about the direction and design of the project C-enhancement New feature or request M-prevent-stale Prevents old inactive issues/PRs from being closed due to inactivity
Projects
Archived in project
Development

No branches or pull requests

1 participant