allow witness_node version to be queried using curl command #391

Closed
opened 2022-06-14 21:00:34 +00:00 by prandnum · 6 comments
prandnum commented 2022-06-14 21:00:34 +00:00 (Migrated from gitlab.com)

Today we have the following list of commands which can be invoked via curl command.

"cancel_all_subscriptions",
"get_24_volume",
"get_account_balances",
"get_account_by_name",
"get_account_count",
"get_account_id_from_string",
"get_account_lotteries",
"get_account_references",
"get_account_roles_by_owner",
"get_accounts",
"get_active_custom_account_authorities_by_operation",
"get_active_son_wallet",
"get_all_unmatched_bets_for_bettor",
"get_asset_count",
"get_asset_id_from_string",
"get_assets",
"get_balance_objects",
"get_blinded_balances",
"get_block",
"get_block_header",
"get_block_header_batch",
"get_blocks",
"get_call_orders",
"get_chain_id",
"get_chain_properties",
"get_committee_member_by_account",
"get_committee_members",
"get_config",
"get_custom_account_authorities",
"get_custom_account_authorities_by_permission_id",
"get_custom_account_authorities_by_permission_name",
"get_custom_permission_by_name",
"get_custom_permissions",
"get_dynamic_global_properties",
"get_full_accounts",
"get_global_betting_statistics",
"get_global_properties",
"get_gpos_info",
"get_key_references",
"get_limit_orders",
"get_lotteries",
"get_lottery_balance",
"get_margin_positions",
"get_named_account_balances",
"get_objects",
"get_offer_history_by_bidder",
"get_offer_history_by_issuer",
"get_offer_history_by_item",
"get_offers_by_issuer",
"get_offers_by_item",
"get_order_book",
"get_potential_address_signatures",
"get_potential_signatures",
"get_proposed_transactions",
"get_recent_transaction_by_id",
"get_registered_tournaments",
"get_required_fees",
"get_required_signatures",
"get_settle_orders",
"get_sidechain_address_by_account_and_sidechain",
"get_sidechain_addresses",
"get_sidechain_addresses_by_account",
"get_sidechain_addresses_by_sidechain",
"get_sidechain_addresses_count",
"get_son_by_account",
"get_son_count",
"get_son_wallet_by_time_point",
"get_son_wallets",
"get_sons",
"get_sweeps_vesting_balance_available_for_claim",
"get_sweeps_vesting_balance_object",
"get_ticker",
"get_tournaments",
"get_tournaments_by_state",
"get_tournaments_in_state",
"get_trade_history",
"get_transaction",
"get_transaction_hex",
"get_unmatched_bets_for_bettor",
"get_vested_balances",
"get_vesting_balances",
"get_witness_by_account",
"get_witness_count",
"get_witnesses",
"get_workers_by_account",
"is_public_key_registered",
"list_assets",
"list_betting_market_groups",
"list_betting_markets",
"list_buy_offers",
"list_event_groups",
"list_events_in_group",
"list_offer_history",
"list_offers",
"list_sell_offers",
"list_sports",
"lookup_account_names",
"lookup_accounts",
"lookup_asset_symbols",
"lookup_committee_member_accounts",
"lookup_son_accounts",
"lookup_vote_ids",
"lookup_witness_accounts",
"nft_get_all_tokens",
"nft_get_approved",
"nft_get_balance",
"nft_get_name",
"nft_get_symbol",
"nft_get_token_uri",
"nft_get_tokens_by_owner",
"nft_get_total_supply",
"nft_is_approved_for_all",
"nft_owner_of",
"nft_token_by_index",
"nft_token_of_owner_by_index",
"set_block_applied_callback",
"set_pending_transaction_callback",
"set_subscribe_callback",
"subscribe_to_market",
"unsubscribe_from_market",
"validate_transaction",
"verify_account_authority",
"verify_authority",

We need to enhance it to allow to query the witness_node version("method": "get_witness_version") used by the specific witness, which will let us know whether witness is running the correct version in the chain

curl --silent --data '{"jsonrpc": "2.0", "method": "get_witness_version", "params": [], "id": 1}' http://96.46.50.60:8090/rpc

Today we have the following list of commands which can be invoked via curl command. ``` "cancel_all_subscriptions", "get_24_volume", "get_account_balances", "get_account_by_name", "get_account_count", "get_account_id_from_string", "get_account_lotteries", "get_account_references", "get_account_roles_by_owner", "get_accounts", "get_active_custom_account_authorities_by_operation", "get_active_son_wallet", "get_all_unmatched_bets_for_bettor", "get_asset_count", "get_asset_id_from_string", "get_assets", "get_balance_objects", "get_blinded_balances", "get_block", "get_block_header", "get_block_header_batch", "get_blocks", "get_call_orders", "get_chain_id", "get_chain_properties", "get_committee_member_by_account", "get_committee_members", "get_config", "get_custom_account_authorities", "get_custom_account_authorities_by_permission_id", "get_custom_account_authorities_by_permission_name", "get_custom_permission_by_name", "get_custom_permissions", "get_dynamic_global_properties", "get_full_accounts", "get_global_betting_statistics", "get_global_properties", "get_gpos_info", "get_key_references", "get_limit_orders", "get_lotteries", "get_lottery_balance", "get_margin_positions", "get_named_account_balances", "get_objects", "get_offer_history_by_bidder", "get_offer_history_by_issuer", "get_offer_history_by_item", "get_offers_by_issuer", "get_offers_by_item", "get_order_book", "get_potential_address_signatures", "get_potential_signatures", "get_proposed_transactions", "get_recent_transaction_by_id", "get_registered_tournaments", "get_required_fees", "get_required_signatures", "get_settle_orders", "get_sidechain_address_by_account_and_sidechain", "get_sidechain_addresses", "get_sidechain_addresses_by_account", "get_sidechain_addresses_by_sidechain", "get_sidechain_addresses_count", "get_son_by_account", "get_son_count", "get_son_wallet_by_time_point", "get_son_wallets", "get_sons", "get_sweeps_vesting_balance_available_for_claim", "get_sweeps_vesting_balance_object", "get_ticker", "get_tournaments", "get_tournaments_by_state", "get_tournaments_in_state", "get_trade_history", "get_transaction", "get_transaction_hex", "get_unmatched_bets_for_bettor", "get_vested_balances", "get_vesting_balances", "get_witness_by_account", "get_witness_count", "get_witnesses", "get_workers_by_account", "is_public_key_registered", "list_assets", "list_betting_market_groups", "list_betting_markets", "list_buy_offers", "list_event_groups", "list_events_in_group", "list_offer_history", "list_offers", "list_sell_offers", "list_sports", "lookup_account_names", "lookup_accounts", "lookup_asset_symbols", "lookup_committee_member_accounts", "lookup_son_accounts", "lookup_vote_ids", "lookup_witness_accounts", "nft_get_all_tokens", "nft_get_approved", "nft_get_balance", "nft_get_name", "nft_get_symbol", "nft_get_token_uri", "nft_get_tokens_by_owner", "nft_get_total_supply", "nft_is_approved_for_all", "nft_owner_of", "nft_token_by_index", "nft_token_of_owner_by_index", "set_block_applied_callback", "set_pending_transaction_callback", "set_subscribe_callback", "subscribe_to_market", "unsubscribe_from_market", "validate_transaction", "verify_account_authority", "verify_authority", ``` We need to enhance it to allow to query the witness_node version("method": "get_witness_version") used by the specific witness, which will let us know whether witness is running the correct version in the chain curl --silent --data '{"jsonrpc": "2.0", "method": "get_witness_version", "params": [], "id": 1}' http://96.46.50.60:8090/rpc
prandnum commented 2022-06-14 21:00:48 +00:00 (Migrated from gitlab.com)

@bobinson @serkixenos

@bobinson @serkixenos
bobinson commented 2022-06-15 06:24:26 +00:00 (Migrated from gitlab.com)

It will be a good idea and can be used in various scripts @prandnum

It will be a good idea and can be used in various scripts @prandnum
serkixenos commented 2022-06-16 02:36:13 +00:00 (Migrated from gitlab.com)

assigned to @serkixenos

assigned to @serkixenos
serkixenos commented 2022-06-17 17:23:00 +00:00 (Migrated from gitlab.com)

assigned to @prandnum

assigned to @prandnum
serkixenos commented 2022-06-17 17:23:25 +00:00 (Migrated from gitlab.com)

Test with the following command

curl --silent --data '{"jsonrpc": "2.0", "method": "get_version_info", "params": [], "id": 1}' http://127.0.0.1:8090/rpc | jq -r ".result"

Output:

{
  "version": "test-1.5.4-199-geb2894c3",
  "git_revision": "eb2894c3d39c8416e86da9ef961266958c71e692",
  "built": "Jun 17 2022 at 20:36:02",
  "openssl": "OpenSSL 1.1.1f  31 Mar 2020",
  "boost": "1.71"
}
Test with the following command ``` curl --silent --data '{"jsonrpc": "2.0", "method": "get_version_info", "params": [], "id": 1}' http://127.0.0.1:8090/rpc | jq -r ".result" ``` Output: ``` { "version": "test-1.5.4-199-geb2894c3", "git_revision": "eb2894c3d39c8416e86da9ef961266958c71e692", "built": "Jun 17 2022 at 20:36:02", "openssl": "OpenSSL 1.1.1f 31 Mar 2020", "boost": "1.71" } ```
prandnum commented 2022-06-17 21:46:14 +00:00 (Migrated from gitlab.com)
bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/cli_wallet$ curl --silent --data '{"jsonrpc": "2.0", "method": "get_version_info", "params": [], "id": 1}' http://127.0.0.1:9090/rpc | jq -r ".result"
{
  "version": "test-1.5.4-199-geb2894c3",
  "git_revision": "eb2894c3d39c8416e86da9ef961266958c71e692",
  "built": "Jun 17 2022 at 17:48:04",
  "openssl": "OpenSSL 1.1.1f  31 Mar 2020",
  "boost": "1.71"
}
bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/cli_wallet$
bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/cli_wallet$
bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/cli_wallet$ cd ../witness_node/
bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/witness_node$ ./witness_node --version
Version: test-1.5.4-199-geb2894c3
Git Revision: eb2894c3d39c8416e86da9ef961266958c71e692
Built: Jun 17 2022 at 17:52:00
SSL: OpenSSL 1.1.1f  31 Mar 2020
Boost: 1.71
bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/witness_node$
``` bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/cli_wallet$ curl --silent --data '{"jsonrpc": "2.0", "method": "get_version_info", "params": [], "id": 1}' http://127.0.0.1:9090/rpc | jq -r ".result" { "version": "test-1.5.4-199-geb2894c3", "git_revision": "eb2894c3d39c8416e86da9ef961266958c71e692", "built": "Jun 17 2022 at 17:48:04", "openssl": "OpenSSL 1.1.1f 31 Mar 2020", "boost": "1.71" } bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/cli_wallet$ bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/cli_wallet$ bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/cli_wallet$ cd ../witness_node/ bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/witness_node$ ./witness_node --version Version: test-1.5.4-199-geb2894c3 Git Revision: eb2894c3d39c8416e86da9ef961266958c71e692 Built: Jun 17 2022 at 17:52:00 SSL: OpenSSL 1.1.1f 31 Mar 2020 Boost: 1.71 bunker@ubuntu-template:~/PBSA/18062022/peerplays/programs/witness_node$ ```
prandnum (Migrated from gitlab.com) closed this issue 2022-06-17 21:46:15 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#391
No description provided.