Skip to content

Conversation

@dnadales
Copy link
Member

@dnadales dnadales self-assigned this Feb 1, 2024
... to match those of the corresponding ledger functions.
…g.Numeric`

This instance was removed from `cardano-base`.
... which is used in the `ThreadNet` tests.

The correctness of this change relies on the ledger not registering
the initial funds in the genesis configuration file. This was recently
changed in the Ledger component.
We rely on the `injectIntoTestState` function, which is now defined at
the Ledger side.
@dnadales dnadales force-pushed the dnadales/899-factor-out-application-of-transition-config-to-ledger-repo branch from 784f977 to c11286c Compare March 1, 2024 10:20
@dnadales dnadales changed the base branch from main to dnadales/consensus-8.10 March 1, 2024 10:21
@dnadales dnadales marked this pull request as ready for review March 1, 2024 10:21
@dnadales dnadales requested a review from a team as a code owner March 1, 2024 10:21
Comment on lines +1122 to +1123
type family ShelleyBlockLedgerEra blk where
ShelleyBlockLedgerEra (ShelleyBlock proto era) = era
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should live in the shelley subdir somewhere, perhaps in Shelley/Block.hs

Copy link
Member

Choose a reason for hiding this comment

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

Could even be used to share code with

type family ShelleyBlockEra blk where
ShelleyBlockEra (ShelleyBlock proto era) = era
class L.Era (ShelleyBlockEra blk) => IsShelleyBlock blk
instance L.Era era => IsShelleyBlock (ShelleyBlock proto era)

Copy link
Member Author

@dnadales dnadales Mar 1, 2024

Choose a reason for hiding this comment

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

I'd argue for leaving it here for the same reasons.

Copy link
Member Author

Choose a reason for hiding this comment

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

For some reason, I missed your last comment, @amesgen. Could I use ShelleyBlockEra instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

Also consider replacing IsShelleyBlock with IsShelleyBlock in

type family ShelleyBlockEra blk where
ShelleyBlockEra (ShelleyBlock proto era) = era
class L.Era (ShelleyBlockEra blk) => IsShelleyBlock blk
instance L.Era era => IsShelleyBlock (ShelleyBlock proto era)

Copy link
Member

Choose a reason for hiding this comment

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

Note that Cardano.Tools.DBAnalyser.Block.Cardano is a consumer of the module Ouroboros.Consensus.Cardano.Node this comment is attached to, so one can't use things from Cardano.Tools.DBAnalyser.Block.Cardano in Ouroboros.Consensus.Cardano.Node. So @jasagredo's suggestion of moving these utilities further up the module dependency tree (eg to Ouroboros.Consensus.Shelley.Ledger.Block) and using them in both places makes sense to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't realize the snippet you sent was in DBAnalyser. I could introduce a new module and reuse definitions from there 👍

@dnadales dnadales force-pushed the dnadales/consensus-8.10 branch from 74664d2 to 2552206 Compare March 1, 2024 11:51
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.

Diff looks great to me---happy to have Consensus out of the loop on this data flow 👏. (I'm not Approving only because there're ongoing conversations about where some of the type-level utilities should live.)

@dnadales dnadales force-pushed the dnadales/consensus-8.10 branch from 23da4ad to 42356a9 Compare March 12, 2024 15:39
@dnadales dnadales force-pushed the dnadales/consensus-8.10 branch 3 times, most recently from 4d77e00 to a6bf691 Compare March 27, 2024 17:15
@dnadales dnadales force-pushed the dnadales/consensus-8.10 branch from a513385 to 2b6d5f5 Compare April 3, 2024 11:42
Base automatically changed from dnadales/consensus-8.10 to main April 3, 2024 23:16
@dnadales
Copy link
Member Author

dnadales commented Apr 9, 2024

Superseded by #1032

@dnadales dnadales closed this Apr 9, 2024
@amesgen amesgen deleted the dnadales/899-factor-out-application-of-transition-config-to-ledger-repo branch April 9, 2024 09:05
github-merge-queue bot pushed a commit that referenced this pull request Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Factor out application of transition config to the Ledger repo

5 participants