This PR aims to generalize and standardize the DA Layers that a rollapp can decide to use. The sequencers can then multiplex between different DAs. Using this, the inclusions of blob can be proved and allows for a trustless dispute process to prove inclusion, non-inclusion or tampering.
The main change includes the change of DAPath from string to a concrete type in MsgUpdateState. Rest of the fields stay the same.
message DAPath {
// da_type identifies the DA type being used by the sequencer to post the blob.
string da_type = 1;
// commitment defines a generic commitment interpreted by the DA Layer.
google.Protobuf.Any commitment = 2;
}
Every new da layer supported will need to implement the following interface to satisfy the requirements.
// DALayer defines a generic DA layer from the point of view of the
// dymension settlement layer.
type DALayer interface {
// This is called by x/rollapp keeper during a rollapp state update.
// It is used to verify the correctness of the provided commitment.
// It is up to the DA Layer to decide the verification level.
// For example, a DA layer using IBC can immediately verify inclusion
// of the blob.
OnRollappStateUpdate(ctx context.Context, commitment anypb.Any) error
// VerifyMembership is called by x/rollapp during the dispute process to verify
// the inclusion or non inclusion of the blob, or verify that it was not tampered
// with.
// It also provides arbitrary proof bytes that can be used to confirm the membership.
VerifyMembership(ctx context.Context, commitment anypb.Any, proof []byte) error
}
Description
Implementing v2.MsgUpdateState which differs from the existing msg in the DAPath field.
This is implemented with a second msg server so that the initial implementation is still useable along with the new one. Eventually v1.MsgUpdateState can be deprecated when all da layers are supported by the v2 type.
Implementing new DAPath field which also holds information about the type of da layer being used. e.g values are celestia, avail etc
The DAPath in the StateInfo is still a string field. The v2.MsgUpdateState will marshall the new DAPath and store it as string and unmarshall when it needs to be read.
Adding the DALayer interface which needs to be implemented by every da layer which will be supported.
This PR does not implement any DA Layer currently, but just enables it.
This PR aims to generalize and standardize the DA Layers that a rollapp can decide to use. The sequencers can then multiplex between different DAs. Using this, the inclusions of blob can be proved and allows for a trustless dispute process to prove inclusion, non-inclusion or tampering.
The main change includes the change of
DAPath
from string to a concrete type inMsgUpdateState
. Rest of the fields stay the same.Every new da layer supported will need to implement the following interface to satisfy the requirements.
Description
v2.MsgUpdateState
which differs from the existing msg in theDAPath
field.v1.MsgUpdateState
can be deprecated when all da layers are supported by the v2 type.DAPath
field which also holds information about the type of da layer being used. e.g values arecelestia
,avail
etcDAPath
in theStateInfo
is still a string field. Thev2.MsgUpdateState
will marshall the newDAPath
and store it as string and unmarshall when it needs to be read.DALayer
interface which needs to be implemented by every da layer which will be supported.References:
All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow-up issues.
PR review checkboxes:
I have...
Unreleased
section inCHANGELOG.md
godoc
commentsSDK Checklist
map
time.Now()
sendCoin
and notSendCoins
Full security checklist here
----;
For Reviewer:
---;
After reviewer approval: