-
Notifications
You must be signed in to change notification settings - Fork 25
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
CardanoTxOut
representation
#951
Conversation
7c76c7a
to
f8fc59e
Compare
f8fc59e
to
6f0e42b
Compare
-- | ||
-- TODO: can this be removed in favour of EncodeDisk and DecodeDisk? |
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.
Something to think about
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.
And probably a good thing to do.
EDIT: actually I'm unsure if we could do this easily. But perhaps can be postponed?
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.
Let's postpone it
type family Key l -- TODO: rename to TxIn | ||
|
||
-- | Each @LedgerState@ instance will have the notion of a @Value@ for the | ||
-- tables. For instance, if we only pulled out only the UTxO set from the ledger | ||
-- state, this type would be @TxOut@ or @NS TxOut@. | ||
type Value :: LedgerStateKind -> Type | ||
type family Value l | ||
type family Value l -- TODO: rename to TxOut |
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.
Not a very interesting change, but it is entirely separate from what I've been doing in this PR so let's do it in a new PR
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.
And actually, is this something we want to change? Are ledgertables UTxO-specific, or would we reuse the same type for other tables like stake-related tables?
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.
Pff, this is a question I don't have an answer for. I don't know how multiple tables would work. I guess we will have several Value
instances indexed by the kind of table? I don't know
-- TODO: if we make mapkinds of kind @(k1, k2) -> Type@ instead of @k1 -> k2 -> | ||
-- Type@, then we could reuse most of the @barbies@ machinery. |
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.
@jasagredo thoughts?
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.
This sounds very reasonable. I agree with this, but maybe in a follow-up?
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.
Sounds good
|
b090546
to
e166497
Compare
GHA is magically passing now |
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.
I think in general this looks good
Description
Reduce heap size of Cardano
TxOut
s by representing them as a flat sum type, instead of anNS