Registering

Registering

A user needs to register in order to be able to use the Entropy network to sign messages. This page covers that process.

The SDK method for registering is Entropy.register.

The registering process

sequenceDiagram
    actor User
    participant Chain

    participant Validator Alice
    participant Validator Bob
    participant Validator Charlie
    participant Validator David

    box Subgroup 1
    participant Validator Alice
    participant Validator Bob
    end

    box Subgroup 2
    participant Validator Charlie
    participant Validator David
    end

    User ->> Chain: Informs chain of registration.

    Note over Chain: Selects validators for distributed-key-generation (DKG).
    Chain ->> Validator Alice: Sends user information.
    Chain ->> Validator Charlie: Sends user information.

    Note over Validator Alice, Validator Bob: Perform DKG.
    Note over Validator Charlie, Validator David: Perform DKG.
    Validator Alice ->> Validator Bob: Sends key-share to rest of subgroup.
    Validator Charlie ->> Validator David: Sends key-share to rest of subgroup.

    Validator Alice ->> Chain: Confirms user is registered.
    Validator Charlie ->> Chain: Confirms user is registered.
    Note over Chain: User now in a registered state.
  1. The user registers with the Entropy chain by submitting a transaction from the ‘signature request account’ containing the ‘Account Key’, and initial ‘ProgramsData’.

    • 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.
  2. The chain selects which nodes should perform a distributed key generation (DKG) based on the current block number.

  3. 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 API) endpoint is called with a OcwMessageDkg.

  4. All selected threshold servers:

    1. Connect to each other over websocket and make a noise handshake to establish an encrypted channel for protocol messages.
    2. Perform a DKG and store their key-share in their encrypted key-value store.
    3. Send the generated share to other members of their signing subgroup by POSTing to /user/receive_key (src API).
    4. They submit a transaction to the entropy chain to confirm the user has successfully registered.
  5. 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.

  6. 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.