Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Capture distribution of node versions seen on the network over time #41

Open
placer14 opened this issue Jan 5, 2021 · 0 comments
Open
Labels
kind/feature New feature request P2 P2: Should be resolved

Comments

@placer14
Copy link
Contributor

placer14 commented Jan 5, 2021

Feature Request

In order to infer the distribution of node versions which are being used on the network, drone's lotus input plugin should periodically query lotus for the number of peers seen for each user agent and persist these values with the current timestamp.

Proposal:

Desired behavior:

Via the lotus input plugin's Gather method, capture and add the following metric once per unique version string and return error appropriately upon completion.

var versionCounts map[string]uint
versionCounts = gatherObservedVersions(api)
for version, count := range versionCounts {
    acc.AddFields("observed_node_versions",
		map[string]interface{}{
			"count": count,
		},
		map[string]string{
			"version": version,
		},
		time.Now(),
    )
}

Data can be sourced via lotus's NetPeers API.

Acceptance Criteria

  • The following schema result in observed_node_versions table:
    • text column "version"
    • int column "count"
    • timestamp column "time"
  • execution against lotus collects and persists data to the above schema once per configured interval

Example data output (non-prescriptive):

version	count	time
lotus-1.1.0	3	2020-12-19 22:16:03
lotus-1.2.0	4	2020-12-19 22:16:03
lotus-1.1.2	10	2020-12-19 22:16:03
lotus-1.2.2	22	2020-12-19 22:16:03
lotus-1.4.0	53	2020-12-19 22:16:03
lotus-1.2.1	58	2020-12-19 22:16:03
lotus-1.3.0	71	2020-12-19 22:16:03

Use case:

Useful for tracking node upgrades being adopted by the network.

@placer14 placer14 added the kind/enhancement Improvement to an existing feature label Jan 5, 2021
@iand iand added kind/feature New feature request P2 P2: Should be resolved and removed kind/enhancement Improvement to an existing feature labels Feb 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature New feature request P2 P2: Should be resolved
Projects
None yet
Development

No branches or pull requests

2 participants