blockfrost: use cost_models_raw in getProtocolParameters#285
Open
sorki wants to merge 1 commit into
Open
Conversation
original `cost_models` have their names included in keys
```json
"cost_models": {
"PlutusV1": {
"addInteger-cpu-arguments-intercept": 197209,
"addInteger-cpu-arguments-slope": 0
},
"PlutusV2": {
"addInteger-cpu-arguments-intercept": 197209,
"addInteger-cpu-arguments-slope": 0
}
},
```
vs `cost_models_raw` have only a list of values
```json
"cost_models_raw": {
"PlutusV1": [
197209,
0
],
"PlutusV2": [
197209,
0
]
},
```
Removed code block transforms former format into latter, since
names are not needed to construct a cost model for Plutus CEK machine.
This means less (temporary) breakage on hard forks till Blockfrost
updates cost models parameter names as just happened on preview network.
Related to blockfrost/blockfrost-backend-ryo#325
|
Does anyone know if this is the only fix required to update Lucid for the new hard forks? |
Author
|
The fix is not required, it is already fixed on Blockfrost side. It's nice to have for future compatibility as the old format is now depraced. Anyway you are probably better off migrating to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
original
cost_modelshave their names included in keysvs
cost_models_rawhave only a list of valuesRemoved code block transforms former format into latter, since names are not needed to construct a cost model for Plutus CEK machine.
This means less (temporary) breakage on hard forks till Blockfrost updates cost models parameter names as just happened on preview network.
Related to blockfrost/blockfrost-backend-ryo#325