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

feat(tool): forest-tool net ping #4071

Merged
merged 2 commits into from
Mar 18, 2024
Merged

feat(tool): forest-tool net ping #4071

merged 2 commits into from
Mar 18, 2024

Conversation

hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Mar 18, 2024

Summary of changes

Changes introduced in this pull request:

  • implement forest-tool net ping command that is similar to lotus net ping but does not require a running forest/lotus daemon

Local run:

➜  forest git:(main) ✗ cargo run --bin forest-tool -- net ping /ip4/108.62.52.130/udp/50374/quic-v1/p2p/12D3KooWHevRB9VCfQYSm12ZFExsrSpKmQKYegJ4WiPPmLNUmW6j
   Compiling forest-filecoin v0.17.0 (/home/me/git/forest)
    Finished dev [unoptimized] target(s) in 37.29s
     Running `target/debug/forest-tool net ping /ip4/108.62.52.130/udp/50374/quic-v1/p2p/12D3KooWHevRB9VCfQYSm12ZFExsrSpKmQKYegJ4WiPPmLNUmW6j`
PING /ip4/108.62.52.130/udp/50374/quic-v1/p2p/12D3KooWHevRB9VCfQYSm12ZFExsrSpKmQKYegJ4WiPPmLNUmW6j
Pong received: time=278ms
Pong received: time=243ms
Pong received: time=280ms
Pong received: time=248ms
Pong received: time=245ms
Average latency: 259ms
➜  forest git:(hm/tool-net-ping) cargo run --bin forest-tool -- net ping /dns4/bootstrap-calibnet-2.chainsafe-fil.io/tcp/34000/p2p/12D3KooWEiBN8jBX8EBoM3M47pVRLRWV812gDRUJhMxgyVkUoR48
    Finished dev [unoptimized] target(s) in 0.32s
     Running `target/debug/forest-tool net ping /dns4/bootstrap-calibnet-2.chainsafe-fil.io/tcp/34000/p2p/12D3KooWEiBN8jBX8EBoM3M47pVRLRWV812gDRUJhMxgyVkUoR48`
PING /dns4/bootstrap-calibnet-2.chainsafe-fil.io/tcp/34000/p2p/12D3KooWEiBN8jBX8EBoM3M47pVRLRWV812gDRUJhMxgyVkUoR48
Pong received: time=500ms
Pong received: time=503ms
Pong received: time=509ms
Pong received: time=501ms
Pong received: time=503ms
Average latency: 503ms

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@hanabi1224 hanabi1224 marked this pull request as ready for review March 18, 2024 09:40
@hanabi1224 hanabi1224 requested a review from a team as a code owner March 18, 2024 09:40
@hanabi1224 hanabi1224 requested review from lemmih, elmattic and LesnyRumcajs and removed request for a team March 18, 2024 09:40
@elmattic elmattic added this pull request to the merge queue Mar 18, 2024
Merged via the queue into main with commit a865269 Mar 18, 2024
32 checks passed
@elmattic elmattic deleted the hm/tool-net-ping branch March 18, 2024 10:35
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.

None yet

3 participants