Skip to content
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

Correct various typos and grammar #179

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion api/attestationpoolopts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion api/blindedproposalopts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion api/v1/beaconcommitteesubscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions api/v1/forkchoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ 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
// Weight is the weight of the node.
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
Expand Down
2 changes: 1 addition & 1 deletion api/v1/proposalpreparation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion api/validatorsopts.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion http/farfutureepoch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion http/parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion http/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions http/submitattesterslashing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
})
}
}
2 changes: 1 addition & 1 deletion http/synccommitteeduties_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
})
}
}
2 changes: 1 addition & 1 deletion mock/attesterduties.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion mock/farfutureepoch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion multi/attesterduties.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
) (
Expand Down
2 changes: 1 addition & 1 deletion multi/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion multi/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion multi/synccommitteeduties.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
) (
Expand Down
2 changes: 1 addition & 1 deletion service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
) (
Expand Down
4 changes: 2 additions & 2 deletions spec/altair/consensusspec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func TestConsensusSpec(t *testing.T) {
s: &phase0.SignedBeaconBlockHeader{},
},
{
name: "SignedContributionAndproof",
name: "SignedContributionAndProof",
s: &altair.SignedContributionAndProof{},
},
{
Expand All @@ -140,7 +140,7 @@ func TestConsensusSpec(t *testing.T) {
s: &altair.SyncAggregate{},
},
{
name: "SyncCommitteeContribuion",
name: "SyncCommitteeContribution",
s: &altair.SyncCommitteeContribution{},
},
{
Expand Down
2 changes: 1 addition & 1 deletion spec/altair/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions spec/bellatrix/consensusspec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func TestConsensusSpec(t *testing.T) {
s: &phase0.SignedBeaconBlockHeader{},
},
{
name: "SignedContributionAndproof",
name: "SignedContributionAndProof",
s: &altair.SignedContributionAndProof{},
},
{
Expand All @@ -149,7 +149,7 @@ func TestConsensusSpec(t *testing.T) {
s: &altair.SyncAggregate{},
},
{
name: "SyncCommitteeContribuion",
name: "SyncCommitteeContribution",
s: &altair.SyncCommitteeContribution{},
},
{
Expand Down
4 changes: 2 additions & 2 deletions spec/capella/consensusspec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func TestConsensusSpec(t *testing.T) {
s: &phase0.SignedBeaconBlockHeader{},
},
{
name: "SignedContributionAndproof",
name: "SignedContributionAndProof",
s: &altair.SignedContributionAndProof{},
},
{
Expand All @@ -153,7 +153,7 @@ func TestConsensusSpec(t *testing.T) {
s: &altair.SyncAggregate{},
},
{
name: "SyncCommitteeContribuion",
name: "SyncCommitteeContribution",
s: &altair.SyncCommitteeContribution{},
},
{
Expand Down
2 changes: 1 addition & 1 deletion spec/versionedsignedbeaconblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions testclients/erroring.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
) (
Expand Down Expand Up @@ -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,
) (
Expand Down
2 changes: 1 addition & 1 deletion testclients/sleepy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
) (
Expand Down
Loading