vana
Advanced tools
| [ | ||
| { | ||
| "inputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "constructor" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "AccessControlBadConfirmation", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "account", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "internalType": "bytes32", | ||
| "name": "neededRole", | ||
| "type": "bytes32" | ||
| } | ||
| ], | ||
| "name": "AccessControlUnauthorizedAccount", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "EnforcedPause", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "ExpectedPause", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "HWRequirementNotMet", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "InvalidInitialization", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "MaxTimeoutExceeded", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "NoActiveTee", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "NotComputeEngine", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "NotInitializing", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "TeeAlreadyAdded", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "teeAddress", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "TeeNotActive", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": false, | ||
| "internalType": "enum IComputeEngineTeePool.HardwareType", | ||
| "name": "newHardwareType", | ||
| "type": "uint8" | ||
| } | ||
| ], | ||
| "name": "HardwareTypeUpdated", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": false, | ||
| "internalType": "uint64", | ||
| "name": "version", | ||
| "type": "uint64" | ||
| } | ||
| ], | ||
| "name": "Initialized", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": true, | ||
| "internalType": "uint256", | ||
| "name": "jobId", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "name": "JobRemoved", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": true, | ||
| "internalType": "uint256", | ||
| "name": "jobId", | ||
| "type": "uint256" | ||
| }, | ||
| { | ||
| "indexed": false, | ||
| "internalType": "address", | ||
| "name": "teeAddress", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "JobSubmitted", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": false, | ||
| "internalType": "address", | ||
| "name": "account", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "Paused", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": true, | ||
| "internalType": "bytes32", | ||
| "name": "role", | ||
| "type": "bytes32" | ||
| }, | ||
| { | ||
| "indexed": true, | ||
| "internalType": "bytes32", | ||
| "name": "previousAdminRole", | ||
| "type": "bytes32" | ||
| }, | ||
| { | ||
| "indexed": true, | ||
| "internalType": "bytes32", | ||
| "name": "newAdminRole", | ||
| "type": "bytes32" | ||
| } | ||
| ], | ||
| "name": "RoleAdminChanged", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": true, | ||
| "internalType": "bytes32", | ||
| "name": "role", | ||
| "type": "bytes32" | ||
| }, | ||
| { | ||
| "indexed": true, | ||
| "internalType": "address", | ||
| "name": "account", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "indexed": true, | ||
| "internalType": "address", | ||
| "name": "sender", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "RoleGranted", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": true, | ||
| "internalType": "bytes32", | ||
| "name": "role", | ||
| "type": "bytes32" | ||
| }, | ||
| { | ||
| "indexed": true, | ||
| "internalType": "address", | ||
| "name": "account", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "indexed": true, | ||
| "internalType": "address", | ||
| "name": "sender", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "RoleRevoked", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": true, | ||
| "internalType": "address", | ||
| "name": "teeAddress", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "indexed": false, | ||
| "internalType": "string", | ||
| "name": "url", | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "indexed": false, | ||
| "internalType": "string", | ||
| "name": "publicKey", | ||
| "type": "string" | ||
| } | ||
| ], | ||
| "name": "TeeAdded", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": false, | ||
| "internalType": "enum IComputeEngineTeePool.TeePoolType", | ||
| "name": "newTeePoolType", | ||
| "type": "uint8" | ||
| } | ||
| ], | ||
| "name": "TeePoolTypeUpdated", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": true, | ||
| "internalType": "address", | ||
| "name": "teeAddress", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "TeeRemoved", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "anonymous": false, | ||
| "inputs": [ | ||
| { | ||
| "indexed": false, | ||
| "internalType": "address", | ||
| "name": "account", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "Unpaused", | ||
| "type": "event" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "DEFAULT_ADMIN_ROLE", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "bytes32", | ||
| "name": "", | ||
| "type": "bytes32" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "MAINTAINER_ROLE", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "bytes32", | ||
| "name": "", | ||
| "type": "bytes32" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "activeTeeList", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "address[]", | ||
| "name": "", | ||
| "type": "address[]" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "index", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "name": "activeTeeListAt", | ||
| "outputs": [ | ||
| { | ||
| "components": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "teeAddress", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "internalType": "string", | ||
| "name": "url", | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "internalType": "enum IComputeEngineTeePool.TeeStatus", | ||
| "name": "status", | ||
| "type": "uint8" | ||
| }, | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "jobsCount", | ||
| "type": "uint256" | ||
| }, | ||
| { | ||
| "internalType": "string", | ||
| "name": "publicKey", | ||
| "type": "string" | ||
| } | ||
| ], | ||
| "internalType": "struct IComputeEngineTeePool.TeeInfo", | ||
| "name": "", | ||
| "type": "tuple" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "activeTeesCount", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "teeAddress", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "internalType": "bytes", | ||
| "name": "params", | ||
| "type": "bytes" | ||
| } | ||
| ], | ||
| "name": "addTee", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "computeEngine", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "bytes32", | ||
| "name": "role", | ||
| "type": "bytes32" | ||
| } | ||
| ], | ||
| "name": "getRoleAdmin", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "bytes32", | ||
| "name": "", | ||
| "type": "bytes32" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "bytes32", | ||
| "name": "role", | ||
| "type": "bytes32" | ||
| }, | ||
| { | ||
| "internalType": "address", | ||
| "name": "account", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "grantRole", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "hardwareType", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "enum IComputeEngineTeePool.HardwareType", | ||
| "name": "", | ||
| "type": "uint8" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "bytes32", | ||
| "name": "role", | ||
| "type": "bytes32" | ||
| }, | ||
| { | ||
| "internalType": "address", | ||
| "name": "account", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "hasRole", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "bool", | ||
| "name": "", | ||
| "type": "bool" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "ownerAddress", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "internalType": "address", | ||
| "name": "_computeEngine", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "internalType": "enum IComputeEngineTeePool.TeePoolType", | ||
| "name": "_teePoolType", | ||
| "type": "uint8" | ||
| }, | ||
| { | ||
| "internalType": "enum IComputeEngineTeePool.HardwareType", | ||
| "name": "_hardwareType", | ||
| "type": "uint8" | ||
| }, | ||
| { | ||
| "internalType": "uint80", | ||
| "name": "_maxTimeout", | ||
| "type": "uint80" | ||
| } | ||
| ], | ||
| "name": "initialize", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "teeAddress", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "isTee", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "bool", | ||
| "name": "", | ||
| "type": "bool" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "maxTimeout", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "uint80", | ||
| "name": "", | ||
| "type": "uint80" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "pause", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "paused", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "bool", | ||
| "name": "", | ||
| "type": "bool" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "jobId", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "name": "removeJob", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "teeAddress", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "removeTee", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "bytes32", | ||
| "name": "role", | ||
| "type": "bytes32" | ||
| }, | ||
| { | ||
| "internalType": "address", | ||
| "name": "callerConfirmation", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "renounceRole", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "bytes32", | ||
| "name": "role", | ||
| "type": "bytes32" | ||
| }, | ||
| { | ||
| "internalType": "address", | ||
| "name": "account", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "revokeRole", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "bytes", | ||
| "name": "params", | ||
| "type": "bytes" | ||
| } | ||
| ], | ||
| "name": "submitJob", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "bytes4", | ||
| "name": "interfaceId", | ||
| "type": "bytes4" | ||
| } | ||
| ], | ||
| "name": "supportsInterface", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "bool", | ||
| "name": "", | ||
| "type": "bool" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "teeList", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "address[]", | ||
| "name": "", | ||
| "type": "address[]" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "index", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "name": "teeListAt", | ||
| "outputs": [ | ||
| { | ||
| "components": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "teeAddress", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "internalType": "string", | ||
| "name": "url", | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "internalType": "enum IComputeEngineTeePool.TeeStatus", | ||
| "name": "status", | ||
| "type": "uint8" | ||
| }, | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "jobsCount", | ||
| "type": "uint256" | ||
| }, | ||
| { | ||
| "internalType": "string", | ||
| "name": "publicKey", | ||
| "type": "string" | ||
| } | ||
| ], | ||
| "internalType": "struct IComputeEngineTeePool.TeeInfo", | ||
| "name": "", | ||
| "type": "tuple" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "teePoolFactory", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "teePoolType", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "enum IComputeEngineTeePool.TeePoolType", | ||
| "name": "", | ||
| "type": "uint8" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "teeAddress", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "tees", | ||
| "outputs": [ | ||
| { | ||
| "components": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "teeAddress", | ||
| "type": "address" | ||
| }, | ||
| { | ||
| "internalType": "string", | ||
| "name": "url", | ||
| "type": "string" | ||
| }, | ||
| { | ||
| "internalType": "enum IComputeEngineTeePool.TeeStatus", | ||
| "name": "status", | ||
| "type": "uint8" | ||
| }, | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "jobsCount", | ||
| "type": "uint256" | ||
| }, | ||
| { | ||
| "internalType": "string", | ||
| "name": "publicKey", | ||
| "type": "string" | ||
| } | ||
| ], | ||
| "internalType": "struct IComputeEngineTeePool.TeeInfo", | ||
| "name": "", | ||
| "type": "tuple" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "teesCount", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "unpause", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "newComputeEngine", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "updateComputeEngine", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "enum IComputeEngineTeePool.HardwareType", | ||
| "name": "newHardwareType", | ||
| "type": "uint8" | ||
| } | ||
| ], | ||
| "name": "updateHardwareType", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "uint80", | ||
| "name": "newMaxTimeout", | ||
| "type": "uint80" | ||
| } | ||
| ], | ||
| "name": "updateMaxTimeout", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "address", | ||
| "name": "newTeePoolFactory", | ||
| "type": "address" | ||
| } | ||
| ], | ||
| "name": "updateTeePoolFactory", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "enum IComputeEngineTeePool.TeePoolType", | ||
| "name": "newTeePoolType", | ||
| "type": "uint8" | ||
| } | ||
| ], | ||
| "name": "updateTeePoolType", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [], | ||
| "name": "version", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "stateMutability": "pure", | ||
| "type": "function" | ||
| } | ||
| ] |
+1
-1
| Metadata-Version: 2.3 | ||
| Name: vana | ||
| Version: 0.45.0 | ||
| Version: 0.46.0 | ||
| Summary: | ||
@@ -5,0 +5,0 @@ Author: Tim Nunamaker |
+1
-1
| [tool.poetry] | ||
| name = "vana" | ||
| version = "0.45.0" | ||
| version = "0.46.0" | ||
| description = "" | ||
@@ -5,0 +5,0 @@ authors = ["Tim Nunamaker <tim@vana.com>", "Volodymyr Isai <volod@vana.com>", "Kahtaf Alam <kahtaf@vana.com>"] |
+1
-1
@@ -18,3 +18,3 @@ # The MIT License (MIT) | ||
| __version__ = "0.45.0" | ||
| __version__ = "0.47.0" | ||
@@ -21,0 +21,0 @@ import rich |
+163
-0
@@ -58,2 +58,7 @@ import argparse | ||
| help="""The address for the Data Refiner Registry Contract.""") | ||
| parser.add_argument( | ||
| "--" + prefix_str + "client.compute_engine_tee_pool_contract_address", | ||
| default=os.getenv("COMPUTE_ENGINE_TEE_POOL_CONTRACT_ADDRESS") or None, | ||
| type=str, | ||
| help="""The address for the Compute Engine TEE Pool (ie. ephemeral-standard, ...) Contract.""") | ||
| except argparse.ArgumentError: | ||
@@ -114,3 +119,58 @@ # re-parsing arguments. | ||
| ) | ||
| query_engine_contract_path = os.path.join( | ||
| os.path.dirname(__file__), | ||
| "contracts/QueryEngine.json" | ||
| ) | ||
| with open(query_engine_contract_path) as f: | ||
| query_engine_address = contracts[self.network]["QueryEngine"] | ||
| if hasattr(self.config, 'client') and self.config.client is not None: | ||
| query_engine_address = self.config.client.query_engine_contract_address or query_engine_address | ||
| self.query_engine_contract = self.chain_manager.web3.eth.contract( | ||
| address=query_engine_address, | ||
| abi=json.load(f) | ||
| ) | ||
| compute_engine_contract_path = os.path.join( | ||
| os.path.dirname(__file__), | ||
| "contracts/ComputeEngine.json" | ||
| ) | ||
| with open(compute_engine_contract_path) as f: | ||
| compute_engine_address = contracts[self.network]["ComputeEngine"] | ||
| if hasattr(self.config, 'client') and self.config.client is not None: | ||
| compute_engine_address = self.config.client.compute_engine_contract_address or compute_engine_address | ||
| self.compute_engine_contract = self.chain_manager.web3.eth.contract( | ||
| address=compute_engine_address, | ||
| abi=json.load(f) | ||
| ) | ||
| compute_instruction_registry_contract_path = os.path.join( | ||
| os.path.dirname(__file__), | ||
| "contracts/ComputeInstructionRegistry.json" | ||
| ) | ||
| with open(compute_instruction_registry_contract_path) as f: | ||
| compute_instruction_registry_address = contracts[self.network]["ComputeInstructionRegistry"] | ||
| if hasattr(self.config, 'client') and self.config.client is not None: | ||
| compute_instruction_registry_address = self.config.client.compute_instruction_registry_contract_address or compute_instruction_registry_address | ||
| self.compute_instruction_registry_contract = self.chain_manager.web3.eth.contract( | ||
| address=compute_instruction_registry_address, | ||
| abi=json.load(f) | ||
| ) | ||
| compute_engine_tee_pool_contract_path = os.path.join( | ||
| os.path.dirname(__file__), | ||
| "contracts/ComputeEngineTeePool.json" | ||
| ) | ||
| with open(compute_engine_tee_pool_contract_path) as f: | ||
| compute_engine_tee_pool_address = contracts[self.network]["ComputeEngineTeePool"] | ||
| if hasattr(self.config, 'client') and self.config.client is not None: | ||
| compute_engine_tee_pool_address = self.config.client.compute_engine_tee_pool_contract_address or compute_engine_tee_pool_address | ||
| self.compute_engine_tee_pool_contract = self.chain_manager.web3.eth.contract( | ||
| address=compute_engine_tee_pool_address, | ||
| abi=json.load(f) | ||
| ) | ||
| # Data Registry | ||
@@ -181,2 +241,90 @@ | ||
| # Query Engine | ||
| def get_dlp_pub_key(self, dlp_id: int) -> Optional[str]: | ||
| """ | ||
| Get the public key for a given DLP ID | ||
| :param dlp_id: DLP ID from the Query Engine | ||
| :return: Public key, or None if the DLP is not found | ||
| """ | ||
| try: | ||
| get_dlp_pub_key_fn = self.query_engine_contract.functions.dlpPubKeys(dlp_id) | ||
| pub_key = self.chain_manager.read_contract_fn(get_dlp_pub_key_fn) | ||
| return pub_key | ||
| except Exception as e: | ||
| vana.logging.error(f"Error getting DLP public key: {str(e)}") | ||
| return None | ||
| # Compute Engine | ||
| def get_job(self, job_id: int): | ||
| """ | ||
| Get the compute job information for a given job ID | ||
| :param job_id: Compute job ID from the Compute Engine | ||
| :return: Job information | ||
| """ | ||
| get_job_fn = self.compute_engine_contract.functions.jobs(job_id) | ||
| job = self.chain_manager.read_contract_fn(get_job_fn) | ||
| keys = ["owner_address", "max_timeout", "gpu_required", "status", "tee_address", "compute_instruction_id", "added_timestamp", "status_message", "tee_pool_address"] | ||
| return dict(zip(keys, job)) | ||
| def update_job_status(self, job_id: int, status: int, status_message: Optional[str] = ""): | ||
| """ | ||
| Update the compute job status in the Compute Engine contract. | ||
| :param job_id: Job ID for status update | ||
| :param job_status: New job status | ||
| :param status_message: Optional message for relevant status (ie. error details, ...) | ||
| :return: Transaction hex, Transaction receipt | ||
| """ | ||
| update_status_fn = self.compute_engine_contract.functions.updateJobStatus(job_id, status, status_message) | ||
| return self.chain_manager.send_transaction(update_status_fn, self.wallet.hotkey) | ||
| # Compute Instructions Registry | ||
| def get_compute_instruction(self, instruction_id: int): | ||
| """ | ||
| Get the compute instruction information for a given instruction ID | ||
| :param instruction_id: Compute instruction ID from the Compute Instructions Registry contract | ||
| :return: Compute instruction information | ||
| """ | ||
| get_instruction_fn = self.compute_instruction_registry_contract.functions.instructions(instruction_id) | ||
| instruction = self.chain_manager.read_contract_fn(get_instruction_fn) | ||
| keys = ["hash", "owner", "url"] | ||
| return dict(zip(keys, instruction)) | ||
| def is_instruction_approved(self, instruction_id: int, dlp_id: int): | ||
| """ | ||
| Get the compute instruction approval information for a given dlp ID from the Compute Instructions Registry contract | ||
| :param instruction_id: Compute instruction ID from the Compute Instructions Registry contract | ||
| :param dlp_id: DLP ID that the instruction might be approved for | ||
| :return: DLP approval (True / False) | ||
| """ | ||
| get_approval_fn = self.compute_instruction_registry_contract.functions.isApproved(instruction_id, dlp_id) | ||
| is_approved = self.chain_manager.read_contract_fn(get_approval_fn) | ||
| if is_approved is None: | ||
| return False | ||
| return is_approved | ||
| def add_compute_instruction(self, instruction_hash: bytes, url: str): | ||
| """ | ||
| Writes a new compute instruction to the Compute Instructions Registry contract | ||
| :param instruction_hash: The SHA256 checksum hash of the instruction image archive (as bytes) | ||
| :param url: Publicly accessible download URL of the instruction image archive (.tar.gz) | ||
| :return: Transaction hex, Transaction receipt | ||
| """ | ||
| add_instruction_fn = self.compute_engine_contract.functions.addComputeInstruction(instruction_hash, url) | ||
| return self.chain_manager.send_transaction(add_instruction_fn, self.wallet.hotkey) | ||
| def update_compute_instruction(self, instruction_id: int, dlp_id: int, approved: bool): | ||
| """ | ||
| Update DLP approval of a compute instruction in the Compute Instructions Registry contract | ||
| :param instruction_id: The SHA256 checksum hash of the instruction image archive (as bytes) | ||
| :param dlp_id: The DLP ID to update compute instruction execution approval for. | ||
| :param approved: Approval (True / False) of whether the instruction is allowed to be executed on the provided DLP's data. | ||
| :return: Transaction hex, Transaction receipt | ||
| """ | ||
| update_instruction_fn = self.compute_engine_contract.functions.updateComputeInstruction(instruction_id, dlp_id, approved) | ||
| return self.chain_manager.send_transaction(update_instruction_fn, self.wallet.hotkey) | ||
| # TEE Pool Contract | ||
@@ -270,1 +418,16 @@ | ||
| return 0 | ||
| # Compute Engine TEE Pool | ||
| def get_compute_engine_tee(self, address: str): | ||
| """ | ||
| Get the TEE information for a registered compute engine TEE in the configured Compute Engine TEE Pool contract | ||
| :param address: Address (hotkey) of TEE | ||
| :return: Transaction hex, Transaction receipt | ||
| """ | ||
| get_tee_fn = self.compute_engine_tee_pool_contract.functions.tees(address) | ||
| tee = self.chain_manager.read_contract_fn(get_tee_fn) | ||
| if tee is None: | ||
| return None | ||
| keys = ["tee_address", "url", "status", "jobs_count", "public_key"] | ||
| return dict(zip(keys, tee)) |
@@ -9,2 +9,3 @@ contracts = { | ||
| "ComputeEngine": "0xb2BFe33FA420c45F1Cf1287542ad81ae935447bd", | ||
| "ComputeEngineTeePool": "0xe124bae846D5ec157f75Bd9e68ca87C4d2AB835A", | ||
| "QueryEngine": "0xd25Eb66EA2452cf3238A2eC6C1FD1B7F5B320490", | ||
@@ -19,2 +20,3 @@ }, | ||
| "ComputeEngine": "0xb2BFe33FA420c45F1Cf1287542ad81ae935447bd", | ||
| "ComputeEngineTeePool": "0xe124bae846D5ec157f75Bd9e68ca87C4d2AB835A", | ||
| "QueryEngine": "0xd25Eb66EA2452cf3238A2eC6C1FD1B7F5B320490", | ||
@@ -29,2 +31,3 @@ }, | ||
| "ComputeEngine": "0xb2BFe33FA420c45F1Cf1287542ad81ae935447bd", | ||
| "ComputeEngineTeePool": "0xe124bae846D5ec157f75Bd9e68ca87C4d2AB835A", | ||
| "QueryEngine": "0xd25Eb66EA2452cf3238A2eC6C1FD1B7F5B320490", | ||
@@ -39,2 +42,3 @@ }, | ||
| "ComputeEngine": "0xb2BFe33FA420c45F1Cf1287542ad81ae935447bd", | ||
| "ComputeEngineTeePool": "0xe124bae846D5ec157f75Bd9e68ca87C4d2AB835A", | ||
| "QueryEngine": "0xd25Eb66EA2452cf3238A2eC6C1FD1B7F5B320490", | ||
@@ -49,4 +53,5 @@ }, | ||
| "ComputeEngine": "0xb2BFe33FA420c45F1Cf1287542ad81ae935447bd", | ||
| "ComputeEngineTeePool": "0xe124bae846D5ec157f75Bd9e68ca87C4d2AB835A", | ||
| "QueryEngine": "0xd25Eb66EA2452cf3238A2eC6C1FD1B7F5B320490", | ||
| }, | ||
| } |
@@ -56,2 +56,7 @@ [ | ||
| { | ||
| "inputs": [], | ||
| "name": "DlpNotFound", | ||
| "type": "error" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
@@ -643,2 +648,21 @@ { | ||
| "internalType": "uint256", | ||
| "name": "dlpId", | ||
| "type": "uint256" | ||
| } | ||
| ], | ||
| "name": "dlpPubKeys", | ||
| "outputs": [ | ||
| { | ||
| "internalType": "string", | ||
| "name": "pubKey", | ||
| "type": "string" | ||
| } | ||
| ], | ||
| "stateMutability": "view", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "refinerId", | ||
@@ -1046,2 +1070,20 @@ "type": "uint256" | ||
| "internalType": "uint256", | ||
| "name": "dlpId", | ||
| "type": "uint256" | ||
| }, | ||
| { | ||
| "internalType": "string", | ||
| "name": "pubKey", | ||
| "type": "string" | ||
| } | ||
| ], | ||
| "name": "updateDlpPubKey", | ||
| "outputs": [], | ||
| "stateMutability": "nonpayable", | ||
| "type": "function" | ||
| }, | ||
| { | ||
| "inputs": [ | ||
| { | ||
| "internalType": "uint256", | ||
| "name": "permissionId", | ||
@@ -1048,0 +1090,0 @@ "type": "uint256" |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
548382
6.28%47
2.17%16331
7.22%