Skip to content

Commit

Permalink
Merge branch 'main' into feat/programs-section
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnymatthews committed Jan 6, 2025
2 parents 90ab40c + f9685f1 commit 23633cd
Show file tree
Hide file tree
Showing 15 changed files with 250 additions and 171 deletions.
23 changes: 11 additions & 12 deletions .github/ISSUE_TEMPLATE
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<!-- Before submitting an issue, please review the project documentation and search for existing issues. The more details you provide, the easier it will be to diagnose and address the issue. Remove this line before submitting your issue. -->
<!-- Describe the issue you're encountering in detail. -->

Describe the issue you're encountering in detail.
## Steps to reproduce

**Issue type**: (Select one)
<!-- Provide a step-by-step explanation of how to reproduce the issue, including the page or section URL (if relevant). -->

- [ ] Bug
- [ ] Question
- [ ] Improvement
## Error messages and/or screenshots

**Steps to reproduce**:
<!-- Include any relevant error messages, logs, or screenshots. -->

Provide a step-by-step explanation of how to reproduce the issue.
## Proposed solution (optional)

**Error messages**:
<!-- If you have ideas about how this might be fixed, share them here. -->

Include any relevant error messages, logs, or screenshots.
## Checklist

**Expected behavior**:
I confirm that I have:

What were you expecting to happen? This may seem like a silly question, but please be specific.
- [ ] Checked to see if there are any existing issue that cover this topic.
- [ ] Linked to any relevant issues across all [entropyxyz](https://github.com/entropyxyz/) repos.
24 changes: 24 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Fill out this template to help us review your pull request. Delete any comments once you are done. -->

## Description

<!-- Quickly describe the changes you made and why you made them. -->
<!-- Reference the issue/issues that this PR fixes. -->

<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- ALL PRs MUST CLOSE AN ISSUE. IF AN ISSUE DOES NOT EXIST, GO MAKE ONE. -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

### Content updates

<!-- List which pages or sections you have created/updated/deleted in this PR. -->

## Documentation updates

<!-- Have you changed how shortcodes work or how the docs site is rendered? Update the relevant info in this project's `README.md` and/or `CONTRIBUTING.md` files. -->

## Checklist:

- [ ] I have read and followed the `CONTRIBUTING.md` guidelines.
- [ ] I have run these changes through a grammar and spell checker.
- [ ] I have updated the documentation (`README.md`, `CONTRIBUTING.md` etc.) to reflect these changes.
65 changes: 65 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Welcome Contributors

We welcome contributions from developers of all experience levels. Whether you're a seasoned blockchain expert or a curious newcomer, your input is valuable to our project.

## Table of contents

- [Creating PRs](#creating-prs)
- [Writing the docs](#writing-the-docs)

## Creating PRs

Follow these steps to make a successful and impactful PR!

### Prerequisites

- Familiarize yourself with the docs project by reading the `README.md`.
- Ensure you have the necessary development tools installed.
- Set up a local development environment following the instructions in `README.md`. The Hugo static site generator is available for pretty much every modern OS.

### Fork the repository

1. Create a personal fork of this project on GitHub.
1. Clone your **forked** repository to your local machine.

### Create a branch

1. Create a new branch for your contribution.
1. Use a clear, descriptive branch name that reflects the purpose of your changes, like `feat/add-key-generation-method` or `update/signature-signing-error`

### Make Your Changes

1. Add or update documentation as needed.
1. Test your changes locally using Hugo to ensure the site renders correctly.

### Prepare your PR

1. Write clear, concise commit messages.
1. Describe _exactly_ what the commit does. For example: "Clarifies T of N signature verification method."
1. Run your markdown through a grammar and spell checker.
1. Ensure clarity and correctness of all written content.
1. If modifying technical documentation, verify technical accuracy.

### Submit a Pull Request

1. Push your changes to your fork.
1. Open a pull request against this repo.
1. Provide a clear description of your changes using the PR template provided (you'll see it when you make your PR).
1. Link all related issues. All PRs **must** close at least one existing issue.

### Code Review Process

1. All pull requests will undergo a thorough code review.
1. Reviewers will provide constructive feedback.
1. Be prepared to make modifications based on review comments.

## Writing the docs

You can find all the docs in the `/content` folder. This content directory is structured the same as the website. The only caveats:

1. The `docs.entropy.xyz` homepage is controlled by `./content/_index.md`.
1. Section indexes, like `docs.entropy.xyz/concepts`, are automatically generated by Hugo -- you do not need to directly edit the content of these pages. The content in the sub-pages controls the page snippets in these index pages. For example, the snippet for the **Quickstart** entry in `docs.entropy.xyz/basics` is generated from the `lead` variable within `./content/basics/quickstart.md`. If a `lead` variable does not exist, Hugo generates a snippet from the main content of a sub-page.

---

**Thanks for helping improve our docs!**
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ To submit a support ticket:
## Contribute
We appreciate contributions of any size from everyone, from fixing typos to proposing substantial rewrites to aid clarity. Simply make a PR with your edits, and a member of the Entropy devrel team will review everything.
We appreciate contributions of any size from everyone, from fixing typos to proposing substantial rewrites to aid clarity. Take a look at the [`CONTRIBUTING.md` doc for more details](./CONTRIBUTING.md) on how to help.
### Writing docs
Expand Down
35 changes: 22 additions & 13 deletions content/concepts/programs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,31 @@ title: "Programs"
lead: "The purpose of an Entropy program is to determine whether a group of nodes should generate a signature or not. Developers can create and deploy programs, but validator nodes are the only agents that will directly interact with the programs once deployed. Programs do not return any data other than a _success_ or _failed_ response."
---

## Quick summary

1. **What are Entropy Programs**: WebAssembly (WASM) components used by signing nodes to determine whether they should generate a signature and how to generate that signature.
1. **Who uses them**: validator nodes are the only agents directly interacting with deployed programs. However, Entropy Program developers will create, test, and deploy them. End-users do not directly interact with Entropy programs.
1. **What can they do**: define which accounts can generate specific signatures and the process by which those nodes generate the signatures. Programs can contain custom hashing functions to create arbitrary signatures.
1. **What they can't do**: return any data other than success/failure responses, call external chains, access external data, or access any non-deterministic data.

## Simple example

As a simple example, a program could be designed to check the length of a message. If the message is more than 10 characters, then the program returns `OK`, and the signing nodes create and return a valid signature to the account that submits the message. If the message is more than 10 characters, then the program fails, and no signature is created.

```mermaid
flowchart LR
A[Entropy account]
B{Length > 10}
C[Signing nodes]
D[Fail]
E[Success]
A --> | send message | B
B -- true --> E
E --> | generate signature | C
C --> | valid signature | A
B -- false --> D
A[Entropy account]
B{Length > 10}
C[Signing nodes]
D[Fail]
E[Success]
A --> | send message | B
B -- true --> E
E --> | generate signature | C
C --> | valid signature | A
B -- false --> D
```

{{< callout "info" >}}
Expand Down Expand Up @@ -78,7 +87,7 @@ The workflow is as follows:
- The signing key signs the transaction and becomes the deployer key
- A reference counter gets set to 0 when uploading and is used to track how many users are using a program
2. A program then gets stored in the Programs storage slot with the key being `H(bytecode + configuration_interface)`. The hash is used by a user to point to the programs they want applied to their key. Every time a program is referenced, the reference counter increments
3. Since the key is a hash, there is no editing programs (since that would change the hash)
3. Since the key is a hash, it is not possible to edit or modify programs (since that would change the hash).
4. Programs can be removed if the ref count is zero by the deploy key

## Device-proxy
Expand Down
Loading

0 comments on commit 23633cd

Please sign in to comment.