Closed guidanoli closed 8 months ago
I'm thinking whether we can get rid of the current AbstractConsensus.sol
but replace it with the codes in EpochHashStorage.sol
. So the inheritance chain becomes simpler: IConsensus
-> EpochHashStorage
(can be renamed as AbstractConsensus
) -> Authority
.
What do you think?
I'm thinking whether we can get rid of the current
AbstractConsensus.sol
but replace it with the codes inEpochHashStorage.sol
. So the inheritance chain becomes simpler:IConsensus
->EpochHashStorage
(can be renamed asAbstractConsensus
) ->Authority
. What do you think?
We could also make Authority
inherit from EpochHashStorage
directly, but then it would have to implement getEpochHash
(much like AbstractConsensus
). So, I kept AbstractConsensus
to avoid having to implement getEpochHash
for every consensus that would like to use EpochHashStorage
.
We could also make Authority inherit from EpochHashStorage directly, but then it would have to implement getEpochHash (much like AbstractConsensus)
It wouldn't. We rename the function _getEpochHash
to getEpochHash
and make it external.
We could also make Authority inherit from EpochHashStorage directly, but then it would have to implement getEpochHash (much like AbstractConsensus)
It wouldn't. We rename the function
_getEpochHash
togetEpochHash
and make it external.
Ok, so you're suggesting to make EpochHashStorage
an abstract contract that half-implements IConsensus
? If we go in this direction, we could even rename it as AbstractConsensus
. What do you think?
Yes. That's my suggestion :)
As a side note, I think maybe we can make the future changeset files a bit less verbose (like this one), or it should be better formatted. Otherwise, it can get hard to read.
As a side note, I think maybe we can make the future changeset files a bit less verbose (like this one), or it should be better formatted. Otherwise, it can get hard to read.
I agree that multi-line changeset files may look really cluttered on their own, but I don't think they look that bad when aggregated in a changelog. See the PR created by the CI for reference. I believe this is how this is going to be rendered in the final CHANGELOG as well.
I agree that multi-line changeset files may look really cluttered on their own, but I don't think they look that bad when aggregated in a changelog. See the https://github.com/cartesi/rollups-contracts/pull/147 created by the CI for reference. I believe this is how this is going to be rendered in the final CHANGELOG as well.
I do agree that they dont look bad at all when aggregated and look from a distance. But if reading from item to item, then it can be difficult because it's lengthy. But also I know it's gonna be helpful if users know what they are looking for and search for it, then the details would be very helpful that way.
Closes #152 and #153 FYI @gligneul