Skip to content

Import a context from a node into another one

Abram Symons edited this page Jan 12, 2021 · 7 revisions

To import a context from a node that currently hosts contextIds linked under that context into another node:

1) Set one time passcode

The admin of the node that currently hosts context should use brightid cli to set a one time passcode on the context to authorize the new node request for getting context info, and share this passcode with the admin of the new node.

$ sudo pip3 install brightidcli
$ brightid admin set-passcode --context <context> --passcode <passcode>
Done

2) Stop consensus_receiver

To ensure that the new node will not miss contextIds that are linked while importing context, its admin should stop consensus_receiver before importing the context.

$ cd BrightID-Node-docker
$ docker-compose stop consensus_receiver
Stopping brightid-node-docker_consensus_receiver_1 ... done

3) Import context

The admin of new node should use brightid cli to import the context into the node.

$ sudo pip3 install brightidcli
$ brightid admin import-context --context <context> --remote-node <remote-node-address> --passcode <passcode>
Checking if the consensus receiver is stopped ...
Getting data ...
Importing context ...
Done

4) Start consensus_receiver

consensus_receiver should be started after importing context using:

$ cd BrightID-Node-docker
$ docker-compose start consensus_receiver

Clone this wiki locally