// Copyright 2022 Prysmatic Labs.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";

package ethereum.eth.v1alpha1;

import "proto/eth/ext/options.proto";

option csharp_namespace = "Ethereum.Eth.v1alpha1";
option go_package = "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1;eth";
option java_multiple_files = true;
option java_outer_classname = "BlobsProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";

message BlindedBlobSidecars {
  repeated BlindedBlobSidecar sidecars = 1
      [ (ethereum.eth.ext.ssz_max) = "max_blobs_per_block.size" ];
}

message SignedBlindedBlobSidecar {
  BlindedBlobSidecar message = 1;
  bytes signature = 2 [ (ethereum.eth.ext.ssz_size) = "96" ];
}

message BlindedBlobSidecar {
  bytes block_root = 1 [ (ethereum.eth.ext.ssz_size) = "32" ];
  uint64 index = 2;
  uint64 slot = 3 [
    (ethereum.eth.ext.cast_type) =
        "github.com/OffchainLabs/prysm/v7/consensus-types/primitives.Slot"
  ];
  bytes block_parent_root = 4 [ (ethereum.eth.ext.ssz_size) = "32" ];
  uint64 proposer_index = 5 [ (ethereum.eth.ext.cast_type) =
                                  "github.com/OffchainLabs/prysm/v7/"
                                  "consensus-types/primitives.ValidatorIndex" ];
  bytes blob_root = 6 [ (ethereum.eth.ext.ssz_size) = "32" ];
  bytes kzg_commitment = 7 [ (ethereum.eth.ext.ssz_size) = "48" ];
  bytes kzg_proof = 8 [ (ethereum.eth.ext.ssz_size) = "48" ];
}

message BlobIdentifier {
  bytes block_root = 1 [ (ethereum.eth.ext.ssz_size) = "32" ];
  uint64 index = 2;
}