Skip to content

Commit bd70c1a

Browse files
committedJul 15, 2024
Add Malonzo test case data causing conformance tests errors
1 parent 0274cf6 commit bd70c1a

File tree

2 files changed

+235
-0
lines changed

2 files changed

+235
-0
lines changed
 

‎libs/cardano-ledger-conformance/cardano-ledger-conformance.cabal

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ library
2424
Test.Cardano.Ledger.Conformance.ConformanceSpec
2525
Test.Cardano.Ledger.Conformance.Spec.Conway
2626
Test.Cardano.Ledger.Conformance.Utils
27+
Test.Cardano.Ledger.Conformance.TestCaseMAlonzoData
2728

2829
hs-source-dirs: src
2930
other-modules:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
module Test.Cardano.Ledger.Conformance.TestCaseMAlonzoData
2+
where
3+
4+
import Lib
5+
import Test.Cardano.Ledger.Conformance.Orphans ()
6+
7+
-- seed 860738573
8+
regDRepErrorTestData :: (CertEnv, GState, TxCert)
9+
regDRepErrorTestData = (regDRepEnv, regDRepState, regDRepSignal)
10+
11+
-- seed 234853314
12+
updateDRepErrorTestData :: (CertEnv, GState, TxCert)
13+
updateDRepErrorTestData = (updateDRepEnv, updateDRepState, updateDRepSignal)
14+
15+
regDRepEnv :: CertEnv
16+
regDRepEnv =
17+
MkCertEnv
18+
{ epoch = 0
19+
, pp =
20+
MkPParams
21+
{ ppA = 0
22+
, ppB = 0
23+
, ppMaxBlockSize = 1
24+
, ppMaxTxSize = 1
25+
, ppMaxHeaderSize = 1
26+
, ppMaxValSize = 1
27+
, ppMinUTxOValue = 0
28+
, ppPoolDeposit = 1
29+
, ppKeyDeposit = 0
30+
, ppEmax = 1
31+
, ppNopt = 0
32+
, ppPv = (0, 0)
33+
, ppPoolVotingThresholds =
34+
MkPoolThresholds
35+
(302026859883347689, 1000000000000000000)
36+
(21, 50)
37+
(3143, 10000)
38+
(94900396147140797, 2500000000000000000)
39+
(7, 10)
40+
, ppDrepVotingThresholds =
41+
MkDrepThresholds
42+
(300187137, 2500000000)
43+
(10253, 500000)
44+
(1, 5)
45+
(1, 1)
46+
(5424043, 50000000)
47+
(21489819003023, 25000000000000)
48+
(4889832021, 5000000000)
49+
(16, 25)
50+
(1483639521139196927, 5000000000000000000)
51+
(64437278629, 100000000000)
52+
, ppGovActionLifetime = 1
53+
, ppGovActionDeposit = 1
54+
, ppDrepDeposit = 1
55+
, ppDrepActivity = 0
56+
, ppCCMinSize = 0
57+
, ppCCMaxTermLength = 1
58+
, ppCostmdls = ()
59+
, ppPrices = ()
60+
, ppMaxTxExUnits = (0, 0)
61+
, ppMaxBlockExUnits = (0, 0)
62+
, ppCoinsPerUTxOByte = 0
63+
, ppMaxCollateralInputs = 0
64+
}
65+
, votes =
66+
[ MkGovVote
67+
{ gvGid = (MkTxId 115226901456195599427884820575782413276072611530428351923844282107126212407004, 2)
68+
, gvVoter =
69+
(SPO, (KeyHashObj 14851458826130131743637198527587984388725556383364516954870199704468))
70+
, gvVote = VoteNo
71+
, gvAnchor = Just ()
72+
}
73+
, MkGovVote
74+
{ gvGid = (MkTxId 88083199499963725752216630727442965110458204362360448264871550469052603482426, 2)
75+
, gvVoter =
76+
(SPO, (KeyHashObj 21080582599226838175513894122043164386946890654269623458841004455554))
77+
, gvVote = VoteYes
78+
, gvAnchor = Just ()
79+
}
80+
, MkGovVote
81+
{ gvGid = (MkTxId 88448952286881031788909683605842369707461139360686836686092501843181962438196, 1)
82+
, gvVoter =
83+
(SPO, (KeyHashObj 21080582599226838175513894122043164386946890654269623458841004455554))
84+
, gvVote = VoteAbstain
85+
, gvAnchor = Just ()
86+
}
87+
]
88+
, wdrls =
89+
MkHSMap
90+
[
91+
( ((), ScriptObj 863628978550658778806118175557780864010495978784202428861811426725)
92+
, 341732
93+
)
94+
,
95+
( ((), KeyHashObj 5850959069843765096279864785780096551531339390830885497783677333467)
96+
, 310379
97+
)
98+
]
99+
}
100+
101+
regDRepState :: GState
102+
regDRepState = MkGState {dreps = MkHSMap [], ccHotKeys = MkHSMap []}
103+
104+
regDRepSignal :: TxCert
105+
regDRepSignal =
106+
RegDRep
107+
(ScriptObj 17525304867231275649772775250368064047039405927693313776739084043872)
108+
1
109+
()
110+
111+
updateDRepEnv :: CertEnv
112+
updateDRepEnv =
113+
MkCertEnv
114+
{ epoch = 0
115+
, pp =
116+
MkPParams
117+
{ ppA = 0
118+
, ppB = 0
119+
, ppMaxBlockSize = 1
120+
, ppMaxTxSize = 1
121+
, ppMaxHeaderSize = 1
122+
, ppMaxValSize = 1
123+
, ppMinUTxOValue = 0
124+
, ppPoolDeposit = 1
125+
, ppKeyDeposit = 0
126+
, ppEmax = 1
127+
, ppNopt = 0
128+
, ppPv = (0, 0)
129+
, ppPoolVotingThresholds =
130+
MkPoolThresholds
131+
(53101, 100000)
132+
(78, 125)
133+
(613404331414007, 10000000000000000)
134+
(0, 1)
135+
(1, 20)
136+
, ppDrepVotingThresholds =
137+
MkDrepThresholds
138+
(390926947, 2000000000)
139+
(589, 1000)
140+
(371, 1000)
141+
(1660491, 8000000)
142+
(2, 5)
143+
(651269191959751, 781250000000000)
144+
(1, 5)
145+
(765049163510351, 5000000000000000)
146+
(149643330670816993, 200000000000000000)
147+
(1925077578881961721, 2500000000000000000)
148+
, ppGovActionLifetime = 1
149+
, ppGovActionDeposit = 1
150+
, ppDrepDeposit = 1
151+
, ppDrepActivity = 0
152+
, ppCCMinSize = 0
153+
, ppCCMaxTermLength = 1
154+
, ppCostmdls = ()
155+
, ppPrices = ()
156+
, ppMaxTxExUnits = (0, 0)
157+
, ppMaxBlockExUnits = (0, 0)
158+
, ppCoinsPerUTxOByte = 0
159+
, ppMaxCollateralInputs = 0
160+
}
161+
, votes =
162+
[ MkGovVote
163+
{ gvGid = (MkTxId 10573480762785547458715593906319493592515577657358578529188644420493312467314, 3)
164+
, gvVoter =
165+
(CC, (KeyHashObj 22413119276237102406895649365844197611424564549865197580618963945526))
166+
, gvVote = VoteYes
167+
, gvAnchor = Just ()
168+
}
169+
, MkGovVote
170+
{ gvGid = (MkTxId 61950260584406258828631380615546504229797558998895154032220297161010314086039, 2)
171+
, gvVoter =
172+
(CC, (KeyHashObj 22413119276237102406895649365844197611424564549865197580618963945526))
173+
, gvVote = VoteNo
174+
, gvAnchor = Nothing
175+
}
176+
, MkGovVote
177+
{ gvGid = (MkTxId 22248136101902996774702417930112075297377726522206941548782298778735160712238, 2)
178+
, gvVoter =
179+
(SPO, (KeyHashObj 15533166275809003337758353294689354602794597660954287114354176080950))
180+
, gvVote = VoteNo
181+
, gvAnchor = Nothing
182+
}
183+
, MkGovVote
184+
{ gvGid = (MkTxId 52590512554131303501102878660554949338059068610568044970289942186060195155377, 1)
185+
, gvVoter =
186+
(SPO, (KeyHashObj 15533166275809003337758353294689354602794597660954287114354176080950))
187+
, gvVote = VoteNo
188+
, gvAnchor = Just ()
189+
}
190+
, MkGovVote
191+
{ gvGid = (MkTxId 89992703712414083318900191501311711222345798071743105811413652426283655760265, 2)
192+
, gvVoter =
193+
(SPO, (KeyHashObj 15533166275809003337758353294689354602794597660954287114354176080950))
194+
, gvVote = VoteNo
195+
, gvAnchor = Just ()
196+
}
197+
]
198+
, wdrls =
199+
MkHSMap
200+
[
201+
( ((), ScriptObj 11351610118471723845378736158885299317678859208838805025566956462847)
202+
, 246955
203+
)
204+
,
205+
( ((), KeyHashObj 14855755521937664048965594005142031367119049395668203891461311889243)
206+
, 8730
207+
)
208+
,
209+
( ((), KeyHashObj 23509965346913385229618864767350023943841938458880348162822738262631)
210+
, 603880
211+
)
212+
,
213+
( ((), KeyHashObj 22007813242956090588149408724251297307777000571636872648320033253196)
214+
, 264632
215+
)
216+
]
217+
}
218+
219+
updateDRepState :: GState
220+
updateDRepState =
221+
MkGState {
222+
dreps = MkHSMap
223+
[
224+
( KeyHashObj 15620926545167659031442662663354207712010596339992188535497801183352, 0)
225+
],
226+
ccHotKeys = MkHSMap []
227+
}
228+
229+
updateDRepSignal :: TxCert
230+
updateDRepSignal =
231+
RegDRep
232+
(KeyHashObj 15620926545167659031442662663354207712010596339992188535497801183352)
233+
0
234+
()

0 commit comments

Comments
 (0)
Please sign in to comment.