IntersectMBO / IntersectMBO/cardano-ledger

Ensure epochNo for BlsKey update is recorded correctly

Open
#6,079 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
295
Forks
179
Avg merge
4d 7h
Merged PRs (30d)
29

Description

Current implementation that was introduced in #6047 updates the epoch number in the StakePoolState regardless whether BLS key was updated or not.
We need to only update that value when bls key is different from the current bls key. Note that we do not need to look in to the future stake pool params, since that value will get replaced by the updated values from the certificate.

This doesn't mean that the Bls key was updated. It only means that something in StakePool params was updated. I believe we need to look into the old state and see if Bls key actually changed, before we can mark it as rotated.

This would probably be easier to do in the POOL rule instead, but I suggest we do it in a separate PR,once we have separate POOL rule defined for Dijkstra

_Originally posted by @lehins in https://github.com/IntersectMBO/cardano-ledger/pull/6047#discussion_r3937106008_

Contributor guide

Open the contributing guide

Research direction

Start with the implementation introduced in #6047 and trace how StakePoolState handles the epoch number during a BLS key update. Read the relevant POOL rule discussion and compare the old state with the certificate’s updated values. Done means epochNo is recorded as rotated only when the BLS key actually differs, without looking into future stake pool parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.