-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Labels
C:data-availabilityComponent: Data Availability layer abstractionComponent: Data Availability layer abstraction
Description
To keep the greatest flexibility, we start with the following very limited interface and extend it only if necessary for implementing using LazyLedger as a DA layer (certainly in a way that would not limit developers to use other DA layers though):
// TODO define an enum of different non-happy-path cases
// that might need to be handled by Optimint independent of
// the underlying DA chain.
type StatusCode uint64
type ResultSubmitBlock struct {
// Code is to determine if the action succeeded.
Code StatusCode
// Not sure if this needs to be bubbled up to other
// parts of Optimint.
// Hash hash.Hash
}
type DataAvailabilityLayerClient interface {
Start() error
Stop() error
// SubmitBlock submits the passed in block to the DA layer.
// This should create a transaction which (potentially)
// triggers a state transition in the DA layer.
SubmitBlock(block types.Block) ResultSubmitBlock
}Metadata
Metadata
Assignees
Labels
C:data-availabilityComponent: Data Availability layer abstractionComponent: Data Availability layer abstraction