Skip to content

Commit

Permalink
Merge branch 'minor/v2.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Jul 22, 2023
2 parents 30f2f3a + ad30532 commit 301cd98
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 12 deletions.
11 changes: 9 additions & 2 deletions db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ CREATE TABLE `inputs` (

CREATE UNIQUE INDEX `inputsByOutputReference` ON `inputs` (`output_reference`);

CREATE INDEX `inputsByAddress` ON `inputs` (`address` COLLATE NOCASE, `spent_at`);
CREATE INDEX `inputsByPaymentCredential` ON `inputs` (`payment_credential` COLLATE NOCASE, `spent_at`);
CREATE INDEX `inputsByAddress` ON `inputs` (`address` COLLATE NOCASE);
CREATE INDEX `inputsByPaymentCredential` ON `inputs` (`payment_credential` COLLATE NOCASE);
CREATE INDEX `inputsByCreatedAt` ON `inputs` (`created_at`);
CREATE INDEX `inputsBySpentAt` ON `inputs` (`spent_at`);

CREATE TABLE `policies` (
`output_reference` BLOB NOT NULL,
Expand Down Expand Up @@ -68,6 +69,12 @@ CREATE TABLE `patterns` (

## Changelog

<p align="right"><code>v2.5.0</code></p>
<hr/>

- Remove `spent_at` from compound indexes `inputsByAddress` and `inputsByPaymentCredential`
- Add permanent index `inputsBySpentAt(spent_at)`

<p align="right"><code>v2.2.0</code></p>
<hr/>

Expand Down
38 changes: 30 additions & 8 deletions docs/api/v2.3.3.yaml → docs/api/v2.5.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ servers:

info:
title: Kupo
version: v2.3.3
version: v2.5.0
license:
name: MPL-2.0
url: https://raw.githubusercontent.com/cardanosolutions/kupo/master/LICENSE
Expand Down Expand Up @@ -279,8 +279,11 @@ info:
├─┫ POLICY_ID ┣────┤ . ├─┫ ASSET_NAME ┣─────┤
│ ┗━━━━━━━━━━━┛ ╰───╯ ┗━━━━━━━━━━━━┛ │
│ ┏━━━━━━━━━━━━━━┓ ╭───╮ ┏━━━━━━━━━━━━━━━━┓ │
└─┫ OUTPUT_INDEX ┣─┤ @ ├─┫ TRANSACTION_ID ┣─┘
┗━━━━━━━━━━━━━━┛ ╰───╯ ┗━━━━━━━━━━━━━━━━┛
├─┫ OUTPUT_INDEX ┣─┤ @ ├─┫ TRANSACTION_ID ┣─┤
│ ┗━━━━━━━━━━━━━━┛ ╰───╯ ┗━━━━━━━━━━━━━━━━┛ │
│ ┏━━━━━━━━━━━━━━┓ │
└─┫ METADATA_TAG ┣──────────────────────────┘
┗━━━━━━━━━━━━━━┛
```
## Address
Expand Down Expand Up @@ -381,12 +384,26 @@ info:
HEXDIG = %x30–39 / %x41-%46
```
## Metadata tag
> <sup><strong>WARNING</strong></sup> <br/>
>
> This pattern can only be used for indexing, not for querying.
```
METADATA_TAG =
╭───╮ ┏━━━━━━━━━━━━━━┓ ╭───╮
╾─┤ { ├──┫ METADATA TAG ┣──┤ } ├─╼
╰───╯ ┗━━━━━━━━━━━━━━┛ ╰───╯
```
### Examples
| Pattern | Description |
| --- | --- |
| `*@dca1e44765b9f80c8b18105e17de90d4a07e4d5a83de533e53fee32e0502d17e` | Outputs from a specific transaction |
| `3@dca1e44765b9f80c8b18105e17de90d4a07e4d5a83de533e53fee32e0502d17e` | The 4th output (0-based indexing) of a given transaction |
| Pattern | Description |
| --- | --- |
| `{25}` | Outputs of any transaction that has metadata with label 25 |
| `{42}` | Outputs of any transaction that has metadata with label 42 |
# Accessing results
Expand Down Expand Up @@ -1241,6 +1258,7 @@ components:
- connection_status
- most_recent_checkpoint
- most_recent_node_tip
- version
properties:
connection_status:
type: string
Expand All @@ -1260,6 +1278,9 @@ components:
description: Absolute slot number of the current tip of the node.
- type: "null"
description: Absolute slot number of the current tip of the node.
version:
type: string
description: Current software version.

parameters:
asset-name:
Expand Down Expand Up @@ -2057,7 +2078,8 @@ paths:
description: |
A key-value export compatible with Prometheus.
`connected` and `disconnected` are encoded as `1.0` and `0.0` respectively.
- `connected` and `disconnected` are encoded as `1.0` and `0.0` respectively.
- `version` is not present in the Prometheus metrics.
examples:
response:
value: |
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@
</script>

<div id="versions">
<a href="#">v2.3.4</a>
<a href="#">v2.4.1</a>
<a href="#">v2.5.0</a>
<a href="#">nightly</a>
<script>
;[1,2,3].forEach(ix => {
Expand Down
2 changes: 1 addition & 1 deletion kupo.cabal

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 301cd98

Please sign in to comment.