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

[WIP] DA read range api #546

Closed
wants to merge 3 commits into from
Closed

[WIP] DA read range api #546

wants to merge 3 commits into from

Conversation

bacv
Copy link
Member

@bacv bacv commented Dec 18, 2023

A proof of concept DA api for blob retrieval by range, mostly for seeing and discussing what parts of various services need to be updated.

@bacv bacv added this to the DA experiments milestone Dec 18, 2023
@bacv bacv requested a review from zeegomo December 18, 2023 10:30
@bacv bacv self-assigned this Dec 18, 2023
@@ -47,6 +48,7 @@ impl Disseminate {
let output = self.output.clone();
let (payload_sender, payload_rx) = tokio::sync::mpsc::unbounded_channel();
payload_sender.send(bytes).unwrap();
let private_key = PrivateKey::default(); // TODO: pass private_key via the cli args.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Uhm, what is this key used for? Shouldn't be the node itself the one to actually sign stuff?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've used this code to discuss an idea on how blob structure should look like, I'll summarize the discussion in the document. In short, this was added as proposal for blob validation during dissemination (before cert is created), but the idea was discarded.

Comment on lines 14 to +24
pub trait DaProtocol {
type Blob: Blob;
type Auth: BlobAuth;
type Attestation: Attestation;
type Certificate: Certificate;
type Settings: Clone;

// Construct a new instance
fn new(settings: Self::Settings) -> Self;
/// Encode bytes into blobs
fn encode<T: AsRef<[u8]>>(&self, data: T) -> Vec<Self::Blob>;
fn encode<T: AsRef<[u8]>>(&self, auth: Self::Auth, data: T) -> Vec<Self::Blob>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is part of the message itself not the blob per se, unless I am missing something.

@bacv
Copy link
Member Author

bacv commented Jan 3, 2024

Closing this as blob validation is not in a scope at the moment.

@bacv bacv closed this Jan 3, 2024
@bacv bacv deleted the da-read-range-api branch January 3, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants