Skip to content

Implements HIP-1137 registered node support in the Python SDK.#2248

Merged
manishdait merged 50 commits into
hiero-ledger:mainfrom
danielmarv:hip-1137-br
May 17, 2026
Merged

Implements HIP-1137 registered node support in the Python SDK.#2248
manishdait merged 50 commits into
hiero-ledger:mainfrom
danielmarv:hip-1137-br

Conversation

@danielmarv

Copy link
Copy Markdown
Member

Description:

This pull request introduces support for HIP-1137 Registered Nodes and Registered Service Endpoints to the SDK, along with related enhancements to the address book and node creation APIs. The changes add new models for registered nodes and service endpoints, update the node creation transaction to associate registered nodes, and expose the new types at the package level. Additionally, the protobuf version is updated.

HIP-1137 Registered Node and Service Endpoint Support:

  • Added new models for HIP-1137 Registered Nodes (RegisteredNode) and a container (RegisteredNodeAddressBook), as well as a query skeleton for fetching registered nodes (RegisteredNodeAddressBookQuery). These provide read-side representations and a future query interface for registered nodes. [1] [2] [3]
  • Introduced a base model for registered service endpoints (RegisteredServiceEndpoint) and concrete subclasses for block node, mirror node, general service, and RPC relay endpoints. These models support serialization and deserialization to/from protobuf and enforce type and value constraints. [1] [2] [3] [4] [5] [6]

Node Creation Enhancements:

  • Updated NodeCreateTransaction to allow associating up to 20 registered node IDs with a node, including new methods for setting and adding associated registered nodes, and validation logic. [1] [2] [3]

SDK API Exposure:

  • Exposed all new registered node and service endpoint types, as well as the new node transaction types, at the package level in __init__.py and updated the public API list. [1] [2] [3]

Protobuf Version Update:

  • Bumped the protobuf version in generate_proto.py from v0.72.1 to v0.73.0 to ensure compatibility with new message types.

Related issue(s):

Fixes #1911

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

danielmarv added 10 commits May 6, 2026 21:21
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
@github-actions github-actions Bot added notes: HIP Adds a HIP scope: DLT involves engineering for distributed ledger technology skill: advanced requires knowledge of multiple areas in the codebase without defined steps to implement or examples labels May 6, 2026
@codacy-production

codacy-production Bot commented May 6, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 297 complexity

Metric Results
Complexity 297

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented May 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.39640% with 24 lines in your changes missing coverage. Please review.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2248      +/-   ##
==========================================
+ Coverage   93.80%   93.97%   +0.17%     
==========================================
  Files         151      163      +12     
  Lines        9744    10408     +664     
==========================================
+ Hits         9140     9781     +641     
- Misses        604      627      +23     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

danielmarv added 3 commits May 7, 2026 02:55
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

Hi, this is WorkflowBot.
Your pull request cannot be merged as it is not passing all our workflow checks.
Please click on each check to review the logs and resolve issues so all checks pass.
To help you:

danielmarv added 3 commits May 7, 2026 03:19
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
@danielmarv
danielmarv marked this pull request as ready for review May 7, 2026 01:11
@danielmarv
danielmarv requested review from a team as code owners May 7, 2026 01:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds HIP-1137 “Registered Nodes” support to the Hiero Python SDK by introducing new registered-node/service-endpoint models, new registered-node transactions, wiring them into transaction deserialization, and extending node create/update transactions to carry associated_registered_nodes. The PR also bumps the protobuf source version and adds unit/integration coverage around the new APIs.

Changes:

  • Add RegisteredNode*Transaction (create/update/delete) plus RegisteredServiceEndpoint subtype hierarchy and read-side registered-node models.
  • Extend NodeCreateTransaction / NodeUpdateTransaction with associated_registered_nodes (including three-state wrapper semantics for update).
  • Wire new transaction types into Transaction deserialization, expose new APIs at package level, and add unit/integration tests.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/registered_service_endpoint_test.py Unit tests for endpoint models and validation/round-trips.
tests/unit/registered_node_transaction_test.py Unit tests for registered node transactions, receipt field, and deserialization mapping.
tests/unit/registered_node_tck_aligned_test.py TCK-aligned scenario-style unit tests for registered node transactions.
tests/unit/registered_node_model_test.py Unit tests for RegisteredNode, address book container, and query skeleton behavior.
tests/unit/registered_node_hardening_test.py Additional validation/enum/export “hardening” tests for HIP-1137 additions.
tests/unit/associated_registered_nodes_test.py Unit tests for associated_registered_nodes behavior on node create/update.
tests/integration/registered_node_update_transaction_e2e_test.py E2E test coverage for registered node update flows on solo network.
tests/integration/registered_node_delete_transaction_e2e_test.py E2E test coverage for registered node delete flows on solo network.
tests/integration/registered_node_create_transaction_e2e_test.py E2E test coverage for registered node create flows on solo network.
tests/integration/associated_registered_nodes_e2e_test.py (Skipped) E2E scaffolding for associated-registered-nodes once supported on solo.
src/hiero_sdk_python/transaction/transaction.py Register registered-node txns in the body-field-name → class mapping.
src/hiero_sdk_python/transaction/transaction_receipt.py Add TransactionReceipt.registered_node_id accessor.
src/hiero_sdk_python/response_code.py Add HIP-1137-related response codes (and adjacent new codes from updated protos).
src/hiero_sdk_python/nodes/registered_node_create_transaction.py Implement registered node create transaction build/deserialize/execute wiring.
src/hiero_sdk_python/nodes/registered_node_update_transaction.py Implement registered node update transaction build/deserialize/execute wiring.
src/hiero_sdk_python/nodes/registered_node_delete_transaction.py Implement registered node delete transaction build/deserialize/execute wiring.
src/hiero_sdk_python/nodes/node_create_transaction.py Add associated_registered_nodes support to node create tx and deserialize it.
src/hiero_sdk_python/nodes/node_update_transaction.py Add three-state associated_registered_nodes wrapper support to node update tx and deserialize it.
src/hiero_sdk_python/address_book/registered_service_endpoint.py Introduce base registered service endpoint model + proto (de)serialization.
src/hiero_sdk_python/address_book/block_node_api.py Add BlockNodeApi enum aligned with protobuf numeric values.
src/hiero_sdk_python/address_book/block_node_service_endpoint.py Add block-node endpoint subtype with endpoint API list support.
src/hiero_sdk_python/address_book/mirror_node_service_endpoint.py Add mirror-node endpoint subtype.
src/hiero_sdk_python/address_book/rpc_relay_service_endpoint.py Add RPC-relay endpoint subtype.
src/hiero_sdk_python/address_book/general_service_endpoint.py Add general-service endpoint subtype supporting optional description.
src/hiero_sdk_python/address_book/registered_node.py Add immutable read-side RegisteredNode model with proto round-trip helpers.
src/hiero_sdk_python/address_book/registered_node_address_book.py Add SDK-side container for collections of registered nodes.
src/hiero_sdk_python/address_book/registered_node_address_book_query.py Add query skeleton that raises NotImplementedError until mirror API exists.
src/hiero_sdk_python/init.py Export new public types/transactions and update __all__.
generate_proto.py Bump protobuf source tag to v0.73.0.
examples/nodes/registered_node_lifecycle.py Add example showing create/update/delete lifecycle for registered nodes on solo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/hiero_sdk_python/address_book/registered_service_endpoint.py
Comment thread src/hiero_sdk_python/address_book/block_node_service_endpoint.py Outdated
Comment thread src/hiero_sdk_python/nodes/node_update_transaction.py
…ransaction classes with additional fields

Signed-off-by: Ntege Daniel <danientege785@gmail.com>
…ransaction classes with additional fields

Signed-off-by: Ntege Daniel <danientege785@gmail.com>
…ransaction classes with additional fields

Signed-off-by: Ntege Daniel <danientege785@gmail.com>

@aceppaluni aceppaluni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielmarv Can you update the branch when you have a moment?

Thank you!

…ransaction classes with additional fields

Signed-off-by: Ntege Daniel <danientege785@gmail.com>
…ransaction classes with additional fields

Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Comment thread src/hiero_sdk_python/address_book/registered_node.py Outdated
Comment thread tests/unit/associated_registered_nodes_test.py
Comment thread tests/unit/registered_node_hardening_test.py
Comment thread tests/unit/registered_node_hardening_test.py
Comment thread tests/unit/registered_node_transaction_test.py
Comment thread tests/unit/registered_service_endpoint_test.py
Comment thread src/hiero_sdk_python/address_book/registered_service_endpoint.py
Comment thread src/hiero_sdk_python/address_book/registered_service_endpoint.py Outdated
…validation in tests

Signed-off-by: Ntege Daniel <danientege785@gmail.com>

@manishdait manishdait left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielmarv, Just some small changes. and i think it is ready to go

Comment thread src/hiero_sdk_python/address_book/block_node_service_endpoint.py Outdated
Comment thread src/hiero_sdk_python/nodes/node_create_transaction.py
…validation in tests

Signed-off-by: Ntege Daniel <danientege785@gmail.com>
…validation in tests

Signed-off-by: Ntege Daniel <danientege785@gmail.com>
…validation in tests

Signed-off-by: Ntege Daniel <danientege785@gmail.com>

@manishdait manishdait left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, need second opinion @aceppaluni

@github-actions github-actions Bot added queue:committers PR awaiting committer technical review and removed queue:junior-committer PR awaiting initial quality review labels May 17, 2026

@aceppaluni aceppaluni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielmarv great work!!

@manishdait
manishdait merged commit 679e4a6 into hiero-ledger:main May 17, 2026
28 checks passed
@github-actions

Copy link
Copy Markdown

👋 Hi @danielmarv! Great work completing a Advanced issue! 🎉

Thanks for your contribution! 🚀

Here are some issues you might want to explore next:

🌟 Stay connected:

Happy coding! 🚀
— Hiero Python SDK Team

@manishdait manishdait added this to the v0.2.7 milestone May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes: HIP Adds a HIP open to community review PR is open for community review and feedback queue:committers PR awaiting committer technical review scope: DLT involves engineering for distributed ledger technology skill: advanced requires knowledge of multiple areas in the codebase without defined steps to implement or examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Advanced]: Implement HIP-1137 — Block Node discoverability via on-chain registry

4 participants