diff --git a/config/provider_examples/sonic_provider_with_addons.yml b/config/provider_examples/sonic_provider_with_addons.yml new file mode 100644 index 0000000000..4ec26a3e72 --- /dev/null +++ b/config/provider_examples/sonic_provider_with_addons.yml @@ -0,0 +1,15 @@ +endpoints: + - api-interface: jsonrpc + chain-id: SONIC + network-address: + address: "127.0.0.1:2221" + node-urls: + # Sonic public RPC with trace support + # Note: Public endpoints typically don't support debug APIs (too resource-intensive) + - url: https://rpc.soniclabs.com/ + addons: + - trace + # Sonic public WebSocket RPC with trace support + - url: wss://sonic-rpc.publicnode.com/ + addons: + - trace diff --git a/cookbook/projects/policy_sonic_with_addons.yml b/cookbook/projects/policy_sonic_with_addons.yml new file mode 100644 index 0000000000..e69689590e --- /dev/null +++ b/cookbook/projects/policy_sonic_with_addons.yml @@ -0,0 +1,36 @@ +# Policy configuration for Sonic with debug and trace add-on support +# +# Note: Debug add-on requires a dedicated/private RPC node with debug APIs enabled. +# Public RPC endpoints typically don't support debug APIs (too resource-intensive). +# The trace add-on works with most public Sonic RPC endpoints. +# +# selected_providers_mode: +# ALLOWED = 0; // no providers restrictions +# MIXED = 1; // use the selected providers mixed with randomly chosen providers +# EXCLUSIVE = 2; // use only the selected providers +# DISABLED = 3; // selected providers feature is disabled + +Policy: + geolocation_profile: 1 # USC + total_cu_limit: 9223372036854775807 + epoch_cu_limit: 9223372036854775807 + max_providers_to_pair: 9223372036854775807 + selected_providers_mode: ALLOWED + chain_policies: + - chain_id: SONIC + requirements: + - collection: + api_interface: "jsonrpc" + type: "POST" + add_on: "debug" + - collection: + api_interface: "jsonrpc" + type: "POST" + add_on: "trace" + - collection: + api_interface: "jsonrpc" + type: "POST" + extensions: + - "archive" + mixed: true + - chain_id: "*" # allows all other chains without specifying diff --git a/protocol/chainlib/chainproxy/rpcInterfaceMessages/grpcMessage_test.go b/protocol/chainlib/chainproxy/rpcInterfaceMessages/grpcMessage_test.go index 80ac54ea4f..df350ae3f1 100644 --- a/protocol/chainlib/chainproxy/rpcInterfaceMessages/grpcMessage_test.go +++ b/protocol/chainlib/chainproxy/rpcInterfaceMessages/grpcMessage_test.go @@ -33,6 +33,11 @@ func TestGRPCParseBlock(t *testing.T) { input: "0x26D", expected: 621, }, + { + name: "Ripple validated block param", + input: "validated", + expected: -6, + }, } for _, testCase := range testTable { diff --git a/protocol/chainlib/chainproxy/rpcInterfaceMessages/jsonRPCMessage_test.go b/protocol/chainlib/chainproxy/rpcInterfaceMessages/jsonRPCMessage_test.go index 2d45c32dd8..5a7ed59a16 100644 --- a/protocol/chainlib/chainproxy/rpcInterfaceMessages/jsonRPCMessage_test.go +++ b/protocol/chainlib/chainproxy/rpcInterfaceMessages/jsonRPCMessage_test.go @@ -74,6 +74,11 @@ func TestJsonrpcMessage_ParseBlock(t *testing.T) { input: "0x26D", expected: 621, }, + { + name: "Ripple validated block param", + input: "validated", + expected: -6, + }, } for _, testCase := range testTable { diff --git a/protocol/chainlib/chainproxy/rpcInterfaceMessages/restMessage_test.go b/protocol/chainlib/chainproxy/rpcInterfaceMessages/restMessage_test.go index d4869186a3..d41558a2fa 100644 --- a/protocol/chainlib/chainproxy/rpcInterfaceMessages/restMessage_test.go +++ b/protocol/chainlib/chainproxy/rpcInterfaceMessages/restMessage_test.go @@ -48,6 +48,11 @@ func TestRestParseBlock(t *testing.T) { input: "0x26D", expected: 621, }, + { + name: "Ripple validated block param", + input: "validated", + expected: -6, + }, } for _, testCase := range testTable { diff --git a/protocol/chainlib/chainproxy/rpcInterfaceMessages/tendermintRPCMessage_test.go b/protocol/chainlib/chainproxy/rpcInterfaceMessages/tendermintRPCMessage_test.go index 543973a24d..bb8be3f52c 100644 --- a/protocol/chainlib/chainproxy/rpcInterfaceMessages/tendermintRPCMessage_test.go +++ b/protocol/chainlib/chainproxy/rpcInterfaceMessages/tendermintRPCMessage_test.go @@ -56,6 +56,11 @@ func TestTendermintrpcMessage_ParseBlock(t *testing.T) { input: "0x26D", expected: 621, }, + { + name: "Ripple validated block param", + input: "validated", + expected: -6, + }, } for _, testCase := range testTable { diff --git a/protocol/chainlib/node_error_handler.go b/protocol/chainlib/node_error_handler.go index 775820efe2..fa4aca20ba 100644 --- a/protocol/chainlib/node_error_handler.go +++ b/protocol/chainlib/node_error_handler.go @@ -238,6 +238,20 @@ func (geh *genericErrorHandler) ValidateRequestAndResponseIds(nodeMessageID json if idErr != nil { return fmt.Errorf("failed parsing ID %s", idErr.Error()) } + + // Allow empty/missing response ID for non-standard JSON-RPC implementations (e.g., XRPL/Ripple) + // Some chains don't follow JSON-RPC 2.0 spec strictly and omit the ID field in responses + // + // TODO: In the future, add a spec-level parameter (e.g., in api_collection or as an add-on flag) + // to explicitly declare when a chain allows non-standard JSON-RPC responses. This validation + // function should check that parameter instead of auto-detecting missing IDs. + // Example: "allow_missing_response_id": true in the spec's collection_data + // Not implemented now because it requires a software upgrade on-chain (spec schema change) + // and governance approval to update existing specs. + if len(replyMsgID) == 0 || string(replyMsgID) == "null" || string(replyMsgID) == "[]" { + return nil // Skip ID validation when response has no ID + } + respId, idErr := rpcInterfaceMessages.IdFromRawMessage(replyMsgID) if idErr != nil { return fmt.Errorf("failed parsing ID %s", idErr.Error()) diff --git a/protocol/parser/parser.go b/protocol/parser/parser.go index 2df1a20083..ca9955f2e6 100644 --- a/protocol/parser/parser.go +++ b/protocol/parser/parser.go @@ -49,6 +49,9 @@ func ParseDefaultBlockParameter(block string) (int64, error) { return spectypes.SAFE_BLOCK, nil case "finalized": return spectypes.FINALIZED_BLOCK, nil + case "validated": + // Ripple uses "validated" for validated ledgers (similar to finalized) + return spectypes.FINALIZED_BLOCK, nil default: // try to parse a number } diff --git a/scripts/pre_setups/init_fantom_main.sh b/scripts/pre_setups/init_fantom_main.sh new file mode 100755 index 0000000000..a5694c3085 --- /dev/null +++ b/scripts/pre_setups/init_fantom_main.sh @@ -0,0 +1,67 @@ +#!/bin/bash +__dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +source "$__dir"/../useful_commands.sh +. "${__dir}"/../vars/variables.sh + +LOGS_DIR=${__dir}/../../testutil/debugging/logs +mkdir -p $LOGS_DIR +rm $LOGS_DIR/*.log + +killall screen +screen -wipe + +echo "[Test Setup] installing all binaries" +make install-all + +echo "[Test Setup] setting up a new lava node" +screen -d -m -S node bash -c "./scripts/start_env_dev.sh" +screen -ls +echo "[Test Setup] sleeping 20 seconds for node to finish setup (if its not enough increase timeout)" +sleep 5 +wait_for_lava_node_to_start + +GASPRICE="0.00002ulava" +# IMPORTANT: Ethereum MUST come before Fantom because Fantom imports ETH1 +# NOTE: Using fantom_mainnet_only.json to avoid circular dependency with testnet spec in same proposal +specs="specs/mainnet-1/specs/ibc.json,specs/mainnet-1/specs/cosmoswasm.json,specs/mainnet-1/specs/tendermint.json,specs/mainnet-1/specs/cosmossdk.json,specs/testnet-2/specs/lava.json,specs/mainnet-1/specs/ethereum.json,specs/mainnet-1/specs/stellar.json,specs/mainnet-1/specs/fantom.json" + +echo "[Test Setup] Submitting spec-add proposal..." +lavad tx gov submit-legacy-proposal spec-add $specs --lava-dev-test -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block +wait_next_block +echo "[Test Setup] Voting on spec proposal #1..." +lavad tx gov vote 1 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block + +# Plans proposal +echo "[Test Setup] Submitting plans-add proposal..." +lavad tx gov submit-legacy-proposal plans-add ./cookbook/plans/test_plans/default.json,./cookbook/plans/test_plans/temporary-add.json -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block +wait_next_block +echo "[Test Setup] Voting on plan proposal #2..." +lavad tx gov vote 2 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block + +sleep 4 + +CLIENTSTAKE="500000000000ulava" +PROVIDERSTAKE="500000000000ulava" + +PROVIDER1_LISTENER="127.0.0.1:2220" + +lavad tx subscription buy DefaultPlan $(lavad keys show user1 -a) -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block +lavad tx pairing stake-provider "FTM250" $PROVIDERSTAKE "$PROVIDER1_LISTENER,1,jsonrpc" 1 $(operator_address) -y --from servicer1 --provider-moniker "dummyMoniker" --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE + +sleep_until_next_epoch + +screen -d -m -S provider1 bash -c "source ~/.bashrc; lavap rpcprovider \ +$PROVIDER1_LISTENER FTM250 jsonrpc 'https://rpcapi.fantom.network/,wss://fantom.drpc.org' \ +$EXTRA_PROVIDER_FLAGS --geolocation 1 --log_level debug --from servicer1 --chain-id lava --metrics-listen-address ":7776" 2>&1 | tee $LOGS_DIR/PROVIDER1.log" && sleep 0.25 + +screen -d -m -S consumers bash -c "source ~/.bashrc; lavap rpcconsumer \ +127.0.0.1:3360 FTM250 jsonrpc \ +$EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 --chain-id lava --allow-insecure-provider-dialing --metrics-listen-address ":7779" 2>&1 | tee $LOGS_DIR/CONSUMERS.log" && sleep 0.25 + +echo "--- setting up screens done ---" +screen -ls \ No newline at end of file diff --git a/scripts/pre_setups/init_ripple_main.sh b/scripts/pre_setups/init_ripple_main.sh new file mode 100755 index 0000000000..d3fe9867da --- /dev/null +++ b/scripts/pre_setups/init_ripple_main.sh @@ -0,0 +1,141 @@ +#!/bin/bash +# init_stellar_main.sh - Setup Lava with Stellar provider using JSON-RPC interface +# This script tests the JSON-RPC parameters fix with Stellar using JSON-RPC protocol +# +# Purpose: Verify that the fix correctly omits params field for no-parameter JSON-RPC methods +# Expected: Stellar-RPC accepts requests from Lava provider with correct parameter format +# +# Usage: bash scripts/pre_setups/init_stellar_main.sh + +__dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +source "$__dir"/../useful_commands.sh +. "${__dir}"/../vars/variables.sh + +LOGS_DIR=${__dir}/../../testutil/debugging/logs +mkdir -p $LOGS_DIR +rm -f $LOGS_DIR/*.log + +killall screen +screen -wipe + +echo "[Test Setup] Installing binaries..." +make install-all + +echo "[Test Setup] Setting up a new lava node" +screen -d -m -S node bash -c "./scripts/start_env_dev.sh" +screen -ls +echo "[Test Setup] Waiting for node to finish setup..." +sleep 5 +wait_for_lava_node_to_start +echo "[Test Setup] Lava node started successfully" + +GASPRICE="0.00002ulava" + +echo "[Test Setup] Adding Stellar spec (with JSON-RPC support)..." +# Use only essential specs to avoid validation issues with uncommitted code changes +# Including: Lava chain spec + Cosmos base specs + Stellar +specs="specs/mainnet-1/specs/ibc.json,specs/mainnet-1/specs/cosmoswasm.json,specs/mainnet-1/specs/tendermint.json,specs/mainnet-1/specs/cosmossdk.json,specs/testnet-2/specs/lava.json,specs/mainnet-1/specs/stellar.json,specs/mainnet-1/specs/ripple.json" +echo "[Test Setup] Submitting spec-add proposal (Lava + Stellar specs)..." +lavad tx gov submit-legacy-proposal spec-add $specs --lava-dev-test -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to submit spec-add proposal" + exit 1 +fi +echo "[Test Setup] Spec proposal submitted successfully, waiting for blocks..." +wait_next_block +wait_next_block +echo "[Test Setup] Voting on spec proposal #1..." +lavad tx gov vote 1 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to vote on spec proposal" + exit 1 +fi +wait_next_block + +echo "[Test Setup] Adding default plan..." +lavad tx gov submit-legacy-proposal plans-add ./cookbook/plans/test_plans/default.json -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to submit plans-add proposal" + exit 1 +fi +wait_next_block +wait_next_block +echo "[Test Setup] Voting on plan proposal #2..." +lavad tx gov vote 2 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to vote on plan proposal" + exit 1 +fi + +sleep 4 + +CLIENTSTAKE="500000000000ulava" +PROVIDERSTAKE="500000000000ulava" + +PROVIDER1_LISTENER="127.0.0.1:2220" + +echo "[Test Setup] Setting up subscription and provider stake..." +lavad tx subscription buy DefaultPlan $(lavad keys show user1 -a) -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block + +lavad tx pairing stake-provider "XRP" $PROVIDERSTAKE "$PROVIDER1_LISTENER,1,jsonrpc" 1 $(operator_address) -y --from servicer1 --provider-moniker "Ripple-JSON-RPC-Provider" --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE + +sleep_until_next_epoch +wait_next_block + +echo "[Test Setup] Starting Ripple JSON-RPC Provider..." +echo " Using public Ripple JSON-RPC endpoint: https://ripple.drpc.org" +echo " Testing JSON-RPC interface (exercises the parameters fix)" +screen -d -m -S provider1 bash -c "source ~/.bashrc; lavap rpcprovider \ +$PROVIDER1_LISTENER XRP jsonrpc 'https://s2.ripple.com:51234/,wss://s1.ripple.com/' \ +$EXTRA_PROVIDER_FLAGS --geolocation 1 --log_level debug --from servicer1 2>&1 | tee $LOGS_DIR/PROVIDER1_RIPPLE_JSONRPC.log" && sleep 2 + +wait_next_block + +echo "[Test Setup] Starting Ripple Consumer..." +screen -d -m -S consumers bash -c "source ~/.bashrc; lavap rpcconsumer \ +127.0.0.1:3360 XRP jsonrpc \ +$EXTRA_PORTAL_FLAGS --geolocation 1 --log_level trace --from user1 --allow-insecure-provider-dialing 2>&1 | tee $LOGS_DIR/CONSUMERS_RIPPLE.log" && sleep 0.25 + +echo "" +echo "===================================================================" +echo "✅ Setup complete - Ripple JSON-RPC Test Environment Ready" +echo "===================================================================" +echo "" +echo "Active screens:" +screen -ls +echo "" +echo "Provider logs:" +echo " tail -f $LOGS_DIR/PROVIDER1_RIPPLE_JSONRPC.log" +echo "" +echo "Consumer logs:" +echo " tail -f $LOGS_DIR/CONSUMERS_RIPPLE.log" +echo "" +echo "Testing the JSON-RPC parameters fix:" +echo "======================================" +echo "" +echo "The fix is in the JSON-RPC layer (client.go:301):" +echo " - Converts nil params → passes nil (not [])" +echo " - omitempty tag omits 'params' field from JSON" +echo " - Ripple-RPC accepts requests without 'params' field" +echo "" +echo "Example test request (no parameters):" +echo " curl -X POST http://127.0.0.1:3360 \\" +echo " -H 'Content-Type: application/json' \\" +echo " -d '{\"jsonrpc\":\"2.0\",\"method\":\"getLatestLedger\",\"id\":1}'" +echo "" +echo "Success indicators:" +echo " ✅ Request succeeds (no 'params' related errors)" +echo " ✅ Provider shows successful relay" +echo " ✅ Ripple-RPC accepts the request" +echo " ✅ Logs show JSON-RPC requests handled correctly" +echo "" +echo "To monitor parameter handling:" +echo " - Check provider logs for JSON-RPC requests" +echo " - Requests should NOT have 'params' field (for no-param methods)" +echo " - OR should have 'params' exactly as sent by client" +echo " - Should NOT have 'params':null" +echo "" +echo "To stop everything:" +echo " killall screen" +echo "" diff --git a/scripts/pre_setups/init_sonic_main.sh b/scripts/pre_setups/init_sonic_main.sh new file mode 100755 index 0000000000..c209615c5c --- /dev/null +++ b/scripts/pre_setups/init_sonic_main.sh @@ -0,0 +1,62 @@ +#!/bin/bash +__dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +source "$__dir"/../useful_commands.sh +. "${__dir}"/../vars/variables.sh + +LOGS_DIR=${__dir}/../../testutil/debugging/logs +mkdir -p $LOGS_DIR +rm $LOGS_DIR/*.log + +killall screen +screen -wipe + +echo "[Test Setup] installing all binaries" +make install-all + + +echo "[Test Setup] setting up a new lava node" +screen -d -m -S node bash -c "./scripts/start_env_dev.sh" +screen -ls +echo "[Test Setup] sleeping 20 seconds for node to finish setup (if its not enough increase timeout)" +sleep 5 +wait_for_lava_node_to_start + +specs="specs/mainnet-1/specs/ibc.json,specs/mainnet-1/specs/cosmoswasm.json,specs/mainnet-1/specs/tendermint.json,specs/mainnet-1/specs/cosmossdk.json,specs/testnet-2/specs/lava.json,specs/mainnet-1/specs/ethereum.json,specs/mainnet-1/specs/sonic.json" +GASPRICE="0.00002ulava" +lavad tx gov submit-legacy-proposal spec-add $specs --lava-dev-test -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block +wait_next_block +lavad tx gov vote 1 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block + +lavad tx gov submit-legacy-proposal plans-add ./cookbook/plans/test_plans/default.json -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block +wait_next_block +lavad tx gov vote 2 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE + +sleep 4 + +CLIENTSTAKE="500000000000ulava" +PROVIDERSTAKE="500000000000ulava" + +PROVIDER1_LISTENER="127.0.0.1:2221" + +lavad tx subscription buy DefaultPlan $(lavad keys show user1 -a) -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block +lavad tx pairing stake-provider "SONIC" $PROVIDERSTAKE "$PROVIDER1_LISTENER,1" 1 $(operator_address) -y --from servicer1 --provider-moniker "dummyMoniker" --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE + +sleep_until_next_epoch +wait_next_block + +screen -d -m -S provider1 bash -c "source ~/.bashrc; lavap rpcprovider \ +$PROVIDER1_LISTENER SONIC jsonrpc 'https://rpc.soniclabs.com/,wss://sonic-rpc.publicnode.com/' \ +$EXTRA_PROVIDER_FLAGS --geolocation 1 --log_level debug --from servicer1 2>&1 | tee $LOGS_DIR/PROVIDER1.log" && sleep 0.25 + +wait_next_block + +screen -d -m -S consumers bash -c "source ~/.bashrc; lavap rpcconsumer \ +127.0.0.1:3360 SONIC jsonrpc \ +$EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 --allow-insecure-provider-dialing 2>&1 | tee $LOGS_DIR/CONSUMERS.log" && sleep 0.25 + +echo "--- setting up screens done ---" +screen -ls diff --git a/scripts/pre_setups/init_sonic_main_with_addons.sh b/scripts/pre_setups/init_sonic_main_with_addons.sh new file mode 100644 index 0000000000..e7a4efb407 --- /dev/null +++ b/scripts/pre_setups/init_sonic_main_with_addons.sh @@ -0,0 +1,186 @@ +#!/bin/bash +__dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +source "$__dir"/../useful_commands.sh +. "${__dir}"/../vars/variables.sh + +LOGS_DIR=${__dir}/../../testutil/debugging/logs +mkdir -p $LOGS_DIR +rm $LOGS_DIR/*.log + +killall screen +screen -wipe + +echo "[Test Setup] installing all binaries" +make install-all + + +echo "[Test Setup] setting up a new lava node" +screen -d -m -S node bash -c "./scripts/start_env_dev.sh" +screen -ls +echo "[Test Setup] sleeping 20 seconds for node to finish setup (if its not enough increase timeout)" +sleep 5 +wait_for_lava_node_to_start + +specs="specs/mainnet-1/specs/ibc.json,specs/mainnet-1/specs/cosmoswasm.json,specs/mainnet-1/specs/tendermint.json,specs/mainnet-1/specs/cosmossdk.json,specs/testnet-2/specs/lava.json,specs/mainnet-1/specs/ethereum.json,specs/mainnet-1/specs/sonic.json" +GASPRICE="0.00002ulava" +lavad tx gov submit-legacy-proposal spec-add $specs --lava-dev-test -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block +wait_next_block +lavad tx gov vote 1 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block + +lavad tx gov submit-legacy-proposal plans-add ./cookbook/plans/test_plans/default.json -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block +wait_next_block +lavad tx gov vote 2 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE + +sleep 4 + +CLIENTSTAKE="500000000000ulava" +PROVIDERSTAKE="500000000000ulava" + +PROVIDER1_LISTENER="127.0.0.1:2221" + +lavad tx subscription buy DefaultPlan $(lavad keys show user1 -a) -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block +# Stake provider with trace add-on only (public RPC endpoints don't support debug) +lavad tx pairing stake-provider "SONIC" $PROVIDERSTAKE "$PROVIDER1_LISTENER,1,trace" 1 $(operator_address) -y --from servicer1 --provider-moniker "dummyMoniker" --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE + +sleep_until_next_epoch +wait_next_block + +# Set project policy to allow trace add-on (and potentially debug if available) +echo "Setting project policy to allow trace and debug add-ons for SONIC" +lavad tx project set-policy $(lavad keys show user1 -a)-admin ./cookbook/projects/policy_sonic_with_addons.yml -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block +sleep_until_next_epoch + +screen -d -m -S provider1 bash -c "source ~/.bashrc; lavap rpcprovider \ +./config/provider_examples/sonic_provider_with_addons.yml \ +$EXTRA_PROVIDER_FLAGS --geolocation 1 --log_level debug --from servicer1 --chain-id lava --metrics-listen-address \":7776\" 2>&1 | tee $LOGS_DIR/PROVIDER1.log" && sleep 0.25 + +wait_next_block + +screen -d -m -S consumers bash -c "source ~/.bashrc; lavap rpcconsumer \ +127.0.0.1:3360 SONIC jsonrpc \ +$EXTRA_PORTAL_FLAGS --geolocation 1 --log_level debug --from user1 --allow-insecure-provider-dialing 2>&1 | tee $LOGS_DIR/CONSUMERS.log" && sleep 0.25 + +echo "--- setting up screens done ---" +screen -ls + +echo "" +echo "==============================================" +echo "Waiting for services to stabilize..." +echo "==============================================" +sleep 10 + +echo "" +echo "==============================================" +echo "Verifying Provider Configuration" +echo "==============================================" +echo "Checking provider logs for add-on configuration..." +if grep -q "Addons:trace" $LOGS_DIR/PROVIDER1.log; then + echo "✅ Provider correctly configured with trace add-on" + if grep -q "Addons:debug" $LOGS_DIR/PROVIDER1.log; then + echo "✅ Provider also has debug add-on available" + else + echo "ℹ️ Note: Debug add-on not available (requires private RPC node)" + fi +else + echo "⚠️ WARNING: Provider add-ons not detected in logs yet" + echo " This may cause add-on API calls to fail" + echo " Check PROVIDER1.log for 'Addons:' configuration" +fi + +echo "" +echo "Checking if provider staked with add-ons..." +lavad query pairing account-info --from servicer1 2>/dev/null | grep -A 20 "SONIC" || echo "Provider info query failed" + +echo "" +echo "==============================================" +echo "Testing Standard APIs (inherited from ETH1)" +echo "==============================================" + +echo "" +echo "Test 1: eth_blockNumber" +curl -s -X POST http://127.0.0.1:3360 \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' | jq + +echo "" +echo "Test 2: eth_chainId" +curl -s -X POST http://127.0.0.1:3360 \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' | jq + +echo "" +echo "==============================================" +echo "Testing TRACE Add-on (Sonic-specific + ETH1)" +echo "==============================================" + +echo "" +echo "Test 3: trace_block (Sonic-specific trace API)" +curl -s -X POST http://127.0.0.1:3360 \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"trace_block","params":["latest"],"id":1}' | jq -r '.error // .result | if type == "string" then . elif type == "array" then "✅ SUCCESS: Returned \(length) traces" else . end' + +echo "" +echo "Test 4: trace_transaction (Sonic-specific trace API)" +echo "(Note: This will fail if no recent transactions exist, which is expected)" +curl -s -X POST http://127.0.0.1:3360 \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"trace_transaction","params":["0x1234567890123456789012345678901234567890123456789012345678901234"],"id":1}' | jq -r '.error // .result // "No transaction found (expected)"' + +echo "" +echo "==============================================" +echo "Testing DEBUG Add-on (inherited from ETH1)" +echo "==============================================" +echo "ℹ️ Note: Debug add-on requires dedicated RPC node (not available on public endpoints)" +echo "" + +echo "" +echo "Test 5: debug_traceBlockByNumber (ETH1 debug API) - Expected to fail with public RPC" +curl -s -X POST http://127.0.0.1:3360 \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"debug_traceBlockByNumber","params":["latest",{"tracer":"callTracer"}],"id":1}' | jq -r '.error // .result | if type == "string" then if (. | contains("does not exist")) or (. | contains("not available")) then "⚠️ Expected: Debug APIs not available on public RPC" else . end elif type == "object" then "✅ SUCCESS: Debug trace returned" else . end' + +echo "" +echo "Test 6: debug_getRawHeader (ETH1 debug API) - Expected to fail with public RPC" +curl -s -X POST http://127.0.0.1:3360 \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"debug_getRawHeader","params":["latest"],"id":1}' | jq -r '.error // .result | if type == "string" then if (. | contains("does not exist")) or (. | contains("not available")) then "⚠️ Expected: Debug APIs not available on public RPC" elif startswith("0x") then "✅ SUCCESS: Raw header returned" else . end else . end' + +echo "" +echo "Test 7: debug_traceTransaction (ETH1 debug API) - Expected to fail with public RPC" +echo "(Note: This will fail if no recent transactions exist, which is expected)" +curl -s -X POST http://127.0.0.1:3360 \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0x1234567890123456789012345678901234567890123456789012345678901234",{"tracer":"callTracer"}],"id":1}' | jq -r '.error // .result // "No transaction found (expected)"' + +echo "" +echo "==============================================" +echo "Testing Archive Extension" +echo "==============================================" + +echo "" +echo "Test 8: eth_getBlockByNumber with old block (should trigger archive)" +curl -s -X POST http://127.0.0.1:3360 \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x1",false],"id":1}' | jq -r '.error // .result | if type == "object" then "✅ SUCCESS: Archive block retrieved" else . end' + +echo "" +echo "==============================================" +echo "Add-on Verification Tests Complete" +echo "==============================================" +echo "" +echo "Expected Results with Public RPC:" +echo " ✅ Standard APIs (eth_*) should work" +echo " ✅ Trace add-on should work (trace_block, trace_transaction, trace_filter)" +echo " ⚠️ Debug add-on expected to fail (requires dedicated RPC node with debug enabled)" +echo " ✅ Archive extension should work for old blocks" +echo "" +echo "Notes:" +echo " - Rate limiting from public RPC endpoints may cause some failures" +echo " - Debug APIs (debug_*) require a dedicated/private RPC node" +echo " - For production, use a dedicated node with debug APIs enabled" +echo "" diff --git a/scripts/pre_setups/init_stellar_main.sh b/scripts/pre_setups/init_stellar_main.sh index 1d607578a5..e27fac58c5 100755 --- a/scripts/pre_setups/init_stellar_main.sh +++ b/scripts/pre_setups/init_stellar_main.sh @@ -32,16 +32,40 @@ echo "[Test Setup] Lava node started successfully" GASPRICE="0.00002ulava" echo "[Test Setup] Adding Stellar spec (with JSON-RPC support)..." -specs=$(get_all_specs) -lavad tx gov submit-legacy-proposal spec-add $specs --lava-dev-test -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE & +# Use only essential specs to avoid validation issues with uncommitted code changes +# Including: Lava chain spec + Cosmos base specs + Stellar +specs="specs/mainnet-1/specs/ibc.json,specs/mainnet-1/specs/cosmoswasm.json,specs/mainnet-1/specs/tendermint.json,specs/mainnet-1/specs/cosmossdk.json,specs/testnet-2/specs/lava.json,specs/mainnet-1/specs/stellar.json" +echo "[Test Setup] Submitting spec-add proposal (Lava + Stellar specs)..." +lavad tx gov submit-legacy-proposal spec-add $specs --lava-dev-test -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to submit spec-add proposal" + exit 1 +fi +echo "[Test Setup] Spec proposal submitted successfully, waiting for blocks..." wait_next_block +wait_next_block +echo "[Test Setup] Voting on spec proposal #1..." lavad tx gov vote 1 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to vote on spec proposal" + exit 1 +fi wait_next_block echo "[Test Setup] Adding default plan..." lavad tx gov submit-legacy-proposal plans-add ./cookbook/plans/test_plans/default.json -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to submit plans-add proposal" + exit 1 +fi +wait_next_block wait_next_block +echo "[Test Setup] Voting on plan proposal #2..." lavad tx gov vote 2 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to vote on plan proposal" + exit 1 +fi sleep 4 @@ -57,19 +81,21 @@ wait_next_block lavad tx pairing stake-provider "XLM" $PROVIDERSTAKE "$PROVIDER1_LISTENER,1,jsonrpc,rest" 1 $(operator_address) -y --from servicer1 --provider-moniker "Stellar-JSON-RPC-Provider" --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE sleep_until_next_epoch +wait_next_block echo "[Test Setup] Starting Stellar JSON-RPC Provider..." -echo " Using public Stellar JSON-RPC endpoint: https://rpc.lightsail.network/" +echo " Using public Stellar JSON-RPC endpoint: https://stellar-mainnet.gateway.tatum.io/" echo " Testing JSON-RPC interface (exercises the parameters fix)" screen -d -m -S provider1 bash -c "source ~/.bashrc; lavap rpcprovider \ -$PROVIDER1_LISTENER XLM jsonrpc 'https://rpc.lightsail.network/' \ +$PROVIDER1_LISTENER XLM jsonrpc 'https://soroban-rpc.mainnet.stellar.gateway.fm' \ +$PROVIDER1_LISTENER XLM rest 'https://stellar-mainnet.gateway.tatum.io/' \ $EXTRA_PROVIDER_FLAGS --geolocation 1 --log_level debug --from servicer1 2>&1 | tee $LOGS_DIR/PROVIDER1_STELLAR_JSONRPC.log" && sleep 2 wait_next_block echo "[Test Setup] Starting Stellar Consumer..." screen -d -m -S consumers bash -c "source ~/.bashrc; lavap rpcconsumer \ -127.0.0.1:3360 XLM jsonrpc \ +127.0.0.1:3360 XLM jsonrpc 127.0.0.1:3361 XLM rest \ $EXTRA_PORTAL_FLAGS --geolocation 1 --log_level trace --from user1 --allow-insecure-provider-dialing 2>&1 | tee $LOGS_DIR/CONSUMERS_STELLAR.log" && sleep 0.25 echo "" diff --git a/scripts/pre_setups/init_tron_main.sh b/scripts/pre_setups/init_tron_main.sh new file mode 100755 index 0000000000..a0d581f44e --- /dev/null +++ b/scripts/pre_setups/init_tron_main.sh @@ -0,0 +1,174 @@ +#!/bin/bash +# init_tron_main.sh - Setup Lava with Tron provider using JSON-RPC interface +# This script tests the REST parameters fix with Tron using REST protocol +# +# Purpose: Verify that the fix correctly omits params field for no-parameter REST methods +# Expected: Tron-REST accepts requests from Lava provider with correct parameter format +# +# Usage: bash scripts/pre_setups/init_tron_main.sh + +__dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +source "$__dir"/../useful_commands.sh +. "${__dir}"/../vars/variables.sh + +LOGS_DIR=${__dir}/../../testutil/debugging/logs +mkdir -p $LOGS_DIR +rm -f $LOGS_DIR/*.log + +killall screen +screen -wipe + +echo "[Test Setup] Installing binaries..." +make install-all + +echo "[Test Setup] Setting up a new lava node" +screen -d -m -S node bash -c "./scripts/start_env_dev.sh" +screen -ls +echo "[Test Setup] Waiting for node to finish setup..." +sleep 5 +wait_for_lava_node_to_start +echo "[Test Setup] Lava node started successfully" + +GASPRICE="0.00002ulava" + +echo "[Test Setup] Adding Tron spec (with JSON-RPC support)..." +# Use only essential specs to avoid validation issues with uncommitted code changes +# Including: Lava chain spec + Cosmos base specs + Tron +specs="specs/mainnet-1/specs/ibc.json,specs/mainnet-1/specs/cosmoswasm.json,specs/mainnet-1/specs/tendermint.json,specs/mainnet-1/specs/cosmossdk.json,specs/testnet-2/specs/lava.json,specs/mainnet-1/specs/tron.json" +echo "[Test Setup] Submitting spec-add proposal (Lava + Tron specs)..." +lavad tx gov submit-legacy-proposal spec-add $specs --lava-dev-test -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to submit spec-add proposal" + exit 1 +fi +echo "[Test Setup] Spec proposal submitted successfully, waiting for blocks..." +wait_next_block +wait_next_block +echo "[Test Setup] Voting on spec proposal #1..." +lavad tx gov vote 1 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to vote on spec proposal" + exit 1 +fi +wait_next_block + +echo "[Test Setup] Adding default plan..." +lavad tx gov submit-legacy-proposal plans-add ./cookbook/plans/test_plans/default.json -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to submit plans-add proposal" + exit 1 +fi +wait_next_block +wait_next_block +echo "[Test Setup] Voting on plan proposal #2..." +lavad tx gov vote 2 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +if [ $? -ne 0 ]; then + echo "ERROR: Failed to vote on plan proposal" + exit 1 +fi + +sleep 4 + +CLIENTSTAKE="500000000000ulava" +PROVIDERSTAKE="500000000000ulava" + +PROVIDER1_LISTENER="127.0.0.1:2220" + +echo "[Test Setup] Setting up subscription and provider stake..." +lavad tx subscription buy DefaultPlan $(lavad keys show user1 -a) -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE +wait_next_block + +lavad tx pairing stake-provider "TRX" $PROVIDERSTAKE "$PROVIDER1_LISTENER,1,rest" 1 $(operator_address) -y --from servicer1 --provider-moniker "Tron-REST-Provider" --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE + +sleep_until_next_epoch +wait_next_block + +echo "[Test Setup] Starting Tron REST Provider..." +# Tron API Endpoint Selection (tested and verified) +# Default: Tatum Gateway (full API support, no API key, moderate rate limits) +# Preferred: Set TRONGRID_API_KEY for TronGrid (higher rate limits, passed via header) +# Custom: Set TRON_ENDPOINT environment variable + +if [ -n "$TRON_ENDPOINT" ]; then + echo " Using custom endpoint: $TRON_ENDPOINT" + screen -d -m -S provider1 bash -c "source ~/.bashrc; lavap rpcprovider \ +$PROVIDER1_LISTENER TRX rest '$TRON_ENDPOINT' \ +$EXTRA_PROVIDER_FLAGS --geolocation 1 --log_level debug --from servicer1 2>&1 | tee $LOGS_DIR/PROVIDER1_TRON_REST.log" && sleep 2 +elif [ -n "$TRONGRID_API_KEY" ]; then + echo " Using TronGrid with API key (via header)" + echo " Endpoint: https://api.trongrid.io" + # Create config file with API key header (correct YAML format) + cat > "$__dir"/../../tron_provider_config.yml <&1 | tee $LOGS_DIR/PROVIDER1_TRON_REST.log" && sleep 2 +else + TRON_ENDPOINT="https://tron-mainnet.gateway.tatum.io" + echo " Using Tatum Gateway (free, but has rate limits)" + echo " Endpoint: $TRON_ENDPOINT" + echo " Tip: For better rate limits, export TRONGRID_API_KEY=your-key" + screen -d -m -S provider1 bash -c "source ~/.bashrc; lavap rpcprovider \ +$PROVIDER1_LISTENER TRX rest '$TRON_ENDPOINT' \ +$EXTRA_PROVIDER_FLAGS --geolocation 1 --log_level debug --from servicer1 2>&1 | tee $LOGS_DIR/PROVIDER1_TRON_REST.log" && sleep 2 +fi + +wait_next_block + +echo "[Test Setup] Starting Tron Consumer..." +screen -d -m -S consumers bash -c "source ~/.bashrc; lavap rpcconsumer \ +127.0.0.1:3360 TRX rest \ +$EXTRA_PORTAL_FLAGS --geolocation 1 --log_level trace --from user1 --allow-insecure-provider-dialing 2>&1 | tee $LOGS_DIR/CONSUMERS_TRON.log" && sleep 0.25 + +echo "" +echo "===================================================================" +echo "✅ Setup complete - Tron REST Test Environment Ready" +echo "===================================================================" +echo "" +echo "Active screens:" +screen -ls +echo "" +echo "Provider logs:" +echo " tail -f $LOGS_DIR/PROVIDER1_TRON_REST.log" +echo "" +echo "Consumer logs:" +echo " tail -f $LOGS_DIR/CONSUMERS_TRON.log" +echo "" +echo "Testing the REST parameters fix:" +echo "======================================" +echo "" +echo "The fix is in the REST layer (client.go:301):" +echo " - Converts nil params → passes nil (not [])" +echo " - omitempty tag omits 'params' field from JSON" +echo " - Tron-REST accepts requests without 'params' field" +echo "" +echo "Example test request (no parameters):" +echo " curl -X POST http://127.0.0.1:3360 \\" +echo " -H 'Content-Type: application/json' \\" +echo " -d '{\"jsonrpc\":\"2.0\",\"method\":\"getLatestLedger\",\"id\":1}'" +echo "" +echo "Success indicators:" +echo " ✅ Request succeeds (no 'params' related errors)" +echo " ✅ Provider shows successful relay" +echo " ✅ Tron-REST accepts the request" +echo " ✅ Logs show REST requests handled correctly" +echo "" +echo "To monitor parameter handling:" +echo " - Check provider logs for REST requests" +echo " - Requests should NOT have 'params' field (for no-param methods)" +echo " - OR should have 'params' exactly as sent by client" +echo " - Should NOT have 'params':null" +echo "" +echo "To stop everything:" +echo " killall screen" +echo "" diff --git a/specs/mainnet-1/specs/arbitrum.json b/specs/mainnet-1/specs/arbitrum.json index e1788cfdec..1945af5723 100644 --- a/specs/mainnet-1/specs/arbitrum.json +++ b/specs/mainnet-1/specs/arbitrum.json @@ -14,7 +14,7 @@ "data_reliability_enabled": true, "block_distance_for_finalized_data": 1, "blocks_in_finalization_proof": 3, - "average_block_time": 500, + "average_block_time": 250, "allowed_block_lag_for_qos_sync": 20, "shares": 1, "min_stake_provider": { @@ -227,7 +227,7 @@ "data_reliability_enabled": true, "block_distance_for_finalized_data": 1, "blocks_in_finalization_proof": 3, - "average_block_time": 500, + "average_block_time": 250, "allowed_block_lag_for_qos_sync": 20, "shares": 1, "min_stake_provider": { @@ -271,7 +271,7 @@ "data_reliability_enabled": true, "block_distance_for_finalized_data": 1, "blocks_in_finalization_proof": 3, - "average_block_time": 500, + "average_block_time": 250, "allowed_block_lag_for_qos_sync": 20, "min_stake_provider": { "denom": "ulava", diff --git a/specs/mainnet-1/specs/bch.json b/specs/mainnet-1/specs/bch.json index 927476a64a..1286acab85 100644 --- a/specs/mainnet-1/specs/bch.json +++ b/specs/mainnet-1/specs/bch.json @@ -30,7 +30,314 @@ "type": "POST", "add_on": "" }, - "apis": [], + "apis": [ + { + "name": "getdsproof", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 1 + }, + "extra_compute_units": 0 + }, + { + "name": "getdsprooflist", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 2 + }, + "extra_compute_units": 0 + }, + { + "name": "getdsproofscore", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 1 + }, + "extra_compute_units": 0 + }, + { + "name": "finalizeblock", + "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, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_HASH" + } + ] + }, + { + "name": "getfinalizedblockhash", + "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": "parkblock", + "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, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_HASH" + } + ] + }, + { + "name": "unparkblock", + "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, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_HASH" + } + ] + }, + { + "name": "getexcessiveblock", + "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": "estimatefee", + "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": "getmempoolentry", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 1 + }, + "extra_compute_units": 0 + }, + { + "name": "getblocktemplate", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 2 + }, + "extra_compute_units": 0 + }, + { + "name": "getblocktemplatelight", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 2 + }, + "extra_compute_units": 0 + }, + { + "name": "submitblock", + "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": "submitblocklight", + "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": "getmininginfo", + "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": "getnetworkhashps", + "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 + } + ], "headers": [], "inheritance_apis": [], "parse_directives": [], @@ -102,5 +409,5 @@ } ] }, - "deposit": "10000000ulava" + "deposit": "10001000ulava" } \ No newline at end of file diff --git a/specs/mainnet-1/specs/btc.json b/specs/mainnet-1/specs/btc.json index 2bf90a5094..5447d23ed3 100644 --- a/specs/mainnet-1/specs/btc.json +++ b/specs/mainnet-1/specs/btc.json @@ -9,7 +9,7 @@ "enabled": true, "reliability_threshold": 268435455, "data_reliability_enabled": true, - "block_distance_for_finalized_data": 1, + "block_distance_for_finalized_data": 6, "blocks_in_finalization_proof": 1, "average_block_time": 600000, "allowed_block_lag_for_qos_sync": 1, @@ -34,8 +34,7 @@ "parser_arg": [ "0" ], - "parser_func": "PARSE_BY_ARG", - "default_value": "latest" + "parser_func": "PARSE_BY_ARG" }, "compute_units": 10, "enabled": true, @@ -57,11 +56,11 @@ "name": "getblock", "block_parsing": { "parser_arg": [ - "latest" + "0" ], - "parser_func": "DEFAULT" + "parser_func": "PARSE_BY_ARG" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -179,7 +178,7 @@ "enabled": true, "category": { "deterministic": true, - "local": false, + "local": true, "subscription": false, "stateful": 0 }, @@ -189,11 +188,11 @@ "name": "getblockheader", "block_parsing": { "parser_arg": [ - "latest" + "0" ], - "parser_func": "DEFAULT" + "parser_func": "PARSE_BY_ARG" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -213,11 +212,11 @@ "name": "getblockstats", "block_parsing": { "parser_arg": [ - "latest" + "0" ], - "parser_func": "DEFAULT" + "parser_func": "PARSE_BY_ARG" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -259,9 +258,9 @@ "name": "getchaintxstats", "block_parsing": { "parser_arg": [ - "latest" + "1" ], - "parser_func": "DEFAULT" + "parser_func": "PARSE_BY_ARG" }, "compute_units": 10, "enabled": true, @@ -285,7 +284,7 @@ "enabled": true, "category": { "deterministic": true, - "local": false, + "local": true, "subscription": false, "stateful": 0 }, @@ -321,7 +320,7 @@ "enabled": true, "category": { "deterministic": true, - "local": false, + "local": true, "subscription": false, "stateful": 0 }, @@ -339,7 +338,7 @@ "enabled": true, "category": { "deterministic": true, - "local": false, + "local": true, "subscription": false, "stateful": 0 }, @@ -353,11 +352,11 @@ ], "parser_func": "DEFAULT" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { - "deterministic": true, - "local": false, + "deterministic": false, + "local": true, "subscription": false, "stateful": 0 }, @@ -371,11 +370,11 @@ ], "parser_func": "DEFAULT" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { - "deterministic": true, - "local": false, + "deterministic": false, + "local": true, "subscription": false, "stateful": 0 }, @@ -392,8 +391,8 @@ "compute_units": 10, "enabled": true, "category": { - "deterministic": true, - "local": false, + "deterministic": false, + "local": true, "subscription": false, "stateful": 0 }, @@ -407,11 +406,11 @@ ], "parser_func": "DEFAULT" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { - "deterministic": true, - "local": false, + "deterministic": false, + "local": true, "subscription": false, "stateful": 0 }, @@ -421,9 +420,9 @@ "name": "getrawtransaction", "block_parsing": { "parser_arg": [ - "latest" + "2" ], - "parser_func": "DEFAULT" + "parser_func": "PARSE_BY_ARG" }, "compute_units": 10, "enabled": true, @@ -461,7 +460,8 @@ ], "parser_func": "DEFAULT" }, - "compute_units": 10, + "compute_units": 500, + "timeout_ms": 180000, "enabled": true, "category": { "deterministic": true, @@ -500,10 +500,11 @@ "compute_units": 10, "enabled": true, "category": { - "deterministic": true, + "deterministic": false, "local": false, "subscription": false, - "stateful": 0 + "stateful": 1, + "hanging_api": true }, "extra_compute_units": 0 }, @@ -518,10 +519,11 @@ "compute_units": 10, "enabled": true, "category": { - "deterministic": true, + "deterministic": false, "local": false, "subscription": false, - "stateful": 0 + "stateful": 1, + "hanging_api": true }, "extra_compute_units": 0 }, @@ -536,8 +538,8 @@ "compute_units": 10, "enabled": true, "category": { - "deterministic": true, - "local": false, + "deterministic": false, + "local": true, "subscription": false, "stateful": 0 }, @@ -641,10 +643,10 @@ ], "reliability_threshold": 268435455, "data_reliability_enabled": true, - "block_distance_for_finalized_data": 7, + "block_distance_for_finalized_data": 6, "blocks_in_finalization_proof": 3, - "average_block_time": 13000, - "allowed_block_lag_for_qos_sync": 2, + "average_block_time": 600000, + "allowed_block_lag_for_qos_sync": 1, "shares": 1, "min_stake_provider": { "denom": "ulava", @@ -678,5 +680,5 @@ } ] }, - "deposit": "10000000ulava" + "deposit": "10001000ulava" } \ No newline at end of file diff --git a/specs/mainnet-1/specs/fantom.json b/specs/mainnet-1/specs/fantom.json index 36c6888d94..c2141a738a 100644 --- a/specs/mainnet-1/specs/fantom.json +++ b/specs/mainnet-1/specs/fantom.json @@ -1,7 +1,7 @@ { "proposal": { "title": "Add Specs: Fantom", - "description": "Adding new specification support for relaying Fantom data on Lava", + "description": "Updated fantom spec for better relaying of fantom data", "specs": [ { "index": "FTM250", @@ -14,8 +14,8 @@ "data_reliability_enabled": true, "block_distance_for_finalized_data": 0, "blocks_in_finalization_proof": 1, - "average_block_time": 1500, - "allowed_block_lag_for_qos_sync": 7, + "average_block_time": 1000, + "allowed_block_lag_for_qos_sync": 10, "shares": 1, "min_stake_provider": { "denom": "ulava", @@ -32,7 +32,7 @@ }, "apis": [ { - "name": "ftm_accounts", + "name": "ftm_currentEpoch", "block_parsing": { "parser_arg": [ "latest" @@ -41,565 +41,6 @@ }, "compute_units": 10, "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_chainId", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 1, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_blockNumber", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_coinbase", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_syncing", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_subscribe", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_unsubscribe", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 19, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": true, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_feeHistory", - "block_parsing": { - "parser_arg": [ - "1" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 19, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_maxPriorityFeePerGas", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 21, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_newBlockFilter", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_newFilter", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_newPendingTransactionFilter", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_uninstallFilter", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_createAccessList", - "block_parsing": { - "parser_arg": [ - "0" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 16, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getTransactionReceipt", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getTransactionByBlockHashAndIndex", - "block_parsing": { - "parser_arg": [ - "0" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getTransactionByBlockNumberAndIndex", - "block_parsing": { - "parser_arg": [ - "1" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 19, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getBlockByNumber", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 75, - "enabled": false, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getBlockReceipts", - "block_parsing": { - "parser_arg": [ - "0" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getStorageAt", - "block_parsing": { - "parser_arg": [ - "0", - "toBlock" - ], - "parser_func": "PARSE_CANONICAL" - }, - "compute_units": 75, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getTransactionByHash", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 21, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_gasPrice", - "block_parsing": { - "parser_arg": [ - "2" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 17, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getBalance", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getCode", - "block_parsing": { - "parser_arg": [ - "0" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getFilterChanges", - "block_parsing": { - "parser_arg": [ - "1" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getFilterLogs", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 60, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getLogs", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 60, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getUncleByBlockHashAndIndex", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getUncleByBlockNumberAndIndex", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getUncleCountByBlockHash", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getUncleCountByBlockNumber", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_sign", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 17, - "enabled": true, "category": { "deterministic": true, "local": false, @@ -609,17 +50,17 @@ "extra_compute_units": 0 }, { - "name": "ftm_signTransaction", + "name": "dag_getHeads", "block_parsing": { "parser_arg": [ - "1" + "latest" ], - "parser_func": "PARSE_BY_ARG" + "parser_func": "DEFAULT" }, - "compute_units": 26, + "compute_units": 10, "enabled": true, "category": { - "deterministic": true, + "deterministic": false, "local": false, "subscription": false, "stateful": 0 @@ -627,14 +68,14 @@ "extra_compute_units": 0 }, { - "name": "ftm_sendTransaction", + "name": "dag_getEventPayload", "block_parsing": { "parser_arg": [ "" ], "parser_func": "EMPTY" }, - "compute_units": 15, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -645,7 +86,7 @@ "extra_compute_units": 0 }, { - "name": "ftm_getBlockTransactionCountByHash", + "name": "dag_getEvent", "block_parsing": { "parser_arg": [ "" @@ -654,60 +95,6 @@ }, "compute_units": 20, "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getBlockTransactionCountByNumber", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 250, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getProof", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getBlockByHash", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, "category": { "deterministic": true, "local": false, @@ -715,112 +102,104 @@ "stateful": 0 }, "extra_compute_units": 0 - }, + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [ { - "name": "ftm_getTransactionCount", - "block_parsing": { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}", + "function_tag": "GET_BLOCKNUM", + "result_parsing": { "parser_arg": [ - "" + "0" ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 + "parser_func": "PARSE_BY_ARG" }, - "extra_compute_units": 0 + "api_name": "eth_blockNumber" }, { - "name": "ftm_call", - "block_parsing": { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x%x\", false],\"id\":1}", + "function_tag": "GET_BLOCK_BY_NUM", + "result_parsing": { "parser_arg": [ - "" + "0", + "hash" ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 + "parser_func": "PARSE_CANONICAL", + "encoding": "hex" }, - "extra_compute_units": 0 + "api_name": "eth_getBlockByNumber" }, { - "name": "ftm_hashrate", - "block_parsing": { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"earliest\", false],\"id\":1}", + "function_tag": "GET_EARLIEST_BLOCK", + "result_parsing": { "parser_arg": [ - "" + "0", + "number" ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 + "parser_func": "PARSE_CANONICAL", + "encoding": "hex" }, - "extra_compute_units": 0 + "api_name": "eth_getBlockByNumber" }, { - "name": "ftm_estimateGas", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 87, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 + "function_tag": "SUBSCRIBE", + "api_name": "eth_subscribe" }, { - "name": "ftm_sendRawTransaction", - "block_parsing": { - "parser_arg": [ - "1" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 26, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_unsubscribe\",\"params\":[\"%s\"],\"id\":1}", + "function_tag": "UNSUBSCRIBE", + "api_name": "eth_unsubscribe" } ], - "headers": [], - "inheritance_apis": [], - "parse_directives": [], "verifications": [ { "name": "chain-id", + "parse_directive": { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_chainId\",\"params\":[],\"id\":1}", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG", + "encoding": "hex" + }, + "api_name": "eth_chainId" + }, "values": [ { "expected_value": "0xfa" } ] + }, + { + "name": "pruning", + "parse_directive": { + "function_tag": "GET_EARLIEST_BLOCK" + }, + "values": [ + { + "latest_distance": 128 + }, + { + "extension": "archive", + "expected_value": "0x0" + } + ] } ], - "extensions": [] + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 127 + } + } + ] }, { "enabled": true, @@ -884,6 +263,24 @@ "stateful": 0 }, "extra_compute_units": 0 + }, + { + "name": "trace_get", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": true, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 } ], "verifications": [ @@ -922,8 +319,8 @@ "data_reliability_enabled": true, "block_distance_for_finalized_data": 0, "blocks_in_finalization_proof": 1, - "average_block_time": 1500, - "allowed_block_lag_for_qos_sync": 7, + "average_block_time": 1000, + "allowed_block_lag_for_qos_sync": 10, "shares": 1, "min_stake_provider": { "denom": "ulava", @@ -957,5 +354,5 @@ } ] }, - "deposit": "10000000ulava" + "deposit": "10001000ulava" } \ No newline at end of file diff --git a/specs/mainnet-1/specs/ripple.json b/specs/mainnet-1/specs/ripple.json index 0a6e4404ff..2d8fa29b31 100644 --- a/specs/mainnet-1/specs/ripple.json +++ b/specs/mainnet-1/specs/ripple.json @@ -1,7 +1,7 @@ { "proposal": { "title": "Add Specs: ripple", - "description": "Adding new specification support for relaying ripple data on Lava", + "description": "Updated ripple spec for better relaying of ripple data", "specs": [ { "index": "XRP", @@ -12,7 +12,7 @@ "block_distance_for_finalized_data": 4, "blocks_in_finalization_proof": 3, "average_block_time": 4000, - "allowed_block_lag_for_qos_sync": 5, + "allowed_block_lag_for_qos_sync": 3, "imports": [], "shares": 1, "min_stake_provider": { @@ -23,7 +23,7 @@ { "enabled": true, "collection_data": { - "api_interface": "rest", + "api_interface": "jsonrpc", "internal_path": "", "type": "POST", "add_on": "" @@ -33,11 +33,13 @@ "name": "account_info", "block_parsing": { "parser_arg": [ - "latest" + "0", + "ledger_index" ], - "parser_func": "DEFAULT" + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -51,11 +53,13 @@ "name": "gateway_balances", "block_parsing": { "parser_arg": [ - "latest" + "0", + "ledger_index" ], - "parser_func": "DEFAULT" + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" }, - "compute_units": 10, + "compute_units": 60, "enabled": true, "category": { "deterministic": true, @@ -69,11 +73,73 @@ "name": "account_lines", "block_parsing": { "parser_arg": [ - "latest" + "0", + "ledger_index" ], - "parser_func": "DEFAULT" + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" }, - "compute_units": 10, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "account_channels", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "account_currencies", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "account_tx", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index_min" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -87,9 +153,9 @@ "name": "submit", "block_parsing": { "parser_arg": [ - "latest" + "" ], - "parser_func": "DEFAULT" + "parser_func": "EMPTY" }, "compute_units": 10, "enabled": true, @@ -97,24 +163,44 @@ "deterministic": false, "local": false, "subscription": false, - "stateful": 1 + "stateful": 1, + "hanging_api": true }, "extra_compute_units": 0 }, { - "name": "server_state", + "name": "submit_multisigned", "block_parsing": { "parser_arg": [ - "latest" + "" ], - "parser_func": "DEFAULT" + "parser_func": "EMPTY" }, "compute_units": 10, "enabled": true, "category": { - "deterministic": true, + "deterministic": false, "local": false, "subscription": false, + "stateful": 1, + "hanging_api": true + }, + "extra_compute_units": 0 + }, + { + "name": "server_state", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, "stateful": 0 }, "extra_compute_units": 0 @@ -123,14 +209,14 @@ "name": "fee", "block_parsing": { "parser_arg": [ - "latest" + "" ], - "parser_func": "DEFAULT" + "parser_func": "EMPTY" }, "compute_units": 10, "enabled": true, "category": { - "deterministic": true, + "deterministic": false, "local": false, "subscription": false, "stateful": 0 @@ -141,11 +227,11 @@ "name": "tx", "block_parsing": { "parser_arg": [ - "latest" + "" ], - "parser_func": "DEFAULT" + "parser_func": "EMPTY" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -160,12 +246,12 @@ "block_parsing": { "parser_arg": [ "0", - "result", "ledger_index" ], - "parser_func": "PARSE_CANONICAL" + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -175,16 +261,92 @@ }, "extra_compute_units": 0 }, + { + "name": "ledger_closed", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "ledger_current", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, { "name": "server_info", "block_parsing": { "parser_arg": [ - "latest" + "" ], - "parser_func": "DEFAULT" + "parser_func": "EMPTY" }, "compute_units": 10, "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "book_offers", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 60, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "ripple_path_find", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 60, + "enabled": true, "category": { "deterministic": true, "local": false, @@ -192,6 +354,42 @@ "stateful": 0 }, "extra_compute_units": 0 + }, + { + "name": "subscribe", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "unsubscribe", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 } ], "headers": [], @@ -203,7 +401,6 @@ "result_parsing": { "parser_arg": [ "0", - "result", "ledger", "ledger_hash" ], @@ -217,13 +414,36 @@ "result_parsing": { "parser_arg": [ "0", - "result", "ledger", "ledger_index" ], "parser_func": "PARSE_CANONICAL" }, "api_name": "ledger" + }, + { + "function_tag": "SUBSCRIBE", + "api_name": "subscribe" + }, + { + "function_template": "{\"method\":\"unsubscribe\",\"params\":[{\"streams\":[]}]}", + "function_tag": "UNSUBSCRIBE", + "api_name": "unsubscribe" + }, + { + "function_tag": "GET_EARLIEST_BLOCK", + "function_template": "{\"method\":\"ledger\",\"params\":[{\"ledger_index\":32570,\"transactions\":false,\"expand\":false,\"owner_funds\":false}]}", + "result_parsing": { + "parser_arg": [ + "closed", + "ledger", + "ledger_index", + "ledger", + "ledger_index" + ], + "parser_func": "PARSE_DICTIONARY" + }, + "api_name": "ledger" } ], "verifications": [ @@ -235,7 +455,6 @@ "result_parsing": { "parser_arg": [ "0", - "result", "info", "network_id" ], @@ -250,7 +469,15 @@ ] } ], - "extensions": [] + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 8192 + } + } + ] } ] }, @@ -263,7 +490,7 @@ "block_distance_for_finalized_data": 4, "blocks_in_finalization_proof": 3, "average_block_time": 4000, - "allowed_block_lag_for_qos_sync": 5, + "allowed_block_lag_for_qos_sync": 2, "imports": [ "XRP" ], @@ -276,7 +503,7 @@ { "enabled": true, "collection_data": { - "api_interface": "rest", + "api_interface": "jsonrpc", "internal_path": "", "type": "POST", "add_on": "" @@ -297,5 +524,5 @@ } ] }, - "deposit": "10000000ulava" + "deposit": "10001000ulava" } \ No newline at end of file diff --git a/specs/mainnet-1/specs/sonic.json b/specs/mainnet-1/specs/sonic.json new file mode 100644 index 0000000000..595c7d9189 --- /dev/null +++ b/specs/mainnet-1/specs/sonic.json @@ -0,0 +1,165 @@ +{ + "proposal": { + "title": "Add Specs: Sonic", + "description": "Adding new specification support for relaying Sonic data on Lava", + "specs": [ + { + "index": "SONIC", + "name": "sonic mainnet", + "enabled": true, + "imports": [ + "ETH1" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 7, + "blocks_in_finalization_proof": 3, + "average_block_time": 350, + "allowed_block_lag_for_qos_sync": 29, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0x92" + } + ] + } + ], + "extensions": [] + }, + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "trace" + }, + "apis": [ + { + "name": "trace_block", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": true, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "trace_filter", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "trace_transaction", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": true, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + } + ], + "verifications": [], + "extensions": [] + } + ] + }, + { + "index": "SONICT", + "name": "sonic blaze testnet", + "enabled": true, + "imports": [ + "SONIC" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 7, + "blocks_in_finalization_proof": 3, + "average_block_time": 350, + "allowed_block_lag_for_qos_sync": 29, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0xdede" + } + ] + } + ] + } + ] + } + ] + }, + "deposit": "10001000ulava" +} \ No newline at end of file diff --git a/specs/mainnet-1/specs/stellar.json b/specs/mainnet-1/specs/stellar.json index c884080eeb..2a0b07753f 100644 --- a/specs/mainnet-1/specs/stellar.json +++ b/specs/mainnet-1/specs/stellar.json @@ -1,7 +1,7 @@ { "proposal": { "title": "Add Specs: stellar", - "description": "Adding new specification support for relaying stellar data on Lava", + "description": "Updated stellar spec for better relaying of stellar data", "specs": [ { "index": "XLM", @@ -12,7 +12,7 @@ "block_distance_for_finalized_data": 4, "blocks_in_finalization_proof": 3, "average_block_time": 5000, - "allowed_block_lag_for_qos_sync": 5, + "allowed_block_lag_for_qos_sync": 2, "imports": [], "shares": 1, "min_stake_provider": { @@ -30,14 +30,14 @@ }, "apis": [ { - "name": "/transactions/{tx_hash}", + "name": "/transactions", "block_parsing": { "parser_arg": [ "latest" ], "parser_func": "DEFAULT" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -48,14 +48,14 @@ "extra_compute_units": 0 }, { - "name": "/accounts/{account}", + "name": "/transactions/{transaction_hash}", "block_parsing": { "parser_arg": [ "latest" ], "parser_func": "DEFAULT" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -66,7 +66,79 @@ "extra_compute_units": 0 }, { - "name": "/assets", + "name": "/transactions/{transaction_hash}/operations", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/transactions/{transaction_hash}/effects", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/transactions/{transaction_hash}/payments", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}", "block_parsing": { "parser_arg": [ "latest" @@ -84,7 +156,79 @@ "extra_compute_units": 0 }, { - "name": "/fee_stats", + "name": "/accounts/{account_id}/transactions", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}/operations", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}/payments", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}/effects", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}/offers", "block_parsing": { "parser_arg": [ "latest" @@ -102,16 +246,30 @@ "extra_compute_units": 0 }, { - "name": "/ledgers", + "name": "/accounts/{account_id}/trades", "block_parsing": { "parser_arg": [ - "0", - "_embedded", - "records", - "0", - "sequence" + "latest" ], - "parser_func": "PARSE_CANONICAL" + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}/data/{key}", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" }, "compute_units": 10, "enabled": true, @@ -124,7 +282,7 @@ "extra_compute_units": 0 }, { - "name": "/operations/{id}/effects", + "name": "/assets", "block_parsing": { "parser_arg": [ "latest" @@ -142,16 +300,12 @@ "extra_compute_units": 0 }, { - "name": "/ledgers/{ledger_id}", + "name": "/fee_stats", "block_parsing": { "parser_arg": [ - "0", - "_embedded", - "records", - "0", - "sequence" + "latest" ], - "parser_func": "PARSE_CANONICAL" + "parser_func": "DEFAULT" }, "compute_units": 10, "enabled": true, @@ -161,23 +315,54 @@ "subscription": false, "stateful": 0 }, - "extra_compute_units": 0, - "parsers": [ - { - "parse_path": ".params.ledger_id", - "parse_type": "BLOCK_LATEST" - } - ] + "extra_compute_units": 0 + }, + { + "name": "/ledgers", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/operations/{id}/effects", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 }, { - "name": "/ledgers/{ledger_id}/{info_type}", + "name": "/ledgers/{sequence}", "block_parsing": { "parser_arg": [ - "0" + "0", + "sequence" ], "parser_func": "PARSE_CANONICAL" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -185,13 +370,7 @@ "subscription": false, "stateful": 0 }, - "extra_compute_units": 0, - "parsers": [ - { - "parse_path": ".params.ledger_id", - "parse_type": "BLOCK_LATEST" - } - ] + "extra_compute_units": 0 }, { "name": "/", @@ -225,7 +404,7 @@ ], "parser_func": "PARSE_CANONICAL" }, - "api_name": "/ledgers/{ledger_id}" + "api_name": "/ledgers/{sequence}" }, { "function_tag": "GET_BLOCKNUM", @@ -290,6 +469,24 @@ "stateful": 1 }, "extra_compute_units": 0 + }, + { + "name": "/transactions_async", + "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 } ], "headers": [ @@ -349,11 +546,13 @@ "name": "getLedgers", "block_parsing": { "parser_arg": [ - "latest" + "0", + "startLedger" ], - "parser_func": "DEFAULT" + "parser_func": "PARSE_CANONICAL", + "default_value": "latest" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -371,7 +570,7 @@ ], "parser_func": "DEFAULT" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -385,11 +584,12 @@ "name": "getEvents", "block_parsing": { "parser_arg": [ - "latest" + "0", + "startLedger" ], - "parser_func": "DEFAULT" + "parser_func": "PARSE_CANONICAL" }, - "compute_units": 10, + "compute_units": 80, "enabled": true, "category": { "deterministic": true, @@ -397,17 +597,25 @@ "subscription": false, "stateful": 0 }, - "extra_compute_units": 0 + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.endLedger", + "parse_type": "BLOCK_LATEST" + } + ] }, { "name": "getTransactions", "block_parsing": { "parser_arg": [ - "latest" + "0", + "startLedger" ], - "parser_func": "DEFAULT" + "parser_func": "PARSE_CANONICAL", + "default_value": "latest" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -421,11 +629,11 @@ "name": "getTransaction", "block_parsing": { "parser_arg": [ - "latest" + "" ], - "parser_func": "DEFAULT" + "parser_func": "EMPTY" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -461,11 +669,11 @@ ], "parser_func": "DEFAULT" }, - "compute_units": 5, + "compute_units": 10, "enabled": true, "category": { - "deterministic": true, - "local": false, + "deterministic": false, + "local": true, "subscription": false, "stateful": 0 }, @@ -479,11 +687,11 @@ ], "parser_func": "DEFAULT" }, - "compute_units": 5, + "compute_units": 10, "enabled": true, "category": { "deterministic": true, - "local": false, + "local": true, "subscription": false, "stateful": 0 }, @@ -517,7 +725,7 @@ ], "parser_func": "DEFAULT" }, - "compute_units": 10, + "compute_units": 100, "enabled": true, "category": { "deterministic": true, @@ -582,7 +790,6 @@ ], "extensions": [] } - ] }, { @@ -594,7 +801,7 @@ "block_distance_for_finalized_data": 4, "blocks_in_finalization_proof": 3, "average_block_time": 5000, - "allowed_block_lag_for_qos_sync": 5, + "allowed_block_lag_for_qos_sync": 2, "imports": [ "XLM" ], @@ -652,5 +859,5 @@ } ] }, - "deposit": "10000000ulava" -} + "deposit": "10001000ulava" +} \ No newline at end of file diff --git a/specs/mainnet-1/specs/tron.json b/specs/mainnet-1/specs/tron.json index 6069585d99..1f33af7c7c 100644 --- a/specs/mainnet-1/specs/tron.json +++ b/specs/mainnet-1/specs/tron.json @@ -1,7 +1,7 @@ { "proposal": { "title": "Add Specs: tron", - "description": "Adding new specification support for relaying tron data on Lava", + "description": "Updated tron spec for better relaying of tron data", "specs": [ { "index": "TRX", @@ -12,7 +12,7 @@ "block_distance_for_finalized_data": 4, "blocks_in_finalization_proof": 3, "average_block_time": 3000, - "allowed_block_lag_for_qos_sync": 5, + "allowed_block_lag_for_qos_sync": 4, "imports": [], "shares": 1, "min_stake_provider": { @@ -37,8 +37,1089 @@ ], "parser_func": "DEFAULT" }, + "compute_units": 20, + "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": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getassetissuelist", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/gettransactionlistfrompending", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getpendingsize", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/listwitnesses", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getbandwidthprices", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getburntrx", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getnextmaintenancetime", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/listnodes", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getpaginatednowwitnesslist", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/listproposals", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getpaginatedassetissuelist", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "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": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/createaccount", + "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/getaccountresource", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getaccountnet", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getaccountbalance", + "block_parsing": { + "parser_arg": [ + "0", + "block_identifier" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/validateaddress", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/freezebalance", + "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/unfreezebalance", + "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/freezebalancev2", + "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/unfreezebalancev2", + "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/withdrawexpireunfreeze", + "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/delegateresource", + "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/undelegateresource", + "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/getdelegatedresource", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getdelegatedresourcev2", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "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": 100, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/deploycontract", + "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/triggersmartcontract", + "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/getcontract", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getcontractinfo", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/estimateenergy", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 100, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getassetissuebyaccount", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getassetissuebyid", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getassetissuebyname", + "block_parsing": { + "parser_arg": [ + "latest", + "startNum" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getassetissuelistbyname", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/gettransactionfrompending", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getReward", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/withdrawbalance", + "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": 20, + "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/broadcasttransaction", + "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/createtransaction", + "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": 20, + "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": 80, + "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": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getblock", + "block_parsing": { + "parser_arg": [ + "0", + "id_or_num" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getblockbyid", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getblockbylatestnum", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getblockbylimitnext", + "block_parsing": { + "parser_arg": [ + "0", + "startNum" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/gettransactionbyid", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getblockbalance", + "block_parsing": { + "parser_arg": [ + "0", + "num" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/updateaccount", + "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/accountpermissionupdate", + "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/cancelallunfreezev2", + "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/getdelegatedresourceaccountindex", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getdelegatedresourceaccountindexv2", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, "category": { "deterministic": true, "local": false, @@ -48,14 +1129,14 @@ "extra_compute_units": 0 }, { - "name": "/wallet/getenergyprices", + "name": "/wallet/getcandelegatedmaxsize", "block_parsing": { "parser_arg": [ "latest" ], "parser_func": "DEFAULT" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -66,14 +1147,14 @@ "extra_compute_units": 0 }, { - "name": "/wallet/getnodeinfo", + "name": "/wallet/getcanwithdrawunfreezeamount", "block_parsing": { "parser_arg": [ "latest" ], "parser_func": "DEFAULT" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -82,28 +1163,16 @@ "stateful": 0 }, "extra_compute_units": 0 - } - ], - "verifications": [] - }, - { - "enabled": true, - "collection_data": { - "api_interface": "rest", - "internal_path": "", - "type": "POST", - "add_on": "" - }, - "apis": [ + }, { - "name": "/wallet/getaccount", + "name": "/wallet/getavailableunfreezecount", "block_parsing": { "parser_arg": [ "latest" ], "parser_func": "DEFAULT" }, - "compute_units": 10, + "compute_units": 20, "enabled": true, "category": { "deterministic": true, @@ -114,7 +1183,43 @@ "extra_compute_units": 0 }, { - "name": "/wallet/triggerconstantcontract", + "name": "/wallet/getapprovedlist", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getproposalbyid", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/proposalapprove", "block_parsing": { "parser_arg": [ "latest" @@ -132,7 +1237,7 @@ "extra_compute_units": 0 }, { - "name": "/wallet/gettransactioninfobyid", + "name": "/wallet/proposaldelete", "block_parsing": { "parser_arg": [ "latest" @@ -142,15 +1247,15 @@ "compute_units": 10, "enabled": true, "category": { - "deterministic": true, + "deterministic": false, "local": false, "subscription": false, - "stateful": 0 + "stateful": 1 }, "extra_compute_units": 0 }, { - "name": "/wallet/getaccountresource", + "name": "/wallet/createwitness", "block_parsing": { "parser_arg": [ "latest" @@ -160,15 +1265,15 @@ "compute_units": 10, "enabled": true, "category": { - "deterministic": true, + "deterministic": false, "local": false, "subscription": false, - "stateful": 0 + "stateful": 1 }, "extra_compute_units": 0 }, { - "name": "/wallet/broadcasthex", + "name": "/wallet/updatewitness", "block_parsing": { "parser_arg": [ "latest" @@ -186,7 +1291,7 @@ "extra_compute_units": 0 }, { - "name": "/wallet/getnowblock", + "name": "/wallet/votewitnessaccount", "block_parsing": { "parser_arg": [ "latest" @@ -195,6 +1300,24 @@ }, "compute_units": 10, "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 1 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getBrokerage", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, "category": { "deterministic": true, "local": false, @@ -204,40 +1327,164 @@ "extra_compute_units": 0 }, { - "name": "/wallet/gettransactioninfobyblocknum", + "name": "/wallet/updateBrokerage", "block_parsing": { "parser_arg": [ - "0", - "num" + "latest" ], - "parser_func": "PARSE_CANONICAL" + "parser_func": "DEFAULT" }, "compute_units": 10, "enabled": true, "category": { - "deterministic": true, + "deterministic": false, "local": false, "subscription": false, - "stateful": 0 + "stateful": 1 }, "extra_compute_units": 0 }, { - "name": "/wallet/getblockbynum", + "name": "/wallet/createassetissue", "block_parsing": { "parser_arg": [ - "0", - "num" + "latest" ], - "parser_func": "PARSE_CANONICAL" + "parser_func": "DEFAULT" }, "compute_units": 10, "enabled": true, "category": { - "deterministic": true, + "deterministic": false, "local": false, "subscription": false, - "stateful": 0 + "stateful": 1 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/updateasset", + "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/participateassetissue", + "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/transferasset", + "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/unfreezeasset", + "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/clearabii", + "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/updateenergylimit", + "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/updatesetting", + "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 } @@ -270,6 +1517,20 @@ "parser_func": "PARSE_CANONICAL" }, "api_name": "/wallet/getnowblock" + }, + { + "function_tag": "GET_EARLIEST_BLOCK", + "function_template": "{\"num\":1}", + "result_parsing": { + "parser_arg": [ + "0", + "block_header", + "raw_data", + "number" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/wallet/getblockbynum" } ], "verifications": [ @@ -292,10 +1553,32 @@ "expected_value": "00000000000000001ebf88508a03865c71d452e25f4d51194196a1d22b6653dc" } ] + }, + { + "name": "pruning", + "parse_directive": { + "function_tag": "GET_EARLIEST_BLOCK" + }, + "values": [ + { + "latest_distance": 128 + }, + { + "extension": "archive", + "expected_value": "1" + } + ] } - ], - "extensions": [] + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 127 + } + } + ] } ] }, @@ -308,7 +1591,7 @@ "block_distance_for_finalized_data": 4, "blocks_in_finalization_proof": 3, "average_block_time": 3000, - "allowed_block_lag_for_qos_sync": 5, + "allowed_block_lag_for_qos_sync": 4, "imports": [ "TRX" ], @@ -356,5 +1639,5 @@ } ] }, - "deposit": "10000000ulava" + "deposit": "10001000ulava" } \ No newline at end of file diff --git a/specs/testnet-2/specs/arbitrum.json b/specs/testnet-2/specs/arbitrum.json new file mode 100644 index 0000000000..e885a6752f --- /dev/null +++ b/specs/testnet-2/specs/arbitrum.json @@ -0,0 +1,309 @@ +{ + "proposal": { + "title": "Add Specs: Arbitrum", + "description": "Adding new specification support for relaying Arbitrum data on Lava", + "specs": [ + { + "index": "ARBITRUM", + "name": "arbitrum mainnet", + "enabled": true, + "imports": [ + "ETH1" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 1, + "blocks_in_finalization_proof": 3, + "average_block_time": 250, + "allowed_block_lag_for_qos_sync": 20, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0xa4b1" + } + ] + } + ] + }, + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "arbtrace" + }, + "apis": [ + { + "name": "arbtrace_block", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 50, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "arbtrace_call", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "arbtrace_callMany", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "arbtrace_filter", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "arbtrace_replayBlockTransactions", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "arbtrace_replayTransaction", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "arbtrace_transaction", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + } + ], + "verifications": [ + { + "name": "enabled", + "parse_directive": { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"arbtrace_block\",\"params\":[\"0x152DD46\"],\"id\":1}", + "function_tag": "VERIFICATION", + "result_parsing": {}, + "parsers": [ + { + "parse_path": ".result.[0].blockHash", + "value": "*", + "parse_type": "RESULT" + } + ], + "api_name": "arbtrace_block" + }, + "values": [ + { + "expected_value": "*" + } + ] + } + ], + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 127 + } + } + ] + } + ] + }, + { + "index": "ARBITRUMN", + "name": "arbitrum nova testnet", + "enabled": true, + "imports": [ + "ARBITRUM" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 1, + "blocks_in_finalization_proof": 3, + "average_block_time": 250, + "allowed_block_lag_for_qos_sync": 20, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0xa4ba" + } + ] + } + ] + } + ] + }, + { + "index": "ARBITRUMS", + "name": "arbitrum sepolia testnet", + "enabled": true, + "imports": [ + "ARBITRUM" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 1, + "blocks_in_finalization_proof": 3, + "average_block_time": 250, + "allowed_block_lag_for_qos_sync": 20, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0x66eee" + } + ] + } + ] + } + ] + } + ] + }, + "deposit": "10001000ulava" +} \ No newline at end of file diff --git a/specs/testnet-2/specs/bch.json b/specs/testnet-2/specs/bch.json new file mode 100644 index 0000000000..1286acab85 --- /dev/null +++ b/specs/testnet-2/specs/bch.json @@ -0,0 +1,413 @@ +{ + "proposal": { + "title": "Add Specs: BitcoinCash", + "description": "Adding new specification support for relaying bitcoin cash data on Lava", + "specs": [ + { + "index": "BCH", + "name": "bitcoin cash mainnet", + "enabled": true, + "imports": [ + "BTC" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 1, + "blocks_in_finalization_proof": 1, + "average_block_time": 600000, + "allowed_block_lag_for_qos_sync": 1, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [ + { + "name": "getdsproof", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 1 + }, + "extra_compute_units": 0 + }, + { + "name": "getdsprooflist", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 2 + }, + "extra_compute_units": 0 + }, + { + "name": "getdsproofscore", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 1 + }, + "extra_compute_units": 0 + }, + { + "name": "finalizeblock", + "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, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_HASH" + } + ] + }, + { + "name": "getfinalizedblockhash", + "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": "parkblock", + "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, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_HASH" + } + ] + }, + { + "name": "unparkblock", + "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, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_HASH" + } + ] + }, + { + "name": "getexcessiveblock", + "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": "estimatefee", + "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": "getmempoolentry", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 1 + }, + "extra_compute_units": 0 + }, + { + "name": "getblocktemplate", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 2 + }, + "extra_compute_units": 0 + }, + { + "name": "getblocktemplatelight", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 2 + }, + "extra_compute_units": 0 + }, + { + "name": "submitblock", + "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": "submitblocklight", + "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": "getmininginfo", + "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": "getnetworkhashps", + "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 + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "main" + } + ] + } + ], + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 42600 + } + } + ] + } + ] + }, + { + "index": "BCHT", + "name": "bitcoin cash testnet", + "enabled": true, + "imports": [ + "BCH" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 1, + "blocks_in_finalization_proof": 1, + "average_block_time": 600000, + "allowed_block_lag_for_qos_sync": 5, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "test" + } + ] + } + ] + } + ] + } + ] + }, + "deposit": "10001000ulava" +} \ No newline at end of file diff --git a/specs/testnet-2/specs/btc.json b/specs/testnet-2/specs/btc.json new file mode 100644 index 0000000000..5447d23ed3 --- /dev/null +++ b/specs/testnet-2/specs/btc.json @@ -0,0 +1,684 @@ +{ + "proposal": { + "title": "Add Specs: bitcoin", + "description": "Adding new specification support for relaying Bitcoin data on Lava", + "specs": [ + { + "index": "BTC", + "name": "bitcoin", + "enabled": true, + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 6, + "blocks_in_finalization_proof": 1, + "average_block_time": 600000, + "allowed_block_lag_for_qos_sync": 1, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [ + { + "name": "getblockhash", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_LATEST" + } + ] + }, + { + "name": "getblock", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_HASH" + } + ] + }, + { + "name": "decoderawtransaction", + "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": "decodescript", + "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": "estimatesmartfee", + "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": "getbestblockhash", + "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": "getblockchaininfo", + "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": "getblockcount", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getblockheader", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_HASH" + } + ] + }, + { + "name": "getblockstats", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_HASH" + }, + { + "parse_path": ".params.[0]", + "parse_type": "BLOCK_LATEST" + } + ] + }, + { + "name": "getchaintips", + "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": "getchaintxstats", + "block_parsing": { + "parser_arg": [ + "1" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getconnectioncount", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getdifficulty", + "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": "getindexinfo", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getmemoryinfo", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getmempoolancestors", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getmempooldescendants", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getmempoolinfo", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getrawmempool", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getrawtransaction", + "block_parsing": { + "parser_arg": [ + "2" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "gettxoutproof", + "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": "gettxoutsetinfo", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 500, + "timeout_ms": 180000, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "gettxout", + "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": "sendrawtransaction", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 1, + "hanging_api": true + }, + "extra_compute_units": 0 + }, + { + "name": "submitpackage", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 1, + "hanging_api": true + }, + "extra_compute_units": 0 + }, + { + "name": "testmempoolaccept", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "validateaddress", + "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": "verifymessage", + "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 + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [ + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"getblockcount\",\"params\":[],\"id\":1}", + "function_tag": "GET_BLOCKNUM", + "result_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "api_name": "getblockcount" + }, + { + "function_tag": "GET_BLOCK_BY_NUM", + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"getblockhash\",\"params\":[%d],\"id\":1}", + "result_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "api_name": "getblockhash" + } + ], + "verifications": [ + { + "name": "chain-id", + "parse_directive": { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"getblockchaininfo\",\"params\":[],\"id\":1}", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "chain", + "=" + ], + "parser_func": "PARSE_DICTIONARY" + }, + "api_name": "getblockchaininfo" + }, + "values": [ + { + "expected_value": "main" + } + ] + } + ], + "extensions": [] + } + ] + }, + { + "index": "BTCT", + "name": "bitcoin testnet", + "enabled": true, + "imports": [ + "BTC" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 6, + "blocks_in_finalization_proof": 3, + "average_block_time": 600000, + "allowed_block_lag_for_qos_sync": 1, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "test" + } + ] + } + ] + } + ] + } + ] + }, + "deposit": "10001000ulava" +} \ No newline at end of file diff --git a/specs/testnet-2/specs/fantom.json b/specs/testnet-2/specs/fantom.json new file mode 100644 index 0000000000..c2141a738a --- /dev/null +++ b/specs/testnet-2/specs/fantom.json @@ -0,0 +1,358 @@ +{ + "proposal": { + "title": "Add Specs: Fantom", + "description": "Updated fantom spec for better relaying of fantom data", + "specs": [ + { + "index": "FTM250", + "name": "fantom mainnet", + "enabled": true, + "imports": [ + "ETH1" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 0, + "blocks_in_finalization_proof": 1, + "average_block_time": 1000, + "allowed_block_lag_for_qos_sync": 10, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [ + { + "name": "ftm_currentEpoch", + "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": "dag_getHeads", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "dag_getEventPayload", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "dag_getEvent", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [ + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}", + "function_tag": "GET_BLOCKNUM", + "result_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "api_name": "eth_blockNumber" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"0x%x\", false],\"id\":1}", + "function_tag": "GET_BLOCK_BY_NUM", + "result_parsing": { + "parser_arg": [ + "0", + "hash" + ], + "parser_func": "PARSE_CANONICAL", + "encoding": "hex" + }, + "api_name": "eth_getBlockByNumber" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"earliest\", false],\"id\":1}", + "function_tag": "GET_EARLIEST_BLOCK", + "result_parsing": { + "parser_arg": [ + "0", + "number" + ], + "parser_func": "PARSE_CANONICAL", + "encoding": "hex" + }, + "api_name": "eth_getBlockByNumber" + }, + { + "function_tag": "SUBSCRIBE", + "api_name": "eth_subscribe" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_unsubscribe\",\"params\":[\"%s\"],\"id\":1}", + "function_tag": "UNSUBSCRIBE", + "api_name": "eth_unsubscribe" + } + ], + "verifications": [ + { + "name": "chain-id", + "parse_directive": { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"eth_chainId\",\"params\":[],\"id\":1}", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG", + "encoding": "hex" + }, + "api_name": "eth_chainId" + }, + "values": [ + { + "expected_value": "0xfa" + } + ] + }, + { + "name": "pruning", + "parse_directive": { + "function_tag": "GET_EARLIEST_BLOCK" + }, + "values": [ + { + "latest_distance": 128 + }, + { + "extension": "archive", + "expected_value": "0x0" + } + ] + } + ], + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 127 + } + } + ] + }, + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "trace" + }, + "apis": [ + { + "name": "trace_block", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": true, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "trace_filter", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "trace_transaction", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": true, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "trace_get", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 200, + "enabled": true, + "category": { + "deterministic": true, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + } + ], + "verifications": [ + { + "name": "trace", + "parse_directive": { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"trace_block\",\"params\":[\"latest\"],\"id\":1}", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "api_name": "trace_block" + }, + "values": [ + { + "expected_value": "*" + } + ] + } + ], + "extensions": [] + } + ] + }, + { + "index": "FTM4002", + "name": "fantom testnet", + "enabled": true, + "imports": [ + "FTM250" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 0, + "blocks_in_finalization_proof": 1, + "average_block_time": 1000, + "allowed_block_lag_for_qos_sync": 10, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0xfa2" + } + ] + } + ] + } + ] + } + ] + }, + "deposit": "10001000ulava" +} \ No newline at end of file diff --git a/specs/testnet-2/specs/ripple.json b/specs/testnet-2/specs/ripple.json new file mode 100644 index 0000000000..2d8fa29b31 --- /dev/null +++ b/specs/testnet-2/specs/ripple.json @@ -0,0 +1,528 @@ +{ + "proposal": { + "title": "Add Specs: ripple", + "description": "Updated ripple spec for better relaying of ripple data", + "specs": [ + { + "index": "XRP", + "name": "ripple mainnet", + "enabled": true, + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 4, + "blocks_in_finalization_proof": 3, + "average_block_time": 4000, + "allowed_block_lag_for_qos_sync": 3, + "imports": [], + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [ + { + "name": "account_info", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "gateway_balances", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 60, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "account_lines", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "account_channels", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "account_currencies", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "account_tx", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index_min" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "submit", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 1, + "hanging_api": true + }, + "extra_compute_units": 0 + }, + { + "name": "submit_multisigned", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 1, + "hanging_api": true + }, + "extra_compute_units": 0 + }, + { + "name": "server_state", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "fee", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "tx", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "ledger", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "ledger_closed", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "ledger_current", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "server_info", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "book_offers", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 60, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "ripple_path_find", + "block_parsing": { + "parser_arg": [ + "0", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "validated" + }, + "compute_units": 60, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "subscribe", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "unsubscribe", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [ + { + "function_tag": "GET_BLOCK_BY_NUM", + "function_template": "{\"method\":\"ledger\",\"params\":[{\"ledger_index\":\"%d\",\"transactions\":false,\"expand\":false,\"owner_funds\":false}]}", + "result_parsing": { + "parser_arg": [ + "0", + "ledger", + "ledger_hash" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "ledger" + }, + { + "function_tag": "GET_BLOCKNUM", + "function_template": "{\"method\":\"ledger\",\"params\":[{\"ledger_index\":\"validated\",\"transactions\":false,\"expand\":false,\"owner_funds\":false}]}", + "result_parsing": { + "parser_arg": [ + "0", + "ledger", + "ledger_index" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "ledger" + }, + { + "function_tag": "SUBSCRIBE", + "api_name": "subscribe" + }, + { + "function_template": "{\"method\":\"unsubscribe\",\"params\":[{\"streams\":[]}]}", + "function_tag": "UNSUBSCRIBE", + "api_name": "unsubscribe" + }, + { + "function_tag": "GET_EARLIEST_BLOCK", + "function_template": "{\"method\":\"ledger\",\"params\":[{\"ledger_index\":32570,\"transactions\":false,\"expand\":false,\"owner_funds\":false}]}", + "result_parsing": { + "parser_arg": [ + "closed", + "ledger", + "ledger_index", + "ledger", + "ledger_index" + ], + "parser_func": "PARSE_DICTIONARY" + }, + "api_name": "ledger" + } + ], + "verifications": [ + { + "name": "chain-id", + "parse_directive": { + "function_template": "{\"method\":\"server_info\",\"params\":[{\"counters\":false}]}", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "0", + "info", + "network_id" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "server_info" + }, + "values": [ + { + "expected_value": "0" + } + ] + } + ], + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 8192 + } + } + ] + } + ] + }, + { + "index": "XRPT", + "name": "ripple testnet", + "enabled": true, + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 4, + "blocks_in_finalization_proof": 3, + "average_block_time": 4000, + "allowed_block_lag_for_qos_sync": 2, + "imports": [ + "XRP" + ], + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "1" + } + ] + } + ] + } + ] + } + ] + }, + "deposit": "10001000ulava" +} \ No newline at end of file diff --git a/specs/testnet-2/specs/solana.json b/specs/testnet-2/specs/solana.json new file mode 100644 index 0000000000..bf925c20b8 --- /dev/null +++ b/specs/testnet-2/specs/solana.json @@ -0,0 +1,1494 @@ +{ + "proposal": { + "title": "Add Specs: Solana", + "description": "Adding new specification support for relaying Solana data on Lava", + "specs": [ + { + "index": "SOLANA", + "name": "solana mainnet", + "enabled": true, + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 0, + "blocks_in_finalization_proof": 1, + "average_block_time": 400, + "allowed_block_lag_for_qos_sync": 25, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "inheritance_apis": [ + { + "api_interface": "jsonrpc", + "internal_path": "WS-ONLY", + "type": "POST", + "add_on": "" + } + ], + "apis": [ + { + "name": "getAccountInfo", + "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": "getBalance", + "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": "getBlock", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 30, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getBlockHeight", + "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": "getBlockProduction", + "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": "getBlockCommitment", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getBlocks", + "block_parsing": { + "parser_arg": [ + "1" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getBlocksWithLimit", + "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": "getBlockTime", + "block_parsing": { + "parser_arg": [ + "0" + ], + "parser_func": "PARSE_BY_ARG" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getClusterNodes", + "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": "getEpochInfo", + "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": "getEpochSchedule", + "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": "getFeeForMessage", + "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": "getFirstAvailableBlock", + "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": "getGenesisHash", + "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": "getHealth", + "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": "getHighestSnapshotSlot", + "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": "getIdentity", + "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": "getInflationGovernor", + "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": "getInflationRate", + "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": "getInflationReward", + "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": "getLargestAccounts", + "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": "getLatestBlockhash", + "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": "getLeaderSchedule", + "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": "getMaxRetransmitSlot", + "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": "getMaxShredInsertSlot", + "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": "getMinimumBalanceForRentExemption", + "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": "getMultipleAccounts", + "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": "getProgramAccounts", + "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": "getRecentPerformanceSamples", + "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": "getRecentPrioritizationFees", + "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": "getSignaturesForAddress", + "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": "getSignatureStatuses", + "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": "getSlot", + "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": "getSlotLeader", + "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": "getSlotLeaders", + "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": "getStakeMinimumDelegation", + "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": "getSupply", + "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": "getTokenAccountBalance", + "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": "getTokenAccountsByDelegate", + "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": "getTokenAccountsByOwner", + "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": "getTokenLargestAccounts", + "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": "getTokenSupply", + "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": "getTransaction", + "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": "getTransactionCount", + "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": "getVersion", + "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": "getVoteAccounts", + "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": "isBlockhashValid", + "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": "minimumLedgerSlot", + "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": "requestAirdrop", + "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": "sendTransaction", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 1, + "hanging_api": true + }, + "extra_compute_units": 0 + }, + { + "name": "simulateTransaction", + "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 + } + ], + "headers": [], + "parse_directives": [ + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"getLatestBlockhash\",\"params\":[{\"commitment\":\"finalized\"}],\"id\":1}", + "function_tag": "GET_BLOCKNUM", + "result_parsing": { + "parser_arg": [ + "0", + "context", + "slot" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "getLatestBlockhash" + }, + { + "function_tag": "GET_BLOCK_BY_NUM", + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"getBlock\",\"params\":[%d,{\"transactionDetails\":\"none\",\"rewards\":false,\"maxSupportedTransactionVersion\":0}],\"id\":1}", + "result_parsing": { + "parser_arg": [ + "0", + "blockhash" + ], + "parser_func": "PARSE_CANONICAL", + "encoding": "base64" + }, + "api_name": "getBlock" + } + ], + "verifications": [ + { + "name": "version", + "parse_directive": { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"getVersion\",\"params\":[],\"id\":1}", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "0", + "solana-core" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "getVersion" + }, + "values": [ + { + "expected_value": "*" + } + ] + }, + { + "name": "tokens-owner-indexed", + "parse_directive": { + "function_template": "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"getTokenAccountsByOwner\",\"params\":[\"4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F\",{\"programId\":\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\"},{\"encoding\":\"jsonParsed\"}]}", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "0", + "value" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "getTokenAccountsByOwner" + }, + "values": [ + { + "expected_value": "*", + "severity": "Warning" + } + ] + } + ] + }, + { + "enabled": false, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "WS-ONLY", + "type": "POST", + "add_on": "" + }, + "apis": [ + { + "name": "accountSubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "accountUnsubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "blockSubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "blockUnsubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "logsSubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "logsUnsubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "programSubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "programUnsubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "rootSubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "rootUnsubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "signatureSubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "signatureUnsubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "slotSubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "slotUnsubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "slotsUpdatesSubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "slotsUpdatesUnsubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "voteSubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "voteUnsubscribe", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 1000, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": true, + "stateful": 0 + }, + "extra_compute_units": 0 + } + ], + "headers": [], + "parse_directives": [ + { + "function_tag": "SUBSCRIBE", + "api_name": "accountSubscribe" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"accountUnsubscribe\",\"params\":[%d],\"id\":1}", + "function_tag": "UNSUBSCRIBE", + "api_name": "accountUnsubscribe" + }, + { + "function_tag": "SUBSCRIBE", + "api_name": "blockSubscribe" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"blockUnsubscribe\",\"params\":[%d],\"id\":1}", + "function_tag": "UNSUBSCRIBE", + "api_name": "blockUnsubscribe" + }, + { + "function_tag": "SUBSCRIBE", + "api_name": "logsSubscribe" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"logsUnsubscribe\",\"params\":[%d],\"id\":1}", + "function_tag": "UNSUBSCRIBE", + "api_name": "logsUnsubscribe" + }, + { + "function_tag": "SUBSCRIBE", + "api_name": "programSubscribe" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"programUnsubscribe\",\"params\":[%d],\"id\":1}", + "function_tag": "UNSUBSCRIBE", + "api_name": "programUnsubscribe" + }, + { + "function_tag": "SUBSCRIBE", + "api_name": "rootSubscribe" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"rootUnsubscribe\",\"params\":[%d],\"id\":1}", + "function_tag": "UNSUBSCRIBE", + "api_name": "rootUnsubscribe" + }, + { + "function_tag": "SUBSCRIBE", + "api_name": "signatureSubscribe" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"signatureUnsubscribe\",\"params\":[%d],\"id\":1}", + "function_tag": "UNSUBSCRIBE", + "api_name": "signatureUnsubscribe" + }, + { + "function_tag": "SUBSCRIBE", + "api_name": "slotSubscribe" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"slotUnsubscribe\",\"params\":[%d],\"id\":1}", + "function_tag": "UNSUBSCRIBE", + "api_name": "slotUnsubscribe" + }, + { + "function_tag": "SUBSCRIBE", + "api_name": "slotsUpdatesSubscribe" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"slotsUpdatesUnsubscribe\",\"params\":[%d],\"id\":1}", + "function_tag": "UNSUBSCRIBE", + "api_name": "slotsUpdatesUnsubscribe" + }, + { + "function_tag": "SUBSCRIBE", + "api_name": "voteSubscribe" + }, + { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"voteUnsubscribe\",\"params\":[%d],\"id\":1}", + "function_tag": "UNSUBSCRIBE", + "api_name": "voteUnsubscribe" + } + ], + "verifications": [] + } + ] + }, + { + "index": "SOLANAT", + "name": "solana test net", + "enabled": true, + "imports": [ + "SOLANA" + ], + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 0, + "blocks_in_finalization_proof": 1, + "average_block_time": 400, + "allowed_block_lag_for_qos_sync": 25, + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + } + } + ] + }, + "deposit": "10001000ulava" +} \ No newline at end of file diff --git a/specs/testnet-2/specs/sonic.json b/specs/testnet-2/specs/sonic.json index a274ae3580..595c7d9189 100644 --- a/specs/testnet-2/specs/sonic.json +++ b/specs/testnet-2/specs/sonic.json @@ -30,783 +30,7 @@ "type": "POST", "add_on": "" }, - "apis": [ - { - "name": "ftm_accounts", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_chainId", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 1, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_blockNumber", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_coinbase", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_syncing", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_subscribe", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_unsubscribe", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 19, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": true, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_feeHistory", - "block_parsing": { - "parser_arg": [ - "1" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 19, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_maxPriorityFeePerGas", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 21, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_newBlockFilter", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_newFilter", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_newPendingTransactionFilter", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_uninstallFilter", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_createAccessList", - "block_parsing": { - "parser_arg": [ - "0" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 16, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getTransactionReceipt", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getTransactionByBlockHashAndIndex", - "block_parsing": { - "parser_arg": [ - "0" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getTransactionByBlockNumberAndIndex", - "block_parsing": { - "parser_arg": [ - "1" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 19, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getBlockByNumber", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 75, - "enabled": false, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getBlockReceipts", - "block_parsing": { - "parser_arg": [ - "0" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getStorageAt", - "block_parsing": { - "parser_arg": [ - "0", - "toBlock" - ], - "parser_func": "PARSE_CANONICAL" - }, - "compute_units": 75, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getTransactionByHash", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 21, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_gasPrice", - "block_parsing": { - "parser_arg": [ - "2" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 17, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getBalance", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getCode", - "block_parsing": { - "parser_arg": [ - "0" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getFilterChanges", - "block_parsing": { - "parser_arg": [ - "1" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": false, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getFilterLogs", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 60, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getLogs", - "block_parsing": { - "parser_arg": [ - "latest" - ], - "parser_func": "DEFAULT" - }, - "compute_units": 60, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getUncleByBlockHashAndIndex", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getUncleByBlockNumberAndIndex", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getUncleCountByBlockHash", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getUncleCountByBlockNumber", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_sign", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 17, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_signTransaction", - "block_parsing": { - "parser_arg": [ - "1" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 26, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_sendTransaction", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 15, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getBlockTransactionCountByHash", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 20, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getBlockTransactionCountByNumber", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 250, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getProof", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getBlockByHash", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_getTransactionCount", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_call", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_hashrate", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 10, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_estimateGas", - "block_parsing": { - "parser_arg": [ - "" - ], - "parser_func": "EMPTY" - }, - "compute_units": 87, - "enabled": true, - "category": { - "deterministic": false, - "local": true, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - }, - { - "name": "ftm_sendRawTransaction", - "block_parsing": { - "parser_arg": [ - "1" - ], - "parser_func": "PARSE_BY_ARG" - }, - "compute_units": 26, - "enabled": true, - "category": { - "deterministic": true, - "local": false, - "subscription": false, - "stateful": 0 - }, - "extra_compute_units": 0 - } - ], + "apis": [], "headers": [], "inheritance_apis": [], "parse_directives": [], @@ -886,27 +110,7 @@ "extra_compute_units": 0 } ], - "verifications": [ - { - "name": "trace", - "parse_directive": { - "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"trace_block\",\"params\":[\"latest\"],\"id\":1}", - "function_tag": "VERIFICATION", - "result_parsing": { - "parser_arg": [ - "0" - ], - "parser_func": "PARSE_BY_ARG" - }, - "api_name": "trace_block" - }, - "values": [ - { - "expected_value": "*" - } - ] - } - ], + "verifications": [], "extensions": [] } ] @@ -957,5 +161,5 @@ } ] }, - "deposit": "10000000ulava" + "deposit": "10001000ulava" } \ No newline at end of file diff --git a/specs/testnet-2/specs/stellar.json b/specs/testnet-2/specs/stellar.json new file mode 100644 index 0000000000..2a0b07753f --- /dev/null +++ b/specs/testnet-2/specs/stellar.json @@ -0,0 +1,863 @@ +{ + "proposal": { + "title": "Add Specs: stellar", + "description": "Updated stellar spec for better relaying of stellar data", + "specs": [ + { + "index": "XLM", + "name": "stellar mainnet", + "enabled": true, + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 4, + "blocks_in_finalization_proof": 3, + "average_block_time": 5000, + "allowed_block_lag_for_qos_sync": 2, + "imports": [], + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "rest", + "internal_path": "", + "type": "GET", + "add_on": "" + }, + "apis": [ + { + "name": "/transactions", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/transactions/{transaction_hash}", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/transactions/{transaction_hash}/operations", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/transactions/{transaction_hash}/effects", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/transactions/{transaction_hash}/payments", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}", + "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": "/accounts/{account_id}/transactions", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}/operations", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}/payments", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}/effects", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}/offers", + "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": "/accounts/{account_id}/trades", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/accounts/{account_id}/data/{key}", + "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": "/assets", + "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": "/fee_stats", + "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": "/ledgers", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/operations/{id}/effects", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/ledgers/{sequence}", + "block_parsing": { + "parser_arg": [ + "0", + "sequence" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/", + "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 + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [ + { + "function_tag": "GET_BLOCK_BY_NUM", + "function_template": "/ledgers/%d", + "result_parsing": { + "parser_arg": [ + "0", + "hash" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/ledgers/{sequence}" + }, + { + "function_tag": "GET_BLOCKNUM", + "function_template": "/ledgers?order=desc&limit=1", + "result_parsing": {}, + "api_name": "/ledgers", + "parsers": [ + { + "parse_path": ".result._embedded.records[0].sequence", + "parse_type": "RESULT" + } + ] + } + ], + "verifications": [ + { + "name": "chain-id", + "parse_directive": { + "function_template": "/", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "0", + "network_passphrase" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/" + }, + "values": [ + { + "expected_value": "Public Global Stellar Network ; September 2015" + } + ] + } + ], + "extensions": [] + }, + { + "enabled": true, + "collection_data": { + "api_interface": "rest", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [ + { + "name": "/transactions", + "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": "/transactions_async", + "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 + } + ], + "headers": [ + { + "name": "content-type", + "kind": "pass_override", + "value": "application/x-www-form-urlencoded" + } + ] + }, + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [ + { + "name": "getNetwork", + "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": "getLatestLedger", + "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": "getLedgers", + "block_parsing": { + "parser_arg": [ + "0", + "startLedger" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "latest" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getLedgerEntries", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getEvents", + "block_parsing": { + "parser_arg": [ + "0", + "startLedger" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 80, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0, + "parsers": [ + { + "parse_path": ".params.endLedger", + "parse_type": "BLOCK_LATEST" + } + ] + }, + { + "name": "getTransactions", + "block_parsing": { + "parser_arg": [ + "0", + "startLedger" + ], + "parser_func": "PARSE_CANONICAL", + "default_value": "latest" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getTransaction", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getFeeStats", + "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": "getHealth", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "getVersionInfo", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "sendTransaction", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 1, + "hanging_api": true + }, + "extra_compute_units": 0, + "timeout_ms": 20000 + }, + { + "name": "simulateTransaction", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 100, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + } + ], + "headers": [], + "inheritance_apis": [], + "parse_directives": [ + { + "function_tag": "GET_BLOCKNUM", + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"getLatestLedger\", \"params\": null, \"id\":1}", + "result_parsing": { + "parser_arg": [ + "0", + "sequence" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "getLatestLedger" + }, + { + "function_tag": "GET_BLOCK_BY_NUM", + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"getLedgers\",\"params\":{\"startLedger\":%d,\"limit\":1},\"id\":1}", + "result_parsing": { + "parser_arg": [ + "0", + "ledgers", + "0", + "hash" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "getLedgers" + } + ], + "verifications": [ + { + "name": "chain-id", + "parse_directive": { + "function_template": "{\"jsonrpc\":\"2.0\",\"method\":\"getNetwork\", \"params\": {}, \"id\":1}", + "function_tag": "VERIFICATION", + "result_parsing": { + "parser_arg": [ + "0", + "passphrase" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "getNetwork" + }, + "values": [ + { + "expected_value": "Public Global Stellar Network ; September 2015" + } + ] + } + ], + "extensions": [] + } + ] + }, + { + "index": "XLMT", + "name": "stellar testnet", + "enabled": true, + "reliability_threshold": 268435455, + "data_reliability_enabled": true, + "block_distance_for_finalized_data": 4, + "blocks_in_finalization_proof": 3, + "average_block_time": 5000, + "allowed_block_lag_for_qos_sync": 2, + "imports": [ + "XLM" + ], + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "api_collections": [ + { + "enabled": true, + "collection_data": { + "api_interface": "rest", + "internal_path": "", + "type": "GET", + "add_on": "" + }, + "apis": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "Test SDF Network ; September 2015" + } + ] + } + ] + }, + { + "enabled": true, + "collection_data": { + "api_interface": "jsonrpc", + "internal_path": "", + "type": "POST", + "add_on": "" + }, + "apis": [], + "headers": [], + "inheritance_apis": [], + "parse_directives": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "Test SDF Network ; September 2015" + } + ] + } + ], + "extensions": [] + } + ] + } + ] + }, + "deposit": "10001000ulava" +} \ No newline at end of file diff --git a/specs/testnet-2/specs/tron.json b/specs/testnet-2/specs/tron.json new file mode 100644 index 0000000000..1f33af7c7c --- /dev/null +++ b/specs/testnet-2/specs/tron.json @@ -0,0 +1,1643 @@ +{ + "proposal": { + "title": "Add Specs: tron", + "description": "Updated tron spec for better relaying of tron data", + "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": 4, + "imports": [], + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "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": 20, + "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": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getassetissuelist", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/gettransactionlistfrompending", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getpendingsize", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/listwitnesses", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getbandwidthprices", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getburntrx", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getnextmaintenancetime", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/listnodes", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": true, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getpaginatednowwitnesslist", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/listproposals", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getpaginatedassetissuelist", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "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": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/createaccount", + "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/getaccountresource", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getaccountnet", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getaccountbalance", + "block_parsing": { + "parser_arg": [ + "0", + "block_identifier" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/validateaddress", + "block_parsing": { + "parser_arg": [ + "" + ], + "parser_func": "EMPTY" + }, + "compute_units": 10, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/freezebalance", + "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/unfreezebalance", + "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/freezebalancev2", + "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/unfreezebalancev2", + "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/withdrawexpireunfreeze", + "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/delegateresource", + "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/undelegateresource", + "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/getdelegatedresource", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getdelegatedresourcev2", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "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": 100, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/deploycontract", + "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/triggersmartcontract", + "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/getcontract", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getcontractinfo", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/estimateenergy", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 100, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getassetissuebyaccount", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getassetissuebyid", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getassetissuebyname", + "block_parsing": { + "parser_arg": [ + "latest", + "startNum" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getassetissuelistbyname", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/gettransactionfrompending", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": false, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getReward", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/withdrawbalance", + "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": 20, + "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/broadcasttransaction", + "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/createtransaction", + "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": 20, + "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": 80, + "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": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getblock", + "block_parsing": { + "parser_arg": [ + "0", + "id_or_num" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getblockbyid", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getblockbylatestnum", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getblockbylimitnext", + "block_parsing": { + "parser_arg": [ + "0", + "startNum" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/gettransactionbyid", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getblockbalance", + "block_parsing": { + "parser_arg": [ + "0", + "num" + ], + "parser_func": "PARSE_CANONICAL" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/updateaccount", + "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/accountpermissionupdate", + "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/cancelallunfreezev2", + "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/getdelegatedresourceaccountindex", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getdelegatedresourceaccountindexv2", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getcandelegatedmaxsize", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getcanwithdrawunfreezeamount", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getavailableunfreezecount", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getapprovedlist", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/getproposalbyid", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/proposalapprove", + "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/proposaldelete", + "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/createwitness", + "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/updatewitness", + "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/votewitnessaccount", + "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/getBrokerage", + "block_parsing": { + "parser_arg": [ + "latest" + ], + "parser_func": "DEFAULT" + }, + "compute_units": 20, + "enabled": true, + "category": { + "deterministic": true, + "local": false, + "subscription": false, + "stateful": 0 + }, + "extra_compute_units": 0 + }, + { + "name": "/wallet/updateBrokerage", + "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/createassetissue", + "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/updateasset", + "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/participateassetissue", + "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/transferasset", + "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/unfreezeasset", + "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/clearabii", + "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/updateenergylimit", + "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/updatesetting", + "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 + } + ], + "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" + }, + { + "function_tag": "GET_EARLIEST_BLOCK", + "function_template": "{\"num\":1}", + "result_parsing": { + "parser_arg": [ + "0", + "block_header", + "raw_data", + "number" + ], + "parser_func": "PARSE_CANONICAL" + }, + "api_name": "/wallet/getblockbynum" + } + ], + "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" + } + ] + }, + { + "name": "pruning", + "parse_directive": { + "function_tag": "GET_EARLIEST_BLOCK" + }, + "values": [ + { + "latest_distance": 128 + }, + { + "extension": "archive", + "expected_value": "1" + } + ] + } + ], + "extensions": [ + { + "name": "archive", + "cu_multiplier": 5, + "rule": { + "block": 127 + } + } + ] + } + ] + }, + { + "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": 4, + "imports": [ + "TRX" + ], + "shares": 1, + "min_stake_provider": { + "denom": "ulava", + "amount": "5000000000" + }, + "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": [], + "verifications": [ + { + "name": "chain-id", + "values": [ + { + "expected_value": "0000000000000000de1aa88295e1fcf982742f773e0419c5a9c134c994a9059e" + } + ] + } + ], + "extensions": [] + } + ] + } + ] + }, + "deposit": "10001000ulava" +} \ No newline at end of file diff --git a/tron_provider_config.yml b/tron_provider_config.yml new file mode 100644 index 0000000000..2eb99f9474 --- /dev/null +++ b/tron_provider_config.yml @@ -0,0 +1,10 @@ +endpoints: + - api-interface: rest + chain-id: TRX + network-address: + address: 127.0.0.1:2220 + node-urls: + - url: https://api.trongrid.io + auth-config: + auth-headers: + TRON-PRO-API-KEY: "XXXXX"