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
In figure 7 of the ShelleyMA formal spec, in the calculation of the stake relation, there seems to be a composition performed between stakeCred_r^{-1} and rewards.
In figure 5 of the Shelley formal spec, we see that stakeCred_r is a map from Addr to Cred. This would imply that stakeCred_r^{-1} is a map from Cred to Addr.
In figure 21 of the Shelley formal spec, we see that rewards is a map from Cred to Coin.
Since this is the case (and that we define the composition of two maps, one of type A -> B, and the other B -> C as a resulting map of type A -> C), it would not make sense to compose stakeCred_r^{-1} (which is of type Cred -> Addr) with rewards (which is of type Cred -> Coin). This composition (and mismatch) seems to also be present in the Shelley spec.
The executable spec seems to be implementing the stake relation calculation correctly, ignoring stakeCred_r^{-1} (and the composition) entirely, unionising the left side with just the rewards.
The text was updated successfully, but these errors were encountered:
yellowtides
changed the title
Type mismatch present in the ShelleyMA/Shelley formal specs when calculating the stake relation for the reward distribution
Type mismatch present in the ShelleyMA/Shelley formal specs when calculating the stake relation for the stake distribution
Mar 8, 2021
yellowtides
changed the title
Type mismatch present in the ShelleyMA/Shelley formal specs when calculating the stake relation for the stake distribution
Type mismatch present in the ShelleyMA/Shelley formal specs when calculating the stake relation in the Rewards and the Epoch Boundary
Mar 8, 2021
In figure 7 of the ShelleyMA formal spec, in the calculation of the stake relation, there seems to be a composition performed between
stakeCred_r^{-1}
andrewards
.In figure 5 of the Shelley formal spec, we see that
stakeCred_r
is a map fromAddr
toCred
. This would imply thatstakeCred_r^{-1}
is a map fromCred
toAddr
.In figure 21 of the Shelley formal spec, we see that
rewards
is a map fromCred
toCoin
.Since this is the case (and that we define the composition of two maps, one of type A -> B, and the other B -> C as a resulting map of type A -> C), it would not make sense to compose
stakeCred_r^{-1}
(which is of typeCred -> Addr
) withrewards
(which is of typeCred -> Coin
). This composition (and mismatch) seems to also be present in the Shelley spec.The executable spec seems to be implementing the stake relation calculation correctly, ignoring
stakeCred_r^{-1}
(and the composition) entirely, unionising the left side with just therewards
.The text was updated successfully, but these errors were encountered: