go-algorand icon indicating copy to clipboard operation
go-algorand copied to clipboard

TestData: Update NPN parameters in Recipes

Open algobarb opened this issue 2 years ago • 1 comments

Summary

  1. update generate.go to mimic the same behavior for participating nodes and hosts for NPNs and NPN hosts.
  2. Update generate_network.py with better variable names and the new npn variable. Used for mainnet-model and custom recipe.
  3. Update generate_network.py to fix conditional for "ConsensusProtocol". Noticed it will error on mainnet-model otherwise.
  4. Update existing Makefiles.
  5. Added a README.md in recipes folder to describe the netgoal generate flags in the numerous Makefiles.

Test Plan

  1. Tested the change by creating a binary locally and making sure I can specify -X (number of NPN) without -H (number of NPN hosts) properly.
  2. Tested a few of the recipes to make sure a newly generated net.json with the netgoal generate will match the existing net.json.

algobarb avatar Oct 17 '22 16:10 algobarb

Codecov Report

Merging #4656 (af0c57a) into master (4961f54) will decrease coverage by 0.00%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4656      +/-   ##
==========================================
- Coverage   54.35%   54.35%   -0.01%     
==========================================
  Files         402      402              
  Lines       51793    51793              
==========================================
- Hits        28154    28151       -3     
- Misses      21272    21274       +2     
- Partials     2367     2368       +1     
Impacted Files Coverage Δ
ledger/roundlru.go 90.56% <0.00%> (-5.67%) :arrow_down:
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) :arrow_down:
ledger/tracker.go 74.04% <0.00%> (-0.86%) :arrow_down:
cmd/tealdbg/debugger.go 72.69% <0.00%> (-0.81%) :arrow_down:
catchup/service.go 68.64% <0.00%> (+0.49%) :arrow_up:
network/wsPeer.go 68.18% <0.00%> (+0.53%) :arrow_up:
data/transactions/verify/txn.go 77.14% <0.00%> (+0.95%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Oct 17 '22 16:10 codecov[bot]

@egieseke Can you review the new netgoal changes to make sure you're aligned with it?

algobarb avatar Oct 24 '22 15:10 algobarb

Nice work. One other change that would be nice is to allow specifying the network name so that it is used for the hostname suffix in the net.json file. Currently, that has to be added manually.

Thanks! I will ask to merge this in as is for now. Maybe we can consider adding the hostname suffix in a follow up iteration/ticket.

algobarb avatar Oct 25 '22 14:10 algobarb