IntersectMBO / IntersectMBO/formal-ledger-specifications

Reconcile interfaces exposed by ledger spec and used by consensus spec

Open
#918 1 comment 0 reactions 1 assignee Claimed by @javierdiaz72 View on GitHub
discussion enhancement
Dominant language
Agda
Stars
52
Forks
20
Avg merge
6d 14h
Merged PRs (30d)
7

Description

Currently, the interface exposed by the ledger spec for consumption of the consensus spec is the following:

```agda
record LedgerInterface : Set₁ where
field
Block Slot BBodyEnv BBodyState NewEpochState PParams : Set
getPParams : NewEpochState → PParams
_⊢_⇀⦇_,BBODY⦈_ : BBodyEnv → BBodyState → Block → BBodyState → Set
_⊢_⇀⦇_,TICK⦈_ : ⊤ → NewEpochState → Slot → NewEpochState → Set
```
However, the interface expected (and used) by the consensus spec is the following:

```agda
PoolDelegatedStake = KeyHashˢ ⇀ (Coin × KeyHashᵛ)

record LedgerInterface : Type₁ where
field
NewEpochState : Type
getPParams : NewEpochState → PParams
getEpoch : NewEpochState → Epoch
getPoolDelegatedStake : NewEpochState → PoolDelegatedStake
adoptGenesisDelegs : NewEpochState → Slot → NewEpochState
_⊢_⇀⦇_,NEWEPOCH⦈_ : ⊤ → NewEpochState → Epoch → NewEpochState → Type
```

It's very important to resolve these discrepancies between the above interfaces.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.