Impl oneshot_broadcast for committee promises (#3595)

## Issue Addressed

NA

## Proposed Changes

Fixes an issue introduced in #3574 where I erroneously assumed that a `crossbeam_channel` multiple receiver queue was a *broadcast* queue. This is incorrect, each message will be received by *only one* receiver. The effect of this mistake is these logs:

```
Sep 20 06:56:17.001 INFO Synced                                  slot: 4736079, block: 0xaa8a…180d, epoch: 148002, finalized_epoch: 148000, finalized_root: 0x2775…47f2, exec_hash: 0x2ca5…ffde (verified), peers: 6, service: slot_notifier
Sep 20 06:56:23.237 ERRO Unable to validate attestation          error: CommitteeCacheWait(RecvError), peer_id: 16Uiu2HAm2Jnnj8868tb7hCta1rmkXUf5YjqUH1YPj35DCwNyeEzs, type: "aggregated", slot: Slot(4736047), beacon_block_root: 0x88d318534b1010e0ebd79aed60b6b6da1d70357d72b271c01adf55c2b46206c1
```

## Additional Info

NA
This commit is contained in:
Paul Hauner
2022-09-21 01:01:50 +00:00
parent a95bcba2ab
commit 96692b8e43
8 changed files with 218 additions and 19 deletions

9
Cargo.lock generated
View File

@@ -387,7 +387,6 @@ version = "0.2.0"
dependencies = [
"bitvec 0.20.4",
"bls",
"crossbeam-channel",
"derivative",
"environment",
"eth1",
@@ -410,6 +409,7 @@ dependencies = [
"lru",
"maplit",
"merkle_proof",
"oneshot_broadcast",
"operation_pool",
"parking_lot 0.12.1",
"proto_array",
@@ -4343,6 +4343,13 @@ version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1"
[[package]]
name = "oneshot_broadcast"
version = "0.1.0"
dependencies = [
"parking_lot 0.12.1",
]
[[package]]
name = "oorandom"
version = "11.1.3"