Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBlobNotFound is used to indicate that the blob was not found. ErrBlobNotFound = errors.New("blob: not found") // ErrBlobSizeOverLimit is used to indicate that the blob size is over limit ErrBlobSizeOverLimit = errors.New("blob: over size limit") )
Functions ¶
This section is empty.
Types ¶
type BaseResult ¶
type BaseResult struct {
// Code is to determine if the action succeeded.
Code StatusCode
// Message may contain DA layer specific information (like DA block height/hash, detailed error message, etc)
Message string
// DAHeight informs about a height on Data Availability Layer for given result.
DAHeight uint64
// SubmittedCount is the number of successfully submitted blocks.
SubmittedCount uint64
}
BaseResult contains basic information returned by DA layer.
type DAClient ¶ added in v0.11.6
DAClient is a new DA implementation.
func (*DAClient) RetrieveBlocks ¶ added in v0.11.6
func (dac *DAClient) RetrieveBlocks(ctx context.Context, dataLayerHeight uint64) ResultRetrieveBlocks
RetrieveBlocks retrieves blocks from DA.
func (*DAClient) SubmitBlocks ¶ added in v0.11.6
SubmitBlocks submits blocks to DA.
type ResultRetrieveBlocks ¶
type ResultRetrieveBlocks struct {
BaseResult
// Block is the full block retrieved from Data Availability Layer.
// If Code is not equal to StatusSuccess, it has to be nil.
Blocks []*types.Block
}
ResultRetrieveBlocks contains batch of blocks returned from DA layer client.
type ResultSubmitBlocks ¶ added in v0.10.0
type ResultSubmitBlocks struct {
BaseResult
}
ResultSubmitBlocks contains information returned from DA layer after blocks submission.
type StatusCode ¶
type StatusCode uint64
StatusCode is a type for DA layer return status. TODO: define an enum of different non-happy-path cases that might need to be handled by Rollkit independent of the underlying DA chain.
const ( StatusUnknown StatusCode = iota StatusSuccess StatusNotFound StatusError )
Data Availability return codes.
Click to show internal directories.
Click to hide internal directories.