Skip to content
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

Merged
merged 1 commit into from
Jun 3, 2020
Merged

Conversation

erikd
Copy link
Contributor

@erikd erikd commented Jun 3, 2020

No description provided.

At blk -> Just (SlotNumber . unSlotNo $ Point.blockPointSlot blk, Point.blockPointHash blk)

renderHash :: ShelleyHash -> Text
renderHash = const "renderHash"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope :)

Copy link
Contributor Author

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

Copy link
Contributor

@ksaric ksaric left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

cardano-db-sync/src/Cardano/DbSync/Types.hs Show resolved Hide resolved
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.
@erikd erikd merged commit 815e79a into master Jun 3, 2020
@iohk-bors iohk-bors bot deleted the erikd/generalise-4 branch June 3, 2020 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants