Support query for masternode via (D)API
Expected Behavior
(As discussed on Discord) Query the API https://explorer.dash.org/insight-api/ or DAPI to retrieve information related to masternode, specifically Status and PoSe Score.
Current Behavior
This is currently not available.
Possible Solution
Extend the current (D)API.
Alternatives Considered
Additional Context
This remove the need to run a daemon with block chain in order to get this information.
Firo seems to have an implementation, but it isn't working currently. I will try to find the source code.
There is actually such query in the DAPI
rpc getMasternodeStatus (GetMasternodeStatusRequest) returns (GetMasternodeStatusResponse);
message GetMasternodeStatusResponse {
enum Status {
UNKNOWN = 0;
WAITING_FOR_PROTX = 1;
POSE_BANNED = 2;
REMOVED = 3;
OPERATOR_KEY_CHANGED = 4;
PROTX_IP_CHANGED = 5;
READY = 6;
ERROR = 7;
}
Status status = 1;
bytes pro_tx_hash = 2;
uint32 pose_penalty = 3;
bool is_synced = 4;
double sync_progress = 5;
}
However, I just checked the DAPI source code. it just turnt off for some reason
However, I just checked the DAPI source code. it just turnt off for some reason
![]()
It was disabled in https://github.com/dashpay/platform/pull/1857. I think because there was concern about how resource-intensive it is.
Can it be enabled again? With Perhaps some monitoring how resource intense it gets. IP-based throttling might be good anyways to keep it fair use. For bulk use better people run a daemon themselves.
Yeah, we will come back to it a bit later
We have no intention to add this in any 2.x version.