hiero-ledger / hiero-ledger/hiero-consensus-node

CLPR: Hiero Native Connector Registration

Open
#23,962 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

This issue is for the introduction of the following elements in registering connectors:
1. The new protobuf related to representing connectors in state and associating them with ledgers.
2. The new transaction body related to registering connectors
3. The transaction handlers needed to handle the new transaction body.
4. The appropriate unit tests for all of the above.

**Connector Registration Transaction Body**:
1. The Initial Connector Admin Public Key
2. The signature on the local ledger's id verifiable with the connector admin public key.
* This is necessary to know that this registration transaction is targeting the intended ledger.
* This value is hashed by the local ledger to create the connector id on the local ledger.
4. The remote ledger's id
5. The remote connector id: the hash of the remote connector's signature on the remote ledger's id.
* The hash of the connector's signature on a ledger id becomes the connector id of that connector on that ledger. The hash produced uses the hashing algorithm of the ledger.
6. The signature on the pair (remote ledger id, remote connector id) that is verifiable with the connector's public key.
* This is used as a security feature to prevent squatting on connector ids by parties that do not manage or own the connector.

Transaction Handler: `ClprRegisterConnector`
* Verifies the registration transaction body
* Creates the pairing between connectors and ledgers in the state.

**Connector Pairing: Map In State**
**Key**: Connector Id (Hash of signature on ledger id)
**Value**: Pair(Ledger Id, Connector Id)

This pairing is bi-directional, meaning that if A -> (X, B) is an entry in the map, then B ->(Y, A) is in entry in the map in the state of both Y and X ledgers.

Once paired, a connector cannot be re-paired.

OUT OF SCOPE FOR THIS ISSUE:
1. Integrating with the native message queue layer
2. Additional payment and funding semantics with respect to registering new connectors.

Contributor guide

Open the contributing guide

Research direction

Start by locating the ClprRegisterConnector handler and the protobuf and transaction definitions for connector registration. Review how connector-and-ledger pairings are represented in state, then identify the relevant unit-test entry points. Done means the transaction is validated, the bidirectional pairing is stored, re-pairing is prevented, and tests cover these elements.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.