Skip to content

Commit 47eff1c

Browse files
authored
Merge pull request #2178 from o1-labs/boray/mega-typo-fix
Mega Typo Fix
2 parents f274fc0 + fc13cef commit 47eff1c

File tree

24 files changed

+39
-39
lines changed

24 files changed

+39
-39
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
5555
- New transaction construction API `new ZkappCommand()`. https://github.com/o1-labs/o1js/pull/2042
5656
- Bump up Rust version to 1.79.0. Bindings now depends on nightly-2024-06-13.
5757
https://github.com/o1-labs/o1js/pull/2063
58-
- `setVerificationKeyUnsafe` static method to `SmartContract` [#2091](httpts://github.com/o1-labs/o1js/pull/2091)
58+
- `setVerificationKeyUnsafe` static method to `SmartContract` [#2091](https://github.com/o1-labs/o1js/pull/2091)
5959
- `toBits()` and `fromBits()` methods added for `UInt32` and `UInt64` classes. https://github.com/o1-labs/o1js/pull/2099
6060
- **Provable BigInt** exposed through the `createProvableBigInt()` class factory https://github.com/o1-labs/o1js/pull/2008
6161

@@ -102,7 +102,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
102102
- Method for optional types to assert none https://github.com/o1-labs/o1js/pull/1922
103103
- Increased maximum supported amount of methods in a `SmartContract` or `ZkProgram` to 30. https://github.com/o1-labs/o1js/pull/1918
104104
- Expose low-level conversion methods `Proof.{_proofToBase64,_proofFromBase64}` https://github.com/o1-labs/o1js/pull/1928
105-
- Expore `maxProofsVerified()` and a `Proof` class directly on ZkPrograms https://github.com/o1-labs/o1js/pull/1933
105+
- Expose `maxProofsVerified()` and a `Proof` class directly on ZkPrograms https://github.com/o1-labs/o1js/pull/1933
106106

107107
### Changed
108108

@@ -277,7 +277,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
277277

278278
### Deprecated
279279

280-
- `MerkleMap.computeRootAndKey()` deprecated in favor of `MerkleMap.computeRootAndKeyV2()` due to a potential issue of computing hash collisions in key indicies https://github.com/o1-labs/o1js/pull/1694
280+
- `MerkleMap.computeRootAndKey()` deprecated in favor of `MerkleMap.computeRootAndKeyV2()` due to a potential issue of computing hash collisions in key indices https://github.com/o1-labs/o1js/pull/1694
281281

282282
## [1.3.1](https://github.com/o1-labs/o1js/compare/1ad7333e9e...40c597775) - 2024-06-11
283283

@@ -948,7 +948,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
948948
### Fixed
949949

950950
- Failing `Mina.transaction` on Berkeley because of unsatisfied constraints caused by dummy data before we fetched account state https://github.com/o1-labs/o1js/pull/807
951-
- Previously, you could work around this by calling `fetchAccount()` for every account invovled in a transaction. This is not necessary anymore.
951+
- Previously, you could work around this by calling `fetchAccount()` for every account involved in a transaction. This is not necessary anymore.
952952
- Update the zkApp verification key from within one of its own methods, via proof https://github.com/o1-labs/o1js/pull/812
953953

954954
## [0.9.4](https://github.com/o1-labs/o1js/compare/9acec55...21de489)

README-dev.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This will trigger our self-hosted runner to build the bindings for your commit a
6262

6363
Much like the mina repo, we use the nix registry to conveniently handle git submodules.
6464
You can enter the devshell with `./pin.sh` and `nix develop o1js#default` or by using
65-
direnv with the `.envrc` provided. This devshell provides all the dependencies required for npm scripts including `npm run:update-bindings`.
65+
direnv with the `.envrc` provided. This devshell provides all the dependencies required for npm scripts including `npm run build:update-bindings`.
6666

6767
## Building Bindings
6868

@@ -116,7 +116,7 @@ This can also be helpful when the bindings don't build identically, as unfortuna
116116

117117
To use this patch:
118118

119-
- Click details on the `Build o1js bindings / build-bindings-ubunutu` job
119+
- Click details on the `Build o1js bindings / build-bindings-ubuntu` job
120120
- Go to the `patch-upload` job and expand the logs for `Upload patch`
121121
- Download the file linked in the last line of the logs ie.
122122
`Artifact download URL: https://github.com/o1-labs/o1js/actions/runs/12401083741/artifacts/2339952965`
@@ -160,7 +160,7 @@ This repo uses minimal [oxlint](https://oxc.rs/docs/guide/usage/linter.html) and
160160

161161
1. Check for style violations by running the npm commands `npm run lint path/to/file` and `npm run format:check path/to/file`
162162

163-
- To attempt to fix all style violations in all changed filed, you can run:
163+
- To attempt to fix all style violations in all changed files, you can run:
164164
- `git diff --cached --name-only --diff-filter=d | grep -E '\.(ts|js)$' | xargs npm run format`
165165
- and `git diff --cached --name-only --diff-filter=d | grep -E '\.(ts|js)$' | xargs npm run lint:fix`
166166

@@ -170,7 +170,7 @@ This repo uses minimal [oxlint](https://oxc.rs/docs/guide/usage/linter.html) and
170170

171171
3. Enable pre-commit hooks
172172

173-
- There is an opt-in pre-commit hook avaibale that will attempt to fix styling for all diffed files. Enable it by running `git config husky.optin true`
173+
- There is an opt-in pre-commit hook available that will attempt to fix styling for all diffed files. Enable it by running `git config husky.optin true`
174174

175175
> [!NOTE]
176176
> You can opt-out of linting in a PR by tagging it with skip-lint, in case the linting script is legitimately blocking an important PR

README-nix.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ npm run build:update-bindings
9999
```
100100
101101
If you need to update the underlying `mina` code, you can also do so with Nix,
102-
but from the corresopnding subdirectory. In particular, you should build Mina
102+
but from the corresponding subdirectory. In particular, you should build Mina
103103
from the o1js subdirectory from a Nix shell. That means,
104104
105105
```console
@@ -118,14 +118,14 @@ Nix has a garbage collector that **is not used by default** after every run. Ins
118118
119119
Instead, you can try to run `nix-env --delete-generations old` or any other time bound like `7d`. This will not have any effect on MacOS though. Alternatively, the [direnv](https://github.com/direnv/direnv) / [nix-direnv](https://github.com/nix-community/nix-direnv) tool can create garbage collector roots that won't be collected for removal. It just keeps one gc-root to the latest build of the dev shell so that `nix-store --gc` only removes older generations.
120120
121-
On top of that, adding `auto-optimise-store = true` to `/etc/nix/nix.conf` and running `nix-store --optimize` shoud help with disk usage, as it replaces duplicated files with symlinks.
121+
On top of that, adding `auto-optimise-store = true` to `/etc/nix/nix.conf` and running `nix-store --optimize` should help with disk usage, as it replaces duplicated files with symlinks.
122122
123123
### Runtime optimization
124124
125125
Other configurations are worth adding into your `/etc/nix/nix.conf`:
126126
127127
```bash
128-
keep-otuputs = true
128+
keep-outputs = true
129129
max-jobs = 20
130130
extra-substituters = https://storage.googleapis.com/mina-nix-cache
131131
extra-trusted-public-keys = nix-cache.minaprotocol.org:fdcuDzmnM0Kbf7yU4yywBuUEJWClySc1WIF6t6Mm8h4= nix-cache.minaprotocol.org:D3B1W+V7ND1Fmfii8EhbAbF1JXoe2Ct4N34OKChwk2c= mina-nix-cache-1:djtioLfv2oxuK2lqPUgmZbf8bY8sK/BnYZCU2iU5Q10=

src/examples/crypto/foreign-field.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ assert(z instanceof SmallField.Unreduced);
3333
// note: "unreduced" doesn't usually mean that the underlying witness is larger than the modulus.
3434
// it just means we haven't _proved_ so.. which means a malicious prover _could_ have managed to make it larger.
3535

36-
// unreduced fields can be added and subtracted, but not be used in multiplcation:
36+
// unreduced fields can be added and subtracted, but not be used in multiplication:
3737

3838
z.add(1).sub(x).assertEquals(0); // works
3939

src/examples/zkapps/voting/membership.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class Membership_ extends SmartContract {
9494
// Preconditions: Restrict who can vote or who can be a candidate
9595

9696
// since we need to keep this contract "generic", we always assert within a range
97-
// even tho voters cant have a maximum balance, only candidates
97+
// even tho voters can't have a maximum balance, only candidates
9898
// but for a voter we simply use UInt64.MAXINT() as the maximum
9999

100100
let accountUpdate = AccountUpdate.create(member.publicKey);
@@ -123,7 +123,7 @@ export class Membership_ extends SmartContract {
123123
);
124124

125125
/*
126-
we cant really branch the control flow - we will always have to emit an event no matter what,
126+
we can't really branch the control flow - we will always have to emit an event no matter what,
127127
so we emit an empty event if the member already exists
128128
it the member doesn't exist, emit the "real" member
129129
*/

src/examples/zkapps/voting/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ export async function testSet(
503503
}
504504

505505
// the merkle roots of both membership contract should still be the initial ones because publish hasn't been invoked
506-
// therefor the state should not have changes
506+
// therefore the state should not have changes
507507
if (!candidateContract.committedMembers.get().equals(initialRoot).toBoolean()) {
508508
throw Error('candidate merkle root is not the initialroot');
509509
}

src/lib/mina/v1/account-update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ class AccountUpdate implements Types.AccountUpdate {
11291129
* This function acts as the `check()` method on an `AccountUpdate` that is sent to the Mina node as part of a transaction.
11301130
*
11311131
* Background: the Mina node performs most necessary validity checks on account updates, both in- and outside of circuits.
1132-
* To save constraints, we don't repeat these checks in zkApps in places where we can be sure the checked account udpates
1132+
* To save constraints, we don't repeat these checks in zkApps in places where we can be sure the checked account updates
11331133
* will be part of a transaction.
11341134
*
11351135
* However, there are a few checks skipped by the Mina node, that could cause vulnerabilities in zkApps if

src/lib/mina/v1/mina.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ function Network(
331331
},
332332
transaction(sender: FeePayerSpec, f: () => Promise<void>) {
333333
return toTransactionPromise(async () => {
334-
// TODO we run the transcation twice to be able to fetch data in between
334+
// TODO we run the transaction twice to be able to fetch data in between
335335
let tx = await createTransaction(sender, f, 0, {
336336
fetchMode: 'test',
337337
isFinalRunOutsideCircuit: false,

src/lib/mina/v1/state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function createState<T>(defaultValue?: T): InternalStateType<T> {
269269
if (this._contract === undefined)
270270
throw Error('get can only be called when the State is assigned to a SmartContract @state.');
271271
// inside the circuit, we have to cache variables, so there's only one unique variable per on-chain state.
272-
// if we'd return a fresh variable everytime, developers could easily end up linking just *one* of them to the precondition,
272+
// if we'd return a fresh variable every time, developers could easily end up linking just *one* of them to the precondition,
273273
// while using an unconstrained variable elsewhere, which would create a loophole in the proof.
274274
if (
275275
this._contract.cachedVariable !== undefined &&

src/lib/mina/v1/zkapp.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function wrapMethod(
192192
const { id, context } = SmartContractContext.enter(this, selfAccountUpdate(this, methodName));
193193
try {
194194
if (inCompile() || inProver() || inAnalyze()) {
195-
// important to run this with a fresh accountUpdate everytime, otherwise compile messes up our circuits
195+
// important to run this with a fresh accountUpdate every time, otherwise compile messes up our circuits
196196
// because it runs this multiple times
197197
let proverData = inProver() ? zkAppProver.getData() : undefined;
198198
let txId = Mina.currentTransaction.enter({
@@ -635,7 +635,7 @@ class SmartContract extends SmartContractBase {
635635
}
636636

637637
/**
638-
* Manually set the verificaiton key.
638+
* Manually set the verification key.
639639
*/
640640
static setVerificationKeyUnsafe(verificationKey: { data: string; hash: Field | string }) {
641641
SmartContract._verificationKey = {
@@ -776,7 +776,7 @@ super.init();
776776
let inTransaction = Mina.currentTransaction.has();
777777
let inSmartContract = smartContractContext.get();
778778
if (!inTransaction && !inSmartContract) {
779-
// TODO: it's inefficient to return a fresh account update everytime, would be better to return a constant "non-writable" account update,
779+
// TODO: it's inefficient to return a fresh account update every time, would be better to return a constant "non-writable" account update,
780780
// or even expose the .get() methods independently of any account update (they don't need one)
781781
return selfAccountUpdate(this);
782782
}

0 commit comments

Comments
 (0)