Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduce Capella and Deneb full-node.md lc changes #14376

Merged
merged 43 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
5be1c9a
feat: introduce Capella and Deneb `full-node.md` lc changes
rupam-04 Aug 22, 2024
1849d35
add switch-case and replace `[][]byte` with `[][]string`
rupam-04 Aug 23, 2024
6b93f1a
return version name in http header
rupam-04 Aug 25, 2024
2165203
populate header and use `interfaces.ReadOnlyBeaconBlock`
rupam-04 Aug 26, 2024
7387900
fix lint
rupam-04 Aug 26, 2024
b83d8a8
merge cases in switch case and replace `interfaces.ExecutionData` wit…
rupam-04 Aug 27, 2024
1aa42e4
Merge branch 'develop' into full-node-capella-deneb
rkapka Aug 29, 2024
7641787
minor fixes
rupam-04 Aug 29, 2024
78fb405
refactor `createLightClientBootstrapCapella` and `createLightClientBo…
rupam-04 Aug 30, 2024
490d15e
use lightclientheader instead of different versions
Inspector-Butters Aug 30, 2024
65b79e9
Merge branch 'full-node-capella-deneb' of https://github.com/rupam-04…
Inspector-Butters Aug 30, 2024
fbf36ce
fix failing `TestLightClientHandler_GetLightClientBootstrap` tests
rupam-04 Aug 30, 2024
8e336c0
fix lint
rupam-04 Aug 30, 2024
ad60aca
resolve conflicts
Inspector-Butters Aug 30, 2024
30b8e83
Merge branch 'full-node-capella-deneb' of https://github.com/rupam-04…
Inspector-Butters Aug 30, 2024
a99ea65
refactor handlers
Inspector-Butters Aug 30, 2024
9940aed
refactor handlers more
Inspector-Butters Aug 30, 2024
e074683
refactor handlers even more
Inspector-Butters Aug 30, 2024
259d6d5
create conversions_lightclient
Inspector-Butters Aug 30, 2024
75a2b5e
fix lint errors
Inspector-Butters Aug 30, 2024
579b26c
add deneb and capella proto headers
Inspector-Butters Aug 31, 2024
fe5bc4c
update lightclientbootstrap proto struct to capella&deneb
Inspector-Butters Aug 31, 2024
da64486
update usecases
Inspector-Butters Sep 1, 2024
ac4fc9e
update usecases
Inspector-Butters Sep 2, 2024
56e5a6f
Merge branch 'develop' into full-node-capella-deneb
Inspector-Butters Sep 2, 2024
2d60884
resolve panic in header.GetBeacon
Inspector-Butters Sep 2, 2024
892d00c
fix spacings
Inspector-Butters Sep 2, 2024
70f46dc
refactor core/lightclient.go
Inspector-Butters Sep 3, 2024
7dfa520
fix isBetterUpdate
Inspector-Butters Sep 3, 2024
25417ae
use errors.wrap instead of fmt.errorf
Inspector-Butters Sep 3, 2024
35d3154
changelog entry
Inspector-Butters Sep 3, 2024
300670d
fix lint errors
Inspector-Butters Sep 3, 2024
baf384f
fix api structs to use json rawMessage
Inspector-Butters Sep 4, 2024
d781d23
Merge branch 'develop' into full-node-capella-deneb
Inspector-Butters Sep 4, 2024
5ed956f
inline unmarshal
Inspector-Butters Sep 6, 2024
3762b93
remove redundant nil check
Inspector-Butters Sep 6, 2024
2f14fe4
revert remove redundant nil check
Inspector-Butters Sep 6, 2024
887f601
return error in newLightClientUpdateToJSON
Inspector-Butters Sep 6, 2024
c534a65
inline getExecutionData
Inspector-Butters Sep 6, 2024
bfa28bc
Merge branch 'full-node-capella-deneb' of https://github.com/rupam-04…
Inspector-Butters Sep 6, 2024
4d78491
Merge branch 'prysmaticlabs:develop' into full-node-capella-deneb
Inspector-Butters Sep 6, 2024
2dba21b
Merge branch 'full-node-capella-deneb' of https://github.com/rupam-04…
Inspector-Butters Sep 6, 2024
65c5ff8
better error handling
Inspector-Butters Sep 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
626 changes: 410 additions & 216 deletions CHANGELOG.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions api/server/structs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ go_library(
"block.go",
"conversions.go",
"conversions_block.go",
"conversions_lightclient.go",
"conversions_state.go",
"endpoints_beacon.go",
"endpoints_blob.go",
Expand Down
3 changes: 3 additions & 0 deletions api/server/structs/conversions_lightclient.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package structs

//
40 changes: 27 additions & 13 deletions api/server/structs/endpoints_lightclient.go
Original file line number Diff line number Diff line change
@@ -1,28 +1,42 @@
package structs

import "encoding/json"

type LightClientHeader struct {
Beacon *BeaconBlockHeader `json:"beacon"`
}

type LightClientBootstrapResponse struct {
Version string `json:"version"`
Data *LightClientBootstrap `json:"data"`
type LightClientHeaderCapella struct {
Beacon *BeaconBlockHeader `json:"beacon"`
Execution *ExecutionPayloadHeaderCapella `json:"execution"`
ExecutionBranch []string `json:"execution_branch"`
}

type LightClientHeaderDeneb struct {
Beacon *BeaconBlockHeader `json:"beacon"`
Execution *ExecutionPayloadHeaderDeneb `json:"execution"`
ExecutionBranch []string `json:"execution_branch"`
}

type LightClientBootstrap struct {
Header *LightClientHeader `json:"header"`
CurrentSyncCommittee *SyncCommittee `json:"current_sync_committee"`
CurrentSyncCommitteeBranch []string `json:"current_sync_committee_branch"`
Header json.RawMessage `json:"header"`
CurrentSyncCommittee *SyncCommittee `json:"current_sync_committee"`
CurrentSyncCommitteeBranch []string `json:"current_sync_committee_branch"`
}

type LightClientBootstrapResponse struct {
Version string `json:"version"`
Data *LightClientBootstrap `json:"data"`
}

type LightClientUpdate struct {
AttestedHeader *LightClientHeader `json:"attested_header"`
NextSyncCommittee *SyncCommittee `json:"next_sync_committee,omitempty"`
FinalizedHeader *LightClientHeader `json:"finalized_header,omitempty"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
NextSyncCommitteeBranch []string `json:"next_sync_committee_branch,omitempty"`
FinalityBranch []string `json:"finality_branch,omitempty"`
SignatureSlot string `json:"signature_slot"`
AttestedHeader json.RawMessage `json:"attested_header"`
NextSyncCommittee *SyncCommittee `json:"next_sync_committee,omitempty"`
FinalizedHeader json.RawMessage `json:"finalized_header,omitempty"`
SyncAggregate *SyncAggregate `json:"sync_aggregate"`
NextSyncCommitteeBranch []string `json:"next_sync_committee_branch,omitempty"`
FinalityBranch []string `json:"finality_branch,omitempty"`
SignatureSlot string `json:"signature_slot"`
}

type LightClientUpdateWithVersion struct {
Expand Down
7 changes: 7 additions & 0 deletions beacon-chain/core/light-client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//beacon-chain/state:go_default_library",
"//config/fieldparams:go_default_library",
"//config/params:go_default_library",
"//consensus-types:go_default_library",
"//consensus-types/blocks:go_default_library",
"//consensus-types/interfaces:go_default_library",
"//encoding/bytesutil:go_default_library",
"//encoding/ssz:go_default_library",
"//proto/engine/v1:go_default_library",
"//proto/eth/v1:go_default_library",
"//proto/eth/v2:go_default_library",
"//proto/migration:go_default_library",
"//runtime/version:go_default_library",
"//time/slots:go_default_library",
"@com_github_pkg_errors//:go_default_library",
],
)

Expand Down
Loading
Loading