Merge pull request #670 from pragma-org/rk/era-names
add EraName enum and era_name property to era Summary
add EraName enum and era_name property to era Summary
Signed-off-by: KtorZ <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
Few things are happening in this commit...
1. TimeMs has been renamed into `SerialisedAsMillis` and
`SerialisedAsPico`; mostly used as newtype wrapper when serializing
/ deserializing durations. They allow to influence the shape of the
serialised data according to _what kind of duration_ do they
represent.
2. TimeMs, and its replacements, is no longer exposed. We favor
idiomatic Rust 'Duration' and 'SystemTime' instead. Which means
that the API of the era history had to slightly change.
3. The serialisation of the era history has been fixed... there were a
comment about how the Haskell node encodes some type representing
seconds with a pico precision, while some other type representing
durations are encoded and treated as milliseconds. However, the
code was conflating both scenarios. In fact, we have:
1. RelativeTime; representing a number of seconds, CBOR-encoded with
pico precision.
2. SlotLength; representing a number of milliseconds, and treated
as such.
In both cases, we now currently use `Duration`, and handle
encoding/decoding in a bespoke fashion.
Note that I think the "better" design would be to introduce proper
newtypes for the relative time and the slot length, though it is
more convenient as the moment to rely on Duration as it leads to
less changes. So perhaps in another iteration.
Signed-off-by: KtorZ <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: KtorZ <[email protected]>
Few things are happening in this commit...
1. TimeMs has been renamed into `SerialisedAsMillis` and
`SerialisedAsPico`; mostly used as newtype wrapper when serializing
/ deserializing durations. They allow to influence the shape of the
serialised data according to _what kind of duration_ do they
represent.
2. TimeMs, and its replacements, is no longer exposed. We favor
idiomatic Rust 'Duration' and 'SystemTime' instead. Which means
that the API of the era history had to slightly change.
3. The serialisation of the era history has been fixed... there were a
comment about how the Haskell node encodes some type representing
seconds with a pico precision, while some other type representing
durations are encoded and treated as milliseconds. However, the
code was conflating both scenarios. In fact, we have:
1. RelativeTime; representing a number of seconds, CBOR-encoded with
pico precision.
2. SlotLength; representing a number of milliseconds, and treated
as such.
In both cases, we now currently use `Duration`, and handle
encoding/decoding in a bespoke fashion.
Note that I think the "better" design would be to introduce proper
newtypes for the relative time and the slot length, though it is
more convenient as the moment to rely on Duration as it leads to
less changes. So perhaps in another iteration.
Signed-off-by: KtorZ <[email protected]>
Defaults like this are good ways to shoot oneself in the foot. I suspect it was added to conveniently allow parsing an era param that doesn't include an era name, but this is wrong. The input data shall be fixed instead. Signed-off-by: KtorZ <[email protected]>
Signed-off-by: KtorZ <[email protected]>
Signed-off-by: KtorZ <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: Jacob Finkelman <[email protected]>
Signed-off-by: Jacob Finkelman <[email protected]>
This will need to be wired to the new chain selection stage that doesn't yet exist. Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: jeluard <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: jeluard <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
Signed-off-by: Roland Kuhn <[email protected]>
* test: add a test showing that an initiator can eventually connect when the responder is started Signed-off-by: etorreborre <[email protected]> * feat: introduce a reconnection delay that's different from the connection timeout Signed-off-by: etorreborre <[email protected]> * refactor: remove an unnecessary supervision Signed-off-by: etorreborre <[email protected]> --------- Signed-off-by: etorreborre <[email protected]>