-
Notifications
You must be signed in to change notification settings - Fork 171
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
Rianhughes/custom network #1416
Conversation
instead of an enum, to allow custom networks
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1416 +/- ##
==========================================
- Coverage 72.97% 72.92% -0.05%
==========================================
Files 96 96
Lines 9997 9963 -34
==========================================
- Hits 7295 7266 -29
+ Misses 2162 2157 -5
Partials 540 540 ☔ View full report in Codecov by Sentry. |
ef8317d
to
c15874b
Compare
50696ae
to
0b8b8a0
Compare
"block_hash_meta_info": { | ||
"first_07_block": 1, | ||
"unverifiable_range": [2, 3], | ||
"fallback_sequencer_address": "0x0" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should support these for the custom networks, they are only there because SW operated networks have a lot of baggage.
n := new(utils.Network) | ||
require.ErrorIs(t, n.Set("blah"), utils.ErrUnknownNetwork) | ||
networkJSON := `{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing a JSON from command line feels really impractical to me. I think we either need to make these different command line flags that use have to set one by one or make custom networks only configurable by config files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config file approach seems cleaner to me, I'll add a flag to specify the config file path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make it a YAML file instead of JSON
I am not sure if we need to change all usages of utils.Network to pointers, it is creating so much noise in the PR. It is a small enough struct to be passed by value IMO. If you disagree, let's extract changes related to that to a separate commit. |
Can this be closed in favor of #1542? |
Yes, closing it now. |
closes #1328