Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
cf87883
feat: support the EIP-8450 post-quantum key registry fork
barnabasbusa Nov 18, 2026
6485569
feat: support the consensus-specs pq fork
barnabasbusa Nov 18, 2026
eed543a
fix: persist pq epochs without sync committees and keep pq envelope v…
barnabasbusa Nov 18, 2026
3ec0357
fix: show xmss keys in the validator list and drop the pq signature c…
barnabasbusa Nov 19, 2026
7301595
feat: show the full xmss signature and vrf proof on the slot page
barnabasbusa Nov 19, 2026
c8da2f7
feat: collapse the xmss signature and vrf proof behind an expand toggle
barnabasbusa Nov 19, 2026
f3214f1
chore: use the go-eth2-client pq branch
barnabasbusa Nov 19, 2026
6d5cafb
feat: expose the xmss signature and vrf proof in the slot api
barnabasbusa Nov 19, 2026
88e4806
feat: show when aggregates were seen on the slot timeline
ampagent Nov 24, 2026
54a6626
Merge pull request #941 from ethpandaops/amp/pq-devnet-0/aggregate-wave
samcm Nov 24, 2026
d4f9489
Merge pull request #942 from ethpandaops/master
samcm Nov 24, 2026
85bc60d
feat: recognize silver and ethlambda as consensus clients
barnabasbusa Nov 24, 2026
f596340
Merge branch 'master' into pq
barnabasbusa Nov 24, 2026
4a9770a
Merge branch 'master' into pq
barnabasbusa Nov 24, 2026
df664a2
feat: fall back to the beacon nodes' single attestation events behind…
barnabasbusa Nov 24, 2026
dea6387
refactor: dispatch single attestation events from the client loop
barnabasbusa Nov 24, 2026
2a8903e
refactor: inline the single-use settle delay and root parsing
barnabasbusa Nov 24, 2026
0a41c7a
refactor: store the block root per arrival instead of a per-slot root…
barnabasbusa Nov 24, 2026
55604b5
Merge branch 'bbusa/attestation-arrival-beacon-events' into pq
barnabasbusa Nov 24, 2026
0488267
feat: attestation arrivals per epoch and after the attestation deadline
barnabasbusa Nov 25, 2026
223cce3
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
ac77d0b
feat: per node attestation arrivals and client highlight in the node …
barnabasbusa Nov 25, 2026
c96863a
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
6e83ee2
feat: list a node's validators with their attestation arrival
barnabasbusa Nov 25, 2026
f2f3e55
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
708c6c0
perf: query only the node's validators for the attester drill-down
barnabasbusa Nov 25, 2026
f3da9a3
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
d0e8df5
feat: hover and click the attester histogram bars to pick a client
barnabasbusa Nov 25, 2026
82f099d
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
82c2473
feat: clear the attester client selection when clicking away
barnabasbusa Nov 25, 2026
a5409b0
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
c8fe1ee
feat: expand a region to list its nodes on the slot propagation tab
barnabasbusa Nov 25, 2026
7e9c7af
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
667995a
feat: show each node's region in the attesters table
barnabasbusa Nov 25, 2026
c23c0aa
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
dd8d2b8
fix: keep a selected client's nodes highlighted when the node table h…
barnabasbusa Nov 25, 2026
6f83779
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
167ceba
feat: preview a client's nodes in the node table on hover
barnabasbusa Nov 25, 2026
5f34524
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
4fac2f9
feat: narrow the slot timeline to the selected client
barnabasbusa Nov 25, 2026
acb302f
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
217a1e9
fix: keep Xatu's other-root votes when it has no arrivals for the vie…
barnabasbusa Nov 25, 2026
d5f0328
Merge branch 'bbusa/attestation-arrival-beacon-events' into bbusa/att…
barnabasbusa Nov 25, 2026
15277a1
perf: load attester committees once per epoch
barnabasbusa Nov 25, 2026
85325c0
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
2fc5486
feat: drive the slot timeline and node table from hover, client, node…
barnabasbusa Nov 25, 2026
b3ae8d8
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
bb40d88
feat: show a single node's attestations in the histogram on hover or …
barnabasbusa Nov 25, 2026
fd4ea23
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
3d544a7
fix: keep the timeline's isolated series when a selection temporarily…
barnabasbusa Nov 25, 2026
7d95f91
Merge branch 'bbusa/attestation-arrival-epoch' into pq
barnabasbusa Nov 25, 2026
420b0c7
feat: rotate the pq aggregation committee window in the epoch transition
barnabasbusa Nov 26, 2026
ac17db4
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
4a50f26
feat: show aggregates per slot and per epoch with their aggregators a…
barnabasbusa Nov 26, 2026
aa93ae3
feat: mark the elected pq aggregators and the ones that sent no aggre…
barnabasbusa Nov 26, 2026
bd09480
fix: match gossip aggregates to the beacon nodes' aggregate events by…
barnabasbusa Nov 26, 2026
1d036b7
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
9f10a26
fix: judge missing aggregators only in past slots that have aggregates
barnabasbusa Nov 26, 2026
1d5bb1a
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
81e59f3
feat: plot each epoch aggregate by slot and arrival time
barnabasbusa Nov 26, 2026
c69ac74
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
29975f9
fix: cap the epoch aggregate plot at one second past the slot
barnabasbusa Nov 26, 2026
07022e1
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
4a1048f
fix: read gossip aggregation bits as raw member bits
barnabasbusa Nov 26, 2026
a305645
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
f107cda
feat: mark each aggregate's arrival on the attester histogram
barnabasbusa Nov 26, 2026
ed26456
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
425430c
feat: merge the block arrival, observation, source and region rows in…
barnabasbusa Nov 26, 2026
8a33075
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
9eeba37
fix: show elected aggregators whose committee was already covered as …
barnabasbusa Nov 26, 2026
2cda930
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
576c581
feat: drill into epoch aggregates by client and node, mark slot bound…
barnabasbusa Nov 26, 2026
53b897b
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
a6bbfb6
feat: give the epoch arrival and aggregate charts the full card width
barnabasbusa Nov 26, 2026
aae288a
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
250d9aa
feat: hover epoch aggregators in place, separate the aggregate table …
barnabasbusa Nov 26, 2026
00f9d66
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
2dc5e57
feat: cross-highlight slot aggregates, group them by committee, sort …
barnabasbusa Nov 26, 2026
a61f8ec
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
3a58f4b
feat: show every elected aggregator without a seen aggregate as missed
barnabasbusa Nov 26, 2026
7b4e98b
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
faef7f4
feat: derive pq aggregation committees from the stored epoch stats so…
barnabasbusa Nov 26, 2026
8596455
feat: show each node's region flag in the attestation arrivals table …
barnabasbusa Nov 26, 2026
098474a
refactor: load node locations once per epoch as a lookup
barnabasbusa Nov 26, 2026
87f6710
Merge branch 'bbusa/attestation-arrival-epoch' into bbusa/aggregate-a…
barnabasbusa Nov 26, 2026
3cb1e58
Merge branch 'bbusa/aggregate-arrivals' into pq
barnabasbusa Nov 26, 2026
d94132c
feat: time pq aggregators by their staggered due time
barnabasbusa Nov 26, 2026
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
43 changes: 43 additions & 0 deletions clients/consensus/chainspec.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"sort"
"sync"

"github.com/ethpandaops/go-eth2-client/spec"
"github.com/ethpandaops/go-eth2-client/spec/phase0"
"gopkg.in/Knetic/govaluate.v3"
"gopkg.in/yaml.v2"
Expand Down Expand Up @@ -57,6 +58,8 @@ type ChainSpecConfig struct {
GloasForkEpoch *uint64 `yaml:"GLOAS_FORK_EPOCH" check-if-fork:"GloasForkEpoch"`
HezeForkVersion phase0.Version `yaml:"HEZE_FORK_VERSION" check-if-fork:"HezeForkEpoch"`
HezeForkEpoch *uint64 `yaml:"HEZE_FORK_EPOCH" check-if-fork:"HezeForkEpoch"`
PqForkVersion phase0.Version `yaml:"PQ_FORK_VERSION" check-if-fork:"PqForkEpoch"`
PqForkEpoch *uint64 `yaml:"PQ_FORK_EPOCH" check-if-fork:"PqForkEpoch"`

// Time parameters
SlotDurationMs uint64 `yaml:"SLOT_DURATION_MS"`
Expand Down Expand Up @@ -132,6 +135,9 @@ type ChainSpecConfig struct {
ConsolidationChurnLimitQuotient uint64 `yaml:"CONSOLIDATION_CHURN_LIMIT_QUOTIENT" check-if-fork:"GloasForkEpoch"`
MaxPerEpochActivationChurnLimitGloas uint64 `yaml:"MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT_GLOAS" check-if-fork:"GloasForkEpoch"`
AggregateDueBpsGloas uint64 `yaml:"AGGREGATE_DUE_BPS_GLOAS" check-if-fork:"GloasForkEpoch"`
AggregationCutoffBps uint64 `yaml:"AGGREGATION_CUTOFF_BPS"`
AggregateDueBpsPq uint64 `yaml:"AGGREGATE_DUE_BPS_PQ"`
AggregatorDelayBps uint64 `yaml:"AGGREGATOR_DELAY_BPS"`
AttestationDueBpsGloas uint64 `yaml:"ATTESTATION_DUE_BPS_GLOAS" check-if-fork:"GloasForkEpoch"`
ContributionDueBpsGloas uint64 `yaml:"CONTRIBUTION_DUE_BPS_GLOAS" check-if-fork:"GloasForkEpoch"`
SyncMessageDueBpsGloas uint64 `yaml:"SYNC_MESSAGE_DUE_BPS_GLOAS" check-if-fork:"GloasForkEpoch"`
Expand All @@ -149,6 +155,8 @@ type ChainSpecConfig struct {
type ChainSpecPreset struct {
// Presets
MaxCommitteesPerSlot uint64 `yaml:"MAX_COMMITTEES_PER_SLOT"`
MaxCommitteesPerSlotPq uint64 `yaml:"MAX_COMMITTEES_PER_SLOT_PQ" check-if-fork:"PqForkEpoch"`
MaxStarkProofSize uint64 `yaml:"MAX_STARK_PROOF_SIZE" check-if-fork:"PqForkEpoch"`
TargetCommitteeSize uint64 `yaml:"TARGET_COMMITTEE_SIZE"`
MaxValidatorsPerCommittee uint64 `yaml:"MAX_VALIDATORS_PER_COMMITTEE"`
ShuffleRoundCount uint64 `yaml:"SHUFFLE_ROUND_COUNT"`
Expand All @@ -159,6 +167,7 @@ type ChainSpecPreset struct {
MaxEffectiveBalance uint64 `yaml:"MAX_EFFECTIVE_BALANCE"`
EffectiveBalanceIncrement uint64 `yaml:"EFFECTIVE_BALANCE_INCREMENT"`
MinAttestationInclusionDelay uint64 `yaml:"MIN_ATTESTATION_INCLUSION_DELAY"`
MinAttestationInclusionDelayPq uint64 `yaml:"MIN_ATTESTATION_INCLUSION_DELAY_PQ" check-if-fork:"PqForkEpoch"`
SlotsPerEpoch uint64 `yaml:"SLOTS_PER_EPOCH"`
MinSeedLookahead uint64 `yaml:"MIN_SEED_LOOKAHEAD"`
MaxSeedLookahead uint64 `yaml:"MAX_SEED_LOOKAHEAD"`
Expand Down Expand Up @@ -300,6 +309,20 @@ func (chain *ChainSpec) ParseAdditive(values map[string]interface{}) error {
chain.DomainExecutionProof = phase0.DomainType{0x0f, 0x00, 0x00, 0x00}
}

if chain.PqForkEpoch != nil {
if chain.MaxCommitteesPerSlotPq == 0 {
chain.MaxCommitteesPerSlotPq = min(chain.MaxCommitteesPerSlot, 16)
}

if chain.MinAttestationInclusionDelayPq == 0 {
chain.MinAttestationInclusionDelayPq = 2
}

if chain.MaxStarkProofSize == 0 {
chain.MaxStarkProofSize = 1 << 20
}
}

if chain.SlotDurationMs == 0 {
var legacySlot struct {
SecondsPerSlot uint64 `yaml:"SECONDS_PER_SLOT"`
Expand Down Expand Up @@ -481,6 +504,26 @@ func (chain *ChainSpec) Clone() *ChainSpec {
return res
}

func (chain *ChainSpec) IsPqActive(epoch phase0.Epoch) bool {
return chain.PqForkEpoch != nil && uint64(epoch) >= *chain.PqForkEpoch
}

func (chain *ChainSpec) MaxCommitteesPerSlotAt(version spec.DataVersion) uint64 {
if version == spec.DataVersionPQ && chain.MaxCommitteesPerSlotPq > 0 {
return chain.MaxCommitteesPerSlotPq
}

return chain.MaxCommitteesPerSlot
}

func (chain *ChainSpec) MaxCommitteesPerSlotAtEpoch(epoch phase0.Epoch) uint64 {
if chain.IsPqActive(epoch) {
return chain.MaxCommitteesPerSlotAt(spec.DataVersionPQ)
}

return chain.MaxCommitteesPerSlot
}

// GetSlotDurationMs returns the slot duration in milliseconds in effect at the given epoch.
func (chain *ChainSpec) GetSlotDurationMs(epoch phase0.Epoch) uint64 {
if chain.HezeForkEpoch != nil && chain.SlotDurationMsHeze > 0 && uint64(epoch) >= *chain.HezeForkEpoch {
Expand Down
10 changes: 10 additions & 0 deletions clients/consensus/chainstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,8 @@ func (cs *ChainState) GetForkVersionAtEpoch(epoch phase0.Epoch) phase0.Version {
}

switch {
case cs.specs.IsPqActive(epoch):
return cs.specs.PqForkVersion
case cs.specs.HezeForkEpoch != nil && epoch >= phase0.Epoch(*cs.specs.HezeForkEpoch):
return cs.specs.HezeForkVersion
case cs.specs.GloasForkEpoch != nil && epoch >= phase0.Epoch(*cs.specs.GloasForkEpoch):
Expand Down Expand Up @@ -558,6 +560,14 @@ func (cs *ChainState) IsEip7732Enabled(epoch phase0.Epoch) bool {
return cs.specs.GloasForkEpoch != nil && phase0.Epoch(*cs.specs.GloasForkEpoch) <= epoch
}

func (cs *ChainState) IsPqEnabled(epoch phase0.Epoch) bool {
if cs.specs == nil {
return false
}

return cs.specs.IsPqActive(epoch)
}

func (cs *ChainState) IsEip7805Enabled(epoch phase0.Epoch) bool {
if cs.specs == nil {
return false
Expand Down
5 changes: 5 additions & 0 deletions clients/consensus/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type Client struct {
inclusionListDispatcher utils.Dispatcher[*v1.InclusionListEvent]
fastConfirmationDispatcher utils.Dispatcher[*rpc.FastConfirmationEvent]
executionProofDispatcher utils.Dispatcher[*rpc.ExecutionProof]
singleAttestationDispatcher utils.Dispatcher[*rpc.SingleAttestationEvent]

specsMutex sync.RWMutex
specWarnings []string // warnings from incomplete spec checks
Expand Down Expand Up @@ -129,6 +130,10 @@ func (client *Client) SubscribeExecutionProofEvent(capacity int, blocking bool)
return client.executionProofDispatcher.Subscribe(capacity, blocking)
}

func (client *Client) SubscribeSingleAttestationEvent(capacity int, blocking bool) *utils.Subscription[*rpc.SingleAttestationEvent] {
return client.singleAttestationDispatcher.Subscribe(capacity, blocking)
}

func (client *Client) GetPool() *Pool {
return client.pool
}
Expand Down
9 changes: 9 additions & 0 deletions clients/consensus/clientlogic.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ func (client *Client) buildEventStreamMask() uint16 {
// being mixed into the main block/head/finalized stream
events |= rpc.StreamFastConfirmationEvent

if client.pool.attestationStream {
events |= rpc.StreamSingleAttestationEvent
}

return events
}

Expand Down Expand Up @@ -187,6 +191,11 @@ func (client *Client) runClientLogic() error {

case rpc.StreamExecutionProofEvent:
client.executionProofDispatcher.Fire(evt.Data.(*rpc.ExecutionProof))

case rpc.StreamSingleAttestationEvent:
client.singleAttestationDispatcher.Fire(evt.Data.(*rpc.SingleAttestationEvent))

continue
}

// fire through stream dispatcher first to preserve SSE ordering
Expand Down
15 changes: 10 additions & 5 deletions clients/consensus/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ import (
)

type Pool struct {
ctx context.Context
logger logrus.FieldLogger
clientCounter uint16
clients []*Client
chainState *ChainState
ctx context.Context
logger logrus.FieldLogger
clientCounter uint16
clients []*Client
chainState *ChainState
attestationStream bool
}

func NewPool(ctx context.Context, logger logrus.FieldLogger) *Pool {
Expand All @@ -29,6 +30,10 @@ func NewPool(ctx context.Context, logger logrus.FieldLogger) *Pool {
}
}

func (pool *Pool) EnableAttestationStream() {
pool.attestationStream = true
}

func (pool *Pool) SubscribeFinalizedEvent(capacity int) *utils.Subscription[*v1.Finality] {
return pool.chainState.checkpointDispatcher.Subscribe(capacity, false)
}
Expand Down
89 changes: 87 additions & 2 deletions clients/consensus/rpc/beaconstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
v1 "github.com/ethpandaops/go-eth2-client/api/v1"
"github.com/ethpandaops/go-eth2-client/spec/gloas"
"github.com/ethpandaops/go-eth2-client/spec/phase0"
"github.com/ethpandaops/go-eth2-client/spec/pq"
"github.com/sirupsen/logrus"

"github.com/ethpandaops/dora/clients/consensus/rpc/eventstream"
Expand All @@ -30,6 +31,7 @@ const (
StreamInclusionListEvent uint16 = 0x20
StreamFastConfirmationEvent uint16 = 0x40
StreamExecutionProofEvent uint16 = 0x80
StreamSingleAttestationEvent uint16 = 0x100
)

type BeaconStreamEvent struct {
Expand Down Expand Up @@ -88,6 +90,54 @@ func (e *FastConfirmationEvent) UnmarshalJSON(input []byte) error {
return nil
}

type SingleAttestationEvent struct {
Slot phase0.Slot
AttesterIndex phase0.ValidatorIndex
BeaconBlockRoot phase0.Root
Seen time.Time
}

func (e *SingleAttestationEvent) UnmarshalJSON(input []byte) error {
var data struct {
AttesterIndex string `json:"attester_index"`
Data struct {
Slot string `json:"slot"`
BeaconBlockRoot string `json:"beacon_block_root"`
} `json:"data"`
}

if err := json.Unmarshal(input, &data); err != nil {
return err
}

attester, err := strconv.ParseUint(data.AttesterIndex, 10, 64)
if err != nil {
return fmt.Errorf("invalid value for attester_index: %w", err)
}

e.AttesterIndex = phase0.ValidatorIndex(attester)

slot, err := strconv.ParseUint(data.Data.Slot, 10, 64)
if err != nil {
return fmt.Errorf("invalid value for slot: %w", err)
}

e.Slot = phase0.Slot(slot)

root, err := hex.DecodeString(strings.TrimPrefix(data.Data.BeaconBlockRoot, "0x"))
if err != nil {
return fmt.Errorf("invalid value for beacon_block_root: %w", err)
}

if len(root) != len(e.BeaconBlockRoot) {
return fmt.Errorf("incorrect length %d for beacon_block_root", len(root))
}

copy(e.BeaconBlockRoot[:], root)

return nil
}

type BeaconStreamStatus struct {
Ready bool
Error error
Expand Down Expand Up @@ -192,6 +242,9 @@ func (bs *BeaconStream) ensureAncillaryStreams(events uint16) {
// so it gets its own stream as well
proofEvents := events & StreamExecutionProofEvent
bs.startAncillaryStream(proofEvents)

attestationEvents := events & StreamSingleAttestationEvent
bs.startAncillaryStream(attestationEvents)
}

func (bs *BeaconStream) startAncillaryStream(events uint16) {
Expand All @@ -212,7 +265,7 @@ func (bs *BeaconStream) startAncillaryStream(events uint16) {

func (bs *BeaconStream) runAncillaryStream(events uint16) {
// streams carrying only optional topics give up when the node rejects the topic
optional := events&^(StreamFastConfirmationEvent|StreamExecutionProofEvent) == 0
optional := events&^(StreamFastConfirmationEvent|StreamExecutionProofEvent|StreamSingleAttestationEvent) == 0

stream := bs.subscribeStream(bs.client.endpoint, events, optional)
if stream == nil {
Expand All @@ -236,6 +289,8 @@ func (bs *BeaconStream) runAncillaryStream(events uint16) {
bs.processFastConfirmationEvent(evt)
case "execution_proof":
bs.processExecutionProofEvent(evt)
case "single_attestation":
bs.processSingleAttestationEvent(evt)
}
case <-stream.Ready:
case err := <-stream.Errors:
Expand Down Expand Up @@ -365,6 +420,16 @@ func (bs *BeaconStream) subscribeStream(endpoint string, events uint16, optional
topicsCount++
}

if events&StreamSingleAttestationEvent > 0 {
if topicsCount > 0 {
fmt.Fprintf(&topics, ",")
}

fmt.Fprintf(&topics, "single_attestation")

topicsCount++
}

if topicsCount == 0 {
return nil
}
Expand Down Expand Up @@ -476,7 +541,12 @@ func parseExecutionPayloadBidEvent(data []byte) (*gloas.SignedExecutionPayloadBi

parsed := &gloas.SignedExecutionPayloadBid{}
if err := json.Unmarshal(data, parsed); err != nil {
return nil, err
xmssSigned := &pq.SignedExecutionPayloadBid{}
if pqErr := json.Unmarshal(data, xmssSigned); pqErr != nil {
return nil, err
}

return &gloas.SignedExecutionPayloadBid{Message: xmssSigned.Message}, nil
}
return parsed, nil
}
Expand Down Expand Up @@ -524,6 +594,21 @@ func (bs *BeaconStream) processInclusionListEvent(evt eventstream.StreamEvent) {
}
}

func (bs *BeaconStream) processSingleAttestationEvent(evt eventstream.StreamEvent) {
parsed := SingleAttestationEvent{Seen: time.Now()}

err := json.Unmarshal([]byte(evt.Data()), &parsed)
if err != nil {
bs.logger.Warnf("beacon block stream failed to decode single_attestation event: %v", err)
return
}

bs.EventChan <- &BeaconStreamEvent{
Event: StreamSingleAttestationEvent,
Data: &parsed,
}
}

func getRedactedURL(requrl string) string {
var logurl string

Expand Down
23 changes: 23 additions & 0 deletions clients/consensus/rpc/beaconstream_attestation_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package rpc

import (
"encoding/json"
"testing"
)

func TestSingleAttestationEventUnmarshal(t *testing.T) {
input := `{"committee_index":"0","attester_index":"2300","data":{"slot":"7162","index":"1","beacon_block_root":"0xe2f4346fcd3303f0aec74f5bb0ae0106cd831c1f2427dcce3c53d04dac1f5472","source":{"epoch":"126","root":"0x00"},"target":{"epoch":"223","root":"0x00"}},"signature":"0xdf80"}`

var evt SingleAttestationEvent
if err := json.Unmarshal([]byte(input), &evt); err != nil {
t.Fatal(err)
}

if evt.AttesterIndex != 2300 || evt.Slot != 7162 || evt.BeaconBlockRoot[0] != 0xe2 || evt.BeaconBlockRoot[31] != 0x72 {
t.Fatalf("unexpected event: %+v", evt)
}

if err := json.Unmarshal([]byte(`{"attester_index":"1","data":{"slot":"1","beacon_block_root":"0x00"}}`), &evt); err == nil {
t.Fatal("expected an error for a short root")
}
}
3 changes: 3 additions & 0 deletions cmd/dora-explorer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ func startFrontend(router *mux.Router) {
router.HandleFunc("/chain-forks", handlers.ChainForks).Methods("GET")
router.HandleFunc("/epochs", handlers.Epochs).Methods("GET")
router.HandleFunc("/epoch/{epoch}", handlers.Epoch).Methods("GET")
router.HandleFunc("/epoch/{epoch}/attesters", handlers.EpochAttesters).Methods("GET")
router.HandleFunc("/epoch/{epoch}/attesters/node", handlers.EpochAttestersNode).Methods("GET")
router.HandleFunc("/slots", handlers.Slots).Methods("GET")
router.HandleFunc("/slots/filtered", handlers.SlotsFiltered).Methods("GET")
router.HandleFunc("/slot/{slotOrHash}", handlers.Slot).Methods("GET")
Expand All @@ -247,6 +249,7 @@ func startFrontend(router *mux.Router) {
router.HandleFunc("/slot/{slotOrHash}/arrival", handlers.SlotArrival).Methods("GET")
router.HandleFunc("/slot/{slotOrHash}/waves", handlers.SlotWaves).Methods("GET")
router.HandleFunc("/slot/{slotOrHash}/attesters", handlers.SlotAttesters).Methods("GET")
router.HandleFunc("/slot/{slotOrHash}/attesters/node", handlers.SlotAttestersNode).Methods("GET")
router.HandleFunc("/slot/{root}/blob/{index}", handlers.SlotBlob).Methods("GET")
router.HandleFunc("/slot/{slotOrHash}/bal", handlers.SlotBlockAccessList).Methods("GET")
router.HandleFunc("/blocks", handlers.Blocks).Methods("GET")
Expand Down
2 changes: 1 addition & 1 deletion cmd/dora-utils/blockdb_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ func computeEpochDuties(chainState *consensus.ChainState, epoch phase0.Epoch, st
Epoch: uint64(epoch),
ValidatorCount: uint64(len(activeIndices)),
SlotsPerEpoch: slotsPerEpoch,
CommitteesPerSlot: duties.SlotCommitteeCount(specs, uint64(len(activeIndices))),
CommitteesPerSlot: duties.SlotCommitteeCount(specs, epoch, uint64(len(activeIndices))),
PtcSize: ptcSize,
Committees: committees,
Ptc: ptc,
Expand Down
4 changes: 4 additions & 0 deletions config/default.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ indexer:
# verifierCacheDir: "" # compiled verifier cache kept across restarts (default: dora-verifiers in the temp dir)
# allowMockProofs: false # devnets: accept zkboost mock proofs that carry the block's public input

#attestationArrivals:
# enabled: false
# retentionSlots: 256

executionIndexer:
enabled: false # enable execution data indexing
retention: 4368h # 4368 hours = 6 months
Expand Down
Loading
Loading