From c4c1a8416d4690d5871fe21bab263e0d43ae63a2 Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Mon, 6 Jan 2025 10:58:12 +0000 Subject: [PATCH] Correct various typos and grammar --- README.md | 2 +- api/attestationpoolopts.go | 2 +- api/blindedproposalopts.go | 2 +- api/v1/beaconcommitteesubscription.go | 2 +- api/v1/forkchoice.go | 4 ++-- api/v1/proposalpreparation.go | 2 +- api/validatorsopts.go | 2 +- http/farfutureepoch.go | 2 +- http/http.go | 2 +- http/parameters.go | 2 +- http/service_test.go | 2 +- http/submitattesterslashing_test.go | 4 ++-- http/synccommitteeduties_test.go | 2 +- mock/attesterduties.go | 2 +- mock/farfutureepoch.go | 2 +- multi/attesterduties.go | 2 +- multi/service.go | 2 +- multi/service_test.go | 2 +- multi/synccommitteeduties.go | 2 +- service.go | 2 +- spec/altair/consensusspec_test.go | 4 ++-- spec/altair/types.go | 2 +- spec/bellatrix/consensusspec_test.go | 4 ++-- spec/capella/consensusspec_test.go | 4 ++-- spec/versionedsignedbeaconblock.go | 2 +- testclients/erroring.go | 4 ++-- testclients/sleepy.go | 2 +- 27 files changed, 33 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index dd609591..f2e0ee86 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Go library providing an abstraction to multiple Ethereum 2 beacon nodes. Its external API follows the official [Ethereum beacon APIs](https://github.com/ethereum/beacon-APIs) specification. -This library is under development; expect APIs and data structures to change until it reaches version 1.0. In addition, clients' implementations of both their own and the standard API are themselves under development so implementation of the the full API can be incomplete. +This library is under development; expect APIs and data structures to change until it reaches version 1.0. In addition, clients' implementations of both their own and the standard API are themselves under development so implementation of the full API can be incomplete. > Between versions 0.18.0 and 0.19.0 the API has undergone a number of changes. Please see [the detailed documentation](docs/0.19.0-changes.md) regarding these changes. diff --git a/api/attestationpoolopts.go b/api/attestationpoolopts.go index 9994e109..fc5923a4 100644 --- a/api/attestationpoolopts.go +++ b/api/attestationpoolopts.go @@ -23,7 +23,7 @@ type AttestationPoolOpts struct { // data for all slots will be obtained. Slot *phase0.Slot - // CommmitteeIndex is the committee index for which the data is obtained. + // CommitteeIndex is the committee index for which the data is obtained. // If not present then data for all committee indices will be obtained. CommitteeIndex *phase0.CommitteeIndex } diff --git a/api/blindedproposalopts.go b/api/blindedproposalopts.go index 0ba2fe96..d1ea3d17 100644 --- a/api/blindedproposalopts.go +++ b/api/blindedproposalopts.go @@ -23,7 +23,7 @@ type BlindedProposalOpts struct { Slot phase0.Slot // RandaoReveal is the RANDAO reveal for the proposal. RandaoReveal phase0.BLSSignature - // Graffit is the graffiti to be included in the beacon block body. + // Graffiti is the graffiti to be included in the beacon block body. Graffiti [32]byte // SkipRandaoVerification is true if we do not want the server to verify our RANDAO reveal. // If this is set then the RANDAO reveal should be passed as the point at infinity (0xc0…00) diff --git a/api/v1/beaconcommitteesubscription.go b/api/v1/beaconcommitteesubscription.go index e45d0081..3ac3793b 100644 --- a/api/v1/beaconcommitteesubscription.go +++ b/api/v1/beaconcommitteesubscription.go @@ -24,7 +24,7 @@ import ( // BeaconCommitteeSubscription is the data required for a beacon committee subscription. type BeaconCommitteeSubscription struct { - // ValidatorIdex is the index of the validator making the subscription request. + // ValidatorIndex is the index of the validator making the subscription request. ValidatorIndex phase0.ValidatorIndex // Slot is the slot for which the validator is attesting. Slot phase0.Slot diff --git a/api/v1/forkchoice.go b/api/v1/forkchoice.go index 0de7e006..1678ad8a 100644 --- a/api/v1/forkchoice.go +++ b/api/v1/forkchoice.go @@ -162,7 +162,7 @@ type ForkChoiceNode struct { BlockRoot phase0.Root // ParentRoot is the parent root of the node. ParentRoot phase0.Root - // JustifiedEpcih is the justified epoch of the node. + // JustifiedEpcoh is the justified epoch of the node. JustifiedEpoch phase0.Epoch // FinalizedEpoch is the finalized epoch of the node. FinalizedEpoch phase0.Epoch @@ -170,7 +170,7 @@ type ForkChoiceNode struct { Weight uint64 // Validity is the validity of the node. Validity ForkChoiceNodeValidity - // ExecutiionBlockHash is the execution block hash of the node. + // ExecutionBlockHash is the execution block hash of the node. ExecutionBlockHash phase0.Root // ExtraData is the extra data of the node. ExtraData map[string]any diff --git a/api/v1/proposalpreparation.go b/api/v1/proposalpreparation.go index f1394489..9a9aace9 100644 --- a/api/v1/proposalpreparation.go +++ b/api/v1/proposalpreparation.go @@ -27,7 +27,7 @@ import ( // ProposalPreparation is the data required for proposal preparation. type ProposalPreparation struct { - // ValidatorIdex is the index of the validator making the proposal request. + // ValidatorIndex is the index of the validator making the proposal request. ValidatorIndex phase0.ValidatorIndex // FeeRecipient is the execution address to be used with preparing blocks. FeeRecipient bellatrix.ExecutionAddress `ssz-size:"20"` diff --git a/api/validatorsopts.go b/api/validatorsopts.go index ef7c0ebd..3e1429bb 100644 --- a/api/validatorsopts.go +++ b/api/validatorsopts.go @@ -31,7 +31,7 @@ type ValidatorsOpts struct { // PubKeys is a list of validator public keys to restrict the returned values. // If no public keys are supplied then no filter will be applied. PubKeys []phase0.BLSPubKey - // ValidatorStates is a list of validator states to restric the returned values. + // ValidatorStates is a list of validator states to restrict the returned values. // If no validator states are supplied then no filter will be applied. ValidatorStates []apiv1.ValidatorState } diff --git a/http/farfutureepoch.go b/http/farfutureepoch.go index d15b10a7..7f3f1570 100644 --- a/http/farfutureepoch.go +++ b/http/farfutureepoch.go @@ -19,7 +19,7 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" ) -// FarFutureEpoch provides the values for FAR_FUTURE_EOPCH of the chain. +// FarFutureEpoch provides the values for FAR_FUTURE_EPOCH of the chain. func (*Service) FarFutureEpoch(_ context.Context) (phase0.Epoch, error) { return phase0.Epoch(0xffffffffffffffff), nil } diff --git a/http/http.go b/http/http.go index 18f90c04..1342841d 100644 --- a/http/http.go +++ b/http/http.go @@ -274,7 +274,7 @@ func (s *Service) get(ctx context.Context, case errors.Is(err, context.DeadlineExceeded): // We don't consider context deadline exceeded to be a potential connection issue, as the user selected the deadline. case strings.HasSuffix(callURL.String(), "/node/syncing"): - // Special case; if we have called the syncing endpoint and it failed then we don't check the connectino status, as + // Special case; if we have called the syncing endpoint and it failed then we don't check the connection status, as // that calls the syncing endpoint itself and so we find ourselves in an endless loop. default: // We consider other errors to be potential connection issues. diff --git a/http/parameters.go b/http/parameters.go index ab679a5b..c6f2e21f 100644 --- a/http/parameters.go +++ b/http/parameters.go @@ -84,7 +84,7 @@ func WithIndexChunkSize(indexChunkSize int) Parameter { }) } -// WithPubKeyChunkSize sets the maximum number of public kyes to send for individual validator requests. +// WithPubKeyChunkSize sets the maximum number of public keys to send for individual validator requests. func WithPubKeyChunkSize(pubKeyChunkSize int) Parameter { return parameterFunc(func(p *parameters) { p.pubKeyChunkSize = pubKeyChunkSize diff --git a/http/service_test.go b/http/service_test.go index aff505e6..f85f8950 100644 --- a/http/service_test.go +++ b/http/service_test.go @@ -118,7 +118,7 @@ func TestInterfaces(t *testing.T) { s, err := v1.New(ctx, v1.WithAddress(os.Getenv("HTTP_ADDRESS")), v1.WithTimeout(5*time.Second)) require.NoError(t, err) - // Standard interfacs. + // Standard interfaces. assert.Implements(t, (*client.AggregateAttestationProvider)(nil), s) assert.Implements(t, (*client.AggregateAttestationsSubmitter)(nil), s) assert.Implements(t, (*client.AttestationDataProvider)(nil), s) diff --git a/http/submitattesterslashing_test.go b/http/submitattesterslashing_test.go index f313c706..6ddf7d92 100644 --- a/http/submitattesterslashing_test.go +++ b/http/submitattesterslashing_test.go @@ -79,8 +79,8 @@ func TestSubmitAttesterSlashing(t *testing.T) { t.Run(test.name, func(t *testing.T) { // Create proposal slashing and submit. err := service.(client.AttesterSlashingSubmitter).SubmitAttesterSlashing(context.Background(), &test.slashing) - // This should error on bad slashing - require.Error(t, err) //we should be getting errors about non-slashable attestations or signatures + // This should error on bad slashing. + require.Error(t, err) // We should be getting errors about non-slashable attestations or signatures. }) } } diff --git a/http/synccommitteeduties_test.go b/http/synccommitteeduties_test.go index a55bd430..0b3a4ad1 100644 --- a/http/synccommitteeduties_test.go +++ b/http/synccommitteeduties_test.go @@ -75,7 +75,7 @@ func TestSyncCommitteeDuties(t *testing.T) { require.NoError(t, err) require.NotNil(t, response) require.NotNil(t, response.Data) - // No guaratee that any included indices will be have a sync duty. + // No guarantee that any included indices will have a sync duty. }) } } diff --git a/mock/attesterduties.go b/mock/attesterduties.go index e2150057..8aafe275 100644 --- a/mock/attesterduties.go +++ b/mock/attesterduties.go @@ -21,7 +21,7 @@ import ( ) // AttesterDuties obtains attester duties. -// If validatorIndicess is nil it will return all duties for the given epoch. +// If validatorIndices is nil it will return all duties for the given epoch. func (*Service) AttesterDuties(_ context.Context, opts *api.AttesterDutiesOpts) (*api.Response[[]*apiv1.AttesterDuty], error) { data := make([]*apiv1.AttesterDuty, len(opts.Indices)) for i := range opts.Indices { diff --git a/mock/farfutureepoch.go b/mock/farfutureepoch.go index da1057f8..5fc13c17 100644 --- a/mock/farfutureepoch.go +++ b/mock/farfutureepoch.go @@ -19,7 +19,7 @@ import ( spec "github.com/attestantio/go-eth2-client/spec/phase0" ) -// FarFutureEpoch provides the values for FAR_FUTURE_EOPCH of the chain. +// FarFutureEpoch provides the values for FAR_FUTURE_EPOCH of the chain. func (*Service) FarFutureEpoch(_ context.Context) (spec.Epoch, error) { return spec.Epoch(0xffffffffffffffff), nil } diff --git a/multi/attesterduties.go b/multi/attesterduties.go index de0d0ce1..52977ba0 100644 --- a/multi/attesterduties.go +++ b/multi/attesterduties.go @@ -22,7 +22,7 @@ import ( ) // AttesterDuties obtains attester duties. -// If validatorIndicess is nil it will return all duties for the given epoch. +// If validatorIndices is nil it will return all duties for the given epoch. func (s *Service) AttesterDuties(ctx context.Context, opts *api.AttesterDutiesOpts, ) ( diff --git a/multi/service.go b/multi/service.go index e28d0ac6..6d03a6d9 100644 --- a/multi/service.go +++ b/multi/service.go @@ -36,7 +36,7 @@ type Service struct { } // New creates a new Ethereum 2 client with multiple endpoints. -// The endpoints are periodiclaly checked to see if they are active, +// The endpoints are periodically checked to see if they are active, // and requests will retry a different client if the currently active // client fails to respond. func New(ctx context.Context, params ...Parameter) (consensusclient.Service, error) { diff --git a/multi/service_test.go b/multi/service_test.go index d9c1391d..e1f503b1 100644 --- a/multi/service_test.go +++ b/multi/service_test.go @@ -100,7 +100,7 @@ func TestInterfaces(t *testing.T) { ) require.NoError(t, err) - // Standard interfacs. + // Standard interfaces. assert.Implements(t, (*client.AggregateAttestationProvider)(nil), s) assert.Implements(t, (*client.AggregateAttestationsSubmitter)(nil), s) assert.Implements(t, (*client.AttestationDataProvider)(nil), s) diff --git a/multi/synccommitteeduties.go b/multi/synccommitteeduties.go index 5723323a..beb85e7c 100644 --- a/multi/synccommitteeduties.go +++ b/multi/synccommitteeduties.go @@ -22,7 +22,7 @@ import ( ) // SyncCommitteeDuties obtains attester duties. -// If validatorIndicess is nil it will return all duties for the given epoch. +// If validatorIndices is nil it will return all duties for the given epoch. func (s *Service) SyncCommitteeDuties(ctx context.Context, opts *api.SyncCommitteeDutiesOpts, ) ( diff --git a/service.go b/service.go index fd50730f..84d35174 100644 --- a/service.go +++ b/service.go @@ -253,7 +253,7 @@ type DepositContractProvider interface { // SyncCommitteeDutiesProvider is the interface for providing sync committee duties. type SyncCommitteeDutiesProvider interface { // SyncCommitteeDuties obtains sync committee duties. - // If validatorIndicess is nil it will return all duties for the given epoch. + // If validatorIndices is nil it will return all duties for the given epoch. SyncCommitteeDuties(ctx context.Context, opts *api.SyncCommitteeDutiesOpts, ) ( diff --git a/spec/altair/consensusspec_test.go b/spec/altair/consensusspec_test.go index b9172be7..8257ef5b 100644 --- a/spec/altair/consensusspec_test.go +++ b/spec/altair/consensusspec_test.go @@ -128,7 +128,7 @@ func TestConsensusSpec(t *testing.T) { s: &phase0.SignedBeaconBlockHeader{}, }, { - name: "SignedContributionAndproof", + name: "SignedContributionAndProof", s: &altair.SignedContributionAndProof{}, }, { @@ -140,7 +140,7 @@ func TestConsensusSpec(t *testing.T) { s: &altair.SyncAggregate{}, }, { - name: "SyncCommitteeContribuion", + name: "SyncCommitteeContribution", s: &altair.SyncCommitteeContribution{}, }, { diff --git a/spec/altair/types.go b/spec/altair/types.go index 4450bd20..8cda55e7 100644 --- a/spec/altair/types.go +++ b/spec/altair/types.go @@ -13,7 +13,7 @@ package altair -// ParticipationFlag is an individual particiation flag for a validator. +// ParticipationFlag is an individual participation flag for a validator. type ParticipationFlag int const ( diff --git a/spec/bellatrix/consensusspec_test.go b/spec/bellatrix/consensusspec_test.go index d5dabfbf..7cc7a066 100644 --- a/spec/bellatrix/consensusspec_test.go +++ b/spec/bellatrix/consensusspec_test.go @@ -137,7 +137,7 @@ func TestConsensusSpec(t *testing.T) { s: &phase0.SignedBeaconBlockHeader{}, }, { - name: "SignedContributionAndproof", + name: "SignedContributionAndProof", s: &altair.SignedContributionAndProof{}, }, { @@ -149,7 +149,7 @@ func TestConsensusSpec(t *testing.T) { s: &altair.SyncAggregate{}, }, { - name: "SyncCommitteeContribuion", + name: "SyncCommitteeContribution", s: &altair.SyncCommitteeContribution{}, }, { diff --git a/spec/capella/consensusspec_test.go b/spec/capella/consensusspec_test.go index 8b000b8a..65e7e23e 100644 --- a/spec/capella/consensusspec_test.go +++ b/spec/capella/consensusspec_test.go @@ -141,7 +141,7 @@ func TestConsensusSpec(t *testing.T) { s: &phase0.SignedBeaconBlockHeader{}, }, { - name: "SignedContributionAndproof", + name: "SignedContributionAndProof", s: &altair.SignedContributionAndProof{}, }, { @@ -153,7 +153,7 @@ func TestConsensusSpec(t *testing.T) { s: &altair.SyncAggregate{}, }, { - name: "SyncCommitteeContribuion", + name: "SyncCommitteeContribution", s: &altair.SyncCommitteeContribution{}, }, { diff --git a/spec/versionedsignedbeaconblock.go b/spec/versionedsignedbeaconblock.go index e5033a52..9bbcf739 100644 --- a/spec/versionedsignedbeaconblock.go +++ b/spec/versionedsignedbeaconblock.go @@ -173,7 +173,7 @@ func (v *VersionedSignedBeaconBlock) ExecutionBlockNumber() (uint64, error) { } } -// ExecutionTransactions returs the execution payload transactions for the block. +// ExecutionTransactions returns the execution payload transactions for the block. func (v *VersionedSignedBeaconBlock) ExecutionTransactions() ([]bellatrix.Transaction, error) { switch v.Version { case DataVersionPhase0: diff --git a/testclients/erroring.go b/testclients/erroring.go index d3957698..12306539 100644 --- a/testclients/erroring.go +++ b/testclients/erroring.go @@ -319,7 +319,7 @@ func (s *Erroring) SubmitSyncCommitteeMessages(ctx context.Context, messages []* } // AttesterDuties obtains attester duties. -// If validatorIndicess is nil it will return all duties for the given epoch. +// If validatorIndices is nil it will return all duties for the given epoch. func (s *Erroring) AttesterDuties(ctx context.Context, opts *api.AttesterDutiesOpts, ) ( @@ -678,7 +678,7 @@ func (s *Erroring) SyncCommitteeContribution(ctx context.Context, } // SyncCommitteeDuties obtains sync committee duties. -// If validatorIndicess is nil it will return all duties for the given epoch. +// If validatorIndices is nil it will return all duties for the given epoch. func (s *Erroring) SyncCommitteeDuties(ctx context.Context, opts *api.SyncCommitteeDutiesOpts, ) ( diff --git a/testclients/sleepy.go b/testclients/sleepy.go index fbab50b5..162b1160 100644 --- a/testclients/sleepy.go +++ b/testclients/sleepy.go @@ -252,7 +252,7 @@ func (s *Sleepy) SubmitAttestations(ctx context.Context, attestations []*phase0. } // AttesterDuties obtains attester duties. -// If validatorIndicess is nil it will return all duties for the given epoch. +// If validatorIndices is nil it will return all duties for the given epoch. func (s *Sleepy) AttesterDuties(ctx context.Context, opts *api.AttesterDutiesOpts, ) (