Skip to content

Commit

Permalink
docs: fix some typos (#3628)
Browse files Browse the repository at this point in the history
* fix typo in whitepapers/0013_ccq.md

* fix typo in scripts/

* fix typo in clients

* fix typo in sdk/

* fix typo in testing/
  • Loading branch information
GoodDaisy authored Mar 8, 2024
1 parent d6b758f commit 2fc2bb5
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion clients/js/src/aptos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export async function execute_aptos(
// Deploying a wrapped asset requires two transactions:
// 1. Publish a new module under a resource account that defines a type T
// 2. Initialise a new coin with that type T
// These need to be done in separate transactions, becasue a
// These need to be done in separate transactions, because a
// transaction that deploys a module cannot use that module
//
// Tx 1.
Expand Down
2 changes: 1 addition & 1 deletion clients/js/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { YargsCommandModule } from "./cmds/Yargs";
import { CLI_COMMAND_MODULES } from "./cmds";

yargs(hideBin(process.argv))
// Build CLI commands dinamically from CLI_COMMAND_MODULES list
// Build CLI commands dynamically from CLI_COMMAND_MODULES list
// Documentation about command hierarchy can be found here: https://github.com/yargs/yargs/blob/main/docs/advanced.md#example-command-hierarchy-using-indexmjs
.command(CLI_COMMAND_MODULES as YargsCommandModule[])
.strict()
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-docker-pin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# - https://nickjanetakis.com/blog/docker-tip-18-please-pin-your-docker-image-versions
# - https://snyk.io/blog/10-docker-image-security-best-practices/ (Specifically: USE FIXED TAGS FOR IMMUTABILITY)
#
# Explaination of regex ignore choices
# Explanation of regex ignore choices
# - We ignore sha256 because it suggests that the image dep is pinned
# - We ignore scratch because it's literally the docker base image
# - We ignore solana AS (builder|ci_tests) because it's a relative reference to another FROM call
Expand Down
4 changes: 2 additions & 2 deletions scripts/guardian-set-init.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# This script allows devnet initalization with more than one guardian.
# This script allows devnet initialization with more than one guardian.
# First argument is the number of guardians for the initial guardian set.
set -exuo pipefail

Expand Down Expand Up @@ -46,7 +46,7 @@ if ! type -p jq; then
exit 1
fi

# 1) guardian public keys - used as the inital guardian set when initializing contracts.
# 1) guardian public keys - used as the initial guardian set when initializing contracts.
echo "generating guardian set addresses"
# create an array of strings containing the ECDSA public keys of the devnet guardians in the guardianset:
# guardiansPublicEth has the leading "0x" that Eth scripts expect.
Expand Down
2 changes: 1 addition & 1 deletion sdk/vaa/payloads.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var (
ActionCancelUpgrade GovernanceAction = 2
ActionSetIbcComposabilityMwContract GovernanceAction = 3

// Accountant goverance actions
// Accountant governance actions
ActionModifyBalance GovernanceAction = 1

// Wormhole tokenbridge governance actions
Expand Down
2 changes: 1 addition & 1 deletion sdk/vaa/quorum.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func CalculateQuorum(numGuardians int) int {
panic("Invalid numGuardians is less than zero")
}

// The goal here is to acheive a 2/3 quorum, but since we're
// The goal here is to achieve a 2/3 quorum, but since we're
// dividing on int, we need to +1 to avoid the rounding down
// effect of integer division
//
Expand Down
4 changes: 2 additions & 2 deletions sdk/vaa/quorum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ func FuzzCalculateQuorum(f *testing.F) {
num := CalculateQuorum(numGuardians)

// Let's always be sure that there are enough guardians to maintain quorum
assert.LessOrEqual(t, num, numGuardians, "fuzz violation: quorum cannot be acheived because we require more guardians than we have")
assert.LessOrEqual(t, num, numGuardians, "fuzz violation: quorum cannot be achieved because we require more guardians than we have")

// Let's always be sure that num is never zero
assert.NotZero(t, num, "fuzz violation: no guardians are required to acheive quorum")
assert.NotZero(t, num, "fuzz violation: no guardians are required to achieve quorum")

var floorFloat float64 = 0.66666666666666666
numGuardiansFloat := float64(numGuardians)
Expand Down
2 changes: 1 addition & 1 deletion testing/contract-integrations/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { clusterApiUrl } from "@solana/web3.js";
import { ethers } from "ethers";
import { getAddress } from "ethers/lib/utils";

//Devnet here means the locahost kubernetes environment used by the wormhole-foundation/wormhole official git repository.
//Devnet here means the localhost kubernetes environment used by the wormhole-foundation/wormhole official git repository.
//Testnet is the official Wormhole testnet
export type Environment = "devnet" | "testnet" | "mainnet";
export const CLUSTER: Environment = "devnet" as Environment; //This is the currently selected environment.
Expand Down
8 changes: 4 additions & 4 deletions whitepapers/0013_ccq.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The guardian will listen for requests on the `ccq_req` topic. When a request is

The initial release of CCQ will not support on chain requests.

Requests could be made on-chain from supported chains via a new cross-chain query contract. This contract could construct a payload representing the requestor and request, and publish it via the core bridge, generating a standard VAA. Guardians could have a pre-defined list of these emitters to treat as cross-chain query requests and process the requests accordingly.
Requests could be made on-chain from supported chains via a new cross-chain query contract. This contract could construct a payload representing the requester and request, and publish it via the core bridge, generating a standard VAA. Guardians could have a pre-defined list of these emitters to treat as cross-chain query requests and process the requests accordingly.

### Request Validation

Expand Down Expand Up @@ -100,7 +100,7 @@ Note that for `eth_call_with_finality` queries, the `finality` must be specified

#### Signature Verification

Requests messages MUST include a signature in the payload in order to distinguish between a requestor and (potentially, third-party) p2p relayer.
Requests messages MUST include a signature in the payload in order to distinguish between a requester and (potentially, third-party) p2p relayer.
That signature SHOULD be created using a separate key.

In order to differentiate signatures and prevent replay attacks of requests intended for devnet/testnet from mainnet ones, the following prefixes MUST be used when signing. These prefix strings are padded to 35-bytes to align with [Guardian Key Usage](0009_guardian_key.md) and existing code.
Expand Down Expand Up @@ -246,7 +246,7 @@ Currently the supported query types on EVM are `eth_call`, `eth_call_by_timestam
[]byte batch_call_data
```

Calls are batched to allow specifying multiple calls against the same block. These will be done in the same batch RPC call and are easier for the requestor to verify on chain.
Calls are batched to allow specifying multiple calls against the same block. These will be done in the same batch RPC call and are easier for the requester to verify on chain.

```go
[20]byte contract_address
Expand Down Expand Up @@ -479,7 +479,7 @@ The following are being done to reduce the denial of service threat surface:
- Only configured wallets can sign requests.
- Invalid requests are dropped without a gossip response.

Note that to prevent requests from creating undue load on guardians' RPC nodes, a mechanism may be needed to rate-limit or impose service fees upon requestors.
Note that to prevent requests from creating undue load on guardians' RPC nodes, a mechanism may be needed to rate-limit or impose service fees upon requesters.

## Replay Protection

Expand Down

0 comments on commit 2fc2bb5

Please sign in to comment.