Adding new participants
Overview
This guide provides instructions for Subnet Operators on adding a new participant Privacy Ledger to a Rayls Private Subnet. The process involves registering the participant in the network governance system and ensuring secure communication with the Commit Chain.
Rayls Private Subnets are designed for financial institutions requiring a secure, private, and scalable blockchain infrastructure. Adding new participants allows institutions to expand the network, enabling more entities to securely interact while preserving privacy and complying with the subnet governance rules.
Pre-requisites
Ensure the following before adding a new participant Privacy Ledger:
- The Rayls Private Subnet must be fully deployed and functioning, with the required contracts already in place on the Commit Chain.
- A WSL or Linux-based system with Make installed.
- Have the following information available:
- Commit Chain Info:
COMMIT_CHAIN_URL
: RPC node URL of Commit ChainCOMMIT_CHAIN_ID
: Chain ID of Commit ChainPRIVATE_KEY_SYSTEM
: The private key used for the Commit Chain contract deployment, known to the Subnet Operator.PARTICIPANT_STORAGE_ADDRESS
: Address found in theParticipantStorageContract
orRELAYER_COMMITCHAIN_PARTICIPANTSTORAGECONTRACT
, provided by the Privacy Ledger owner.
- Participant PL To Be Added:
PARTICIPANT_CHAIN_ID
: The unique chain ID assigned to the participant’s Privacy Ledger.PARTICIPANT_NAME
: The name of the participant.PARTICIPANT_ROLE
: The role assigned to the participant in the network. There are three types of roles:- Participant (0): A standard role for entities that can transact within the subnet but do not have any special permissions.
- Issuer (1): A participant that can issue new tokens or digital assets within the subnet.
- Auditor (2): A role for entities that are responsible for reviewing and validating transactions, usually with read-only access to certain data for compliance purposes.
- Commit Chain Info:
Step-by-Step
Follow these steps to add a new participant Privacy Ledger to a Rayls Private Subnet:
1. Participant Configuration
Set the Variables:
Configure the environment variables based on the provided information:
# Commit Chain Info
export PRIVATE_KEY_SYSTEM=\<commit_chain_private_key>
export PARTICIPANT_STORAGE_ADDRESS=\<provided_storage_contract_address>
# Participant PL Info
export PARTICIPANT_CHAIN_ID=\<provided_chain_id>
export PARTICIPANT_NAME="Provided Participant Name"
export PARTICIPANT_ROLE=\<role_number>
2. Add the Participant Using Docker Compose
Update the Docker Compose Configuration:
Add a new service in the Docker Compose file to handle participant addition:
add-participant: image: registry.parfin.io/rayls-contracts:v1.8.6
command: ["addParticipant"]
environment:
- RPC_URL_NODE_CC= \<input Commit Chain's RPC node URL>
- NODE_CC_CHAIN_ID= \<input Commit Chain's chain id>
- PRIVATE_KEY_SYSTEM= \<input Commit Chain's private key>
- PARTICIPANT_STORAGE_ADDRESS= \<input Commit Chain's participant storage contract address>
- PARTICIPANT_CHAIN_ID= \<input participant's chain id>
- PARTICIPANT_NAME= \<input participant's name>
- PARTICIPANT_ROLE= \<choose role Issuer(0)| Participant(1)| Auditor(2)>
- PARTICIPANT_OWNER_ADDRESS= \<input participant's owner address>
Execute the Addition Command:
Run the following command to add the participant:
make add-participant
Confirm Success:
If successful, you will see the output: Participant Successfully added!
If the participant already exists, an error message will indicate: Participant already exists.
Here is an example of the error message:
code: 'CALL_EXCEPTION',
action: 'estimateGas',
data: '0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a5061727469636970616e7420616c726561647920657869737473000000000000',
reason: 'Participant already exists',
transaction: {
to: '0x6548DB08755D22537D731980F030E2707eC71c96',
data: '0x7b7dae1f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000186355c80000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001268656e72697175652d626163656e2d706f630000000000000000000000000000',
from: '0xf9260C378ea6E428A79EAfe443BD24EA09Af8Bc9'
},
invocation: null,
revert: {
signature: 'Error(string)',
name: 'Error',
args: [ 'Participant already exists' ]
},
shortMessage: 'execution reverted: "Participant already exists"',
info: {
error: {
code: -32000,
message: 'Execution reverted: Participant already exists',
data: '0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a5061727469636970616e7420616c726561647920657869737473000000000000'
},
payload: {
method: 'eth_estimateGas',
params: [Array],
id: 3,
jsonrpc: '2.0'
}
}
}
Updated about 2 months ago