platform icon indicating copy to clipboard operation
platform copied to clipboard

Support query for masternode via (D)API

Open PanderMusubi opened this issue 1 year ago • 7 comments

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.

PanderMusubi avatar Aug 03 '24 13:08 PanderMusubi

Firo seems to have an implementation, but it isn't working currently. I will try to find the source code.

PanderMusubi avatar Aug 10 '24 14:08 PanderMusubi

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;
}

pshenmic avatar Aug 23 '24 05:08 pshenmic

However, I just checked the DAPI source code. it just turnt off for some reason

image

pshenmic avatar Aug 23 '24 05:08 pshenmic

However, I just checked the DAPI source code. it just turnt off for some reason

image

It was disabled in https://github.com/dashpay/platform/pull/1857. I think because there was concern about how resource-intensive it is.

thephez avatar Aug 23 '24 23:08 thephez

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.

PanderMusubi avatar Aug 25 '24 13:08 PanderMusubi

Yeah, we will come back to it a bit later

shumkov avatar Sep 23 '24 15:09 shumkov

We have no intention to add this in any 2.x version.

QuantumExplorer avatar Jul 15 '25 11:07 QuantumExplorer