stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 671 forks source link

feat: add a consolidated endpoint for current and prior sortitions #5213

Closed kantai closed 1 month ago

kantai commented 1 month ago

Description

This implements the lowest hanging fruit for https://github.com/stacks-network/stacks-core/issues/5200 by adding an endpoint that returns both the current and prior sortitions.

wileyj commented 1 month ago
error[E0560]: struct `SortitionsView` has no field named `latest_consensus_hash`
Error:   --> stacks-signer/src/tests/chainstate.rs:85:9
   |
85 |         latest_consensus_hash: cur_sortition.consensus_hash,
   |         ^^^^^^^^^^^^^^^^^^^^^ `SortitionsView` does not have this field
   |
   = note: all struct fields are already assigned

For more information about this error, try `rustc --explain E0560`.
error: could not compile `stacks-signer` (lib test) due to 1 previous error

we also need an openapi doc for the signer, would be nice to document this endpoint so it's not forgotten (i'll create an issue for that specifically though - doesn't seem appropriate to add to stacks-core's openapi doc)

blockstack-devops commented 3 weeks ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.