Skip to content

Commit

Permalink
Merge pull request #365 from blockfrost/srk/rawCostModelsConsumedUtxo
Browse files Browse the repository at this point in the history
Add `cost_models_raw` for epoch parameters, `consumed_by_tx` for `tx/{hash}/utxos`
  • Loading branch information
slowbackspace authored Sep 11, 2024
2 parents cf9054f + 4835e55 commit 7d6b971
Show file tree
Hide file tree
Showing 11 changed files with 298 additions and 51 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ Unreleased changes are in the `master` branch.

## [Unreleased]

### Added

- `/txs/{hash}/utxos`
- `consumed_by_tx` field
- `/epochs/{number}/parameters` and `/epochs/latest/parameters`
- `cost_models_raw` field, list variant of `cost_models` without name mapping

### Fixed

- Naming of `pvtpp_security_group` -> `pvt_p_p_security_group`, the old field is
preserved but marked as deprecated.
- `/governance/proposals/{tx_hash}/{cert_index}/parameters`
- Example and description of `cost_models` (these match `cost_models_raw` of epoch parameters)

## [0.1.66] - 2024-09-02

### Changed
Expand Down
43 changes: 37 additions & 6 deletions blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6318,7 +6318,7 @@ components:
objectives: CIP119:objectives
motivations: CIP119:motivations
qualifications: CIP119:qualifications
hahsAlgorithm: blake2b-256
hashAlgorithm: blake2b-256
body:
paymentAddress: addr1q86dnpkva4mm859c8ur7tjxn57zgsu6vg8pdetkdve3fsacnq7twy06u2ev5759vutpjgzfryx0ud8hzedhzerava35qwh3x34
givenName: Ryan Williams
Expand Down Expand Up @@ -6596,12 +6596,12 @@ components:
nullable: true
example:
PlutusV1:
addInteger-cpu-arguments-intercept: 197209
addInteger-cpu-arguments-slope: 0
- 197209
- 0
PlutusV2:
addInteger-cpu-arguments-intercept: 197209
addInteger-cpu-arguments-slope: 0
description: Cost models parameters for Plutus Core scripts
- 197209
- 0
description: Cost models parameters for Plutus Core scripts in raw list form
price_mem:
type: number
nullable: true
Expand Down Expand Up @@ -6747,6 +6747,12 @@ components:
pvtpp_security_group:
type: number
nullable: true
deprecated: true
description: Pool Voting threshold for security-relevant protocol parameters changes. Renamed to pvt_p_p_security_group.
pvt_p_p_security_group:
type: number
nullable: true
description: Pool Voting threshold for security-relevant protocol parameters changes.
min_fee_ref_script_cost_per_byte:
type: number
nullable: true
Expand Down Expand Up @@ -6803,6 +6809,7 @@ components:
- drep_deposit
- drep_activity
- pvtpp_security_group
- pvt_p_p_security_group
- min_fee_ref_script_cost_per_byte
required:
- tx_hash
Expand Down Expand Up @@ -7123,6 +7130,18 @@ components:
addInteger-cpu-arguments-intercept: 197209
addInteger-cpu-arguments-slope: 0
description: Cost models parameters for Plutus Core scripts
cost_models_raw:
additionalProperties: true
type: object
nullable: true
example:
PlutusV1:
- 197209
- 0
PlutusV2:
- 197209
- 0
description: Cost models parameters for Plutus Core scripts in raw list form
price_mem:
type: number
nullable: true
Expand Down Expand Up @@ -7262,6 +7281,12 @@ components:
pvtpp_security_group:
type: number
nullable: true
deprecated: true
description: Pool Voting threshold for security-relevant protocol parameters changes. Renamed to pvt_p_p_security_group.
pvt_p_p_security_group:
type: number
nullable: true
description: Pool Voting threshold for security-relevant protocol parameters changes.
min_fee_ref_script_cost_per_byte:
type: number
nullable: true
Expand Down Expand Up @@ -7319,6 +7344,7 @@ components:
- drep_deposit
- drep_activity
- pvtpp_security_group
- pvt_p_p_security_group
- min_fee_ref_script_cost_per_byte
epoch_content_array:
type: array
Expand Down Expand Up @@ -7632,6 +7658,11 @@ components:
nullable: true
description: The hash of the reference script of the output
example: 13a3efd825703a352a8f71f4e2758d08c28c564e8dfcce9f77776ad1
consumed_by_tx:
type: string
nullable: true
description: Transaction hash that consumed the UTXO or null for unconsumed UTXOs. Always null for collateral outputs.
example: 66c29b56952f6085afac3b0632d781af78d020b080063bcfd6c54b8e2b8fed41
required:
- address
- amount
Expand Down
2 changes: 1 addition & 1 deletion json-schema.json

Large diffs are not rendered by default.

62 changes: 50 additions & 12 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -8676,7 +8676,7 @@
}
}
},
"hahsAlgorithm": "blake2b-256",
"hashAlgorithm": "blake2b-256",
"body": {
"paymentAddress": "addr1q86dnpkva4mm859c8ur7tjxn57zgsu6vg8pdetkdve3fsacnq7twy06u2ev5759vutpjgzfryx0ud8hzedhzerava35qwh3x34",
"givenName": "Ryan Williams",
Expand Down Expand Up @@ -9040,16 +9040,16 @@
"type": "object",
"nullable": true,
"example": {
"PlutusV1": {
"addInteger-cpu-arguments-intercept": 197209,
"addInteger-cpu-arguments-slope": 0
},
"PlutusV2": {
"addInteger-cpu-arguments-intercept": 197209,
"addInteger-cpu-arguments-slope": 0
}
"PlutusV1": [
197209,
0
],
"PlutusV2": [
197209,
0
]
},
"description": "Cost models parameters for Plutus Core scripts"
"description": "Cost models parameters for Plutus Core scripts in raw list form"
},
"price_mem": {
"type": "number",
Expand Down Expand Up @@ -9226,7 +9226,14 @@
},
"pvtpp_security_group": {
"type": "number",
"nullable": true
"nullable": true,
"deprecated": true,
"description": "Pool Voting threshold for security-relevant protocol parameters changes. Renamed to pvt_p_p_security_group."
},
"pvt_p_p_security_group": {
"type": "number",
"nullable": true,
"description": "Pool Voting threshold for security-relevant protocol parameters changes."
},
"min_fee_ref_script_cost_per_byte": {
"type": "number",
Expand Down Expand Up @@ -9286,6 +9293,7 @@
"drep_deposit",
"drep_activity",
"pvtpp_security_group",
"pvt_p_p_security_group",
"min_fee_ref_script_cost_per_byte"
]
}
Expand Down Expand Up @@ -9720,6 +9728,22 @@
},
"description": "Cost models parameters for Plutus Core scripts"
},
"cost_models_raw": {
"additionalProperties": true,
"type": "object",
"nullable": true,
"example": {
"PlutusV1": [
197209,
0
],
"PlutusV2": [
197209,
0
]
},
"description": "Cost models parameters for Plutus Core scripts in raw list form"
},
"price_mem": {
"type": "number",
"nullable": true,
Expand Down Expand Up @@ -9889,7 +9913,14 @@
},
"pvtpp_security_group": {
"type": "number",
"nullable": true
"nullable": true,
"deprecated": true,
"description": "Pool Voting threshold for security-relevant protocol parameters changes. Renamed to pvt_p_p_security_group."
},
"pvt_p_p_security_group": {
"type": "number",
"nullable": true,
"description": "Pool Voting threshold for security-relevant protocol parameters changes."
},
"min_fee_ref_script_cost_per_byte": {
"type": "number",
Expand Down Expand Up @@ -9950,6 +9981,7 @@
"drep_deposit",
"drep_activity",
"pvtpp_security_group",
"pvt_p_p_security_group",
"min_fee_ref_script_cost_per_byte"
]
},
Expand Down Expand Up @@ -10358,6 +10390,12 @@
"nullable": true,
"description": "The hash of the reference script of the output",
"example": "13a3efd825703a352a8f71f4e2758d08c28c564e8dfcce9f77776ad1"
},
"consumed_by_tx": {
"type": "string",
"nullable": true,
"description": "Transaction hash that consumed the UTXO or null for unconsumed UTXOs. Always null for collateral outputs.",
"example": "66c29b56952f6085afac3b0632d781af78d020b080063bcfd6c54b8e2b8fed41"
}
},
"required": [
Expand Down
54 changes: 48 additions & 6 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6609,7 +6609,7 @@ components:
objectives: 'CIP119:objectives'
motivations: 'CIP119:motivations'
qualifications: 'CIP119:qualifications'
hahsAlgorithm: blake2b-256
hashAlgorithm: blake2b-256
body:
paymentAddress: >-
addr1q86dnpkva4mm859c8ur7tjxn57zgsu6vg8pdetkdve3fsacnq7twy06u2ev5759vutpjgzfryx0ud8hzedhzerava35qwh3x34
Expand Down Expand Up @@ -6904,12 +6904,12 @@ components:
nullable: true
example:
PlutusV1:
addInteger-cpu-arguments-intercept: 197209
addInteger-cpu-arguments-slope: 0
- 197209
- 0
PlutusV2:
addInteger-cpu-arguments-intercept: 197209
addInteger-cpu-arguments-slope: 0
description: Cost models parameters for Plutus Core scripts
- 197209
- 0
description: Cost models parameters for Plutus Core scripts in raw list form
price_mem:
type: number
nullable: true
Expand Down Expand Up @@ -7095,6 +7095,16 @@ components:
pvtpp_security_group:
type: number
nullable: true
deprecated: true
description: >-
Pool Voting threshold for security-relevant protocol parameters
changes. Renamed to pvt_p_p_security_group.
pvt_p_p_security_group:
type: number
nullable: true
description: >-
Pool Voting threshold for security-relevant protocol parameters
changes.
min_fee_ref_script_cost_per_byte:
type: number
nullable: true
Expand Down Expand Up @@ -7151,6 +7161,7 @@ components:
- drep_deposit
- drep_activity
- pvtpp_security_group
- pvt_p_p_security_group
- min_fee_ref_script_cost_per_byte
required:
- tx_hash
Expand Down Expand Up @@ -7483,6 +7494,18 @@ components:
addInteger-cpu-arguments-intercept: 197209
addInteger-cpu-arguments-slope: 0
description: Cost models parameters for Plutus Core scripts
cost_models_raw:
additionalProperties: true
type: object
nullable: true
example:
PlutusV1:
- 197209
- 0
PlutusV2:
- 197209
- 0
description: Cost models parameters for Plutus Core scripts in raw list form
price_mem:
type: number
nullable: true
Expand Down Expand Up @@ -7642,6 +7665,16 @@ components:
pvtpp_security_group:
type: number
nullable: true
deprecated: true
description: >-
Pool Voting threshold for security-relevant protocol parameters
changes. Renamed to pvt_p_p_security_group.
pvt_p_p_security_group:
type: number
nullable: true
description: >-
Pool Voting threshold for security-relevant protocol parameters
changes.
min_fee_ref_script_cost_per_byte:
type: number
nullable: true
Expand Down Expand Up @@ -7699,6 +7732,7 @@ components:
- drep_deposit
- drep_activity
- pvtpp_security_group
- pvt_p_p_security_group
- min_fee_ref_script_cost_per_byte
epoch_content_array:
type: array
Expand Down Expand Up @@ -8032,6 +8066,14 @@ components:
nullable: true
description: The hash of the reference script of the output
example: 13a3efd825703a352a8f71f4e2758d08c28c564e8dfcce9f77776ad1
consumed_by_tx:
type: string
nullable: true
description: >-
Transaction hash that consumed the UTXO or null for unconsumed
UTXOs. Always null for collateral outputs.
example: >-
66c29b56952f6085afac3b0632d781af78d020b080063bcfd6c54b8e2b8fed41
required:
- address
- amount
Expand Down
Loading

0 comments on commit 7d6b971

Please sign in to comment.