Skip to content

Commit

Permalink
Register TEE: get public_key from argument (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
volod-vana authored Dec 5, 2024
1 parent babcfc4 commit f46ebae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "vana"
version = "0.35.0"
version = "0.36.0"
description = ""
authors = ["Tim Nunamaker <[email protected]>", "Volodymyr Isai <[email protected]>", "Kahtaf Alam <[email protected]>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion vana/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

__version__ = "0.35.0"
__version__ = "0.36.0"

import rich

Expand Down
7 changes: 5 additions & 2 deletions vana/commands/satya.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ def run(cli: "vana.cli"):
wallet = vana.Wallet(config=cli.config if cli.config.wallet else None)

tee_address = cli.config.get('tee_address', wallet.hotkey.address)
public_key = cli.config.get('public_key', wallet.get_hotkey_public_key())

tx_hash, tx_receipt = vana_client.register_tee(
url=cli.config.url,
public_key=wallet.get_hotkey_public_key(),
public_key=public_key,
tee_address=tee_address
)

Expand All @@ -65,7 +66,7 @@ def run(cli: "vana.cli"):
f"[bold green]Successfully registered validator node with:"
f"\n- URL: '{cli.config.url}'"
f"\n- TEE Address: '{tee_address}'"
f"\n- Public Key: '{wallet.get_hotkey_public_key()}'[/bold green]"
f"\n- Public Key: '{public_key}'[/bold green]"
)
vana.__console__.print(f"Transaction hash: {tx_hash.hex()}")
else:
Expand All @@ -88,6 +89,8 @@ def add_args(parser: argparse.ArgumentParser):
help="The network to use for registration.")
satya_parser.add_argument("--tee_address", type=str, required=False,
help="The hotkey address of the TEE node to register.")
satya_parser.add_argument("--public_key", type=str, required=False,
help="The public key of the TEE node to register.")

@staticmethod
def check_config(config: "vana.Config"):
Expand Down

0 comments on commit f46ebae

Please sign in to comment.