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

Fixes to foundry connections and configs #924

Merged
merged 7 commits into from
Apr 24, 2024
Merged

Fixes to foundry connections and configs #924

merged 7 commits into from
Apr 24, 2024

Conversation

AnieeG
Copy link
Contributor

@AnieeG AnieeG commented Apr 23, 2024


Anvil can be run without forking. Renamed network's ForkConfig to AnvilConfig. Made necessary changes to make fork config not mandatory while using Anvil.

Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes improve the function signatures in foundry.go by switching from value to pointer receivers for the Props parameter. This enhances memory efficiency and consistency in how the Props struct is handled across functions.

What

  • k8s/pkg/helm/foundry/foundry.go
    • Modified the New function signature to accept a pointer to Props instead of a value. This change optimizes memory usage by passing a reference.
    • Altered the NewVersioned function signature to also accept a pointer to Props for the same reasons of efficiency and consistency with the New function adjustments.

@AnieeG AnieeG requested review from sebawo and a team as code owners April 23, 2024 10:51
@AnieeG AnieeG changed the title reference to foundry props Fixes to foundry connections and configs Apr 24, 2024
@cl-sonarqube-production
Copy link

@@ -149,14 +149,8 @@ func (n *NetworkConfig) Validate() error {
return fmt.Errorf("chain ID for %s network must be set", name)
}
}
if n.ForkConfigs != nil {
if _, ok := n.ForkConfigs[network]; ok {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why remove these checks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While using Anvil you may choose not to fork a network, and start network from empty state like geth. Hence these checks are not required

@AnieeG AnieeG merged commit 34241fb into main Apr 24, 2024
26 checks passed
@AnieeG AnieeG deleted the foundry-fixes branch April 24, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants