Skip to content

Define a custom Cardano-like era with long TLL for benchmarking it #1464

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

Open
dnadales opened this issue Apr 15, 2025 · 2 comments
Open

Define a custom Cardano-like era with long TLL for benchmarking it #1464

dnadales opened this issue Apr 15, 2025 · 2 comments

Comments

@dnadales
Copy link
Member

dnadales commented Apr 15, 2025

There is a suspicion that the integration layer of the node might be invoking computations that are proportional to the type-level lists (TLL) that are used in the hard-fork combinator (HFC).

We need to define a custom Cardano-like era that can be run with our system-level benchmarks so that we can compare its performance with that of the Cardano node.

If there is a cost introduced by the HFC then we want to exaggerate its impact, hence the preference for a long TLL.

@dnadales dnadales converted this from a draft issue Apr 15, 2025
@amesgen
Copy link
Member

amesgen commented Apr 15, 2025

Some pointers regarding the topic of performance improvements in this area:

  • sop-core PR to represent NS/NP more efficiently: WIP: Revive compact representation for NP/NS well-typed/generics-sop#129

    We mostly use strict versions of NS/NP in strict-sop-core, so these would need to be changed in a similar fashion.

    This might result in both speed and memory improvements.

  • A more modest idea is to "reverse" the structure of our NSs such that accessing the most recent era can happen in constant time. See e.g. here for some discussion.

  • Since CardanoTxOut representation #951, UTxO-HD uses a custom representation for TxOuts (a custom sum type instead of an NS). Maybe the compact representation for NS could make this optimization unnecessary, simplifying the code.

    cc @jorisdral @jasagredo

@amesgen
Copy link
Member

amesgen commented Apr 15, 2025

Also: We have a relatively small upper bound on the number of eras we can support ATM regarding serialization: #328

@geo2a geo2a moved this from 🔖 Ready to 🏗 In progress in Consensus Team Backlog Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

No branches or pull requests

3 participants