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>
103 lines
2.9 KiB
Python
103 lines
2.9 KiB
Python
##############################################################################
|
|
# Common
|
|
##############################################################################
|
|
|
|
load("@rules_proto//proto:defs.bzl", "proto_library")
|
|
|
|
# gazelle:ignore
|
|
proto_library(
|
|
name = "proto",
|
|
srcs = [
|
|
"ssz.proto",
|
|
"version.proto",
|
|
":ssz_proto_files",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//proto/engine/v1:proto",
|
|
"//proto/eth/ext:proto",
|
|
"//proto/eth/v1:proto",
|
|
],
|
|
)
|
|
|
|
##############################################################################
|
|
# Go
|
|
##############################################################################
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
|
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
|
|
load("//proto:ssz_proto_library.bzl", "ssz_proto_files")
|
|
load("//tools:ssz.bzl", "SSZ_DEPS", "ssz_gen_marshal")
|
|
|
|
ssz_gen_marshal(
|
|
name = "ssz_generated_files",
|
|
go_proto = ":go_proto",
|
|
out = "grpc.ssz.go",
|
|
includes = [
|
|
"//consensus-types/primitives:go_default_library",
|
|
"//proto/engine/v1:go_default_library",
|
|
"//proto/eth/v1:go_default_library",
|
|
],
|
|
objs = [
|
|
"BlsToExecutionChange",
|
|
"SignedBeaconBlockAltair",
|
|
"SignedBeaconBlockBellatrix",
|
|
"SignedBlindedBeaconBlockBellatrix",
|
|
"SignedBeaconBlockCapella",
|
|
"SignedBlindedBeaconBlockCapella",
|
|
"SignedBeaconBlockDeneb",
|
|
"SignedBlindedBeaconBlockDeneb",
|
|
"BlsToExecutionChange",
|
|
"SignedBlsToExecutionChange",
|
|
"SignedBeaconBlockContentsDeneb",
|
|
"BeaconBlockContentsDeneb",
|
|
"SyncCommittee",
|
|
"BlobIdentifier",
|
|
],
|
|
)
|
|
|
|
go_proto_library(
|
|
name = "go_proto",
|
|
compilers = [
|
|
"@com_github_prysmaticlabs_protoc_gen_go_cast//:go_cast_grpc",
|
|
],
|
|
importpath = "github.com/prysmaticlabs/prysm/v5/proto/eth/v2",
|
|
proto = ":proto",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//consensus-types/primitives:go_default_library",
|
|
"//proto/engine/v1:go_default_library",
|
|
"//proto/eth/ext:go_default_library",
|
|
"//proto/eth/v1:go_default_library",
|
|
"@com_github_golang_protobuf//proto:go_default_library",
|
|
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
|
|
],
|
|
)
|
|
|
|
go_library(
|
|
name = "go_default_library",
|
|
srcs = [
|
|
":ssz_generated_files",
|
|
"custom.go",
|
|
],
|
|
embed = [":go_proto"],
|
|
importpath = "github.com/prysmaticlabs/prysm/v5/proto/eth/v2",
|
|
visibility = ["//visibility:public"],
|
|
deps = SSZ_DEPS,
|
|
)
|
|
|
|
ssz_proto_files(
|
|
name = "ssz_proto_files",
|
|
srcs = [
|
|
"beacon_block.proto",
|
|
"beacon_lightclient.proto",
|
|
"sync_committee.proto",
|
|
"validator.proto",
|
|
"withdrawals.proto",
|
|
],
|
|
config = select({
|
|
"//conditions:default": "mainnet",
|
|
"//proto:ssz_mainnet": "mainnet",
|
|
"//proto:ssz_minimal": "minimal",
|
|
}),
|
|
)
|