mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
* feat: introduce Capella and Deneb `full-node.md` lc changes * add switch-case and replace `[][]byte` with `[][]string` * return version name in http header * populate header and use `interfaces.ReadOnlyBeaconBlock` * fix lint * merge cases in switch case and replace `interfaces.ExecutionData` with `*ExecutionPayloadHeader` * minor fixes * refactor `createLightClientBootstrapCapella` and `createLightClientBootstrapDeneb` * use lightclientheader instead of different versions * fix failing `TestLightClientHandler_GetLightClientBootstrap` tests * fix lint * refactor handlers * refactor handlers more * refactor handlers even more * create conversions_lightclient * fix lint errors * add deneb and capella proto headers * update lightclientbootstrap proto struct to capella&deneb * update usecases * update usecases * resolve panic in header.GetBeacon * fix spacings * refactor core/lightclient.go * fix isBetterUpdate * use errors.wrap instead of fmt.errorf * changelog entry * fix lint errors * fix api structs to use json rawMessage * inline unmarshal * remove redundant nil check * revert remove redundant nil check * return error in newLightClientUpdateToJSON * inline getExecutionData * better error handling --------- Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Inspector-Butters <mohamadbastin@gmail.com> Co-authored-by: Bastin <43618253+Inspector-Butters@users.noreply.github.com>
101 lines
3.3 KiB
Protocol Buffer
101 lines
3.3 KiB
Protocol Buffer
// Copyright 2023 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.v2;
|
|
|
|
import "proto/eth/ext/options.proto";
|
|
import "proto/eth/v1/beacon_block.proto";
|
|
import "proto/eth/v2/version.proto";
|
|
import "proto/eth/v2/sync_committee.proto";
|
|
import "proto/engine/v1/execution_engine.proto";
|
|
|
|
option csharp_namespace = "Ethereum.Eth.V2";
|
|
option go_package = "github.com/prysmaticlabs/prysm/v5/proto/eth/v2;eth";
|
|
option java_multiple_files = true;
|
|
option java_outer_classname = "SyncCommitteeProto";
|
|
option java_package = "org.ethereum.eth.v2";
|
|
option php_namespace = "Ethereum\\Eth\\v2";
|
|
|
|
// Beacon LightClient API related messages.
|
|
|
|
message LightClientHeader {
|
|
v1.BeaconBlockHeader beacon = 1;
|
|
}
|
|
|
|
message LightClientHeaderCapella {
|
|
v1.BeaconBlockHeader beacon = 1;
|
|
ethereum.engine.v1.ExecutionPayloadHeaderCapella execution = 2;
|
|
repeated bytes execution_branch = 3;
|
|
}
|
|
|
|
message LightClientHeaderDeneb {
|
|
v1.BeaconBlockHeader beacon = 1;
|
|
ethereum.engine.v1.ExecutionPayloadHeaderDeneb execution = 2;
|
|
repeated bytes execution_branch = 3;
|
|
}
|
|
|
|
message LightClientHeaderContainer {
|
|
oneof header {
|
|
LightClientHeader header_altair = 1;
|
|
LightClientHeaderCapella header_capella = 2;
|
|
LightClientHeaderDeneb header_deneb = 3;
|
|
}
|
|
}
|
|
|
|
|
|
message LightClientBootstrap {
|
|
LightClientHeaderContainer header = 1;
|
|
SyncCommittee current_sync_committee = 2;
|
|
repeated bytes current_sync_committee_branch = 3;
|
|
}
|
|
|
|
message LightClientUpdate {
|
|
LightClientHeaderContainer attested_header = 1;
|
|
SyncCommittee next_sync_committee = 2;
|
|
repeated bytes next_sync_committee_branch = 3;
|
|
LightClientHeaderContainer finalized_header = 4;
|
|
repeated bytes finality_branch = 5;
|
|
v1.SyncAggregate sync_aggregate = 6;
|
|
uint64 signature_slot = 7 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
|
|
}
|
|
|
|
message LightClientFinalityUpdateWithVersion {
|
|
v2.Version version = 1;
|
|
LightClientFinalityUpdate data = 2;
|
|
}
|
|
|
|
message LightClientFinalityUpdate {
|
|
LightClientHeaderContainer attested_header = 1;
|
|
LightClientHeaderContainer finalized_header = 2;
|
|
repeated bytes finality_branch = 3;
|
|
v1.SyncAggregate sync_aggregate = 4;
|
|
uint64 signature_slot = 5 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
|
|
}
|
|
|
|
message LightClientOptimisticUpdateWithVersion {
|
|
v2.Version version = 1;
|
|
LightClientOptimisticUpdate data = 2;
|
|
}
|
|
|
|
message LightClientOptimisticUpdate {
|
|
LightClientHeaderContainer attested_header = 1;
|
|
v1.SyncAggregate sync_aggregate = 2;
|
|
uint64 signature_slot = 3 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.Slot"];
|
|
}
|
|
|
|
message LightClientUpdateWithVersion {
|
|
v2.Version version = 1;
|
|
LightClientUpdate data = 2;
|
|
} |