-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Electra attestation interfaces #13937
Conversation
This reverts commit 32ad5009537bc5ec0e6caf9f52143d380d00be85.
This reverts commit f39644ed3cb6f3964fc6c86fdf4bd5de2a9668c8.
…p-7549 # Conflicts: # config/params/config.go # consensus-types/blocks/types.go # consensus-types/mock/block.go # proto/prysm/v1alpha1/attestation.go # proto/prysm/v1alpha1/attestation.pb.go # proto/prysm/v1alpha1/attestation.proto # proto/prysm/v1alpha1/beacon_block.pb.go # proto/prysm/v1alpha1/beacon_block.proto # proto/prysm/v1alpha1/cloners.go # proto/prysm/v1alpha1/generated.ssz.go # proto/ssz_proto_library.bzl
05787e7
to
d2628f3
Compare
1122d7a
to
05787e7
Compare
@@ -671,5 +671,5 @@ func ValidatorMaxEffectiveBalance(val *ethpb.Validator) uint64 { | |||
if HasCompoundingWithdrawalCredential(val) { | |||
return params.BeaconConfig().MaxEffectiveBalanceElectra | |||
} | |||
return params.BeaconConfig().MinActivationBalance // TODO: Add test that MinActivationBalance == (old) MaxEffectiveBalance | |||
return params.BeaconConfig().MinActivationBalance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was a test added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this test in #13921 and forgot to remove the TODO
"attestationSlot1": slashing.GetFirstAttestation().GetData().Slot, | ||
"beaconBlockRoot1": fmt.Sprintf("%#x", bytesutil.Trunc(slashing.GetFirstAttestation().GetData().BeaconBlockRoot)), | ||
"sourceEpoch1": slashing.GetFirstAttestation().GetData().Source.Epoch, | ||
"targetEpoch1": slashing.GetFirstAttestation().GetData().Target.Epoch, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not for this pr but maybe we should rename this function as it can be easily misused and accidentally swapped with GetSecondAttestation
GetSignature() []byte | ||
} | ||
|
||
func (a *Attestation) Version() int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should have a check for these attestations/sub types using var _ = MyInterface(concrete type)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@james-prysm i think that would have the same circular dependency issue that is mentioned on line 10
…Slashings and SetAttestations
} | ||
|
||
// PbCapella -- | ||
func (executionPayloadHeaderElectra) PbCapella() (*enginev1.ExecutionPayloadCapella, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will need to be removed again as part of kasey's changes
@@ -13,7 +13,7 @@ import ( | |||
) | |||
|
|||
// Proto converts the signed beacon block to a protobuf object. | |||
func (b *SignedBeaconBlock) Proto() (proto.Message, error) { | |||
func (b *SignedBeaconBlock) Proto() (proto.Message, error) { // nolint:gocognit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably a todo to improve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think we can really make this much less complex :(
* config values * block protos * get_committee_indices * proto and ssz * attestation interface * Revert "Auxiliary commit to revert individual files from deadb21" This reverts commit 32ad5009537bc5ec0e6caf9f52143d380d00be85. * todos * get_attesting_indices * Revert "Auxiliary commit to revert individual files from dd27897" This reverts commit f39644ed3cb6f3964fc6c86fdf4bd5de2a9668c8. * beacon spec changes * Fix pending attestation. Build ok * Electra: add electra version * Electra: consensus types * gocognit exclusion * @potuz's suggestion * build fix * interfaces for indexed att and slashing * indexed att usage * BuildSignedBeaconBlockFromExecutionPayload * slashing usage * grpc stubs * remove unused methods * Electra attestation interfaces * cleanup * tests * make linter happy * simple casting * test fixes * Fix spectest failures * Regen pb and ssz files * Handle "not ok" type assertion cases * Setters that check version should always return an error. SetAttesterSlashings and SetAttestations * gofmt * Fix TestMinSpanChunksSlice_CheckSlashable --------- Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: Preston Van Loon <preston@pvl.dev>
No description provided.