Conversation
Use Params instead of long parameter lists in some places, and add more parameters from constants to Params.
Put block rewards into a constant, remove duplicated switch block detection from era supervisor, and rename `relative_height` to `height`.
|
Yes, exactly; as far as an individual |
The first `FinalizedBlock` in a new era must have the previous era's switch block as a parent, not `None`. Consensus protocol results from starting a new era must have the _new_ era's ID, not the old ones. Eras start at 0, so if we are in era 2, we will have three entries: The test checked only for two.
RMP is what we use elsewhere, and secp256k1 signatures somehow fail to deserialize if serialized with `serde_json::to_vec_pretty`.
This reverts commit d64c773.
|
I rebased and ran into a serialization issue. The solution for now was to switch from @Fraser999: I reverted the second half of #166, because it works with both key types now. Thanks for helping me with this! |
fizyk20
left a comment
There was a problem hiding this comment.
Looking good, just some naming nitpicks ;)
|
|
||
| /// Returns a temporary container with this `EraSupervisor`, `EffectBuilder` and random number | ||
| /// generator, for handling events. | ||
| pub(super) fn handling<'a, REv: ReactorEventT<I>>( |
There was a problem hiding this comment.
I think the name is a bit confusing. How about something like handling_wrapper or wrapper_for_handling? Short names are nice, but this one made me scratch my head a few times...
| @@ -181,6 +236,7 @@ where | |||
| pub(super) struct HandlingEraSupervisor<'a, I, REv: 'static, R: Rng + CryptoRng + ?Sized> { | |||
There was a problem hiding this comment.
This is also a bit of a weird name to me, but it's already established, so let's let it be ;)
There was a problem hiding this comment.
I agree, I renamed it, too. It's not explicitly used often anyway, so it's fine if it has a long name.
Clear named keys instead of prune
This generates the random bit, moves
switch_blockfromProtoBlocktoFinalizedBlock, adds timestamp, era ID and height toFinalizedBlockand setsswitch_blockbased on those values and the era configuration from the chainspec.https://casperlabs.atlassian.net/browse/NDRS-223