Implements HIP-1137 registered node support in the Python SDK.#2248
Conversation
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>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 297 |
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 Report❌ Patch coverage is @@ 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:
|
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
|
Hi, this is WorkflowBot.
|
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
There was a problem hiding this comment.
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) plusRegisteredServiceEndpointsubtype hierarchy and read-side registered-node models. - Extend
NodeCreateTransaction/NodeUpdateTransactionwithassociated_registered_nodes(including three-state wrapper semantics for update). - Wire new transaction types into
Transactiondeserialization, 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.
…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
left a comment
There was a problem hiding this comment.
@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>
…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
left a comment
There was a problem hiding this comment.
@danielmarv, Just some small changes. and i think it is ready to go
…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
left a comment
There was a problem hiding this comment.
lgtm, need second opinion @aceppaluni
aceppaluni
left a comment
There was a problem hiding this comment.
@danielmarv great work!!
|
👋 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! 🚀 |
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:
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]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:
NodeCreateTransactionto 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:
__init__.pyand updated the public API list. [1] [2] [3]Protobuf Version Update:
generate_proto.pyfromv0.72.1tov0.73.0to ensure compatibility with new message types.Related issue(s):
Fixes #1911
Notes for reviewer:
Checklist