txpipe / dolos

Cardano Data Node
https://dolos.txpipe.io
Apache License 2.0
65 stars 18 forks source link

test: implement PParams blackbox test using Haskell node as test oracle #180

Open scarmuega opened 5 months ago

scarmuega commented 5 months ago

Context

Correct management of protocol params (aka: PParams) is a complex and essential part of the ledger logic. The easiest way (at the moment) to ensure a correct implementation and detect regressions is by assuming that the output from the Haskell node as our gold-standard.

The current Dolos implementation for PParams management resides here

A hardcoded set of PParams for different epochs and networks is available here. Take these values with a grain of salt, they have been compiled manually and might have inconsistencies.

Goal

We need new unit tests that allows us to compare the output from Dolos' PParams aggregation with well-known values gathered from the chain.

One way to approach this (not mandatory) is to gather the actual blocks from the chain containing param updates and store them as test data in the repo. With use this blocks to execute the PParams aggregation logic in Dolos and then compare the output with the well-known values.

Quantumplation commented 4 months ago

:wave: I'm going to tackle this, if you want to assign it to me