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

Missing peers' score in peer_score_event table #1

Open
cortze opened this issue Apr 3, 2023 · 0 comments
Open

Missing peers' score in peer_score_event table #1

cortze opened this issue Apr 3, 2023 · 0 comments

Comments

@cortze
Copy link

cortze commented Apr 3, 2023

Description

Hey @iand , great work on this trace-catcher.

I'm not sure if that is an intentional behavior of the tool and I'm missing something, but I'm trying to link the score of a peer with its related graft and prunes and I'm unable to locate the actual score in the peer_score_event table.

The schema of the table looks like this:

CREATE TABLE IF NOT EXISTS peer_score_event (
id                    INT         GENERATED ALWAYS AS IDENTITY,
peer_id               TEXT        NOT NULL,
timestamp             TIMESTAMPTZ NOT NULL,
other_peer_id         TEXT        NOT NULL,
app_specific_score    FLOAT8      NOT NULL,
ip_colocation_factor  FLOAT8      NOT NULL,
behaviour_penalty     FLOAT8      NOT NULL,

PRIMARY KEY (id)
);

meanwhile, the actual trace does record the score as a float64

type PeerScoreEvent struct {
	PeerID             []byte            `json:"peerID"`
	Score              float64           `json:"score"`
	AppSpecificScore   float64           `json:"appSpecificScore"`
	IPColocationFactor float64           `json:"ipColocationFactor"`
	BehaviourPenalty   float64           `json:"behaviourPenalty"`
	Topics             []TopicScoreEvent `json:"topics"`
}

Let me know if I'm missing anything here or if I can help you out with anything :)

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

No branches or pull requests

1 participant