Skip to content

Commit b4b1749

Browse files
authored
Add Dijkstra ledger era (#1567)
Fixes #1544 ~Needs IntersectMBO/cardano-ledger#5136 --- the Ledger pr was merged to `master`; I've updates the s-r-p. ~Needs draft integration with `cardano-node`~ I've attempted to integrate with `cardano-node`, but abandoned this effort, as we first need an integration into `cardano-api`.
2 parents 34a5f5b + c8ae7c1 commit b4b1749

File tree

185 files changed

+1018
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+1018
-238
lines changed

cabal.project

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ source-repository-package
6868
source-repository-package
6969
type: git
7070
location: https://github.com/IntersectMBO/cardano-ledger
71-
tag: b44ce911475794a15f908ad27a6f497d6a27e8ba
72-
--sha256: sha256-MXaVKKH9siUsmOnJmYyL6if48dx11zugux7AWGPABfA=
71+
tag: ca8d451bbce11dde3b68e99782c79f9b4c1dfca5
72+
--sha256: sha256-YHIscWnp9GrFn0EYGM7xd8Ds8x0O00FWBAIZX22bWpA=
7373
subdir:
7474
eras/allegra/impl
7575
eras/alonzo/impl
@@ -82,6 +82,7 @@ source-repository-package
8282
eras/byron/ledger/impl
8383
eras/conway/impl
8484
eras/conway/test-suite
85+
eras/dijkstra/
8586
eras/mary/impl
8687
eras/shelley/impl
8788
eras/shelley-ma/test-suite

docs/website/contents/for-developers/AddingAnEra.md

Lines changed: 52 additions & 23 deletions

nix/shell.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ hsPkgs.shellFor {
1818
pkgs.fourmolu
1919
pkgs.cuddle
2020
pkgs.cddlc
21+
pkgs.pretty-simple
2122

2223
# release management
2324
pkgs.scriv

ouroboros-consensus-cardano/cddl/base.cddl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
telescope7<byron, shelley, allegra, mary, alonzo, babbage, conway>
2-
= [pastEra, pastEra, pastEra, pastEra, pastEra, pastEra, currentEra<conway>] /
1+
telescope8<byron, shelley, allegra, mary, alonzo, babbage, conway, dijkstra>
2+
= [pastEra, pastEra, pastEra, pastEra, pastEra, pastEra, pastEra, currentEra<dijkstra>] /
3+
[pastEra, pastEra, pastEra, pastEra, pastEra, pastEra, currentEra<conway>] /
34
[pastEra, pastEra, pastEra, pastEra, pastEra, currentEra<babbage>] /
45
[pastEra, pastEra, pastEra, pastEra, currentEra<alonzo>] /
56
[pastEra, pastEra, pastEra, currentEra<mary>] /
67
[pastEra, pastEra, currentEra<allegra>] /
78
[pastEra, currentEra<shelley>] /
89
[currentEra<byron>]
910

10-
ns7<byron, shelley, allegra, mary, alonzo, babbage, conway>
11-
= [6, conway] /
11+
ns8<byron, shelley, allegra, mary, alonzo, babbage, conway, dijkstra>
12+
= [7, dijkstra] /
13+
[6, conway] /
1214
[5, babbage] /
1315
[4, alonzo] /
1416
[3, mary] /

ouroboros-consensus-cardano/cddl/disk/ledger/headerstate.cddl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ headerState =
22
[withOrigin<headerStateTip>, headerStateChainDep]
33

44
headerStateTip =
5-
ns7<byronAnnTip, annTip, annTip, annTip, annTip, annTip, annTip>
5+
ns8<byronAnnTip, annTip, annTip, annTip, annTip, annTip, annTip, annTip>
66

77
byronAnnTip = [slotno,
88
hash,
@@ -14,15 +14,16 @@ annTip = [slotno,
1414
blockno]
1515

1616
headerStateChainDep =
17-
telescope7<versionedPbftState,
17+
telescope8<versionedPbftState,
1818
versionedTPraosState,
1919
versionedTPraosState,
2020
versionedTPraosState,
2121
versionedTPraosState,
2222
versionedPraosState,
23+
versionedPraosState,
2324
versionedPraosState>
2425

25-
;# import withOrigin, ns7, telescope7, slotno, hash, blockno from base
26+
;# import withOrigin, ns8, telescope8, slotno, hash, blockno from base
2627
;# import versionedPbftState from pbft
2728
;# import versionedPraosState from praos
2829
;# import versionedTPraosState from tpraos

ouroboros-consensus-cardano/cddl/disk/ledger/ledgerstate.cddl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
ledgerState =
2-
telescope7<byron.ledgerstate,
2+
telescope8<byron.ledgerstate,
33
versionedShelleyLedgerState<shelley.ledgerstate>,
44
versionedShelleyLedgerState<allegra.ledgerstate>,
55
versionedShelleyLedgerState<mary.ledgerstate>,
66
versionedShelleyLedgerState<alonzo.ledgerstate>,
77
versionedShelleyLedgerState<babbage.ledgerstate>,
8-
versionedShelleyLedgerState<conway.ledgerstate>>
8+
versionedShelleyLedgerState<conway.ledgerstate>,
9+
versionedShelleyLedgerState<dijkstra.ledgerstate>>
910

1011
versionedShelleyLedgerState<eraSt1> = [ shelleyVersion2, shelleyLedgerState<eraSt1> ]
1112

@@ -26,5 +27,6 @@ mary.ledgerstate = any
2627
alonzo.ledgerstate = any
2728
babbage.ledgerstate = any
2829
conway.ledgerstate = any
30+
dijkstra.ledgerstate = any
2931

30-
;# import telescope7, withOrigin, slotno, blockno, hash, word32 from base
32+
;# import telescope8, withOrigin, slotno, blockno, hash, word32 from base

ouroboros-consensus-cardano/cddl/node-to-node/blockfetch/block.cddl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cardanoBlock = byron.block
77
/ [5, alonzo.block]
88
/ [6, babbage.block]
99
/ [7, conway.block]
10+
/ [8, dijkstra.block]
1011

1112
;# import byron as byron
1213
;# import shelley as shelley
@@ -15,3 +16,4 @@ cardanoBlock = byron.block
1516
;# import alonzo as alonzo
1617
;# import babbage as babbage
1718
;# import conway as conway
19+
;# import dijkstra as dijkstra

ouroboros-consensus-cardano/cddl/node-to-node/chainsync/header.cddl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
header
2-
= base.ns7<byronHeader,
2+
= base.ns8<byronHeader,
33
serialisedShelleyHeader<shelley.header>,
44
serialisedShelleyHeader<allegra.header>,
55
serialisedShelleyHeader<mary.header>,
66
serialisedShelleyHeader<alonzo.header>,
77
serialisedShelleyHeader<babbage.header>,
8-
serialisedShelleyHeader<conway.header>>
8+
serialisedShelleyHeader<conway.header>,
9+
serialisedShelleyHeader<dijkstra.header>>
910

1011
byronHeader = [byronRegularIdx, #6.24(bytes .cbor byron.blockhead)]
1112
/ [byronBoundaryIdx, #6.24(bytes .cbor byron.ebbhead)]
@@ -22,4 +23,5 @@ serialisedShelleyHeader<era> = #6.24(bytes .cbor era)
2223
;# include alonzo as alonzo
2324
;# include babbage as babbage
2425
;# include conway as conway
26+
;# include dijkstra as dijkstra
2527
;# import base as base

ouroboros-consensus-cardano/cddl/node-to-node/txsubmission2/tx.cddl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
tx =
2-
base.ns7<byron.transaction,
2+
base.ns8<byron.transaction,
33
serialisedShelleyTx<shelley.transaction>,
44
serialisedShelleyTx<allegra.transaction>,
55
serialisedShelleyTx<mary.transaction>,
66
serialisedShelleyTx<alonzo.transaction>,
77
serialisedShelleyTx<babbage.transaction>,
8-
serialisedShelleyTx<conway.transaction>>
8+
serialisedShelleyTx<conway.transaction>,
9+
serialisedShelleyTx<dijkstra.transaction>>
910

1011
serialisedShelleyTx<era> = #6.24(bytes .cbor era)
1112

@@ -20,4 +21,5 @@ byron.transaction = [0, [byron.tx, [+ byron.twit]]] / [1, any] / [2, any] / [3,
2021
;# include alonzo as alonzo
2122
;# include babbage as babbage
2223
;# include conway as conway
24+
;# include dijkstra as dijkstra
2325
;# import base as base

ouroboros-consensus-cardano/cddl/node-to-node/txsubmission2/txId.cddl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
; TODO(geo2a): why are this order? Why babbage is last?
12
txId =
2-
base.ns7<byronTxId,
3+
base.ns8<byronTxId,
34
shelley.transaction_id,
45
allegra.transaction_id,
56
mary.transaction_id,
67
alonzo.transaction_id,
78
conway.transaction_id,
9+
dijkstra.transaction_id,
810
babbage.transaction_id>
911

1012
byronTxId = [0, byron.txid]
@@ -19,4 +21,5 @@ byronTxId = [0, byron.txid]
1921
;# include alonzo as alonzo
2022
;# include babbage as babbage
2123
;# include conway as conway
24+
;# include dijkstra as dijkstra
2225
;# import base as base

0 commit comments

Comments
 (0)