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

Fix links to API docs now that crate documentation is available on docs.rs #58

Merged
merged 1 commit into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/concepts/register.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 50

A user needs to register in order to be able to use the Entropy network to sign messages.

The SDK method for registering is [`Entropy.register`](https://entropy-api-docs.vercel.app/entropy-js/classes/core.default.html#register).
The SDK method for registering is [`Entropy.register`](https://github.com/entropyxyz/sdk/blob/main/README.md#register).

## The registering process

Expand All @@ -16,11 +16,11 @@ The SDK method for registering is [`Entropy.register`](https://entropy-api-docs.
* ```ProgramsData``` - Is multiple Programs Instances. Which contain the ```program_pointer``` (the hash of the program you want to use) and the ```program_config``` for that program. On the evaluation of a signature request a threshold server will run all the programs and pass through the program config for that program.

1. The chain selects which nodes should perform a [distributed key generation (DKG)](https://docs.rs/synedrion/latest/synedrion/sessions/fn.make_key_gen_session.html) based on the current block number.
1. As each block is finalized, an off-chain worker makes an HTTP POST request to each selected threshold server with the signature request accounts of all users who have registered, as well as details of the other validator nodes in the signing subgroup. Specifically, the `/user/new` ([src](https://github.com/entropyxyz/entropy-core/blob/master/crypto/server/src/user/api.rs) [API](https://docs-api-entropy-core.vercel.app/server/user/api/fn.new_user.html)) endpoint is called with a [`OcwMessage`](https://docs-api-entropy-core.vercel.app/entropy_shared/types/struct.OcwMessage.html).
1. As each block is finalized, an off-chain worker makes an HTTP POST request to each selected threshold server with the signature request accounts of all users who have registered, as well as details of the other validator nodes in the signing subgroup. Specifically, the `/user/new` ([src](https://github.com/entropyxyz/entropy-core/blob/master/crypto/server/src/user/api.rs) [API](https://docs.rs/entropy-tss/latest/entropy_tss/#usernew---post)) endpoint is called with a [`OcwMessageDkg`](https://docs.rs/entropy-shared/latest/entropy_shared/types/struct.OcwMessageDkg.html).
1. All selected threshold servers:
1. Connect to each other over websocket and make a [noise handshake](https://noiseprotocol.org/noise.html) to establish an encrypted channel for protocol messages.
1. Perform a [DKG](https://docs-api-synedrion.vercel.app/synedrion/sessions/fn.make_keygen_and_aux_session.html) and store their [key-share](https://docs-api-synedrion.vercel.app/synedrion/struct.KeyShare.html) in their [encrypted key-value store](https://docs-api-entropy-core.vercel.app/kvdb/index.html).
1. Send the generated share to other members of their signing subgroup by POSTing to `/user/receive_key` ([src](https://github.com/entropyxyz/entropy-core/blob/master/crates/threshold-signature-server/src/user/api.rs) [API](https://docs-api-entropy-core.vercel.app/server/user/api/fn.receive_key.html)).
1. Perform a [DKG](https://docs.rs/synedrion/latest/synedrion/sessions/fn.make_key_gen_session.html) and store their [key-share](https://docs.rs/synedrion/latest/synedrion/struct.KeyShare.html) in their [encrypted key-value store](https://docs.rs/entropy-kvdb).
1. Send the generated share to other members of their signing subgroup by POSTing to `/user/receive_key` ([src](https://github.com/entropyxyz/entropy-core/blob/master/crates/threshold-signature-server/src/user/api.rs) [API](https://docs.rs/entropy-tss/latest/entropy_tss/#for-other-instances-of-the-threshold-server)).
1. They submit a transaction to the entropy chain to confirm the user has successfully registered.
1. On receiving a key-share via `receive_key`, the threshold server will check with the chain that the sender is in the correct subgroup, and if so store the key-share in their key-value store.
1. On receiving a confirmation transaction from all selected threshold server, the chain sets the user to a 'registered' state, making it possible to sign messages.
18 changes: 9 additions & 9 deletions docs/concepts/validators.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you are interested in how to interact with the Entropy network, rather than h

![birdsEye](/img/birdsEye.png)

## The Entropy chain [src](https://github.com/entropyxyz/entropy-core) [API](https://docs-api-entropy-core.vercel.app/entropy)
## The Entropy chain [src](https://github.com/entropyxyz/entropy-core/tree/master/node/cli)

The purpose of the Entropy blockchain is to have a 'single source of truth' for the information which needs to be public and which the threshold signature servers need to have consensus on. For example, we need to have agreement of which validators belong to which signing subgroups, and which subgroups will participate in signing a particular message.

Expand All @@ -30,21 +30,21 @@ The purpose of the Entropy blockchain is to have a 'single source of truth' for

### Custom functionality specific to Entropy:

- **Staking extension pallet** [src](https://github.com/entropyxyz/entropy-core/blob/master/pallets/staking/src/lib.rs) [API](https://docs-api-entropy-core.vercel.app/pallet_staking_extension/index.html) - staking is extended to assign a particular Threshold Signature Servers account to a particular chain node, and tracks which signing subgroup they belong to.
- **Relayer pallet** [src](https://github.com/entropyxyz/entropy-core/blob/master/pallets/relayer/src/lib.rs) [API](https://docs-api-entropy-core.vercel.app/pallet_relayer/index.html) - This provides a registry of Entropy users, and which programs are currently associated with their account. This uses substrate [events](https://docs.substrate.io/build/events-and-errors).
- **Programs pallet** [src](https://github.com/entropyxyz/entropy-core/blob/master/pallets/programs/src/lib.rs) [API](https://docs-api-entropy-core.vercel.app/pallet_programs/index.html) - This stores program bytecode as well as metadata associated with the program such as a description of its interface and how many times it is used.
- **Free transactions pallet** [src](https://github.com/entropyxyz/entropy-core/tree/master/pallets/free-tx) [API](https://docs-api-entropy-core.vercel.app/pallet_free_tx/index.html) - free transactions are also known as 'zaps'.
- **Staking extension pallet** [src](https://github.com/entropyxyz/entropy-core/blob/master/pallets/staking/src/lib.rs) - staking is extended to assign a particular Threshold Signature Servers account to a particular chain node, and tracks which signing subgroup they belong to.
- **Registry pallet** [src](https://github.com/entropyxyz/entropy-core/blob/master/pallets/registry/src/lib.rs) - This provides a registry of Entropy users, and which programs are currently associated with their account. This uses substrate [events](https://docs.substrate.io/build/events-and-errors).
- **Programs pallet** [src](https://github.com/entropyxyz/entropy-core/blob/master/pallets/programs/src/lib.rs) - This stores program bytecode as well as metadata associated with the program such as a description of its interface and how many times it is used.
<!-- Missing from here are the `parameters`, `propagation`, `slashing` and `transaction-pause` pallets -->

## The Threshold Signature Server [src](https://github.com/entropyxyz/entropy-core/tree/master/crates/threshold-signature-server) [API](https://docs-api-entropy-core.vercel.app/entropy_tss/index.html)
## The Threshold Signature Server [src](https://github.com/entropyxyz/entropy-core/tree/master/crates/threshold-signature-server) [API](https://docs.rs/entropy-tss)

This is the part which carries out the threshold signing protocol, together with other instances of the threshold signature server. It has an encrypted key-value store used for private information where consensus is not required. Since the threshold signature server deals with private data which must never be exposed publicly on-chain, it is distributed as a separate binary. It also handles the distributed key generation and proactive-refresh protocols.

It has the following features:

- The **signing client** [src](https://github.com/entropyxyz/entropy-core/tree/master/crates/threshold-signature-server/src/signing_client) which handles listeners for the different protocol sessions. The protocol transport is handled by the **entropy-protocol** crate [src](https://github.com/entropyxyz/entropy-core/tree/master/crates/protocol) [API](https://docs-api-entropy-core.vercel.app/entropy_protocol/index.html) which run the [ThresholdSignaureScheme].
- An **encrypted key-value store** [src](https://github.com/entropyxyz/entropy-core/tree/master/crypto/kvdb) [API](https://docs-api-entropy-core.vercel.app/kvdb/index.html) for key shares and other secret data, which are submitted by the user. Built with [sled](https://docs.rs/sled/latest/sled).
- The **signing client** [src](https://github.com/entropyxyz/entropy-core/tree/master/crates/threshold-signature-server/src/signing_client) which handles listeners for the different protocol sessions. The protocol transport is handled by the **entropy-protocol** crate [src](https://github.com/entropyxyz/entropy-core/tree/master/crates/protocol) [API](https://docs.rs/entropy-protocol) which run the [ThresholdSignaureScheme].
- An **encrypted key-value store** [src](https://github.com/entropyxyz/entropy-core/tree/master/crypto/kvdb) [API](https://docs.rs/entropy-kvdb) for key shares and other secret data, which are submitted by the user. Built with [sled](https://docs.rs/sled/latest/sled).
- Executes [programs](./program-features) - upon which a decision is made as to whether to participate in signing a given message.
- An **[HTTP API](https://docs-api-entropy-core.vercel.app/entropy_tss)** for communication with users, with the entropy chain node, and with other threshold servers.
- An **[HTTP API](https://docs.rs/entropy-tss/latest/entropy_tss/#the-http-endpoints)** for communication with users, with the entropy chain node, and with other threshold servers.
- An account for submitting extrinsics (transactions) to the Entropy chain. For example, when the distributed key generation protocol runs successfully during user registration, each TSS server sends a confirmation to the chain by submitting a transaction.

### Usage
Expand Down