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
+14-13Lines changed: 14 additions & 13 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,26 @@ 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
-
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.
151
-
152
-
# Approach
149
+
## Method of transition
153
150
154
151
The new api should be created adjacant to the existing one.
155
152
We then slowly replace the use of the existing api in cardano-api, eventually deprecating the "old" api.
156
153
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`.
160
-
161
154
# Consequences
162
155
156
+
## Upsides
157
+
163
158
- Less boiler plate in cardano-api and in users' codebases
164
159
- Clearer defined boundaries as to new functionality being introduced due to a new era
165
160
- Lower maintenance overhead
166
161
- The need for an era agnostic api with respect to update proposals (these change on the Babbage/Conway boundary)
167
162
163
+
## Downsides
164
+
165
+
`cardano-api` users will be limited up to only two eras exposed from `cardano-api`.
166
+
This will force them to keep up-to-date their code after the hardfork.
167
+
This may turn out to be a disruptive process, but necessary to make the code using `cardano-api` healthy.
0 commit comments