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

[CAD-3383] Bring db analyser back to life #3337

Merged
merged 5 commits into from
Sep 16, 2021

Conversation

EncodePanda
Copy link
Contributor

@EncodePanda EncodePanda commented Sep 10, 2021

Examples usage:

λ cabal run ouroboros-consensus-cardano:db-analyser -- \
   --db db_mainnet cardano \
   --configByron dbacfg/mainnet-byron-genesis.json \
   --configShelley dbacfg/mainnet-shelley-genesis.json \
   --configAlonzo dbacfg/mainnet-alonzo-genesis.json \
   --show-slot-block-no

(...)
BlockNo 73752	SlotNo 73780
BlockNo 73753	SlotNo 73781
BlockNo 73754	SlotNo 73782
BlockNo 73755	SlotNo 73783
BlockNo 73756	SlotNo 73784
(...)

Not tested with Alonzo yet, because the mainnet chain (that this tool was tested with) does not yet hold alonzo blocks.

Copy link
Contributor

@nfrisby nfrisby left a comment

Choose a reason for hiding this comment

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

Some minor feedback, and a note wherein I question the existing Args code.

@EncodePanda EncodePanda force-pushed the EncodePanda/CAD-3383/bring-db-analyzer-back-to-life branch 2 times, most recently from 92e5375 to f88a26d Compare September 14, 2021 10:58
@EncodePanda
Copy link
Contributor Author

@nfrisby I've went through the comments, I've applied two of your suggestions, for the other two I've left my comments. Please have a look .

@EncodePanda
Copy link
Contributor Author

@dnadales @jasagredo @nfrisby second look? :)

{-# LANGUAGE TypeFamilies #-}

{-# OPTIONS_GHC -Wno-orphans #-}
module Block.Alonzo (
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to refer to IntersectMBO/cardano-ledger#2452 in the comments and explain that this module was copied from the node, why it was copied, and that it'll be removed from consensus once 2452 is solved?

This instances was copied from node. But it should really live in
ledger spec. Same as ShelleyGenesis does. This should be addressed in
the near future.
Once we have AlonzoGenesis FromJSON, providing it to
mkCardanoProtocolInfo is just a matter of reading the configuration
file provided by the user
To keep code consistent with previous eras
@EncodePanda EncodePanda force-pushed the EncodePanda/CAD-3383/bring-db-analyzer-back-to-life branch from be6221c to bec44a4 Compare September 16, 2021 12:07
@EncodePanda
Copy link
Contributor Author

@dnadales it works on Alonzo chain, checked [x]

@EncodePanda
Copy link
Contributor Author

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 16, 2021

@iohk-bors iohk-bors bot merged commit 5d87eca into master Sep 16, 2021
@iohk-bors iohk-bors bot deleted the EncodePanda/CAD-3383/bring-db-analyzer-back-to-life branch September 16, 2021 18:04
@@ -114,15 +113,15 @@ mkCardanoProtocolInfo genesisByron signatureThreshold genesisShelley genesisAlon
, shelleyBasedLeaderCredentials = []
}
ProtocolParamsShelley {
shelleyProtVer = ProtVer 2 0
shelleyProtVer = ProtVer 3 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice job debugging these 👏

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.

3 participants