Skip to content

Commit 82e31db

Browse files
authored
*: v1.6.1 (#3975)
Prep for v1.6.1 release. category: misc ticket: none
1 parent 5f953a6 commit 82e31db

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

app/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
)
1616

1717
// version a string since it is overwritten at build-time with the git tag for official releases.
18-
var version = "v1.6"
18+
var version = "v1.6-rc"
1919

2020
// Version is the branch version of the codebase.
2121
// - Main branch: v0.X-dev

core/dutydb/memory.go

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,29 @@ func (db *MemDB) storeAttestationUnsafe(pubkey core.PubKey, unsignedData core.Un
372372
}
373373

374374
if value, ok := db.attDuties[aKeyCommIdx0]; ok {
375-
if value.String() != attData.Data.String() {
376-
return errors.New("clashing attestation data", z.Any("key", aKeyCommIdx0))
375+
// When we fetch attestation data with the fetcher, we are doing this in a loop,
376+
// which takes variable amount of time, based on the beacon node's performance.
377+
// If the beacon node is underperforming it might be that in the middle of this loop it receives a new block.
378+
// This will result some attestation datas having the up to date head, while others have an old head.
379+
// In a good scenario of well performing beacon node, the heads will be the same and the `value`` and `attData.Data`
380+
// will be equal. However, in the scenario explained above, their head will missmatch, resulting in inequality.
381+
// That's why we are checking here only if source and target missmatch.
382+
if value.Source.String() != attData.Data.Source.String() {
383+
return errors.New(
384+
"clashing attestation data with hardcoded commidx=0 source",
385+
z.Any("key", aKeyCommIdx0),
386+
z.Str("existing", value.Source.String()),
387+
z.Str("new", attData.Data.Source.String()),
388+
)
389+
}
390+
391+
if value.Target.String() != attData.Data.Target.String() {
392+
return errors.New(
393+
"clashing attestation data with hardcoded commidx=0 target",
394+
z.Any("key", aKeyCommIdx0),
395+
z.Str("existing", value.Target.String()),
396+
z.Str("new", attData.Data.Target.String()),
397+
)
377398
}
378399
} else {
379400
db.attDuties[aKeyCommIdx0] = &attData.Data

p2p/sender.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ func SendReceive(ctx context.Context, p2pNode host.Host, peerID peer.ID,
324324
log.Debug(ctx, "Closing canceled stream", z.Err(err), z.Any("protocol", s.Protocol()))
325325
return nil
326326
}
327+
327328
return errors.Wrap(err, "close stream", z.Any("protocol", s.Protocol()))
328329
}
329330

@@ -367,6 +368,7 @@ func Send(ctx context.Context, p2pNode host.Host, protoID protocol.ID, peerID pe
367368
log.Debug(ctx, "Closing canceled stream", z.Err(err), z.Any("protocol", s.Protocol()))
368369
return nil
369370
}
371+
370372
return errors.Wrap(err, "close stream", z.Any("protocol", s.Protocol()))
371373
}
372374

0 commit comments

Comments
 (0)