Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App structure: DNAs page #516

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open

App structure: DNAs page #516

wants to merge 36 commits into from

Conversation

pdaoust
Copy link
Collaborator

@pdaoust pdaoust commented Jan 21, 2025

All about DNAs. Closes #488. Depends on #512. Don't review until those are merged, cuz otherwise this PR will seem bigger than it really is.

@pdaoust pdaoust requested review from zippy, mattyg and matthme January 21, 2025 21:08
@pdaoust pdaoust force-pushed the feat/guide/app-structure-dnas branch from 005aa7c to 994c997 Compare January 21, 2025 21:33
Copy link
Contributor

@jost-s jost-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really long PR that includes much more than the issue is about. I suppose this is based off of another branch that addresses the other issues, so I haven't reviewed callbacks and zomes. I did review the DNA part and glossed over the relaxed ordering parts for entries. I haven't run the code examples.

The DNA part looks good to me with a few change requests.

src/pages/build/callbacks-and-lifecycle-hooks.md Outdated Show resolved Hide resolved
src/pages/build/dnas.md Outdated Show resolved Hide resolved
src/pages/build/dnas.md Outdated Show resolved Hide resolved
* `name`: A string for humans to read. This might get used in the admin panel of Holochain [conductors](/concepts/2_application_architecture/#conductor) like [Holochain Launcher](https://github.com/holochain/launcher) or [Moss](https://theweave.social/moss/).
* `integrity`: Contains all the integrity modifiers for the DNA, the things that **change the DNA hash**.
* `network_seed`: A string that serves only to change the DNA hash without affecting behavior. It acts like a network-wide passcode. {#network-seed}
* `properties`: Arbitrary, application-specific constants. The integrity code can access this, deserialize it, and change its runtime behavior. Think of it as configuration for the DNA.
Copy link
Contributor

@jost-s jost-s Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `properties`: Arbitrary, application-specific constants. The integrity code can access this, deserialize it, and change its runtime behavior. Think of it as configuration for the DNA.
* `properties`: Arbitrary, application-specific constants. The zome code can read this at runtime. Think of it as configuration for the DNA.

Copy link
Collaborator Author

@pdaoust pdaoust Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dna_info is in the hdi crate, so it's accessible to the validate and genesis_self_check functions. This lets you implement patterns like Progenitor. (But I hear you about coordinators being able to access it too; I'll add that.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay, so just "the zome code".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still says "the integrity code".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so weird; not the first time my edits have just vanished. Thanks for the heads-up.

src/pages/build/dnas.md Show resolved Hide resolved
src/pages/build/dnas.md Outdated Show resolved Hide resolved
src/pages/build/dnas.md Outdated Show resolved Hide resolved
src/pages/build/entries.md Show resolved Hide resolved
src/pages/build/entries.md Show resolved Hide resolved
src/pages/build/zome-functions.md Outdated Show resolved Hide resolved
jost-s
jost-s previously approved these changes Jan 30, 2025
* `name`: A string for humans to read. This might get used in the admin panel of Holochain [conductors](/concepts/2_application_architecture/#conductor) like [Holochain Launcher](https://github.com/holochain/launcher) or [Moss](https://theweave.social/moss/).
* `integrity`: Contains all the integrity modifiers for the DNA, the things that **change the DNA hash**.
* `network_seed`: A string that serves only to change the DNA hash without affecting behavior. It acts like a network-wide passcode. {#network-seed}
* `properties`: Arbitrary, application-specific constants. The integrity code can access this, deserialize it, and change its runtime behavior. Think of it as configuration for the DNA.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still says "the integrity code".

use movies_integrity::{EntryTypes, LinkTypes, Movie, Director};
```

!!! info Why do I need to specify the dependency twice?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, if that's a bug then fine.

this was supposed to already happen; got lost somehow

Co-authored-by: Jost <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App structure 2: DNA manifest and bundling
2 participants