Skip to content

Commit dd5ecf3

Browse files
committed
Address review feedback; refresh goldens.
* Add missing changelog entries. * Revert missing cddl section in shelley changelog. * Convert positional args to record syntax in Examples. Also, * Needed some examples re-exported from conway, they seemed to have been updated, and led to updates to the goldens.
1 parent 46169ab commit dd5ecf3

14 files changed

Lines changed: 340 additions & 97 deletions

File tree

eras/conway/impl/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 1.23.0.0
44

5+
* Add `ToJSON` instance for `DefaultVote`.
56
* Add `injectStakeCredentials`, `injectDRepsThenDelegs` to `Cardano.Ledger.Conway.Transition`
67
* Add `ConwayExtraConfig` type and `cgExtraConfig` field to `ConwayGenesis`
78
* Deprecate `conwayRegisterInitialAccounts`, `registerDRepsThenDelegs`

eras/conway/impl/src/Cardano/Ledger/Conway/Governance.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -552,11 +552,10 @@ instance DecCBOR DefaultVote where
552552
{-# INLINE decCBOR #-}
553553

554554
instance ToJSON DefaultVote where
555-
toJSON defaultVote =
556-
case defaultVote of
557-
DefaultNo -> String "DefaultNo"
558-
DefaultAbstain -> String "DefaultAbstain"
559-
DefaultNoConfidence -> String "DefaultNoConfidence"
555+
toJSON = \case
556+
DefaultNo -> String "DefaultNo"
557+
DefaultAbstain -> String "DefaultAbstain"
558+
DefaultNoConfidence -> String "DefaultNoConfidence"
560559

561560
defaultStakePoolVote ::
562561
ConwayEraAccounts era =>

eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Examples.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ module Test.Cardano.Ledger.Conway.Examples (
1414
exampleConwayBasedTx,
1515
exampleConwayBasedTopTx,
1616
exampleAnchor,
17+
exampleProposalProcedure,
18+
exampleProposalProcedureHardForkInitiation,
19+
exampleProposalProcedureNewConstitution,
20+
exampleProposalProcedureNoConfidence,
21+
exampleProposalProcedureParameterChange,
22+
exampleProposalProcedureTreasuryWithdrawals,
23+
exampleProposalProcedureUpdateCommittee,
1724
) where
1825

1926
import Cardano.Ledger.Alonzo.Plutus.Context (EraPlutusTxInfo)

eras/shelley/impl/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
- `ChainPredicateFailure`
5151
* Add protocol version validation to `createInitialState`:
5252
- Validate that current protocol version is within the era's bounds
53+
54+
### `cddl`
55+
5356
* Remove `withAntiGen` re-export, since it's deprecated
5457
* Change `ipv4` and `ipv6` to use exact byte sizes (4 and 16 respectively), no longer allowing leftover bytes
5558

libs/cardano-ledger-api/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 1.13.1.0
44

5+
* Add `ToJSON` instances for `StakeSnapshot` and `StakeSnapshots`.
6+
* Add `ToJSON` instance for `QueryPoolStateResult`.
57
* Add `querySetSnapshotStakePoolDistr` (`GetPoolDistr2`).
68
* Add `queryDRepDelegatees` (`GetFilteredVoteDelegatees`).
79
* Add `queryStakePoolRelays` (`GetLedgerPeerSnapshot`).
140 Bytes
Binary file not shown.
210 Bytes
Binary file not shown.

libs/cardano-ledger-api/golden/conway/json/queryPoolParameters.json

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,26 @@
1919
],
2020
"pledge": 1,
2121
"poolId": "0d6a577e9441ad8ed9663931906e4d43ece8f82c712b1d0235affb06",
22-
"relays": [],
22+
"relays": [
23+
{
24+
"single host address": {
25+
"IPv4": "127.0.0.1",
26+
"IPv6": "2001:db8::1",
27+
"port": 3000
28+
}
29+
},
30+
{
31+
"single host name": {
32+
"dnsName": "relay.example.com",
33+
"port": 3001
34+
}
35+
},
36+
{
37+
"multi host name": {
38+
"dnsName": "relay.example.com"
39+
}
40+
}
41+
],
2342
"vrf": "c5e21ab1c9f6022d81c3b25e3436cb7f1df77f9652ae3e1310c28e621dd87b4c"
2443
},
2544
"b77908a84072eb9151782d64504f0f6975b7143d49514eaeb0991d00": {
@@ -71,7 +90,26 @@
7190
],
7291
"pledge": 0,
7392
"poolId": "c7b31a062855f437a05caf5060582ea40e840ebe4b431ffdf84780db",
74-
"relays": [],
93+
"relays": [
94+
{
95+
"single host address": {
96+
"IPv4": "127.0.0.1",
97+
"IPv6": "2001:db8::1",
98+
"port": 3000
99+
}
100+
},
101+
{
102+
"single host name": {
103+
"dnsName": "relay.example.com",
104+
"port": 3001
105+
}
106+
},
107+
{
108+
"multi host name": {
109+
"dnsName": "relay.example.com"
110+
}
111+
}
112+
],
75113
"vrf": "c5e21ab1c9f6022d81c3b25e3436cb7f1df77f9652ae3e1310c28e621dd87b4c"
76114
}
77115
}

libs/cardano-ledger-api/golden/conway/json/queryPoolState.json

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,26 @@
2929
],
3030
"pledge": 1,
3131
"poolId": "c7b31a062855f437a05caf5060582ea40e840ebe4b431ffdf84780db",
32-
"relays": [],
32+
"relays": [
33+
{
34+
"single host address": {
35+
"IPv4": "127.0.0.1",
36+
"IPv6": "2001:db8::1",
37+
"port": 3000
38+
}
39+
},
40+
{
41+
"single host name": {
42+
"dnsName": "relay.example.com",
43+
"port": 3001
44+
}
45+
},
46+
{
47+
"multi host name": {
48+
"dnsName": "relay.example.com"
49+
}
50+
}
51+
],
3352
"vrf": "c5e21ab1c9f6022d81c3b25e3436cb7f1df77f9652ae3e1310c28e621dd87b4c"
3453
}
3554
},
@@ -55,7 +74,26 @@
5574
],
5675
"pledge": 1,
5776
"poolId": "0d6a577e9441ad8ed9663931906e4d43ece8f82c712b1d0235affb06",
58-
"relays": [],
77+
"relays": [
78+
{
79+
"single host address": {
80+
"IPv4": "127.0.0.1",
81+
"IPv6": "2001:db8::1",
82+
"port": 3000
83+
}
84+
},
85+
{
86+
"single host name": {
87+
"dnsName": "relay.example.com",
88+
"port": 3001
89+
}
90+
},
91+
{
92+
"multi host name": {
93+
"dnsName": "relay.example.com"
94+
}
95+
}
96+
],
5997
"vrf": "c5e21ab1c9f6022d81c3b25e3436cb7f1df77f9652ae3e1310c28e621dd87b4c"
6098
},
6199
"b77908a84072eb9151782d64504f0f6975b7143d49514eaeb0991d00": {
@@ -76,7 +114,26 @@
76114
],
77115
"pledge": 1,
78116
"poolId": "b77908a84072eb9151782d64504f0f6975b7143d49514eaeb0991d00",
79-
"relays": [],
117+
"relays": [
118+
{
119+
"single host address": {
120+
"IPv4": "127.0.0.1",
121+
"IPv6": "2001:db8::1",
122+
"port": 3000
123+
}
124+
},
125+
{
126+
"single host name": {
127+
"dnsName": "relay.example.com",
128+
"port": 3001
129+
}
130+
},
131+
{
132+
"multi host name": {
133+
"dnsName": "relay.example.com"
134+
}
135+
}
136+
],
80137
"vrf": "c5e21ab1c9f6022d81c3b25e3436cb7f1df77f9652ae3e1310c28e621dd87b4c"
81138
}
82139
}
Binary file not shown.

0 commit comments

Comments
 (0)