bro-n-bro / spacebox-api

Flask api for services on top of spacebox
MIT License
4 stars 0 forks source link

Several Api fixes #89

Closed bro-n-bro-2 closed 9 months ago

bro-n-bro-2 commented 1 year ago

Validator tab: Endpoint - statistics/get_statistics_validators

Endpoint - /statistics/get_statistics_validators__operatoraddress

New endpoint:

Endpoint - /statistics/get_statistics_inactive_accounts

Endpoint -/statistics/get_statistics_total_accounts

Endpoint - statistics/get_statistics_blocks_time

Account tab: Add additional endpoint with static value.

iljagrabar14 commented 1 year ago

@bro-n-bro-0 Additional endpoint inactive_accounts as historical value Please provide sql

iljagrabar14 commented 1 year ago

Restake enabled (yes,no) spacebox.exec_message msgs type message delegate -> delegator address invalid json, must be fixed in DB before

iljagrabar14 commented 1 year ago

Validator Rank, according to voting power from 1 to n based on validator_voting_power

iljagrabar14 commented 1 year ago

active validators select * FROM spacebox.validator_status FINAL WHERE status = 3 and jailed = FALSE

iljagrabar14 commented 1 year ago

validator created - select FROM spacebox.create_validator_message cvm
proposal created - select
FROM spacebox.proposal submit_type

iljagrabar14 commented 1 year ago

select * FROM spacebox.validator_precommit vp for last 10000 count of each validator / 10000

for 500: return like true/false for each validator does he sign each block

iljagrabar14 commented 1 year ago

@bro-n-bro-0 can't find a way to calculate proposals , that were created after validator was created. here is sql example, how i thought it could work

select 
    t.*,
    (select count(*) from spacebox.proposal as p where p.submit_time > t.timestamp ) as value
    from (
        select * from spacebox.create_validator_message as cvm
        left join (select * from spacebox.block) as b on cvm.height = b.height
    ) as t

UPD: for each calculate separately

iljagrabar14 commented 1 year ago

@bro-n-bro-0

Add uptime stats. Static value for 10k blocks

Don't really get it, looks like some validators appears more often then 1 time in each block, let's discuss

iljagrabar14 commented 12 months ago

@bro-n-bro-0 please help with it, any ideas? Unique delegators historical data

iljagrabar14 commented 12 months ago

@bro-n-bro-0 Add commission earned as static

Timeout error