❗❗❗ THIS PROJECT IS CURRENTLY UNDER DEVELOPMENT BY ROTKO NETWORKS ❗❗❗
An automated registrar service for Polkadot on-chain identities.
This service ("the challenger") is responsible for veryifing accounts and providing a HTTP and websocket API to the UI. The full list of features includes:
- Verification
- Display name
- Matrix
- API
- Websocket API for live notifications and state changes.
- Rest API for display name checks.
- Communication with the watcher
- Request pending judgement.
- Request active display names of other identities.
- Send judgement to the watcher to issue a judgement extrinsic.
- Manual judgements
- The registrar supports manual judgements via a Matrix bot.
On judgement request, the challenger generates challenges for each specified account (email, etc.) of the identity and expects those challenges to be sent to the registrar service by the user for verification. Display names are verified by matching those with the display names of already verified identities and deciding on a judgement based on a similarity ranking.
This service only verifies identities, but does not interact with the Kusama/Polkadot blockchain directly. Rather, it communicates with the watcher which is responsible for any blockchain interaction.
The UI can be found in the www/
directory, which is automatically built and deployed via Github Actions.
In order to submit manual judgements, admins can join a room with the Matrix account of the registrar service as specified in the config. Admins are specified as:
admins:
- '@admin1:matrix.org'
- '@admin2:matrix.org'
- '@admin3:matrix.org'
If there should not be any admins, then just set the value to admins: null
. Those specified admins have the permission to send Matrix messages to the bot in order to perform an action.
status <ADDR>
- Gets the (verbose) verification state.
E.g.
status 1a2YiGNu1UUhJtihq8961c7FZtWGQuWDVMWTNBKJdmpGhZP
verify <ADDR> [FIELD]...
- Manually verifies the provided field(s).- Supported fields:
legalname
,displayname
,email
,web
,twitter
,matrix
,all
.
- Supported fields:
E.g.
verify 1a2YiGNu1UUhJtihq8961c7FZtWGQuWDVMWTNBKJdmpGhZP displayname email
NOTE: The all
field, as the name implies, verifies the full identity and (re-)issues a judgement extrinsic.
help
- Displays a help message.
The application reads settings from config.yaml
. See the example configuration for details.
To build the binary:
$ apt-get update
$ apt-get -y install --no-install-recommends \
lld pkg-config openssl libssl-dev gcc g++ clang cmake
And to run the service:
$ cargo run --release --bin registrar
To build the UI (adjust any values in the config):
$ cd www/
$ cat config.json
{
"http_url": "https://registrar-backend.web3.foundation/api/check_display_name",
"ws_url": "wss://registrar-backend.web3.foundation/api/account_status"
}
$ yarn build # output in dist/
The unit test need a Mongodb instance with enabled replica set listening on
localhost:27017
:
mongod --replSet "rs0"
Make sure to initialize the replicaset in the mongo shell:
rs.initiate()
To run the tests, set a low thread threshold otherwise there might be some database connection timeouts which result in an error when all tests runs all at once.
cargo test -- --test-threads=3