-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Might now work for Shelley (Byron unchanged) #117
Conversation
At blk -> Just (SlotNumber . unSlotNo $ Point.blockPointSlot blk, Point.blockPointHash blk) | ||
|
||
renderHash :: ShelleyHash -> Text | ||
renderHash = const "renderHash" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be:
renderHash :: ShelleyHash -> Text
renderHash = Text.decodeUtf8 . unHeaderHash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some minor cosmetic changes.
data DbAction | ||
= DbApplyBlock !CardanoBlockTip | ||
| DbRollBackToPoint !CardanoPoint | ||
| DbFinish |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for? "End of the world" scenario?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been there for ages. It can probably be removed at some point, but I won't do it now because simple Shelley support and then full Shelly support is a priority,
{ dbActQueue :: TBQueue DbAction | ||
} | ||
|
||
class MkDbAction blk where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, but I think the consensus guys are doing something pretty similar with the abstractions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I do not think that is nice.
|
||
import qualified Shelley.Spec.Ledger.BlockChain as Shelley | ||
import qualified Shelley.Spec.Ledger.Tx as Shelley | ||
-- import qualified Shelley.Spec.Ledger.TxData as Shelley |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Byron has been tested and there is very unlikely to be breakage. Shelley has been minimally tested and there are likely to be bugs. Some of the Shelley code in lower level libraries is not even complete yet, for instance: * Address hashes are currently 32 bytes and should be 28 bytes. * Address encoding is Base16 but is supposed to be bech32. * Need a way to generate a Genesis Hash for a pure Shelley chain.
No description provided.