Skip to content

test: Network debug#1442

Draft
ancazamfir wants to merge 8 commits intocirclefin:mainfrom
ancazamfir:network-debug
Draft

test: Network debug#1442
ancazamfir wants to merge 8 commits intocirclefin:mainfrom
ancazamfir:network-debug

Conversation

@ancazamfir
Copy link
Contributor

Closes: #XXX

This PR is temporary to help us testing quickly with different combinations of libp2p options (e.g. enable_peer_scoring, enable_explicit_peering, enable_flood_publish, persistent_peers_only) on different setups.

To test on consensus repository you can use these helpers:

Script to quickly init, start, stop, restart nodes here

  • App used informalsystems-malachitebft-example-channel.

  • Has the env flags:

    export MALACHITE__CONSENSUS__P2P__PROTOCOL__ENABLE_PEER_SCORING="true"
    export MALACHITE__CONSENSUS__P2P__PROTOCOL__ENABLE_FLOOD_PUBLISH="false"
    # Note: settingenable_explicit_peering to true should be done per-node in config files
    # Validators: true, Full nodes: false
    # This is because typically validators don't include full nodes in their persistent peers
    # and we want validators to use the mesh to full nodes. Also full nodes need to mesh with validators.
    # If you want to disable explicit peering, set this to false
    #export MALACHITE__CONSENSUS__P2P__PROTOCOL__ENABLE_EXPLICIT_PEERING="false"
    
    # Create 0-mesh
    export MALACHITE__CONSENSUS__P2P__PROTOCOL__MESH_N=0
    export MALACHITE__CONSENSUS__P2P__PROTOCOL__MESH_N_HIGH=0
    export MALACHITE__CONSENSUS__P2P__PROTOCOL__MESH_N_LOW=0
    export MALACHITE__CONSENSUS__P2P__PROTOCOL__MESH_OUTBOUND_MIN=0
  • The config flags and current defaults:
[consensus.p2p.protocol]
type = "gossipsub"
mesh_n = 6
mesh_n_high = 12
mesh_n_low = 4
mesh_outbound_min = 2
enable_peer_scoring = true
enable_explicit_peering = false
enable_flood_publish = true
  • If enable_explicit_peering = true then enable_flood_publish setting is ignored
  • As noted above, the global flag for enable_explicit_peering should only be used for disabing it, to enable it makes more sense to do it in the config as validators and full nodes are requiring different settings

Script to help network checks here

TODO:


PR author checklist

Contribution eligibility

  • I am a core contributor, OR I have been explicitly assigned to the linked issue
  • I have read CONTRIBUTING.md and my PR complies with all requirements
  • I understand that PRs not meeting these requirements will be closed without review

For all contributors

For external contributors

@ancazamfir ancazamfir changed the title Network debug test: Network debug Feb 3, 2026
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.

1 participant