Hive Developers logo

Hive Developer Portal

Methods:

This plugin allows all sorts of creative “what-if” experiments with the chain.

See: debug_node_plugin.md

debug_node_api.debug_generate_blocks

Generate blocks locally.

Query Parameters JSON
{
  "debug_key": "",
  "count": 0,
  "skip": 0,
  "miss_blocks": 0
}
Expected Response JSON
{"blocks": 0}

debug_node_api.debug_generate_blocks_until

Generate blocks locally until a specified head block time. Can generate them sparsely.

Query Parameters JSON
{
  "debug_key": "",
  "head_block_time": "1970-01-01T00:00:00",
  "generate_sparsely": true
}
Expected Response JSON
{"blocks": 0}

debug_node_api.debug_get_hardfork_property_object

Query Parameters JSON
{}
Expected Response JSON
{
  "id": 0,
  "processed_hardforks": [],
  "last_hardfork": 0,
  "current_hardfork_version": "0.0.0",
  "next_hardfork": "0.0.0",
  "next_hardfork_time": "1970-01-01T00:00:00"
}

debug_node_api.debug_get_json_schema

Query Parameters JSON
{}
Expected Response JSON
{"schema": ""}

debug_node_api.debug_get_witness_schedule

Query Parameters JSON
{}
Expected Response JSON
{
  "id": 0,
  "current_virtual_time": "0",
  "next_shuffle_block_num": 21573344,
  "current_shuffled_witnesses": [],
  "num_scheduled_witnesses": 192,
  "elected_weight": 49,
  "timeshare_weight": 73,
  "miner_weight": 1,
  "witness_pay_normalization_factor": 0,
  "median_props": {
    "account_creation_fee": {
      "amount": "0",
      "precision": 3,
      "nai": "@@000000021"
    },
    "maximum_block_size": 131072,
    "hbd_interest_rate": 1000,
    "account_subsidy_budget": 797,
    "account_subsidy_decay": 347321
  },
  "majority_version": "0.0.0",
  "max_voted_witnesses": 128,
  "max_miner_witnesses": 131,
  "max_runner_witnesses": 191,
  "hardfork_required_witnesses": 4,
  "account_subsidy_rd": {
    "resource_unit": 0,
    "budget_per_time_unit": 0,
    "pool_eq": 0,
    "max_pool_size": 0,
    "decay_params": {
      "decay_per_time_unit": 0,
      "decay_per_time_unit_denom_shift": 0
    },
    "min_decay": 0
  },
  "account_subsidy_witness_rd": {
    "resource_unit": 0,
    "budget_per_time_unit": 0,
    "pool_eq": 0,
    "max_pool_size": 0,
    "decay_params": {
      "decay_per_time_unit": 0,
      "decay_per_time_unit_denom_shift": 0
    },
    "min_decay": 0
  },
  "min_witness_account_subsidy_decay": 0
}

debug_node_api.debug_has_hardfork

Query Parameters JSON
{"hardfork_id": 0}
Expected Response JSON
{"has_hardfork": false}

debug_node_api.debug_pop_block

Pop a block from the blockchain, returning it.

Replacement / Successor
Query Parameters JSON
{}
Expected Response JSON
{}

debug_node_api.debug_push_blocks

Push blocks from existing database.

Replacement / Successor
Query Parameters JSON
{
  "src_filename": "",
  "count": 0,
  "skip_validate_invariants": false
}
Expected Response JSON
{"blocks": 0}

debug_node_api.debug_set_hardfork

Query Parameters JSON
{"hardfork_id": 0, "hook_to_tx": ""}
Expected Response JSON
{}

debug_node_api.debug_fail_transaction

Registers a transaction id that should fail during debug-node block application.

This is local/testnet debug tooling. Public API nodes do not normally expose debug_node_api.

Query Parameters JSON
{
  "tx_id": "0000000000000000000000000000000000000000"
}
Expected Response JSON
{}

debug_node_api.debug_get_future_witness_schedule

Returns the future witness schedule object.

This method is available after HF26 and exposes the raw debug-node witness schedule shape.

Query Parameters JSON
{}
Expected Response JSON
{
  "id": 0,
  "current_virtual_time": "965626696637118176548648739",
  "next_shuffle_block_num": 96113997,
  "current_shuffled_witnesses": ["blocktrades", "gtg", "arcange"],
  "num_scheduled_witnesses": 21,
  "elected_weight": 1,
  "timeshare_weight": 5,
  "miner_weight": 1,
  "witness_pay_normalization_factor": 25,
  "median_props": {
    "account_creation_fee": {
      "amount": "3000",
      "precision": 3,
      "nai": "@@000000021"
    },
    "maximum_block_size": 65536,
    "hbd_interest_rate": 1500,
    "account_subsidy_budget": 797,
    "account_subsidy_decay": 347321
  },
  "majority_version": "1.27.3",
  "max_voted_witnesses": 20,
  "max_miner_witnesses": 0,
  "max_runner_witnesses": 1,
  "hardfork_required_witnesses": 17,
  "account_subsidy_rd": {
    "resource_unit": 10000,
    "budget_per_time_unit": 797,
    "pool_eq": 157691079,
    "max_pool_size": 157691079,
    "decay_params": {
      "decay_per_time_unit": 347321,
      "decay_per_time_unit_denom_shift": 36
    },
    "min_decay": 0
  },
  "account_subsidy_witness_rd": {
    "resource_unit": 10000,
    "budget_per_time_unit": 996,
    "pool_eq": 9384019,
    "max_pool_size": 9384019,
    "decay_params": {
      "decay_per_time_unit": 7293741,
      "decay_per_time_unit_denom_shift": 36
    },
    "min_decay": 179
  },
  "min_witness_account_subsidy_decay": 0
}

debug_node_api.debug_get_head_block

Returns the current head block from the debug node.

Query Parameters JSON
{}
Expected Response JSON
{
  "block": {
    "previous": "0000000000000000000000000000000000000000",
    "timestamp": "1970-01-01T00:00:00",
    "witness": "initminer",
    "transaction_merkle_root": "0000000000000000000000000000000000000000",
    "extensions": [],
    "witness_signature": "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "transactions": []
  }
}

debug_node_api.debug_set_vest_price

Sets the debug node price used to convert VESTS to HIVE.

hook_to_tx is optional and can be used to attach the debug update to a transaction id.

Query Parameters JSON
{
  "vest_price": {
    "base": {
      "amount": "100000",
      "precision": 3,
      "nai": "@@000000021"
    },
    "quote": {
      "amount": "27009",
      "precision": 3,
      "nai": "@@000000013"
    }
  },
  "hook_to_tx": ""
}
Expected Response JSON
{}

debug_node_api.debug_throw_exception

Enables or disables artificial exception throwing in the debug node.

Query Parameters JSON
{"throw_exception": true}
Expected Response JSON
{}