You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/lifecycle_of_a_transaction_technical.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Check out [transaction_payload.mli](../src/lib/coda_base/transaction_payload.mli
48
48
49
49
(TODO: @ihm can you correct any details I mess up here)
50
50
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).
52
52
53
53
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.
54
54
@@ -80,7 +80,7 @@ A transaction is valid if:
80
80
81
81
1. The signature is valid w.r.t. the public key of the sender
82
82
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
84
84
4. The [account nonce](#account-nonce) matches the nonce inside the transaction.
85
85
86
86
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.
120
120
121
121
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.
122
122
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.
124
124
125
125
<aname="main"></a>
126
126
## Main
@@ -194,10 +194,10 @@ A diff consists of
194
194
195
195
There are two primary operations in ledger builder.
196
196
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.
198
198
The diff is then included in the external transition and broadcasted to the network.
199
199
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.
0 commit comments