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

Default peerSharing true and add block producer config to release binaries #5789

Merged
merged 3 commits into from
May 6, 2024

Conversation

johnalotoski
Copy link
Contributor

@johnalotoski johnalotoski commented Apr 18, 2024

Description

  • Bump iohk-nix to:

    • Default node config to use PeerSharing true with TargetNumberOfRootPeers reduced from 100 to 60
    • Make available a block producer config which keeps PeerSharing disabled
    • Adds MinNodeVersion to node config to indicate the lowest compatible version of node with the config
  • Adds config-bp.json block producer configs for each environment to the release binary artifacts

  • Tree diff of the gzip expanded and untarred release binary show a new config-bp.json file for each env:

# Build the artifact before and after PR with:
#   `nix build -L .#hydraJobs.x86_64-linux.musl.cardano-node-linux`
# Compare the expanded result/cardano-node-8.10.0-linux.tar.gz
❯ icdiff -W --cols=80 <(tree beforePR) <(tree afterPR)
beforePR                                afterPR                                
├── bin                                 ├── bin                                
│   ├── bech32                          │   ├── bech32                         
│   ├── cardano-cli                     │   ├── cardano-cli                    
│   ├── cardano-node                    │   ├── cardano-node                   
│   ├── cardano-node-chairman           │   ├── cardano-node-chairman          
│   ├── cardano-submit-api              │   ├── cardano-submit-api             
│   ├── cardano-testnet                 │   ├── cardano-testnet                
│   ├── cardano-topology                │   ├── cardano-topology               
│   ├── db-analyser                     │   ├── db-analyser                    
│   ├── db-synthesizer                  │   ├── db-synthesizer                 
│   ├── db-truncater                    │   ├── db-truncater                   
│   └── locli                           │   └── locli                          
└── share                               └── share                              
    ├── mainnet                             ├── mainnet                        
    │   ├── alonzo-genesis.json             │   ├── alonzo-genesis.json        
    │   ├── byron-genesis.json              │   ├── byron-genesis.json         
                                            │   ├── config-bp.json             
    │   ├── config.json                     │   ├── config.json                
    │   ├── conway-genesis.json             │   ├── conway-genesis.json        
    │   ├── shelley-genesis.json            │   ├── shelley-genesis.json       
    │   └── topology.json                   │   └── topology.json              
    ├── preprod                             ├── preprod                        
    │   ├── alonzo-genesis.json             │   ├── alonzo-genesis.json        
    │   ├── byron-genesis.json              │   ├── byron-genesis.json         
                                            │   ├── config-bp.json             
    │   ├── config.json                     │   ├── config.json                
    │   ├── conway-genesis.json             │   ├── conway-genesis.json        
    │   ├── shelley-genesis.json            │   ├── shelley-genesis.json       
    │   └── topology.json                   │   └── topology.json              
    ├── preview                             ├── preview                        
    │   ├── alonzo-genesis.json             │   ├── alonzo-genesis.json        
    │   ├── byron-genesis.json              │   ├── byron-genesis.json         
                                            │   ├── config-bp.json             
    │   ├── config.json                     │   ├── config.json                
    │   ├── conway-genesis.json             │   ├── conway-genesis.json        
    │   ├── shelley-genesis.json            │   ├── shelley-genesis.json       
    │   └── topology.json                   │   └── topology.json              
    └── sanchonet                           └── sanchonet                      
        ├── alonzo-genesis.json                 ├── alonzo-genesis.json        
        ├── byron-genesis.json                  ├── byron-genesis.json         
                                                ├── config-bp.json             
        ├── config.json                         ├── config.json                
        ├── conway-genesis.json                 ├── conway-genesis.json        
        ├── shelley-genesis.json                ├── shelley-genesis.json       
        └── topology.json                       └── topology.json              
                                                                               
7 directories, 35 files                 7 directories, 39 files
  • Diff for a non-block-producer config (config.json), for example for sanchonet, shows:
diff -Naru --exclude bin beforePR/share/sanchonet/config.json afterPR/share/sanchonet/config.json
--- beforePR/share/sanchonet/config.json        2024-04-18 14:13:03.000000000 -0500
+++ afterPR/share/sanchonet/config.json 2024-04-18 16:13:12.000000000 -0500
@@ -11,6 +11,8 @@
   "LastKnownBlockVersion-Alt": 0,
   "LastKnownBlockVersion-Major": 3,
   "LastKnownBlockVersion-Minor": 1,
+  "MinNodeVersion": "8.10.0",
+  "PeerSharing": true,
   "Protocol": "Cardano",
   "RequiresNetworkMagic": "RequiresMagic",
   "ShelleyGenesisFile": "shelley-genesis.json",
@@ -18,7 +20,7 @@
   "TargetNumberOfActivePeers": 20,
   "TargetNumberOfEstablishedPeers": 50,
   "TargetNumberOfKnownPeers": 100,
-  "TargetNumberOfRootPeers": 100,
+  "TargetNumberOfRootPeers": 60,
   "TestAllegraHardForkAtEpoch": 0,
   "TestAlonzoHardForkAtEpoch": 0,
   "TestMaryHardForkAtEpoch": 0,
  • Diff for a block-producer config (config-bp.json), compared to the non-block-producer config, for example for sanchonet, shows:
❯ diff afterPR/share/sanchonet/config.json afterPR/share/sanchonet/config-bp.json
15c15
<   "PeerSharing": true,
---
>   "PeerSharing": false,
23c23
<   "TargetNumberOfRootPeers": 60,
---
>   "TargetNumberOfRootPeers": 100,

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-8.10.7 and ghc-9.2.7
  • Self-reviewed the diff

@johnalotoski johnalotoski requested review from a team as code owners April 18, 2024 22:02
@johnalotoski johnalotoski force-pushed the jl/config-bp branch 5 times, most recently from d433a92 to 1b900f3 Compare April 19, 2024 18:54
@disassembler disassembler added this pull request to the merge queue Apr 26, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 26, 2024
@disassembler disassembler added this pull request to the merge queue Apr 26, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 26, 2024
@johnalotoski johnalotoski added this pull request to the merge queue Apr 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 29, 2024
@johnalotoski johnalotoski added this pull request to the merge queue Apr 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 30, 2024
@johnalotoski johnalotoski added this pull request to the merge queue May 2, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 2, 2024
@johnalotoski johnalotoski added this pull request to the merge queue May 3, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 3, 2024
@johnalotoski johnalotoski added this pull request to the merge queue May 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 6, 2024
@johnalotoski johnalotoski added this pull request to the merge queue May 6, 2024
Merged via the queue into master with commit a0d571d May 6, 2024
22 checks passed
@johnalotoski johnalotoski deleted the jl/config-bp branch May 6, 2024 16:56
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.

2 participants