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

share: GetShares method for Getter interface #2983

Closed
Wondertan opened this issue Dec 3, 2023 · 8 comments
Closed

share: GetShares method for Getter interface #2983

Wondertan opened this issue Dec 3, 2023 · 8 comments
Assignees

Comments

@Wondertan
Copy link
Member

Wondertan commented Dec 3, 2023

We only have the GetShare method, which gets us a single share/sample. It worked well before, but with shwap sampling protocol, we need a method that gets multiple shares within one call to allow batching requests.

GetShares(ctx context.Context, hdr *header.ExtendedHeader, shrIdxs ...int) ([]share.Share, error) 

The method can also satisfy singular requests, so we would also deprecate GetShare

@Dadiselef20

This comment has been minimized.

@Dadiselef20

This comment has been minimized.

@Dadiselef20

This comment has been minimized.

@vgonkivs
Copy link
Member

vgonkivs commented Jan 8, 2024

We had something similar but with range. I think we can combine somehow these two issues:
#2304

@Wondertan
Copy link
Member Author

I dont see how we can combine range requests and single share requests in a single method ergonomically. Please show if you have an idea

@vgonkivs
Copy link
Member

instead of having shrIdxs ...int it could be some kind of a filter struct that determines the behavior.

@vgonkivs
Copy link
Member

type filter struct {
idx []uint
start uint
end uint
}

func(f *filter) Next() uint {}

@renaynay
Copy link
Member

renaynay commented Dec 2, 2024

Resolved by #3891

@renaynay renaynay closed this as completed Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants