You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, we track performance by looking at view timeout logs (view timed out, $.fields.leader gives the node who should have been driving that view). This information is also inferable from looking at the chain, although there is not a nice collated endpoint right now. But the way we would do it is look at decided leaves (e.g. https://query.decaf.testnet.espresso.network/v0/availability/leaf/100 or https://query.decaf.testnet.espresso.network/v0/availability/stream/leaves), look at $.leaf.view_number to see views which are successful, then figuring out which views we aren't seeing to find unsuccessful views, and finally mapping view number back to leader by taking view number mod 100 (total number of nodes) and indexing into the stake table (https://query.decaf.testnet.espresso.network/v0/config/hotshot, $.config.known_nodes_with_stake)
We can make a better endpoint for pulling this data. Th interface should look like GET /node/leader-performance/:pubkey/:from/:to with :from and :to being unix timestamps specifying the window of interest, and returning a float in [0, 1] indicating the fraction of views in that window where that leader was successful. We can also include for convenience an endpoint GET /node/leader-performance/:pubkey/:from where :from indicates a number of seconds back from the current time.
The text was updated successfully, but these errors were encountered:
At the moment, we track performance by looking at view timeout logs (
view timed out
,$.fields.leader
gives the node who should have been driving that view). This information is also inferable from looking at the chain, although there is not a nice collated endpoint right now. But the way we would do it is look at decided leaves (e.g. https://query.decaf.testnet.espresso.network/v0/availability/leaf/100 or https://query.decaf.testnet.espresso.network/v0/availability/stream/leaves), look at$.leaf.view_number
to see views which are successful, then figuring out which views we aren't seeing to find unsuccessful views, and finally mapping view number back to leader by taking view number mod 100 (total number of nodes) and indexing into the stake table (https://query.decaf.testnet.espresso.network/v0/config/hotshot,$.config.known_nodes_with_stake
)We can make a better endpoint for pulling this data. Th interface should look like
GET /node/leader-performance/:pubkey/:from/:to
with:from
and:to
being unix timestamps specifying the window of interest, and returning a float in[0, 1]
indicating the fraction of views in that window where that leader was successful. We can also include for convenience an endpointGET /node/leader-performance/:pubkey/:from
where:from
indicates a number of seconds back from the current time.The text was updated successfully, but these errors were encountered: