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: query block count per Evonode proposed in any given epoch #2114

Merged
merged 13 commits into from
Sep 12, 2024

Conversation

QuantumExplorer
Copy link
Member

@QuantumExplorer QuantumExplorer commented Sep 12, 2024

Issue being fixed or feature implemented

As a user or a service to users, we would like to know how many blocks each proposer proposed in any given epoch.

What was done?

Added two queries, either to get this with a list of Pro_Tx_Hashes, or to get this with a range.
Epoch is an optional field, if epoch is not set, it will get the proposer block count for the current epoch.

How Has This Been Tested?

Added a few tests

Breaking Changes

Not breaking.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@QuantumExplorer QuantumExplorer changed the title Feat/query blocks proposed in epoch2 feat: query blocks proposed in epoch Sep 12, 2024
@QuantumExplorer QuantumExplorer changed the title feat: query blocks proposed in epoch feat: query block count per Evonode proposed in any given epoch Sep 12, 2024
@QuantumExplorer QuantumExplorer added this to the v1.3.0 milestone Sep 12, 2024
@QuantumExplorer QuantumExplorer self-assigned this Sep 12, 2024
@QuantumExplorer QuantumExplorer added the dapi-endpoint DAPI endpoint addition or modification label Sep 12, 2024
@QuantumExplorer QuantumExplorer merged commit 4425a94 into v1.3-dev Sep 12, 2024
76 of 77 checks passed
@QuantumExplorer QuantumExplorer deleted the feat/QueryBlocksProposedInEpoch2 branch September 12, 2024 14:25
@p-m
Copy link

p-m commented Oct 31, 2024

Hi,
How could I use this please on the command line?
TIA, Peter

@thephez
Copy link
Collaborator

thephez commented Oct 31, 2024

@p-m You can see an example using gRPCurl in the docs: getEvonodesProposedEpochBlocksByIds

@p-m
Copy link

p-m commented Oct 31, 2024

Thanks. It works well for epoch=7, but not for epoch<7. Here the error message with epoch=6:

ERROR:
  Code: Internal
  Message: query: storage: grovedb: path parent layer not found: could not get key for parent of subtree optional no tx: path key not found: key not found in Merk for get from storage: 6d

@p-m
Copy link

p-m commented Nov 4, 2024

Thanks. It works well for epoch=7, but not for epoch<7.

Hi,
Should I fill a bug report?
Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dapi-endpoint DAPI endpoint addition or modification new query
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants