-
Notifications
You must be signed in to change notification settings - Fork 69
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(da): RetrieveBatchesV2 method #937
base: kirill/interchain-da
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to say 'can't or 'failed to' or 'could not' in any of the errors
But otherwise really nice and thanks for wrapping them
if err != nil { | ||
return types.Batch{}, fmt.Errorf("can't gunzip batch: %w", err) | ||
} | ||
|
||
// Prepare the blob data | ||
var batch types.Batch | ||
err = batch.UnmarshalBinary(binary) | ||
if err != nil { | ||
return types.Batch{}, fmt.Errorf("can't unmarshal batch: %w", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont need 'can't in the messages
// Generate batches with random headers | ||
expected := types.Batch{ | ||
StartHeight: h1, | ||
EndHeight: h2, | ||
Blocks: []*types.Block{}, | ||
Commits: []*types.Commit{}, | ||
} | ||
|
||
data, err := interchain.EncodeBatch(expected) | ||
require.NoError(t, err) | ||
|
||
actual, err := interchain.DecodeBatch(data) | ||
require.NoError(t, err) | ||
|
||
require.Equal(t, expected, actual) | ||
}) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what exactly do you expect to reveal by only fuzzing the heights?
Co-authored-by: Daniel T <[email protected]>
Co-authored-by: zale144 <[email protected]>
Signed-off-by: yuhangcangqian <[email protected]>
Co-authored-by: zale144 <[email protected]>
Co-authored-by: danwt <[email protected]>
Co-authored-by: Omri <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Michael Tsitrin <[email protected]> Co-authored-by: Omri <[email protected]> Co-authored-by: Daniel T <[email protected]>
…mer to submitter thread (#1014)
Co-authored-by: Daniel T <[email protected]>
…of restart or crash) (#1045) Co-authored-by: Omri <[email protected]>
…v0.15 compatibility (#1047)
Part of #930
This PR contains changes with respect to the generalized DA specification. This is the second part of the implementation following #929.
Changelog:
For Author:
godoc
commentsFor Reviewer:
After reviewer approval: