Separating out a more generic DA interface #755
Replies: 10 comments 18 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Questions
// 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
// CheckBlockAvailability queries DA layer to check data availability of block corresponding at given height.
CheckBlockAvailability(ctx context.Context, dataLayerHeight uint64) ResultCheckBlock |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
State of DA Interface in Rollkit
Currently, Rollkit contains the interface described in DA Interface ADR. Extracted implementation:
This interface is currently implemented by three DA layers: celestia, mock, grpc, and contexts were introduced in #623.
Proposed more generic DA Interface
Recently, @nashqueue and @Wondertan proposed a more generic DA interface in ADR-009, extracted proposal:
Note that this proposal was made without referencing ADR-006 and we should discuss what changes would make sense going from the current interface to a more generic interface with eventually separating out the interface in its own repository and importing it as a dependency to Rollkit.
Points of Discussion
Here's a list of preliminary questions that came up when exploring these changes:
Init
,Start
, andStop
as part of the DA interface? Currently, lifecycle methods are a part of the interface to enable choosing DA in configuration (file or CLI flags) without changing cosmos-sdk which is where a DA object is initialized when a Rollkit node is created. As we move towards supporting more execution environments, we'd like to enable the creation of a Rollkit node through a new CLI. So alternatively we can accept object implementing DA interface, and leave the lifecycle to the developer. Making lifecycle methods part of the Service Interface is another option mentioned by @liamsi, but I'm not sure what that looks like in practice.Init
, namelynamespaceID
,config
,kvStore
, andlogger
fit into the new design?CheckBlockAvailability
, which is part of the DA interface, is never used anywhere in the Rollkit implementation. When ADR-006 was designed, where was the intended use case behind this method and do we still plan to use it somewhere?Put
-Data
just a byte array or is it an array of byte arrays? In my opinion, byte array makes more sense since that is what is returned when we marshal a protobuf object. Are there instances where array of byte arrays is needed?Ref
since it is the only argument toRetrieveBlocks
, do we expect the developer to provide aRef
struct that can be Marshaled to and from a byte array for each custom DA implementation?Commit
method introduced in the new design fit in with the current implementation?StatusCode
andBaseResult
fit into the new design? If the goal of the more generic interface is to have all arguments and return values be byte arrays and all serialization/deserialization be handled by the custom DA implementation, how do we incorporate this change inmanager.go
? Currently,manager.go
is whereSubmitBlock
andRetrieveBlocks
are called.Putting each question above as its own comment below.
Beta Was this translation helpful? Give feedback.
All reactions