From 1225fb390bc4920c378f5127e4b7ecfba801f602 Mon Sep 17 00:00:00 2001 From: agoltzman <106151463+agoltzman@users.noreply.github.com> Date: Sun, 2 Mar 2025 15:17:23 +0200 Subject: [PATCH] feat: add tron specs --- specs/mainnet-1/specs/tron.json | 387 ++++++++++++++++++++++++++++++++ 1 file changed, 387 insertions(+) create mode 100644 specs/mainnet-1/specs/tron.json diff --git a/specs/mainnet-1/specs/tron.json b/specs/mainnet-1/specs/tron.json new file mode 100644 index 0000000000..8db44a5b78 --- /dev/null +++ b/specs/mainnet-1/specs/tron.json @@ -0,0 +1,387 @@ +{ + "proposal": { + "title": "Add Specs: tron", + "description": "Adding new specification support for relaying tron data on Lava", + "specs": [ + { + "index": "TRX", + "name": "tron mainnet", + "enabled": true, + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 4, + "blocks_in_finalization_proof": 3, + "average_block_time": 3000, + "allowed_block_lag_for_qos_sync": 5, + "imports": [], + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "50000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "rest", + "internal_path": "", + "type": "GET", + "add_on": "" + }, + "apis": [ + { + "name": "/wallet/getnowblock", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getenergyprices", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getnodeinfo", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + } + ], + "verifications": [] + }, + { + "enabled": true, + "collection_data": { + "api_interface": "rest", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [ + { + "name": "/wallet/getaccount", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/triggerconstantcontract", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 1 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/gettransactioninfobyid", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getaccountresource", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/broadcasthex", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 1 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getnowblock", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/gettransactioninfobyblocknum", + "block_parsing": { + "parser_arg": [ + "0", + "num" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getblockbynum", + "block_parsing": { + "parser_arg": [ + "0", + "num" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [ + { + "function_tag": "GET_BLOCK_BY_NUM", + "function_template": "{\"num\":%d}", + "result_parsing": { + "parser_arg": [ + "0", + "blockID" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/wallet/getblockbynum" + }, + { + "function_template": "/wallet/getnowblock", + "function_tag": "GET_BLOCKNUM", + "result_parsing": { + "parser_arg": [ + "0", + "block_header", + "raw_data", + "number" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/wallet/getnowblock" + } + ], + "verifications": [ + { + "name": "chain-id", + "parse_directive": { + "function_template": "{\"num\":0}", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "0", + "blockID" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/wallet/getblockbynum" + }, + "values": [ + { + "expected_value": "00000000000000001ebf88508a03865c71d452e25f4d51194196a1d22b6653dc" + } + ] + } + + ], + "extensions": [] + } + ] + }, + { + "index": "TRXT", + "name": "tron shasta testnet", + "enabled": true, + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 4, + "blocks_in_finalization_proof": 3, + "average_block_time": 3000, + "allowed_block_lag_for_qos_sync": 5, + "imports": [ + "TRX" + ], + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "50000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "rest", + "internal_path": "", + "type": "GET", + "add_on": "" + }, + "apis": [] + }, + { + "enabled": true, + "collection_data": { + "api_interface": "rest", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [ + { + "function_tag": "GET_BLOCK_BY_NUM", + "function_template": "{\"num\":%d}", + "result_parsing": { + "parser_arg": [ + "0", + "blockID" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/wallet/getblockbynum" + }, + { + "function_template": "/wallet/getnowblock", + "function_tag": "GET_BLOCKNUM", + "result_parsing": { + "parser_arg": [ + "0", + "block_header", + "raw_data", + "number" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/wallet/getnowblock" + } + ], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0000000000000000de1aa88295e1fcf982742f773e0419c5a9c134c994a9059e" + } + ] + } + ], + "extensions": [] + } + ] + } + ] + }, + "deposit": "10000000ulava" +} \ No newline at end of file