Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions core/tracker/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1082,9 +1082,9 @@ func reportParSigs(ctx context.Context, duty core.Duty, parsigMsgs parsigsByMsg)
entriesJSON = json.RawMessage(fmt.Sprintf("%q", err.Error()))
}

// DutySyncMessage is handled earlier via reportSyncMessageCohorts. Sync contribution
// inconsistency is expected (per-validator, per-subcommittee) so log at debug.
if duty.Type == core.DutySyncContribution {
// DutySyncMessage is handled earlier via reportSyncMessageCohorts. Sync contribution and
// selection proof inconsistency is expected (per-validator, per-subcommittee) so log at debug.
if duty.Type == core.DutySyncContribution || duty.Type == core.DutyPrepareSyncContribution {
log.Debug(ctx, "Inconsistent sync committee partial signed data",
z.Any("pubkey", pubkey),
z.Any("duty", duty),
Expand Down
18 changes: 18 additions & 0 deletions core/tracker/tracker_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ import (
eth2p0 "github.com/attestantio/go-eth2-client/spec/phase0"
promtestutil "github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"

"github.com/obolnetwork/charon/app/errors"
"github.com/obolnetwork/charon/app/log"
"github.com/obolnetwork/charon/core"
"github.com/obolnetwork/charon/p2p"
"github.com/obolnetwork/charon/testutil"
Expand Down Expand Up @@ -1767,6 +1769,22 @@ func TestReportParSigsBuilderPreferences(t *testing.T) {
require.InDelta(t, before, inconsistentVal(), 0)
}

// TestReportParSigsSyncSubcommittees verifies that a validator's sync contributions and selection proofs
// for different subcommittees aren't warned about as inconsistent, since their message roots differ.
func TestReportParSigsSyncSubcommittees(t *testing.T) {
for _, duty := range []core.Duty{core.NewSyncContributionDuty(123), core.NewPrepareSyncContributionDuty(123)} {
t.Run(duty.Type.String(), func(t *testing.T) {
var buf zaptest.Buffer
log.InitConsoleForT(t, &buf)

reportParSigs(context.Background(), duty, parsigsByMsg{"pk": {rootFrom(0x0a): syncSigs(1, 2), rootFrom(0x0b): syncSigs(3)}})

require.Contains(t, buf.String(), "Inconsistent sync committee partial signed data")
require.NotContains(t, buf.String(), "Inconsistent partial signed data")
})
}
}

func TestBuilderAuthReporter(t *testing.T) {
const (
builderA = "builder-a.example.com"
Expand Down
Loading