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

Read confirmed certs #2867

Merged
merged 7 commits into from
Nov 12, 2024
Merged

Read confirmed certs #2867

merged 7 commits into from
Nov 12, 2024

Conversation

deuszx
Copy link
Contributor

@deuszx deuszx commented Nov 12, 2024

Motivation

We know that in storage we only ever have instances of confirmed certificates.

Proposal

Reflect that fact in the API of the Storage.

Test Plan

Release Plan

  • Nothing to do / These changes follow the usual release cycle.

Links

Closes #2860

// The certificate is not as expected. Give up.
warn!("Failed to process network certificate {}", hash);
return info;
}
let mut result = self.handle_certificate(certificate.clone(), vec![]).await;
let mut result = self
.handle_certificate(certificate.clone().into(), vec![])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

handle_certificate expects the "old" Certificate type still. Internally it pattern-matches on the value type (ConfirmedValue enum) and forwards to the specialized handlers.

@deuszx deuszx requested review from ndr-ds and afck November 12, 2024 12:45
@deuszx deuszx marked this pull request as ready for review November 12, 2024 12:46
linera-storage/src/lib.rs Show resolved Hide resolved
linera-service/src/proxy/grpc.rs Show resolved Hide resolved
linera-core/src/remote_node.rs Outdated Show resolved Hide resolved
linera-core/src/client/mod.rs Outdated Show resolved Hide resolved
linera-chain/src/certificate.rs Outdated Show resolved Hide resolved
@deuszx deuszx merged commit 65eb2f7 into main Nov 12, 2024
23 checks passed
@deuszx deuszx deleted the read-confirmed-certs branch November 12, 2024 16:43
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.

Storage::read_certificate should only ever return a ConfirmedBlock certificate
2 participants