You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ADR-004-Support-only-for-mainnet-and-upcoming-eras.md
+17-12Lines changed: 17 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,10 @@ However, the only test QA performs across the eras are hardforks.
36
36
Therefore we don't need to expose all the era specific functionality for each era, rather we need to maintain the ability to submit hardfork update proposals across the eras i.e Byron-> latest era.
37
37
38
38
Users consuming `cardano-api` are only interested in functionality relevant to mainnet and the upcoming era if they want to experiment with new features on a testnet.
39
-
Therefore rather than maintaining a potentially never ending enumeration of eras, I propose to maintain only the era on mainnet and the upcoming era that will be hardforked to in the future.
39
+
40
+
# Decision
41
+
42
+
Rather than maintaining a potentially never ending enumeration of eras, we will maintain only the era on mainnet and the upcoming era that will be hardforked to in the future.
40
43
41
44
## Code
42
45
@@ -76,7 +79,7 @@ instance UseEra ConwayEra where
76
79
useEra =ConwayEra
77
80
```
78
81
79
-
###Deprecation of an era
82
+
## Deprecation of an era
80
83
81
84
The following is an example of how a user would consume the api and how a user would see a deprecation of an era
82
85
@@ -143,28 +146,30 @@ If users for some reason want this, we can direct them to use the ledger's api d
143
146
The next stage after deprecation period, should be **removal of the deprecated constructor**.
144
147
The deprecation period should be long enough to give enough time for `cardano-api` consumers to update their codebase to the post-hardfork era.
145
148
146
-
## Downsides
147
149
148
-
`cardano-api` users will be limited up to only two eras exposed from `cardano-api`.
149
-
This will force them to keep up-to-date their code after the hardfork.
150
-
This may turn out to be a disruptive process, but necessary to make the code using `cardano-api` healthy.
150
+
## Method of transition
151
151
152
-
# Approach
153
-
154
-
The new api should be created adjacant to the existing one.
152
+
The new API will be implemented in `cardano-api`, adjacant to the existing one.
155
153
We then slowly replace the use of the existing api in cardano-api, eventually deprecating the "old" api.
156
154
157
-
# Decision
158
-
159
-
The ADR gets adopted in `cardano-api` and `cardano-cli`. There may be minor tweaks as it is rolled out in `cardano-cli`.
155
+
The new API will be used by `cardano-cli` as the first client by modifying the `cardano-cli` code to use the new API
156
+
exclusively and lessons their will influence the evolution of the new API.
160
157
161
158
# Consequences
162
159
160
+
## Upsides
161
+
163
162
- Less boiler plate in cardano-api and in users' codebases
164
163
- Clearer defined boundaries as to new functionality being introduced due to a new era
165
164
- Lower maintenance overhead
166
165
- The need for an era agnostic api with respect to update proposals (these change on the Babbage/Conway boundary)
167
166
167
+
## Downsides
168
+
169
+
`cardano-api` users will be limited up to only two eras exposed from `cardano-api`.
170
+
This will force them to keep up-to-date their code after the hardfork.
171
+
This may turn out to be a disruptive process, but necessary to make the code using `cardano-api` healthy.
0 commit comments