Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
875fd03
add eip7732 containers & generate ssz code
pk910 Jan 27, 2025
563b55f
add eip7732 containers to versioned helper structs
pk910 Jan 27, 2025
fd8557b
some fixes
pk910 Jan 27, 2025
8cfe1ff
linter fixes
pk910 Jan 27, 2025
69ef9de
Merge branch 'master' into eip7732
pk910 Feb 4, 2025
43591af
add missing signedbeaconblock ssz handling
pk910 Feb 4, 2025
361ad93
update eip7732 containers, generate missing ssz code
pk910 Feb 5, 2025
0d04ee2
use `epbs` as block version for eip7732
pk910 Feb 5, 2025
f35b6f0
use correct ExecutionPayloadHeader for eip7732 containers
pk910 Feb 5, 2025
66eea50
Merge branch 'pk910/fix-attestation-annotations' into eip7732
pk910 Feb 5, 2025
72bb42c
add `ExecutionPayloadEvent`
pk910 Feb 5, 2025
1bf0201
add SignedExecutionPayloadEnvelope getter
pk910 Feb 5, 2025
2570116
Merge branch 'master' into eip7732
pk910 Feb 6, 2025
c7d9302
update block version to `eip7732`
pk910 Feb 6, 2025
3e9ff5f
fix ExecutionPayloadEvent field name
pk910 Feb 8, 2025
6103e2d
fix execution_payload endpoint url
pk910 Feb 8, 2025
4cc8d12
add `SignedExecutionPayloadEnvelope` getter to mock service
pk910 Feb 9, 2025
79247c3
fix linter
pk910 Feb 9, 2025
4136b2b
Merge branch 'master' into eip7732
pk910 May 22, 2025
f12ffc3
dynssz annotation fixes for minimal preset compatibility
pk910 Jun 7, 2025
d8cde0c
add missing `dynssz` annotations to api containers
pk910 Jun 9, 2025
3d549c5
make linter happy
pk910 Jun 24, 2025
460cfc4
re-generate blobsidecar_ssz.go
pk910 Jun 24, 2025
f861f15
Merge branch 'master' into eip7732
pk910 Jul 15, 2025
8c135d9
Merge branch 'master' into eip7732
pk910 Jul 16, 2025
4382baf
add missing getters for eip7732
pk910 Jul 16, 2025
599a201
Merge branch 'fulu' into eip7732
pk910 Jul 23, 2025
72bcf1a
rename `eip7732` to `gloas`
pk910 Aug 25, 2025
378ca5a
update glaos spec to `v1.6.0-alpha.5`
pk910 Aug 25, 2025
bdafec0
rename `glaos` to `gloas`
pk910 Aug 25, 2025
96aa895
Merge remote-tracking branch 'upstream/fulu' into gloas
pk910 Aug 25, 2025
ba7ef0d
generate `BeaconState` ssz
pk910 Aug 25, 2025
5e0210a
switch to dynamic-ssz codegen
pk910 Sep 22, 2025
f1d41f4
update gloas types
pk910 Sep 22, 2025
fb4fe8c
generate legacy code only for direct comparison
pk910 Sep 23, 2025
c9d5975
bump `dynamic-ssz`
pk910 Sep 23, 2025
e94a10f
fix linter issues
pk910 Sep 23, 2025
5d7b022
flatten generated code
pk910 Sep 23, 2025
012c273
go fmt fixes
pk910 Sep 24, 2025
75360b6
update generated code
pk910 Sep 24, 2025
489df4c
add missing cloas code
pk910 Sep 25, 2025
858437b
regenerate code
pk910 Sep 28, 2025
2e4aff8
switch to cli based code generator
pk910 Sep 28, 2025
f5e1521
bump dynamic-ssz & regen ssz code
pk910 Sep 29, 2025
0be78af
re-generate ssz files
pk910 Oct 4, 2025
c28b53a
restore proof creation & verification methods
pk910 Oct 4, 2025
45d1c16
remove leftover codegen.go
pk910 Oct 4, 2025
71861c2
regenerate code
pk910 Oct 6, 2025
b996b4f
reorder ssz code for easier comparison
pk910 Oct 6, 2025
cacaa13
regenerate code
pk910 Oct 6, 2025
7bdb7a9
regenerate ssz files
pk910 Oct 6, 2025
84825b7
re-generate ssz code
pk910 Oct 10, 2025
bc8e808
re-generate ssz code
pk910 Oct 15, 2025
82b43df
re-generate ssz files
pk910 Oct 19, 2025
ae58ba1
Merge branch 'master' into pk910/dynssz-codegen
pk910 Oct 19, 2025
26c3598
fix linter issues
pk910 Oct 19, 2025
73937a7
bump `dynamic-ssz`
pk910 Oct 19, 2025
a34bb13
Merge branch 'master' into pk910/dynssz-annotation-fixes
pk910 Jan 2, 2026
8afb9e0
Update HTTP tests (#275)
AntiD2ta Jan 6, 2026
e0130e3
Merge branch 'master' into gloas
pk910 Jan 8, 2026
4b984a3
update to spec `v1.7.0-alpha.0`
pk910 Jan 8, 2026
a8ba35a
Merge branch 'pk910/dynssz-annotation-fixes' into pk910/dynssz-codegen
pk910 Jan 8, 2026
12aa5d7
update to dynamic-ssz v1.2.0
pk910 Jan 8, 2026
7753ca5
Merge branch 'master' into pk910/dynssz-codegen
pk910 Jan 8, 2026
33d151a
Merge branch 'gloas' into pk910/dynssz-codegen-gloas
pk910 Jan 8, 2026
f278834
dynamic-ssz migration for gloas types
pk910 Jan 8, 2026
5a3d258
fix golangci-lint issue
pk910 Jan 8, 2026
2541c40
annotation fixes
pk910 Jan 8, 2026
8806444
regenerate leftover fastssz files
pk910 Jan 8, 2026
37b7ab4
add epbs events
pk910 Jan 9, 2026
3742e71
Merge branch 'gloas' into pk910/dynssz-codegen-gloas
pk910 Jan 9, 2026
112779b
add `VersionedBeaconBlock.SignedExecutionPayloadBid`
pk910 Jan 20, 2026
0463b89
Merge branch 'gloas' into pk910/dynssz-codegen-gloas
pk910 Jan 20, 2026
6be3bd0
add `VersionedSignedBeaconBlock.SignedExecutionPayloadBid`
pk910 Jan 20, 2026
f54f296
Merge branch 'gloas' into pk910/dynssz-codegen-gloas
pk910 Jan 20, 2026
6ff53e8
bump `dynamic-ssz` & regenerate ssz code
pk910 Jan 21, 2026
3e33311
Merge branch 'pk910/dynssz-codegen' into pk910/dynssz-codegen-gloas
pk910 Jan 21, 2026
f6ee250
fix execution payload envelope endpoint
pk910 Feb 13, 2026
b4d78ac
update gloas types
pk910 Feb 19, 2026
6080c2d
Merge branch 'gloas' into pk910/dynssz-codegen-gloas
pk910 Feb 19, 2026
75b8670
fix `gloas.PayloadAttestation` container
pk910 Feb 25, 2026
7c91f34
add missing gloas getters
pk910 Feb 26, 2026
fca1bc2
add `VersionedBeaconState.Builders`
pk910 Feb 26, 2026
d54997e
add `VersionedBeaconState.ExecutionPayloadAvailability`
pk910 Feb 26, 2026
7d62dcc
bump `dynamic-ssz` & re-generate ssz code
pk910 Mar 12, 2026
1c74340
Merge branch 'pk910/dynssz-codegen' into pk910/dynssz-codegen-gloas
pk910 Mar 12, 2026
0f95e2d
re-generate ssz code
pk910 Mar 12, 2026
3ea8925
Fix linter issues (#283)
AntiD2ta Mar 17, 2026
7dc1b1a
Merge branch 'master' into pk910/dynssz-codegen
pk910 Mar 19, 2026
744d7c8
fix `electra.BlindedBeaconBlockBody` annotation
pk910 Mar 22, 2026
adb1cc1
fix linter issues
pk910 Mar 22, 2026
9bcb18e
add proposer preferences
bharath-123 Mar 24, 2026
9fd38e0
Merge pull request #8 from bharath-123/proposer-preferences
pk910 Mar 25, 2026
db19055
Add ptc_window field to gloas BeaconState for alpha.4
barnabasbusa Mar 31, 2026
05aefaa
Merge pull request #9 from barnabasbusa/bbusa/alpha4
pk910 Mar 31, 2026
3b5c652
bump dynamic-ssz to v1.3.0
pk910 Apr 1, 2026
792a851
re-generate ssz code with v1.3.0
pk910 Apr 1, 2026
0713666
remove size tag from `uint256.Int` fields
pk910 Apr 1, 2026
9a19e24
Merge branch 'pk910/dynssz-codegen' into pk910/dynssz-codegen-gloas
pk910 Apr 1, 2026
ef18237
remove spacing
pk910 Apr 1, 2026
4544cf2
re-generate ssz code
pk910 Apr 1, 2026
9de64ee
Add beacon_committee_selections endpoint for DVs (#290)
Bez625 Apr 15, 2026
7c57caf
Updates to release 0.28.1.
Bez625 Apr 17, 2026
1795539
Merge pull request #292 from attestantio/release_28_1
Bez625 Apr 17, 2026
46b7a19
Merge remote-tracking branch 'upstream/master' into pk910/dynssz-codegen
pk910 Apr 22, 2026
1718b20
bump dynamic-ssz
pk910 Apr 22, 2026
e4ed95f
bump dynamic-ssz & move generator config into separate yaml files for…
pk910 Apr 22, 2026
8821f9a
re-generate ssz files
pk910 Apr 22, 2026
c991725
Merge branch 'pk910/dynssz-codegen' into pk910/dynssz-codegen-gloas
pk910 Apr 22, 2026
c6c54bc
re-generate ssz code
pk910 Apr 22, 2026
858aa78
prepare for v1.7.0-alpha.5
pk910 Apr 14, 2026
f068b12
update for v1.7.0-alpha.5
pk910 Apr 20, 2026
ede82f1
make linter happy
pk910 Apr 20, 2026
4af90ef
update upstream gloas branch
pk910 Apr 22, 2026
aeafd22
alpha5 fixes
pk910 Apr 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions .github/workflows/http-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: http-tests

on:
pull_request:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.25.2'

- name: Validate required variables
run: |
if [ -z "${{ vars.HTTP_ADDRESS }}" ]; then
echo "Error: HTTP_ADDRESS variable is not set in repository variables"
exit 1
fi
if [ -z "${{ vars.HTTP_TEST_CONCURRENCY }}" ]; then
echo "Error: HTTP_TEST_CONCURRENCY variable is not set in repository variables"
exit 1
fi

- name: Run HTTP tests
env:
HTTP_ADDRESS: ${{ vars.HTTP_ADDRESS }}
HTTP_TEST_CONCURRENCY: ${{ vars.HTTP_TEST_CONCURRENCY }}
HTTP_BEARER_TOKEN: ${{ secrets.HTTP_BEARER_TOKEN }}
run: go test -v -timeout=10m ./http/...
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ linters:
disabled: true
- name: package-directory-mismatch
disabled: true
- name: package-naming
disabled: true
- name: var-naming
disabled: true
# Configure specific rules
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.28.1:
- update to HTTP tests
- add beacon committee selections endpoint for distributed validators

0.28.0:
- update dependency for go-bitfield to get from offchain instead of prysmatic org

Expand Down
24 changes: 24 additions & 0 deletions api/beaconcommitteeselectionsopts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright © 2025 Attestant Limited.
// 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.

package api

import apiv1 "github.com/attestantio/go-eth2-client/api/v1"

// BeaconCommitteeSelectionsOpts are the options for obtaining beacon committee selections.
type BeaconCommitteeSelectionsOpts struct {
Common CommonOpts

// Beacon Committee Selections are the selections which the DV should resolve.
Selections []*apiv1.BeaconCommitteeSelection
}
49 changes: 33 additions & 16 deletions api/blobsidecars.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,50 @@ package api

import (
"github.com/attestantio/go-eth2-client/spec/deneb"
ssz "github.com/ferranbt/fastssz"
dynssz "github.com/pk910/dynamic-ssz"
)

// BlobSidecars is an API construct to allow decoding an array of blob sidecars.
type BlobSidecars struct {
Sidecars []*deneb.BlobSidecar `ssz-max:"72"`
Sidecars []*deneb.BlobSidecar
}

// blobSidecarsSSZ is the SSZ wrapper for the BlobSidecars object.
type blobSidecarsSSZ = dynssz.TypeWrapper[struct {
Sidecars []*deneb.BlobSidecar `ssz-max:"72"`
}, []*deneb.BlobSidecar]

// UnmarshalSSZ ssz unmarshals the BlobSidecars object.
// This is a hand-crafted function, as automatic generation does not support immediate arrays.
func (b *BlobSidecars) UnmarshalSSZ(buf []byte) error {
num, err := ssz.DivideInt2(len(buf), 131928, 72)
if err != nil {
blobs := blobSidecarsSSZ{}
if err := dynssz.GetGlobalDynSsz().UnmarshalSSZ(&blobs, buf); err != nil {
return err
}

b.Sidecars = make([]*deneb.BlobSidecar, num)
for ii := range num {
if b.Sidecars[ii] == nil {
b.Sidecars[ii] = new(deneb.BlobSidecar)
}

err = b.Sidecars[ii].UnmarshalSSZ(buf[ii*131928 : (ii+1)*131928])
if err != nil {
return err
}
}
b.Sidecars = blobs.Data

return nil
}

// MarshalSSZ ssz marshals the BlobSidecars object.
func (b *BlobSidecars) MarshalSSZ() ([]byte, error) {
return dynssz.GetGlobalDynSsz().MarshalSSZ(&blobSidecarsSSZ{
Data: b.Sidecars,
})
}

// SizeSSZ returns the size of the BlobSidecars object.
func (b *BlobSidecars) SizeSSZ() int {
size, _ := dynssz.GetGlobalDynSsz().SizeSSZ(&blobSidecarsSSZ{
Data: b.Sidecars,
})

return size
}

// HashTreeRoot ssz hashes the BlobSidecars object.
func (b *BlobSidecars) HashTreeRoot() ([32]byte, error) {
return dynssz.GetGlobalDynSsz().HashTreeRoot(&blobSidecarsSSZ{
Data: b.Sidecars,
})
}
7 changes: 2 additions & 5 deletions api/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@

package api

//nolint:revive
// Need to `go install github.com/ferranbt/fastssz/sszgen@latest` for this to work.
//go:generate rm -f versionedblindedbeaconblock_ssz.go versionedsignedblindedbeaconblock_ssz.go versionedsignedvalidatorregistration_ssz.go
//go:generate sszgen -suffix=ssz -path . -include ../spec,../spec/phase0,../spec/altair,../spec/bellatrix,../spec/capella,../spec/deneb,v1,v1/bellatrix,v1/capella,v1/deneb -exclude-objs DataVersion -objs VersionedBlindedBeaconBlock,VersionedSignedBlindedBeaconBlock,VersionedSignedValidatorRegistration
//go:generate goimports -w versionedblindedbeaconblock_ssz.go versionedsignedblindedbeaconblock_ssz.go versionedsignedvalidatorregistration_ssz.go
//go:generate rm -f *_ssz.go
//go:generate go tool dynssz-gen -config generate.yaml
11 changes: 11 additions & 0 deletions api/generate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package: .
legacy: true
without-dynamic-expressions: true

types:
- name: VersionedBlindedBeaconBlock
output: versionedblindedbeaconblock_ssz.go
- name: VersionedSignedBlindedBeaconBlock
output: versionedsignedblindedbeaconblock_ssz.go
- name: VersionedSignedValidatorRegistration
output: versionedsignedvalidatorregistration_ssz.go
22 changes: 22 additions & 0 deletions api/signedexecutionpayloadenvelopeopts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright © 2025 Attestant Limited.
// 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.

package api

// SignedExecutionPayloadEnvelopeOpts are the options for obtaining signed execution payload envelopes.
type SignedExecutionPayloadEnvelopeOpts struct {
Common CommonOpts

// Block is the ID of the block which the data is obtained.
Block string
}
2 changes: 1 addition & 1 deletion api/v1/attesterduty_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"testing"

api "github.com/attestantio/go-eth2-client/api/v1"
require "github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
require "github.com/stretchr/testify/require"
)

func TestAttesterDutyJSON(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion api/v1/beaconblockheader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"testing"

api "github.com/attestantio/go-eth2-client/api/v1"
require "github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
require "github.com/stretchr/testify/require"
)

func TestBeaconBlockHeaderJSON(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion api/v1/beaconcommittee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"testing"

api "github.com/attestantio/go-eth2-client/api/v1"
require "github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
require "github.com/stretchr/testify/require"
)

func TestBeaconCommitteeJSON(t *testing.T) {
Expand Down
100 changes: 100 additions & 0 deletions api/v1/beaconcommitteeselection.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// Copyright © 2025 Attestant Limited.
// 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.

package v1

import (
"encoding/hex"
"encoding/json"
"fmt"
"strconv"
"strings"

"github.com/attestantio/go-eth2-client/spec/phase0"
"github.com/pkg/errors"
)

// BeaconCommitteeSelection is the data required for a beacon committee selection.
type BeaconCommitteeSelection struct {
// ValidatorIndex is the index of the validator making the selection request.
ValidatorIndex phase0.ValidatorIndex
// Slot is the slot for which the validator is attesting.
Slot phase0.Slot
// SelectionProof is the proof of the validator being selected for beacon committee aggregation.
SelectionProof phase0.BLSSignature
}

// beaconCommitteeSelectionJSON is the spec representation of the struct.
type beaconCommitteeSelectionJSON struct {
ValidatorIndex string `json:"validator_index"`
Slot string `json:"slot"`
SelectionProof string `json:"selection_proof"`
}

// MarshalJSON implements json.Marshaler.
func (b *BeaconCommitteeSelection) MarshalJSON() ([]byte, error) {
return json.Marshal(&beaconCommitteeSelectionJSON{
ValidatorIndex: fmt.Sprintf("%d", b.ValidatorIndex),
Slot: fmt.Sprintf("%d", b.Slot),
SelectionProof: fmt.Sprintf("%#x", b.SelectionProof),
})
}

// UnmarshalJSON implements json.Unmarshaler.
func (b *BeaconCommitteeSelection) UnmarshalJSON(input []byte) error {
var err error

var beaconCommitteeSelectionJSON beaconCommitteeSelectionJSON
if err = json.Unmarshal(input, &beaconCommitteeSelectionJSON); err != nil {
return errors.Wrap(err, "invalid JSON")
}
if beaconCommitteeSelectionJSON.ValidatorIndex == "" {
return errors.New("validator index missing")
}
validatorIndex, err := strconv.ParseUint(beaconCommitteeSelectionJSON.ValidatorIndex, 10, 64)
if err != nil {
return errors.Wrap(err, "invalid value for validator index")
}
b.ValidatorIndex = phase0.ValidatorIndex(validatorIndex)
if beaconCommitteeSelectionJSON.Slot == "" {
return errors.New("slot missing")
}
slot, err := strconv.ParseUint(beaconCommitteeSelectionJSON.Slot, 10, 64)
if err != nil {
return errors.Wrap(err, "invalid value for slot")
}
b.Slot = phase0.Slot(slot)
if beaconCommitteeSelectionJSON.SelectionProof == "" {
return errors.New("selection proof missing")
}
selectionProof, err := hex.DecodeString(strings.TrimPrefix(beaconCommitteeSelectionJSON.SelectionProof, "0x"))
if err != nil {
return errors.Wrap(err, "invalid value for selection proof")
}
if len(selectionProof) != phase0.SignatureLength {
return errors.New("incorrect length for selection proof")
}
copy(b.SelectionProof[:], selectionProof)

return nil
}

// String returns a string version of the structure.
func (b *BeaconCommitteeSelection) String() string {
data, err := json.Marshal(b)
if err != nil {
return fmt.Sprintf("ERR: %v", err)
}

return string(data)
}
Loading