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

boostx stats: output agent version and retrieval protocols #1304

Merged
merged 2 commits into from
Mar 20, 2023

Conversation

dirkmc
Copy link
Contributor

@dirkmc dirkmc commented Mar 20, 2023

Fixes #1271

Total Boost nodes: 17
Total Boost raw power: 20588664467750912
Total Boost quality adj power: 164240643386998784
Total Lotus Markets nodes: 40
Total SPs with minimum power:  3603
Total Indexer nodes: 43
Agent Versions:
  lotus-1.18.0+mainnet: 1
  lotus-1.18.2+mainnet: 1
  lotus-1.20.0+mainnet: 2
  lotus-1.20.0-rc1+mainnet: 2
  lotus-1.20.0-rc2+debug: 1
  lotus-1.20.0-rc2+mainnet: 8
  lotus-1.20.6+mainnet: 2
Retrieval Protocol Support:
  bitswap: 1
  libp2p: 17

UserAgent

Unfortunately it seems that the UserAgent is being set to the lotus version imported by boost (not boost's build version).

This is because we build the Host using lotus modules rather than building it from boost modules:

Override(new(lotus_lp2p.RawHost), lotus_lp2p.Host),

The lotus modules code sets the AgentVersion from the lotus build version:

	opts := []libp2p.Option{
		libp2p.Identity(pkey),
		libp2p.Peerstore(params.Peerstore),
		libp2p.NoListenAddrs,
		libp2p.Ping(true),
		libp2p.UserAgent("lotus-" + build.UserVersion()),
	}
	for _, o := range params.Opts {
		opts = append(opts, o...)
	}

	h, err := libp2p.New(opts...)

We can fix this by writing our own boost UserAgent libp2p option override. See PR #1305

@dirkmc dirkmc force-pushed the feat/boostx-stats branch 6 times, most recently from 666b063 to 61d32a5 Compare March 20, 2023 09:55
@dirkmc dirkmc marked this pull request as ready for review March 20, 2023 10:06
@dirkmc dirkmc requested a review from jacobheun March 20, 2023 10:07
Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the agentversion comment the rest of this looks good.

cmd/boostx/stats_cmd.go Show resolved Hide resolved
@dirkmc dirkmc merged commit a1e7cc1 into main Mar 20, 2023
@dirkmc dirkmc deleted the feat/boostx-stats branch March 20, 2023 13: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.

Update boostx stats command to include agent version & retrieval support breakdown
2 participants