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

Update cardano-ping to 0.2.0.7, so that -j is "more" honored in ping command #411

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Oct 30, 2023

Changelog

- description: |
    Update cardano-ping to 0.2.0.7, so that `-j` is honored more often in ping command:
    the output of the info `network_rtt`, `handshake_rtt`, `negotiated_version`, and `queried_versions`
    is now written in JSON when `-j` is passed.
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Fixes #197

How to trust this PR

Run a local node, execute this command and observe JSON is written to stdout now:

export CARDANO_NODE_SOCKET_PATH="$HOME/dev/sanchonet/node.socket"
→ cabal run cardano-cli -- ping -m 4 -u $CARDANO_NODE_SOCKET_PATH -j
/home/churlin/dev/sanchonet/node.socket {"network_rtt":1.621e-5}
/home/churlin/dev/sanchonet/node.socket {"handshake_rtt":1.36611e-4}
/home/churlin/dev/sanchonet/node.socket {"negotiated_version":{"magic":4,"version":"NodeToClientVersionV16"}}

Try on a public node:

→ cabal run cardano-cli -- ping -h relay0.bluecheesestakehouse.com -j -p 5000 -Q
47.196.34.59:5000 {"network_rtt":0.127222397}
47.196.34.59:5000 {"handshake_rtt":0.126536844}
47.196.34.59:5000 {"queried_versions":[{"initiator":"InitiatorAndResponder","magic":764824073,"version":"NodeToNodeVersionV11"},{"initiator":"InitiatorAndResponder","magic":764824073,"version":"NodeToNodeVersionV10"},{"initiator":"InitiatorAndResponder","magic":764824073,"version":"NodeToNodeVersionV9"},{"initiator":"InitiatorAndResponder","magic":764824073,"version":"NodeToNodeVersionV8"},{"initiator":"InitiatorAndResponder","magic":764824073,"version":"NodeToNodeVersionV7"}]}

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@smelc smelc added this pull request to the merge queue Oct 30, 2023
Merged via the queue into main with commit ff75875 Oct 30, 2023
20 of 21 checks passed
@smelc smelc deleted the smelc@update-cardano-ping branch October 30, 2023 16:10
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.

[FR] - Ping versions should return json as well
2 participants