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

[ONLY IF NEEDED] feat(nodebuilder/p2p): Decouple ChainID from Network #2550

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

renaynay
Copy link
Member

@renaynay renaynay commented Aug 9, 2023

Reasoning for this feature can be found in the issue linked below.

Resolves #2548

…use CELESTIA_CUSTOM when defining network name
@walldiss
Copy link
Member

walldiss commented Aug 9, 2023

What is the reason for format "ChainID-da-NetworkID`? If those are independent (while related), maybe we can use 2 separate config params and provide them separately instead of parsing both values from single param?

nodebuilder/p2p/network.go Outdated Show resolved Hide resolved
@renaynay renaynay changed the title nodebuilder/p2p: Decouple ChainID from Network feat(nodebuilder/p2p): Decouple ChainID from Network Aug 9, 2023
nodebuilder/p2p/network.go Outdated Show resolved Hide resolved
@musalbas
Copy link
Member

musalbas commented Aug 9, 2023

I feel there's a lot of weird/undocumented behavior that can occur from the fact that the separator is "-da-" (for example, you can't have a chain/network id called "dark-roast-3-da-x"), and it would make more sense to use a unique character as a separator, such as mocha-3/foo.

name string
expectedChainID string
}{
{name: "mocha-3-da-custom", expectedChainID: "mocha-3"},
Copy link
Member

Choose a reason for hiding this comment

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

How are these tests still passing if : is the separator now?

Copy link
Member Author

Choose a reason for hiding this comment

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

I forgot to update tests, my bad. I was pushing code while on call with john lol.

@renaynay renaynay requested a review from musalbas August 10, 2023 13:48
@codecov-commenter
Copy link

Codecov Report

Merging #2550 (a5c7898) into main (a86ddca) will decrease coverage by 0.26%.
Report is 13 commits behind head on main.
The diff coverage is 51.47%.

@@            Coverage Diff             @@
##             main    #2550      +/-   ##
==========================================
- Coverage   51.39%   51.14%   -0.26%     
==========================================
  Files         158      158              
  Lines       10304    10410     +106     
==========================================
+ Hits         5296     5324      +28     
- Misses       4556     4621      +65     
- Partials      452      465      +13     
Files Changed Coverage Δ
nodebuilder/p2p/flags.go 32.91% <ø> (ø)
share/eds/byzantine/bad_encoding.go 32.63% <ø> (ø)
share/eds/byzantine/share_proof.go 45.71% <0.00%> (-4.29%) ⬇️
share/p2p/shrexnd/params.go 12.50% <ø> (ø)
share/ipld/nmt_adder.go 49.48% <20.83%> (-9.90%) ⬇️
share/p2p/shrexnd/server.go 48.12% <42.42%> (-4.82%) ⬇️
share/p2p/shrexnd/client.go 52.85% <46.93%> (+7.33%) ⬆️
core/exchange.go 34.61% <50.00%> (+0.61%) ⬆️
share/eds/retriever.go 85.87% <57.14%> (-3.08%) ⬇️
core/eds.go 65.51% <62.50%> (-7.82%) ⬇️
... and 10 more

... and 7 files with indirect coverage changes

@renaynay renaynay changed the title feat(nodebuilder/p2p): Decouple ChainID from Network [ONLY IF NEEDED] feat(nodebuilder/p2p): Decouple ChainID from Network Aug 18, 2023
@renaynay renaynay marked this pull request as draft August 18, 2023 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:node Node area:p2p kind:feat Attached to feature PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

p2p: Decouple ChainID from DA networkID
6 participants