Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support query for masternode via (D)API #2036

Open
PanderMusubi opened this issue Aug 3, 2024 · 6 comments
Open

Support query for masternode via (D)API #2036

PanderMusubi opened this issue Aug 3, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@PanderMusubi
Copy link

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 PanderMusubi added the enhancement New feature or request label Aug 3, 2024
@PanderMusubi
Copy link
Author

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

@pshenmic
Copy link
Collaborator

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
Copy link
Collaborator

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

image

@thephez
Copy link
Collaborator

thephez commented Aug 23, 2024

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

image

It was disabled in #1857. I think because there was concern about how resource-intensive it is.

@PanderMusubi
Copy link
Author

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.

@shumkov
Copy link
Member

shumkov commented Sep 23, 2024

Yeah, we will come back to it a bit later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

4 participants