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

Rianhughes/custom network #1416

Closed
wants to merge 33 commits into from
Closed

Rianhughes/custom network #1416

wants to merge 33 commits into from

Conversation

rianhughes
Copy link
Contributor

@rianhughes rianhughes commented Nov 8, 2023

closes #1328

@rianhughes rianhughes requested review from IronGauntlets and omerfirmak and removed request for IronGauntlets November 8, 2023 18:00
Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Attention: 30 lines in your changes are missing coverage. Please review.

Comparison is base (cf7b9a3) 72.97% compared to head (ce6b7ae) 72.92%.

Files Patch % Lines
validator/validator.go 0.00% 15 Missing ⚠️
core/block.go 58.33% 5 Missing ⚠️
node/node.go 63.63% 4 Missing ⚠️
utils/network.go 93.44% 3 Missing and 1 partial ⚠️
core/transaction.go 93.33% 1 Missing ⚠️
p2p/starknet/client.go 85.71% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@rianhughes rianhughes marked this pull request as ready for review November 9, 2023 13:45
.golangci.yaml Outdated Show resolved Hide resolved
utils/network.go Outdated Show resolved Hide resolved
utils/network.go Outdated Show resolved Hide resolved
utils/network.go Outdated Show resolved Hide resolved
utils/network.go Show resolved Hide resolved
utils/network.go Outdated Show resolved Hide resolved
@rianhughes rianhughes marked this pull request as draft December 1, 2023 09:58
@rianhughes rianhughes marked this pull request as ready for review December 6, 2023 08:49
utils/network.go Outdated Show resolved Hide resolved
juno/CURRENT Outdated Show resolved Hide resolved
@rianhughes rianhughes marked this pull request as draft December 8, 2023 15:17
@rianhughes rianhughes marked this pull request as ready for review December 11, 2023 08:29
Comment on lines +113 to +117
"block_hash_meta_info": {
"first_07_block": 1,
"unverifiable_range": [2, 3],
"fallback_sequencer_address": "0x0"
}
Copy link
Contributor

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 := `{
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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

@omerfirmak
Copy link
Contributor

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.

@joshklop
Copy link
Contributor

Can this be closed in favor of #1542?

@rianhughes
Copy link
Contributor Author

rianhughes commented Dec 14, 2023

Can this be closed in favor of #1542?

Yes, closing it now.

@rianhughes rianhughes closed this Dec 14, 2023
@rianhughes rianhughes deleted the rianhughes/custom-network branch January 15, 2024 13:48
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.

Enable syncing from custom feeder URL
3 participants