Skip to content

Commit

Permalink
feat(da): added commitment type and additional comments
Browse files Browse the repository at this point in the history
  • Loading branch information
keruch committed Jul 3, 2024
1 parent 7c85f8c commit 9c81c58
Show file tree
Hide file tree
Showing 5 changed files with 425 additions and 31 deletions.
8 changes: 7 additions & 1 deletion proto/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ done
cd $SCRIPT_DIR
mkdir -p ./proto/pb
rm -rf $TARGET_DIR/*
docker run -v $PWD:/workspace --workdir /workspace tendermintdev/docker-build-proto sh ./proto/protoc.sh

protoVer=v0.7
protoImageName=tendermintdev/sdk-proto-gen:$protoVer
containerProtoGen=cosmos-sdk-proto-gen-$protoVer
containerProtoFmt=cosmos-sdk-proto-fmt-$protoVer

docker run -v $PWD:/workspace --workdir /workspace $protoImageName sh ./proto/protoc.sh

# Copy the generated files to the target directories
for TARGET_DIR in $TARGETS; do
Expand Down
20 changes: 19 additions & 1 deletion proto/types/interchain_da/da.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package dymension.interchain_da;

import "gogoproto/gogo.proto";
import "types/cosmos/base/v1beta1/coin.proto";
import "types/tendermint/crypto/proof.proto";

option go_package = "github.com/dymensionxyz/dymint/types/pb/interchain_da";

Expand All @@ -16,7 +17,10 @@ message Params {
cosmos.base.v1beta1.Coin cost_per_byte = 1 [ (gogoproto.nullable) = false ];
// MaxBlobSize is the hard cap of how many bytes a blob can be.
uint32 max_blob_size = 2;
// DisputePeriod is the number of blocks the blob is stored for.
// DisputePeriod is the number of blocks the blob is stored for. In the
// current implementation, the dispute period equals the store time. Meaning,
// a dispute can't be submitted after the dispute period is over because both
// the blob and the metadata are pruned.
uint64 dispute_period = 3;
}

Expand All @@ -25,3 +29,17 @@ message BlobMetadata {
// BlobHash is the hash of the submitted blob.
string blob_hash = 1;
}

// Commitment defines the commitment type used by the InterchainDALayer.
message Commitment {
// ClientID identifies the client_id of the DA chain where the blob was posted.
string client_id = 1;
// BlobHeight identifies the height at which the blob was posted.
uint64 blob_height = 2;
// BlobHash is the hash of the submitted blob.
string blob_hash = 3;
// BlobID is the unique ID of the blob.
uint64 blob_id = 4;
// MerkleProof is a merkle inclusion proof of the blob.
tendermint.crypto.ProofOps merkle_proof = 5;
}
7 changes: 4 additions & 3 deletions types/pb/dalc/dalc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9c81c58

Please sign in to comment.