Draft: lib, bark, server: introduce PolicyBlockHeight and PolicyBlockDelta

We introduce the bounded types PolicyBlockHeight, and PolicyBlockDelta along with invariants to only work with "safe" values. Along with this, we introduce some more careful handling at wire and config boundaries.

It's a little more verbose, but makes valid block heights and deltas more well-defined. You can escape the bounded types with their respective .to_raw() methods.

This is quite a breaking change.

Seeking conceptual/impl review.

Edited by Duncan Dean

Merge request reports

Loading