-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
101 commits
Select commit
Hold shift + click to select a range
25feedf
First pass
pawanjay176 4dc6e65
Add restrictions to RuntimeVariableList api
pawanjay176 a9cb329
Use empty_uninitialized and fix warnings
pawanjay176 60100fc
Fix some todos
pawanjay176 13f9bba
Merge branch 'unstable' into max-blobs-preset
pawanjay176 e71020e
Fix take impl on RuntimeFixedList
pawanjay176 52bb581
cleanup
pawanjay176 d37733b
Fix test compilations
pawanjay176 12c6ef1
Fix some more tests
pawanjay176 2fcb293
Fix test from unstable
pawanjay176 21ecb58
Merge branch 'unstable' into max-blobs-preset
pawanjay176 366bed3
SingleAttestation
eserilev 68292ad
Add post attestation v2 endpoint logic to attestation service
eserilev 5a4cd3b
Merge branch 'unstable' of https://github.com/sigp/lighthouse into si…
eserilev 9d5a3af
Implement "Bugfix and more withdrawal tests"
michaelsproul f892849
Implement "Add missed exit checks to consolidation processing"
michaelsproul f27216f
Implement "Update initial earliest_exit_epoch calculation"
michaelsproul c31f1cc
Implement "Limit consolidating balance by validator.effective_balance"
michaelsproul 282eefb
Implement "Use 16-bit random value in validator filter"
michaelsproul 52e602d
Implement "Do not change creds type on consolidation"
michaelsproul f56083d
some tests and fixed attestqtion calc
eserilev 44d15a9
Merge branch 'unstable' of https://github.com/sigp/lighthouse into si…
eserilev 293db28
Rename PendingPartialWithdraw index field to validator_index
eserilev 9b8a25f
Skip slots to get test to pass and add TODO
eserilev 23d331b
Implement "Synchronously check all transactions to have non-zero length"
eserilev 0c2c8c4
Merge remote-tracking branch 'origin/unstable' into max-blobs-preset
michaelsproul de01f92
Remove footgun function
michaelsproul 1095d60
Minor simplifications
michaelsproul 2e86585
Move from preset to config
michaelsproul 32483d3
Fix typo
michaelsproul 88bedf0
Revert "Remove footgun function"
michaelsproul 063b79c
Try fixing tests
michaelsproul 251bca7
Implement "bump minimal preset MAX_BLOB_COMMITMENTS_PER_BLOCK and KZG…
eserilev e4bfe71
Thread through ChainSpec
michaelsproul f66e179
Fix release tests
michaelsproul 440e854
Move RuntimeFixedVector into module and rename
michaelsproul 04b3743
Add test
michaelsproul 4700ef9
Merge branch 'unstable' of https://github.com/sigp/lighthouse into si…
eserilev c7ef72d
Added more test coverage, simplified Attestation conversion, and othe…
eserilev 9945079
Removed unusued codepaths
eserilev 12e442c
Fix failing test
eserilev 3d3bc6d
Implement "Remove post-altair `initialize_beacon_state_from_eth1` fro…
eserilev 2dbd3b7
Update preset YAML
michaelsproul 0cd263f
Remove empty RuntimeVarList awefullness
pawanjay176 3b788bf
Make max_blobs_per_block a config parameter (#6329)
michaelsproul 7c215f8
Fix tests
pawanjay176 0f26408
Implement max_blobs_per_block_electra
michaelsproul d65e821
Fix config issues
michaelsproul 26c409c
Simplify BlobSidecarListFromRoot
michaelsproul eee9218
Disable PeerDAS tests
michaelsproul e95f003
Cleanup single attestation imports
eserilev 823ddf5
Fix some single attestation network plumbing
eserilev 07c039c
Merge remote-tracking branch 'origin/unstable' into max-blobs-preset
michaelsproul d4e152c
Bump quota to account for new target (6)
michaelsproul a73ecb5
Remove clone
michaelsproul f13bdfc
Fix issue from review
pawanjay176 70917f7
Try to remove ugliness
pawanjay176 22b7fcb
Merge branch 'unstable' into max-blobs-preset
pawanjay176 9e972b1
Merge remote-tracking branch 'origin/unstable' into electra-alpha10
michaelsproul bb59e7a
Merge commit '04b3743ec1e0b650269dd8e58b540c02430d1c0d' into electra-…
michaelsproul 1d4dc59
Merge remote-tracking branch 'pawan/max-blobs-preset' into electra-al…
michaelsproul bba7310
Update tests to v1.5.0-beta.0
michaelsproul 8c96c35
Merge remote-tracking branch 'origin/electra-alpha10' into single_att…
michaelsproul d7a69e4
Fix some tests
michaelsproul ce488b2
Cargo fmt
michaelsproul b42cc84
lint
eserilev 7bd174e
fmt
eserilev ef13f0f
Resolve merge conflicts
eserilev 40f65bb
Merge branch 'electra-alpha10' of https://github.com/sigp/lighthouse …
eserilev fe3d5de
lint
eserilev 72bcc8a
Linting
eserilev 344ba2b
fmt
eserilev eb5d3eb
Merge branch 'electra-alpha10' of https://github.com/sigp/lighthouse …
eserilev fdf9af8
Fmt
eserilev a45c0f0
Fix test and add TODO
eserilev f4fe1b8
Gracefully handle slashed proposers in fork choice tests
michaelsproul 1205d83
Merge remote-tracking branch 'origin/unstable' into electra-alpha10
michaelsproul 3b17732
Keep latest changes from max_blobs_per_block PR in codec.rs
michaelsproul e2ff440
Revert a few more regressions and add a comment
michaelsproul 6cc798a
Merge branch 'electra-alpha10' of https://github.com/sigp/lighthouse …
eserilev 7df6560
Disable more DAS tests
michaelsproul 4fbca37
Improve validator monitor test a little
michaelsproul e821e62
Make test more robust
michaelsproul 0b36d60
Fix sync test that didn't understand blobs
michaelsproul 4f08ac7
Fill out cropped comment
michaelsproul 11c1949
Merge remote-tracking branch 'origin/electra-alpha10' into single_att…
michaelsproul e76322e
Merge remote-tracking branch 'origin/unstable' into single_attestation
michaelsproul d8f32de
Merge remote-tracking branch 'origin/unstable' into single_attestation
michaelsproul fb5e378
Merge branch 'unstable' of https://github.com/sigp/lighthouse into si…
eserilev 2d61b65
publish_attestations should accept Either<Attestation,SingleAttestation>
eserilev b6d80eb
log an error when failing to convert to SingleAttestation
eserilev 86ce323
Use Cow to avoid clone
michaelsproul 8cc43c1
Avoid reconverting to SingleAttestation
michaelsproul e900bb8
Tweak VC error message
michaelsproul 72da039
update comments
eserilev b9b9b99
update comments
eserilev 4f2182e
pass in single attestation as ref to subnetid calculation method
eserilev aa66b06
Improved API, new error variants and other minor tweaks
eserilev 54844b3
Fix single_attestation event topic boilerplate
eserilev f7a0b37
fix sse event failure
eserilev 42c01c6
Add single_attestation event topic test coverage
eserilev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2035,10 +2035,30 @@ impl<T: BeaconChainTypes> BeaconChain<T> { | |
|v| { | ||
// 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_single_attestation_subscribers() { | ||
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, | ||
))); | ||
} | ||
} | ||
} | ||
|
||
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() { | ||
event_handler.register(EventKind::Attestation(Box::new( | ||
v.attestation().clone_as_attestation(), | ||
))); | ||
} | ||
} | ||
} | ||
metrics::inc_counter(&metrics::UNAGGREGATED_ATTESTATION_PROCESSING_SUCCESSES); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.