mlabs-haskell / cardano-open-oracle-protocol

COOP - Cardano open oracle protocol
Apache License 2.0
22 stars 3 forks source link

Token selection is performed (seemingly) alphabetically when selecting valid auth tokens #88

Open ross-spencer opened 8 months ago

ross-spencer commented 8 months ago

Mint auth creates new auth tokens that allows COOP publishers to publish on-chain. Occasionally there is a period of overlap between existing auth tokens and newly minted ones, e.g. covering time periods in long-running operations.

When there is an overlap in auth token validity the selector picks the first token it comes across with validity, this seems to be the one alphabetically in order, not the oldest valid token that may also be valid. This leads to unused tokens.

Logging this as much as a note to users. The ability to burn unused $AUTH (below) essentially renders this moot. We might also consider a line or two in documentation for potential users.

Connected to: https://github.com/mlabs-haskell/cardano-open-oracle-protocol/issues/83