input-output-hk / mithril

Stake-based threshold multi-signatures protocol
https://mithril.network
Apache License 2.0
130 stars 41 forks source link

Cardano era in status page of aggregator is incorrect #2111

Closed jpraynaud closed 1 week ago

jpraynaud commented 1 week ago

Why

The /status route returns an unexpected Babagge era when the Cardano node is running Conway on testing-preview and testing-sanchonet:

{
  "epoch": 750,
  "cardano_era": "Babbage",
  "mithril_era": "pythagoras",
  "cardano_node_version": "10.1.2",
  "aggregator_node_version": "0.5.110+e2fa1e0",
  "protocol": {
    "k": 2422,
    "m": 20973,
    "phi_f": 0.2
  },
  "next_protocol": {
    "k": 2422,
    "m": 20973,
    "phi_f": 0.2
  },
  "total_signers": 3,
  "total_next_signers": 3,
  "total_stakes_signers": 28492690661,
  "total_next_stakes_signers": 28492690661,
  "total_cardano_spo": 315,
  "total_cardano_stake": 587868773564114
}

Investigation

After investigation with Pallas developers, it appears that there is an offset of 1 which comes from the implementation of the Cardano node itself:

What

Fix the era conversion in the Pallas chain observer to return the correct epoch

How