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

(BIDS-3095) revamp adding validators to dashboard #370

Merged
merged 8 commits into from
Jun 6, 2024

Conversation

LuccaBitfly
Copy link
Contributor

No description provided.

Copy link

cloudflare-workers-and-pages bot commented Jun 4, 2024

Deploying beaconchain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 36c515d
Status:🚫  Build failed.

View logs

Input string `json:"input"`
Networks []network `json:"networks,omitempty"`
Types []searchTypeKey `json:"types,omitempty"`
IncludeValidators bool `json:"include_validators,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Dear Lucca,
I might be wrong but I think that you do not let anymore the front-end tell the API whether counting is needed.
When the request comes from the general search bar, a count is not needed (as far as I know). To save resources, maybe you want to keep this boolean in the spec, so you count only if we set it to true.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

getting the count was the alternative to getting the validator indices, i.e. even in the old system it was always planned to return the count when setting include_validators to false. fetching the count is not that resource intensive, so it should be fine.

}
err := db.ReaderDb.Select(&ret.Validators, "select distinct proposer from blocks where graffiti_text = $1 limit 10;", graffiti) // added a limit here to keep the query fast
err := db.ReaderDb.Get(&ret.Count, "select count(distinct proposer) from blocks where graffiti_text = $1;", graffiti) // added a limit here to keep the query fast
Copy link
Contributor

Choose a reason for hiding this comment

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

the comment is obsolete now

@LuccaBitfly LuccaBitfly merged commit 79d676a into main Jun 6, 2024
2 checks passed
@LuccaBitfly LuccaBitfly deleted the BIDS-3095/rework-add-vdb-valis branch June 6, 2024 06:57
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.

4 participants