// Copyright 2024 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";
import "proto/prysm/v1alpha1/beacon_block.proto";
import "proto/engine/v1/execution_engine.proto";
import "proto/prysm/v1alpha1/beacon_state.proto";

option csharp_namespace = "Ethereum.Eth.V1alpha1";
option go_package = "github.com/prysmaticlabs/prysm/v5/proto/eth/v1alpha1;eth";
option java_multiple_files = true;
option java_outer_classname = "LightClientProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";

message LightClientHeaderAltair {
  BeaconBlockHeader beacon = 1;
}

message LightClientHeaderCapella {
  BeaconBlockHeader beacon = 1;
  ethereum.engine.v1.ExecutionPayloadHeaderCapella execution = 2;
  repeated bytes execution_branch = 3 [(ethereum.eth.ext.ssz_size) = "4,32"];
}

message LightClientHeaderDeneb {
  BeaconBlockHeader beacon = 1;
  ethereum.engine.v1.ExecutionPayloadHeaderDeneb execution = 2;
  repeated bytes execution_branch = 3 [(ethereum.eth.ext.ssz_size) = "4,32"];
}

message LightClientBootstrapAltair {
  LightClientHeaderAltair header = 1;
  SyncCommittee current_sync_committee = 2;
  repeated bytes current_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"];
}

message LightClientBootstrapCapella {
  LightClientHeaderCapella header = 1;
  SyncCommittee current_sync_committee = 2;
  repeated bytes current_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"];
}

message LightClientBootstrapDeneb {
  LightClientHeaderDeneb header = 1;
  SyncCommittee current_sync_committee = 2;
  repeated bytes current_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"];
}

message LightClientBootstrapElectra {
  LightClientHeaderDeneb header = 1;
  SyncCommittee current_sync_committee = 2;
  repeated bytes current_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "6,32"];
}

message LightClientUpdateAltair {
  LightClientHeaderAltair attested_header = 1;
  SyncCommittee next_sync_committee = 2;
  repeated bytes next_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"];
  LightClientHeaderAltair finalized_header = 4;
  repeated bytes finality_branch = 5 [(ethereum.eth.ext.ssz_size) = "6,32"];
  SyncAggregate sync_aggregate = 6;
  uint64 signature_slot = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
}

message LightClientUpdateCapella {
  LightClientHeaderCapella attested_header = 1;
  SyncCommittee next_sync_committee = 2;
  repeated bytes next_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"];
  LightClientHeaderCapella finalized_header = 4;
  repeated bytes finality_branch = 5 [(ethereum.eth.ext.ssz_size) = "6,32"];
  SyncAggregate sync_aggregate = 6;
  uint64 signature_slot = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
}

message LightClientUpdateDeneb {
  LightClientHeaderDeneb attested_header = 1;
  SyncCommittee next_sync_committee = 2;
  repeated bytes next_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "5,32"];
  LightClientHeaderDeneb finalized_header = 4;
  repeated bytes finality_branch = 5 [(ethereum.eth.ext.ssz_size) = "6,32"];
  SyncAggregate sync_aggregate = 6;
  uint64 signature_slot = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
}

message LightClientUpdateElectra {
  LightClientHeaderDeneb attested_header = 1;
  SyncCommittee next_sync_committee = 2;
  repeated bytes next_sync_committee_branch = 3 [(ethereum.eth.ext.ssz_size) = "6,32"];
  LightClientHeaderDeneb finalized_header = 4;
  repeated bytes finality_branch = 5 [(ethereum.eth.ext.ssz_size) = "6,32"];
  SyncAggregate sync_aggregate = 6;
  uint64 signature_slot = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
}

message LightClientFinalityUpdateAltair {
  LightClientHeaderAltair attested_header = 1;
  LightClientHeaderAltair finalized_header = 2;
  repeated bytes finality_branch = 3 [(ethereum.eth.ext.ssz_size) = "6,32"];
  SyncAggregate sync_aggregate = 4;
  uint64 signature_slot = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
}

message LightClientFinalityUpdateCapella {
  LightClientHeaderCapella attested_header = 1;
  LightClientHeaderCapella finalized_header = 2;
  repeated bytes finality_branch = 3 [(ethereum.eth.ext.ssz_size) = "6,32"];
  SyncAggregate sync_aggregate = 4;
  uint64 signature_slot = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
}

message LightClientFinalityUpdateDeneb {
  LightClientHeaderDeneb attested_header = 1;
  LightClientHeaderDeneb finalized_header = 2;
  repeated bytes finality_branch = 3 [(ethereum.eth.ext.ssz_size) = "6,32"];
  SyncAggregate sync_aggregate = 4;
  uint64 signature_slot = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
}

message LightClientOptimisticUpdateAltair {
  LightClientHeaderAltair attested_header = 1;
  SyncAggregate sync_aggregate = 2;
  uint64 signature_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
}

message LightClientOptimisticUpdateCapella {
  LightClientHeaderCapella attested_header = 1;
  SyncAggregate sync_aggregate = 2;
  uint64 signature_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
}

message LightClientOptimisticUpdateDeneb {
  LightClientHeaderDeneb attested_header = 1;
  SyncAggregate sync_aggregate = 2;
  uint64 signature_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
}