Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added TCK support #53

Closed
wants to merge 2 commits into from
Closed

Added TCK support #53

wants to merge 2 commits into from

Conversation

LukeBair
Copy link
Contributor

@LukeBair LukeBair commented Feb 12, 2025

Overview

This pull request adds new scripts under root/tck/ to interface with Hiero’s TCK via a JSON RPC server and adds a new dependency: jsonrpcserver.

Added Files

  • Utils.py

    • Implements JSON RPC methods: setup, reset, and generateKey according to the TCK documentation for "Utility JSON RPC Methods".
    • These methods are designed to help configure the client, reset its state, and perform key generation tasks.
  • server.py

    • A simple JSON RPC server that searches imported files for methods decorated with @method and serves that method as an endpoint.
    • The server listens on the default port (8545), matching the standard JSON RPC server port.
  • key_identifier.py

    • Contains logic to identify the key type (ed25519/ECDSA and private/public) using existing methods from the PrivateKey/PublicKey classes.
    • Serves as a helper method for the TCK tests. This function could probably be merged into a more general helper class or file within the SDK at some point in the future.
  • account_create.py

    • This is a testing endpoint for the test-account-create-transaction.ts tests in the TCK.
    • This implementation is super incomplete and only covers part of the account creation tests, it's here for an example of how to implement other endpoints.

Impact and Next Steps

  • Current Test Coverage
    • Add endpoints for all remaining TCK tests to fully assess the SDK's compatibility, once all endpoints are implemented, these tests will help identify further fixes and additions are needed.
  • Address failing account creation tests

To run TCK tests

Go to the Hiero TCK repo, clone and setup as directed by its README.md

Make sure the .env variables supplied for the TCK and Python SDK are the same.
cd into the tck directory in the Python SDK and run: python3 server.py, then run a TCK test from a command line or IDE as directed by the TCK's README.

@LukeBair LukeBair marked this pull request as ready for review February 12, 2025 00:45
@LukeBair LukeBair closed this Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant