diff --git a/hedera-mirror-rest/__tests__/application.yml b/hedera-mirror-rest/__tests__/application.yml index 0dfa073a790..4c9cf325f68 100644 --- a/hedera-mirror-rest/__tests__/application.yml +++ b/hedera-mirror-rest/__tests__/application.yml @@ -5,5 +5,3 @@ hedera: enabled: false redis: enabled: false - response: - includeAdminKey: true diff --git a/hedera-mirror-rest/__tests__/specs/network/nodes/include-admin-key-feature-flag-false.json b/hedera-mirror-rest/__tests__/specs/network/nodes/include-admin-key-feature-flag-false.json deleted file mode 100644 index cf846a283e4..00000000000 --- a/hedera-mirror-rest/__tests__/specs/network/nodes/include-admin-key-feature-flag-false.json +++ /dev/null @@ -1,210 +0,0 @@ -{ - "description": "Network nodes API with all params", - "setup": { - "config": { - "response": { - "includeAdminKey": false - } - }, - "addressbooks": [ - { - "start_consensus_timestamp": 1, - "memo": null, - "file_id": 101, - "node_count": 1 - }, - { - "start_consensus_timestamp": 2, - "file_id": 102, - "node_count": 1 - }, - { - "start_consensus_timestamp": 187654000123456, - "memo": null, - "file_id": 101, - "node_count": 2 - }, - { - "start_consensus_timestamp": 187654000123457, - "file_id": 102, - "node_count": 2 - } - ], - "addressbookentries": [ - { - "consensus_timestamp": 1, - "node_id": 0, - "node_account_id": 3 - }, - { - "consensus_timestamp": 2, - "memo": "0.0.3", - "node_id": 0, - "node_account_id": 3 - }, - { - "consensus_timestamp": 187654000123456, - "node_id": 0, - "node_account_id": 3 - }, - { - "consensus_timestamp": 187654000123456, - "node_id": 1, - "node_account_id": 4 - }, - { - "consensus_timestamp": 187654000123457, - "memo": "0.0.3", - "node_id": 0, - "node_account_id": 3 - }, - { - "consensus_timestamp": 187654000123457, - "memo": "0.0.4", - "node_id": 1, - "node_account_id": 4 - } - ], - "addressbookserviceendpoints": [ - { - "consensus_timestamp": 1, - "ip_address_v4": "127.0.0.1", - "node_id": 0, - "port": 50211 - }, - { - "consensus_timestamp": 2, - "ip_address_v4": "128.0.0.1", - "node_id": 0, - "port": 50212 - }, - { - "consensus_timestamp": 187654000123456, - "ip_address_v4": "127.0.0.3", - "node_id": 0, - "port": 50213 - }, - { - "consensus_timestamp": 187654000123456, - "ip_address_v4": "127.0.0.4", - "node_id": 1, - "port": 50214 - }, - { - "consensus_timestamp": 187654000123457, - "domain_name": "https://www.node5.com", - "ip_address_v4": "", - "port": 50215, - "node_id": 0 - }, - { - "consensus_timestamp": 187654000123457, - "ip_address_v4": "128.0.0.6", - "node_id": 1, - "port": 50216 - } - ], - "nodestakes": [ - { - "consensus_timestamp": 1, - "epoch_day": 1, - "node_id": 0, - "reward_rate": 5, - "stake": 10, - "stake_rewarded": 2 - }, - { - "consensus_timestamp": 2, - "epoch_day": 2, - "node_id": 0, - "reward_rate": 6, - "stake": 11, - "stake_rewarded": 3 - }, - { - "consensus_timestamp": 187654000123456, - "epoch_day": 3, - "node_id": 0, - "reward_rate": 7, - "stake": 12, - "stake_rewarded": 4 - }, - { - "consensus_timestamp": 187654000123456, - "epoch_day": 1, - "node_id": 1, - "reward_rate": 8, - "stake": 100, - "stake_rewarded": 20 - }, - { - "_description": "An old entry without data for max_stake, min_stake, and stake_not_rewarded", - "consensus_timestamp": 187654000123457, - "max_stake": -1, - "min_stake": -1, - "epoch_day": 4, - "node_id": 0, - "reward_rate": 9, - "stake": 13, - "stake_not_rewarded": -1, - "stake_rewarded": 5 - }, - { - "consensus_timestamp": 187654000123457, - "epoch_day": 2, - "node_id": 1, - "reward_rate": 10, - "stake": 101, - "stake_rewarded": 21 - } - ], - "nodes": [ - { - "admin_key": "3a21b5b1ce6a41a2c3c147ea7c183cbabca97c519cc257ac02b673043b0482fcabd0c4", - "node_id": 0, - "created_timestamp": 1664365660048674966, - "deleted": false, - "timestamp_range": "[0,)" - } - ] - }, - "url": "/api/v1/network/nodes?file.id=102&node.id=0&limit=1&order=desc", - "responseStatus": 200, - "responseJson": { - "nodes": [ - { - "description": "description", - "file_id": "0.0.102", - "max_stake": null, - "memo": "0.0.3", - "min_stake": null, - "node_account_id": "0.0.3", - "node_cert_hash": "0x01d173753810c0aae794ba72d5443c292e9ff962b01046220dd99f5816422696e0569c977e2f169e1e5688afc8f4aa16", - "node_id": 0, - "public_key": "0x4a5ad514f0957fa170a676210c9bdbddf3bc9519702cf915fa6767a40463b96f", - "reward_rate_start": 9, - "service_endpoints": [ - { - "domain_name": "https://www.node5.com", - "ip_address_v4": "", - "port": 50215 - } - ], - "stake": 13, - "stake_not_rewarded": null, - "stake_rewarded": 5, - "staking_period": { - "from": "86400.000000000", - "to": "172800.000000000" - }, - "timestamp": { - "from": "187654.000123457", - "to": null - } - } - ], - "links": { - "next": "/api/v1/network/nodes?file.id=102&node.id=0&limit=1&order=desc" - } - } -} diff --git a/hedera-mirror-rest/config/application.yml b/hedera-mirror-rest/config/application.yml index 9448ec9632f..3d8f51036ed 100644 --- a/hedera-mirror-rest/config/application.yml +++ b/hedera-mirror-rest/config/application.yml @@ -138,7 +138,6 @@ hedera: { "cache-control": "public, max-age=600" } /api/v1/transactions/:transactionId/stateproof: { "cache-control": "public, max-age=600" } - includeAdminKey: false includeHostInLink: false limit: default: 25 diff --git a/hedera-mirror-rest/viewmodel/networkNodeViewModel.js b/hedera-mirror-rest/viewmodel/networkNodeViewModel.js index 64d46bb66df..ee0458e55ac 100644 --- a/hedera-mirror-rest/viewmodel/networkNodeViewModel.js +++ b/hedera-mirror-rest/viewmodel/networkNodeViewModel.js @@ -17,7 +17,6 @@ import AddressBookServiceEndpointViewModel from './addressBookServiceEndpointViewModel'; import EntityId from '../entityId'; import * as utils from '../utils'; -import config from '../config'; /** * Network node view model @@ -30,9 +29,7 @@ class NetworkNodeViewModel { */ constructor(networkNode) { const {addressBookEntry, nodeStake, node} = networkNode; - if (config.response.includeAdminKey) { - this.admin_key = utils.encodeKey(node.adminKey); - } + this.admin_key = utils.encodeKey(node.adminKey); this.description = addressBookEntry.description; this.file_id = EntityId.parse(networkNode.addressBook.fileId).toString(); this.max_stake = utils.asNullIfDefault(nodeStake.maxStake, -1);