Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Fix spelling #1577

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 cmd/keytransparency-client/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func readConfigFromDisk() (*pb.Directory, error) {
}
mapPubPB, err := der.ToPublicProto(mapPubKey)
if err != nil {
return nil, fmt.Errorf("error seralizeing map public key: %v", err)
return nil, fmt.Errorf("error serializing map public key: %v", err)
}

return &pb.Directory{
Expand Down
2 changes: 1 addition & 1 deletion cmd/serverutil/healthz.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"gocloud.dev/server/health"
)

// RootHeaalthHandler handles liveness checks at "/".
// RootHealthHandler handles liveness checks at "/".
// All other requests are passed through to `otherHandler`.
func RootHealthHandler(otherHandler http.Handler) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion core/adminserver/admin_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func treeConfig(treeTemplate *tpb.CreateTreeRequest, privKey *any.Any, directory
return config
}

// CreateDirectory reachs out to Trillian to produce new trees.
// CreateDirectory reaches out to Trillian to produce new trees.
func (s *Server) CreateDirectory(ctx context.Context, in *pb.CreateDirectoryRequest) (*pb.Directory, error) {
glog.Infof("Begin CreateDirectory(%v)", in.GetDirectoryId())
if _, err := s.directories.Read(ctx, in.GetDirectoryId(), true); status.Code(err) != codes.NotFound {
Expand Down
2 changes: 1 addition & 1 deletion core/api/v1/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ service KeyTransparencyAdmin {
get: "/v1/directories"
};
}
// GetDirectory returns the confiuration information for a given directory.
// GetDirectory returns the configuration information for a given directory.
rpc GetDirectory(GetDirectoryRequest) returns (Directory) {
option (google.api.http) = {
get: "/v1/directories/{directory_id}"
Expand Down
2 changes: 1 addition & 1 deletion core/client/get_and_verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (c *Client) VerifiedGetLatestRevision(ctx context.Context) (*types.LogRootV
return nil, nil, err
}
if mr.Revision != wantRevision {
return nil, nil, fmt.Errorf("map revision is not the most recent. smr.Revison: %v != slr.TreeSize-1: %v", mr.Revision, lr.TreeSize-1)
return nil, nil, fmt.Errorf("map revision is not the most recent. smr.Revision: %v != slr.TreeSize-1: %v", mr.Revision, lr.TreeSize-1)
}
return lr, mr, nil
}
Expand Down
2 changes: 1 addition & 1 deletion core/client/meetinthemiddle.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func NewerRevisionsToVerify(created, current, verified uint64) []uint64 {
//
// TODO: Consier limiting the max period between checks to the expected value
// of other party lifetimes -- the maximum amount of time this algorithm can
// tollerate the other party being offline at an unknown point in the past.
// tolerate the other party being offline at an unknown point in the past.
// Currently this algorithm expects the relying party to keep its memory and
// be online at least once every `current = 2ⁱ` revisions. See Tests.
func OlderRevisionsToVerify(current, verified uint64) []uint64 {
Expand Down
2 changes: 1 addition & 1 deletion core/frontend/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
pb "github.com/google/keytransparency/core/api/v1/keytransparency_go_proto"
)

// PublicKeyGetter retrives a public key.
// PublicKeyGetter retrieves a public key.
type PublicKeyGetter interface {
PublicKey() *keyset.Handle
}
Expand Down
2 changes: 1 addition & 1 deletion core/keyserver/keyserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func (s *Server) batchGetUserByRevision(ctx context.Context, sth *tpb.SignedLogR
})
if st := status.Convert(err); st.Code() != codes.OK {
glog.Errorf("tlog.GetInclusionProof(%v): %v", d.Log.TreeId, err)
return nil, status.Errorf(st.Code(), "caannot fetch log inclusion proof: %v", st.Message())
return nil, status.Errorf(st.Code(), "cannot fetch log inclusion proof: %v", st.Message())
}

return &pb.BatchGetUserResponse{
Expand Down
2 changes: 1 addition & 1 deletion core/mutator/entry/mutator.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func MutateFn(oldSignedEntry, newSignedEntry *pb.SignedEntry) (*pb.SignedEntry,
}

if oldSignedEntry == nil {
// Skip verificaion checks if there is no previous oldSignedEntry.
// Skip verification checks if there is no previous oldSignedEntry.
return newSignedEntry, nil
}

Expand Down
2 changes: 1 addition & 1 deletion core/sequencer/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func TestDefiningRevisions(t *testing.T) {
maxGap int32
wantNew int64
}{
{desc: "alomost-blocked", highestRev: mapRev + 1, maxGap: 1, wantNew: mapRev + 2},
{desc: "almost-blocked", highestRev: mapRev + 1, maxGap: 1, wantNew: mapRev + 2},
{desc: "blocked", highestRev: mapRev + 2, wantNew: mapRev + 2},
{desc: "unblocked", highestRev: mapRev, wantNew: mapRev + 1},
{desc: "lagging", highestRev: mapRev + 3, wantNew: mapRev + 3},
Expand Down
4 changes: 2 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ Leaf entry for a user.
<a name="google.keytransparency.v1.MapRevision"></a>

### MapRevision
MapRevision contains a map leaf at a speific revision.
MapRevision contains a map leaf at a specific revision.


| Field | Type | Label | Description |
Expand Down Expand Up @@ -938,7 +938,7 @@ The KeyTransparencyAdmin API provides the following resources:
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| ListDirectories | [ListDirectoriesRequest](#google.keytransparency.v1.ListDirectoriesRequest) | [ListDirectoriesResponse](#google.keytransparency.v1.ListDirectoriesResponse) | ListDirectories returns a list of all directories this Key Transparency server operates on. |
| GetDirectory | [GetDirectoryRequest](#google.keytransparency.v1.GetDirectoryRequest) | [Directory](#google.keytransparency.v1.Directory) | GetDirectory returns the confiuration information for a given directory. |
| GetDirectory | [GetDirectoryRequest](#google.keytransparency.v1.GetDirectoryRequest) | [Directory](#google.keytransparency.v1.Directory) | GetDirectory returns the configuration information for a given directory. |
| CreateDirectory | [CreateDirectoryRequest](#google.keytransparency.v1.CreateDirectoryRequest) | [Directory](#google.keytransparency.v1.Directory) | CreateDirectory creates a new Trillian log/map pair. A unique directoryId must be provided. To create a new directory with the same name as a previously deleted directory, a user must wait X days until the directory is garbage collected. |
| DeleteDirectory | [DeleteDirectoryRequest](#google.keytransparency.v1.DeleteDirectoryRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | DeleteDirectory marks a directory as deleted. Directories will be garbage collected after X days. |
| UndeleteDirectory | [UndeleteDirectoryRequest](#google.keytransparency.v1.UndeleteDirectoryRequest) | [.google.protobuf.Empty](#google.protobuf.Empty) | UndeleteDirectory marks a previously deleted directory as active if it has not already been garbage collected. |
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Map.

# Commitment Table
The commitment table stores account values and the associated commitment key
nessesary to verify the commitment stored in the Trillian Map.
necessary to verify the commitment stored in the Trillian Map.

# Mutation Table
When a user wishes to make a change to their account, they create a signed change
Expand All @@ -35,7 +35,7 @@ The Trillian Map stores the sparse merkle tree and is designed to scale to
extremely large trees. The Trillian Map is updated in batches.

# Trillian Log
The Trillian Log stores a dense merkle tree in the style of Ceritificate
The Trillian Log stores a dense merkle tree in the style of Certificate
Transparency. The Key Transparency Sequencer adds SignedMapRoots from the
Trillian Map to the Trillian Log as they are created.

Expand Down
4 changes: 2 additions & 2 deletions docs/meet-in-the-middle.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ revision *current* to perform append-only proofs between revisions *fetched* <=
### Background
Key Transparency 1.0 allowed Bob to fetch at an unknown revision, requiring
Alice to fetch *all* revisions in order to verify her key history, an O(n)
amount of work where n is the number of revisonis between verifications. This
amount of work where n is the number of revisions between verifications. This
limited the frequency and freshness of directory updates.

The meet in the middle algorithm shares the work between Alice and Bob by
Expand All @@ -18,7 +18,7 @@ verification work down to a logarithmic, regardless of directory freshness.

## Algorithm

### Sender Verificatoin
### Sender Verification
Clients save the (earliest) revision number associated with the data they have
fetched. For Key Transparency, this means that *senders* will store, for each
contact, the contact's public key, map revision number it was fetched at, and
Expand Down
2 changes: 1 addition & 1 deletion impl/authorization/authorization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func TestIsAuthorized(t *testing.T) {
}
}

func TestResouceLabel(t *testing.T) {
func TestResourceLabel(t *testing.T) {
for _, tc := range []struct {
directoryID string
out string
Expand Down
2 changes: 1 addition & 1 deletion scripts/kubernetes_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -ex
set -o pipefail

# This script assumes the existance of a local cluster
# This script assumes the existence of a local cluster
# go get sigs.k8s.io/kind@v0.6.1
# kind create cluster --config deploy/kubernetes/kind-config.yaml
# kubectl cluster-info --context kind-kind
Expand Down