Skip to content

Commit 414ea41

Browse files
committed
fix: CodeRabbit review
1 parent d0fcd4a commit 414ea41

File tree

7 files changed

+19
-15
lines changed

7 files changed

+19
-15
lines changed

.cspell/custom-words.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ NixOS
4949
nixpkgs
5050
pkgs
5151
POSIX
52+
prevalidate
53+
prevalidated
5254
prevalidates
55+
prevalidating
56+
prevalidation
5357
privkey
5458
pubkey
5559
QUIC

src/pages/build/identifiers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Here's an overview of the five types above, plus the two composite types:
3737
* `ExternalHash` is the ID of a resource that exists outside the database, such as the hash of an IPFS resource or the public key of an Ethereum wallet. Holochain doesn't care about its value, as long as it's 32 bytes long. There's no content stored at the address; it simply serves as an anchor to attach [links](/build/links-paths-and-anchors/) to.
3838
* Composite types --- if one of the types above is eligible, it can be converted into one of these two types via the `.into()` method. Functions that take the below types will implicitly convert from the above types.
3939
* `AnyDhtHash` is the hash of any kind of addressable content (actions, entries, and agent public keys). Any
40-
* `AnyLinkableHash` is the hash of anything that can be linked to or from (that is, all of the above, or `AnyDhtHash` + `ExternalHash`).
40+
* `AnyLinkableHash` is the hash of anything that can be linked to or from (that is, all of the above, or `AnyDhtHash` or `ExternalHash`).
4141

4242
## Getting hashes
4343

src/pages/build/must-get-host-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If a `must_get_*` function can't retrieve the data, it isn't considered a valida
1515
To get a single entry, use [`must_get_entry`](https://docs.rs/hdi/latest/hdi/entry/fn.must_get_entry.html). To get a single action, use [`must_get_action`](https://docs.rs/hdi/latest/hdi/entry/fn.must_get_action.html).
1616

1717
!!! info Results aren't guaranteed to be valid
18-
Neither of these functions verify that the retrieved data is valid. If you need this assurance, use an action hash as as a dependency's identifier and retrieve it with [`must_get_valid_record`](#must-get-valid-record).
18+
Neither of these functions verify that the retrieved data is valid. If you need this assurance, use an action hash as a dependency's identifier and retrieve it with [`must_get_valid_record`](#must-get-valid-record).
1919
!!!
2020

2121
This example validates a [movie loan acceptance](/build/identifiers/#in-dht-data), making sure that it's valid against the original loan offer.
@@ -105,7 +105,7 @@ pub fn validate_not_spamming_movies(action: Action) -> ExternResult<ValidateCall
105105
// The result is a vector of `RegisterAgentActivity`` DHT ops.
106106
// Let's convert it into a count of the movie creation actions written in
107107
// the last minute.
108-
let take_until_timestamp = action.timestamp().saturating_add(&Duration::new(60, 0));
108+
let lower_bound = action.timestamp().saturating_sub(&Duration::new(60, 0));
109109
let movie_entry_def = &EntryType::App(UnitEntryTypes::Movie.try_into()?);
110110
let movies_written_within_window = result
111111
.iter()

src/pages/concepts/4_dht.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Let's see what happens when a simple 'create entry' record is published to the D
169169

170170
No matter what operation they receive, all three authorities check the signature on it to make sure it hasn't been modified in transit and it belongs to the agent that claims to have authored it. If the signature check fails, the data is rejected.
171171

172-
After this first check, the authorities runs the data through the proper system and app-level **validation rules**, then sign the result and return it to the author as a **validation receipt**.
172+
After this first check, the authorities run the data through the proper system and app-level **validation rules**, then sign the result and return it to the author as a **validation receipt**.
173173

174174
If validation fails, the validator also generates a **warrant**, which is a signed proof that the author has broken a rule. They then publish this warrant to the agent activity authorities, who keep the warrant on file. Any peer who receives a warrant, either via gossip or by requesting invalid data, validates it against the data that's claimed to be invalid, then blocks network communications with the warranted author. This is what creates Holochain's immune system.
175175

src/pages/concepts/6_crud_actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ In the future Holochain might introduce 'purge' and 'withdraw' action types, whi
8080
* All data in the source chain and DHT is immutable once it's written. Nothing is ever deleted.
8181
* It's useful to be able to modify data, so Holochain offers delete and update actions that simulate mutability by adding status-changing metadata to existing data.
8282
* Because this may surprise users, developers have a responsibility to inform them of the permanence of data and protect them from negative consequences.
83-
* In the future we intend to introduce actions that request the actual deletion of data.
83+
* In the future we may introduce actions that request the actual deletion of data.
8484

8585

8686
!!! learn Learn more

src/pages/concepts/7_validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ Some reasons for ejecting an agent from a network simply shouldn't be encoded in
310310
* Validation supports intrinsic data integrity, which upholds the security of a Holochain app.
311311
* Validation rules can be written for an agent's entry into an application, the shape and content of data, rules for interaction, write permissions, and write throttling.
312312
* An author validates their own entries before committing them to their source chain or publishing them to the DHT.
313-
* Peers in the DHT subject all public data to validation before before storing. This validation uses the same rules that the author used at the time of commit.
313+
* Peers in the DHT subject all public data to validation before storing. This validation uses the same rules that the author used at the time of commit.
314314
* If all data upon which a validation depends can be retrieved, the result of a validation function is a clear yes/no result. It proves whether the author has hacked their software to produce invalid entries.
315315
* If some data dependencies can't be retrieved from the DHT, the conductor will fail with an 'unresolved dependencies' error and try again later.
316316
* If the validity of an operation depends on existing DHT data, a validating agent can generally trust in the existing validation results on those dependencies instead of having to revalidate them.

src/pages/resources/glossary.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ A [zome function](#zome-function) call made between [cells](#cell) in one [agent
124124
The act of packaging:
125125

126126
1. one or more [zomes](#zome) into a [DNA bundle](#dna-bundle),
127-
2. one or more DNA bundles into a [hApp bundle](#h-app-bundle), or
128-
3. a hApp bundle and a UI into a [web hApp](#web-h-app).
127+
2. one or more DNA bundles into a [hApp bundle](#happ-bundle), or
128+
3. a hApp bundle and a UI into a [web hApp](#web-happ).
129129

130130
#### Byzantine fault tolerance (BFT)
131131

@@ -257,7 +257,7 @@ An algorithm that governs the synchronization of data in a [distributed system](
257257

258258
#### Coordinator zome
259259

260-
A [zome](#zome) that defines [zome functions](#zome-function). Arbitrary public zome functions give a DNA [DNA](#dna) its API which mediates interactions between [clients](#client) and a [cell](#cell) instantiated from the DNA, while arbitrary private zome functions can be [scheduled](#scheduling), and special private zome functions with reserved names are called by the [conductor](#conductor) as a consequence of lifecycle events such as [cell initialization](#init-callback) and [source chain commits](#post-commit-callback). Zome functions in a coordinator zome have access to most of the [host API](#holochain-host-api), including the ability to:
260+
A [zome](#zome) that defines [zome functions](#zome-function). Arbitrary public zome functions give a [DNA](#dna) its API which mediates interactions between [clients](#client) and a [cell](#cell) instantiated from the DNA, while arbitrary private zome functions can be [scheduled](#scheduling), and special private zome functions with reserved names are called by the [conductor](#conductor) as a consequence of lifecycle events such as [cell initialization](#init-callback) and [source chain commits](#post-commit-callback). Zome functions in a coordinator zome have access to most of the [host API](#holochain-host-api), including the ability to:
261261

262262
* write to the [source chain](#source-chain) of the [agent](#agent) running the [cell](#cell) (with the exception of the post-commit callback),
263263
* read from the [source chain](#source-chain) of the agent running the cell, or from the [DHT](#distributed-hash-table-dht) that the cell belongs to,
@@ -463,13 +463,13 @@ A protocol used by many [peer-to-peer](#peer-to-peer) networks to rapidly propag
463463

464464
In Holochain terms, a [client](#client) that presents a visual way for a user to interact with a [hApp](#holochain-application-happ) running in their [conductor](#conductor). As with any client of a Holochain application, the GUI must possess a [capability](#capability) allowing them to call the hApp's public [zome functions](#zome-function).
465465

466-
#### hApp bundle
466+
#### hApp bundle {#happ-bundle}
467467

468-
One or more [DNAs](#dna), which together form the [back end](#back-end) for a complete [hApp](#holochain-application-happ). These components are specified in a [hApp manifest](#h-app-manifest) file, and can be packaged together in a zip archive along with the manifest or downloaded separately from the internet. A hApp can also be bundled with a web-based [GUI](#graphical-user-interface-gui) to become a [web hApp](#web-h-app).
468+
One or more [DNAs](#dna), which together form the [back end](#back-end) for a complete [hApp](#holochain-application-happ). These components are specified in a [hApp manifest](#happ-manifest) file, and can be packaged together in a zip archive along with the manifest or downloaded separately from the internet. A hApp can also be bundled with a web-based [GUI](#graphical-user-interface-gui) to become a [web hApp](#web-happ).
469469

470-
#### hApp manifest
470+
#### hApp manifest {#happ-manifest}
471471

472-
A file that specifies the DNAs comprising a [hApp bundle](#h-app-bundle).
472+
A file that specifies the DNAs comprising a [hApp bundle](#happ-bundle).
473473

474474
#### Hash
475475

@@ -497,7 +497,7 @@ Holochain's standard Rust-based software development kit (SDK) for [DNA](#dna) d
497497

498498
#### Holochain application (hApp) {#holochain-application-happ}
499499

500-
A collection of [DNAs](#dna) in a [hApp bundle](#h-app-bundle) and optionally a [client](#client) or clients that allow users to interact with those DNAs.
500+
A collection of [DNAs](#dna) in a [hApp bundle](#happ-bundle) and optionally a [client](#client) or clients that allow users to interact with those DNAs.
501501

502502
#### Holochain Core
503503

@@ -945,7 +945,7 @@ A warrant can be used by any peer as legitimate grounds for blocking communicati
945945

946946
A low-level program byte code format that can be run on almost any platform, including the web browser. Holochain expects [zomes](#zome) to be compiled to WebAssembly so the [ribosome](#ribosome) can execute them. See [WebAssembly website](https://webassembly.org/).
947947

948-
#### Web hApp
948+
#### Web hApp {#web-happ}
949949

950950
A [hApp](#holochain-application-happ) [bundled](#bundling) with a web-based UI.
951951

0 commit comments

Comments
 (0)