-
Notifications
You must be signed in to change notification settings - Fork 886
SingleAttestation
implementation
#6488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 97 commits
25feedf
4dc6e65
a9cb329
60100fc
13f9bba
e71020e
52bb581
d37733b
12c6ef1
2fcb293
21ecb58
366bed3
68292ad
5a4cd3b
9d5a3af
f892849
f27216f
c31f1cc
282eefb
52e602d
f56083d
44d15a9
293db28
9b8a25f
23d331b
0c2c8c4
de01f92
1095d60
2e86585
32483d3
88bedf0
063b79c
251bca7
e4bfe71
f66e179
440e854
04b3743
4700ef9
c7ef72d
9945079
12e442c
3d3bc6d
2dbd3b7
0cd263f
3b788bf
7c215f8
0f26408
d65e821
26c409c
eee9218
e95f003
823ddf5
07c039c
d4e152c
a73ecb5
f13bdfc
70917f7
22b7fcb
9e972b1
bb59e7a
1d4dc59
bba7310
8c96c35
d7a69e4
ce488b2
b42cc84
7bd174e
ef13f0f
40f65bb
fe3d5de
72bcc8a
344ba2b
eb5d3eb
fdf9af8
a45c0f0
f4fe1b8
1205d83
3b17732
e2ff440
6cc798a
7df6560
4fbca37
e821e62
0b36d60
4f08ac7
11c1949
e76322e
d8f32de
fb5e378
2d61b65
b6d80eb
86ce323
8cc43c1
e900bb8
72da039
b9b9b99
4f2182e
aa66b06
54844b3
f7a0b37
42c01c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2036,9 +2036,22 @@ impl<T: BeaconChainTypes> BeaconChain<T> { | |
// This method is called for API and gossip attestations, so this covers all unaggregated attestation events | ||
if let Some(event_handler) = self.event_handler.as_ref() { | ||
if event_handler.has_attestation_subscribers() { | ||
event_handler.register(EventKind::Attestation(Box::new( | ||
v.attestation().clone_as_attestation(), | ||
))); | ||
let current_fork = self | ||
.spec | ||
.fork_name_at_slot::<T::EthSpec>(v.attestation().data().slot); | ||
if current_fork.electra_enabled() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it necessary to check the fork now? Can we have single attestations before electra? |
||
// I don't see a situation where this could return None. The upstream unaggregated attestation checks | ||
// should have already verified that this is an attestation with a single committee bit set. | ||
if let Some(single_attestation) = v.single_attestation() { | ||
event_handler.register(EventKind::SingleAttestation(Box::new( | ||
single_attestation, | ||
))); | ||
} | ||
} else { | ||
event_handler.register(EventKind::Attestation(Box::new( | ||
v.attestation().clone_as_attestation(), | ||
))); | ||
} | ||
} | ||
} | ||
metrics::inc_counter(&metrics::UNAGGREGATED_ATTESTATION_PROCESSING_SUCCESSES); | ||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -90,6 +90,10 @@ impl<E: EthSpec> ServerSentEventHandler<E> { | |||
.attestation_tx | ||||
.send(kind) | ||||
.map(|count| log_count("attestation", count)), | ||||
EventKind::SingleAttestation(_) => self | ||||
.attestation_tx | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not correct I believe. There's a new event name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah otherwise calls into the event stream with error with unknown topic There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok maybe I am wrong, ill double check, thanks There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lighthouse/common/eth2/src/types.rs Line 1267 in 0d90135
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep you were right, heres the fix |
||||
.send(kind) | ||||
.map(|count| log_count("attestation", count)), | ||||
EventKind::Block(_) => self | ||||
.block_tx | ||||
.send(kind) | ||||
|
Uh oh!
There was an error while loading. Please reload this page.