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

Refactor fromProtocol #326

Merged
merged 3 commits into from
Nov 26, 2019
Merged

Refactor fromProtocol #326

merged 3 commits into from
Nov 26, 2019

Conversation

Jimbo4350
Copy link
Contributor

@Jimbo4350 Jimbo4350 commented Nov 21, 2019

This PR:

  • Refactors fromProtocol to accept exactly what it needs.
  • Removes extraneous command line arguments as a result of the above refactor.
  • Replaced RequireNetworkMagic with RequiresNetworkMagic

Relevant: #311, #312

@Jimbo4350 Jimbo4350 force-pushed the jordan/generalize-fromProtocol branch 2 times, most recently from 4d24fb5 to a51e43e Compare November 21, 2019 19:36
@Jimbo4350 Jimbo4350 changed the title Implement Real vs Mock protocol selection Implement real vs mock protocol selection Nov 22, 2019
@Jimbo4350 Jimbo4350 force-pushed the jordan/generalize-fromProtocol branch 3 times, most recently from 88a6c91 to 5e49791 Compare November 25, 2019 12:25
@Jimbo4350 Jimbo4350 marked this pull request as ready for review November 25, 2019 12:26
@Jimbo4350 Jimbo4350 requested review from CodiePP and karknu November 25, 2019 12:27
karknu
karknu previously requested changes Nov 25, 2019
Copy link
Contributor

@karknu karknu left a comment

Choose a reason for hiding this comment

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

The node should not determine its IP address from a topology file, it should use a topology file to determine its peer's IP addresses.

@CodiePP
Copy link
Contributor

CodiePP commented Nov 25, 2019

The node should not determine its IP address from a topology file, it should use a topology file to determine its peer's IP addresses.

@denisshevchenko is working on issue: #329 which should eliminate the need for a topology file, at least for the tx generator. Could this be reused for the node too?

Copy link
Contributor

@CodiePP CodiePP left a comment

Choose a reason for hiding this comment

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

this PR touches 32 files! can it be broken in smaller chunkes?
and, there is work underway to remove the topology. It might make sense to push this other PRs first and then rebase.

@@ -95,6 +99,14 @@ parseGenesisPathLast =
<> help "The filepath to the genesis file."
)

parseGenesisHash :: Parser Text
Copy link
Contributor

Choose a reason for hiding this comment

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

looking forward to have this option on the command line

@Jimbo4350 Jimbo4350 changed the title Implement real vs mock protocol selection Refactor fromProtocol Nov 25, 2019
@Jimbo4350
Copy link
Contributor Author

Jimbo4350 commented Nov 25, 2019

this PR touches 32 files! can it be broken in smaller chunkes?
and, there is work underway to remove the topology. It might make sense to push this other PRs first and then rebase.

I can cut it in half. I think @deepfire is still trying to get the chairman to work on #318 so I'd prefer to get this merged as I'm not sure how long that will take. It's not a big difference in terms of
rebase conflict & I've reduced the PR by 50%.
Just saw @denisshevchenko's PR, I can wait till he merges it 🙂

@Jimbo4350
Copy link
Contributor Author

The node should not determine its IP address from a topology file, it should use a topology file to determine its peer's IP addresses.

@karknu I've reduced this PR, so in a separate PR I will address this. You wanted to specify the IP via the command line correct?

@Jimbo4350 Jimbo4350 force-pushed the jordan/generalize-fromProtocol branch from 5e49791 to 26847a5 Compare November 25, 2019 14:36
@karknu
Copy link
Contributor

karknu commented Nov 25, 2019

The node should not determine its IP address from a topology file, it should use a topology file to determine its peer's IP addresses.

@karknu I've reduced this PR, so in a separate PR I will address this. You wanted to specify the IP via the command line correct?

Yeah, an optional command line argument for the IP address will work fine.

Copy link
Contributor

@karknu karknu left a comment

Choose a reason for hiding this comment

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

With the topology changes removed I have no objections.

@Jimbo4350 Jimbo4350 force-pushed the jordan/generalize-fromProtocol branch from 26847a5 to c53f6fd Compare November 25, 2019 17:59
@Jimbo4350 Jimbo4350 dismissed karknu’s stale review November 26, 2019 13:55

Spoke with Karl, agreed to allow me to dismiss his review.

@Jimbo4350
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Nov 26, 2019
326: Refactor `fromProtocol` r=Jimbo4350 a=Jimbo4350

This PR: 
- Refactors `fromProtocol` to accept exactly what it needs.
- Removes extraneous command line arguments as a result of the above refactor.

Relevant: #311

Co-authored-by: Jordan Millar <[email protected]>
@Jimbo4350
Copy link
Contributor Author

bors r-

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 26, 2019

Canceled

@Jimbo4350
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request Nov 26, 2019
326: Refactor `fromProtocol` r=Jimbo4350 a=Jimbo4350

This PR: 
- Refactors `fromProtocol` to accept exactly what it needs.
- Removes extraneous command line arguments as a result of the above refactor.

Relevant: #311

Co-authored-by: Jordan Millar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 26, 2019

@iohk-bors iohk-bors bot merged commit c53f6fd into master Nov 26, 2019
@iohk-bors iohk-bors bot deleted the jordan/generalize-fromProtocol branch November 26, 2019 15:07
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.

4 participants