Skip to content

Add a command to query a validator for a certificate#6037

Open
bart-linera wants to merge 1 commit intolinera-io:testnet_conwayfrom
bart-linera:validator-query-cert
Open

Add a command to query a validator for a certificate#6037
bart-linera wants to merge 1 commit intolinera-io:testnet_conwayfrom
bart-linera:validator-query-cert

Conversation

@bart-linera
Copy link
Copy Markdown
Contributor

Motivation

We could use a way of inspecting blocks without downloading whole chains from validators.

Proposal

Add a command to the client which uses download_certificates_by_height to download a single certificate from a given validator and display the block.

Test Plan

CI will catch possible regressions.
The command has been succesfully used manually.

Release Plan

  • These changes should be ported to the main branch

Links

@bart-linera bart-linera requested review from afck, deuszx and ma2bd April 16, 2026 13:43
);

let result = node
.download_certificates_by_heights(chain_id, vec![height])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(I think that processes/preprocesses the block, does it? It's probably fine, but we could also just download, print and forget it. Not sure what's better.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think it does, it seems to only call the method on the GRPC client as far as I can tell, but I may be wrong.

match result {
Ok(certificates) => {
let block = certificates[0].block();
println!("{:#?}", block);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should it be called query-block then?
Because this specifically prints only the block and not the signatures or even signatories.

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.

2 participants