Skip to content

Commit 196e413

Browse files
ValarDragonbkase
authored andcommitted
Fix typos in docs (#1077)
This fixes a couple of minor typos.
1 parent 4dfcf86 commit 196e413

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/lifecycle_of_a_transaction_technical.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Check out [transaction_payload.mli](../src/lib/coda_base/transaction_payload.mli
4848

4949
(TODO: @ihm can you correct any details I mess up here)
5050

51-
We use [Schnorr signatures](https://en.wikipedia.org/wiki/Schnorr_signature). A [Schnorr signature](https://en.wikipedia.org/wiki/Schnorr_signature) is an element in a [group](https://en.wikipedia.org/wiki/Group_(mathematics). Our group is a point on an [eliptic curve](https://en.wikipedia.org/wiki/Elliptic_curve). So what is a signature? Open up [signature lib's checked.ml](../src/lib/signature_lib/checked.ml) and scroll to `module Signature` within `module type S`. It's a non-zero point on a curve, aka a pair of two `curve_scalar` values. To sign we give a [private key](#private-key) and a message, we can verify a signature on a message with a [public key](#public-key).
51+
We use [Schnorr signatures](https://en.wikipedia.org/wiki/Schnorr_signature). A [Schnorr signature](https://en.wikipedia.org/wiki/Schnorr_signature) is an element in a [group](https://en.wikipedia.org/wiki/Group_(mathematics). Our group is a point on an [elliptic curve](https://en.wikipedia.org/wiki/Elliptic_curve). So what is a signature? Open up [signature lib's checked.ml](../src/lib/signature_lib/checked.ml) and scroll to `module Signature` within `module type S`. It's a non-zero point on a curve, aka a pair of two `curve_scalar` values. To sign we give a [private key](#private-key) and a message, we can verify a signature on a message with a [public key](#public-key).
5252

5353
This is the first time we see heavily functored code, so see [functors](style_guide.md#functors) if you're confused. This is also the first time we see custom SNARK circuit logic, see [custom SNARK circuit logic](style_guide.md#snark-checked) for more.
5454

@@ -80,7 +80,7 @@ A transaction is valid if:
8080

8181
1. The signature is valid w.r.t. the public key of the sender
8282
2. The sender has enough balance to pay out the fee and the amount
83-
3. The reciever has enough room for the amount s.t. there won't be an overflow
83+
3. The receiver has enough room for the amount s.t. there won't be an overflow
8484
4. The [account nonce](#account-nonce) matches the nonce inside the transaction.
8585

8686
When we apply a transaction we also cons it onto the [receipt chain](#receipt-chain-hash), and increment the account nonce.
@@ -120,7 +120,7 @@ After a break, we'll be ready to dive into the daemon code.
120120

121121
The coda daemon is defined inline in [coda.ml](../src/app/cli/src/coda.ml). Search for the `daemon` function to see the CLI flags we use there. The daemon is optionally auto-started by the client if it doesn't already exist. We get configuration from a JSON configuration file (try first from `-f`, then from `$XDG_CONFIG_DIR/coda/daemon.json`, then from `/etc/coda/daemon.json`). We do a lot of setup here which leads up to invoking `Coda_main.Coda.Make` and then `Run`ing it. The details of those are described below.
122122

123-
When we have the `Run` modulle, we can make an instance of the coda daemon at the value level, and set up any background processes and services.
123+
When we have the `Run` module, we can make an instance of the coda daemon at the value level, and set up any background processes and services.
124124

125125
<a name="main"></a>
126126
## Main
@@ -194,10 +194,10 @@ A diff consists of
194194

195195
There are two primary operations in ledger builder.
196196
1. Creating a diff :
197-
To include a transaction from the transaction pool, the proposer needs to include snarks generated by its own snark-workers (or buy it from someone) which certifies some of the transactions added in previous blocks. The number of snarks needs to be twice the number of transaction being included in th block (an invariant of the aux data structure). These proofs are included in the diff along with the transactions and coinbase.
197+
To include a transaction from the transaction pool, the proposer needs to include snarks generated by its own snark-workers (or buy it from someone) which certifies some of the transactions added in previous blocks. The number of snarks needs to be twice the number of transaction being included in the block (an invariant of the aux data structure). These proofs are included in the diff along with the transactions and coinbase.
198198
The diff is then included in the external transition and broadcasted to the network.
199199

200-
2. Applying a diff: Diffs from the node itself (Internal transitions) or form the network (External transitions) are then used to update the ledger builder by applying the transactions to the ledger and updating the parallel scan state with the proofs. Applying a diff may produce a proof for a sequence of transactions that were included in the previous blocks.
200+
2. Applying a diff: Diffs from the node itself (Internal transitions) or from the network (External transitions) are then used to update the ledger builder by applying the transactions to the ledger and updating the parallel scan state with the proofs. Applying a diff may produce a proof for a sequence of transactions that were included in the previous blocks.
201201

202202
## Ledger
203203

src/lib/snarky/src/curves.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ module Make_weierstrass_checked
842842
let sigma_count = (n + 1) / 2 in
843843
(* = ceil (n / 2.0) *)
844844
(* We implement a complicated optimzation so that in total
845-
this costs roughly (1 + 3) * (n / 2) constaints, rather than
845+
this costs roughly (1 + 3) * (n / 2) constraints, rather than
846846
the naive 4*n + 3*n. If scalars were represented with some
847847
kind of signed digit representation we could probably get it
848848
down to 2 * (n / 3) + 3 * (n / 3).

0 commit comments

Comments
 (0)