Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
e108079
bump: dependencies for cardano-node 11.0
johnalotoski May 13, 2026
57a2da9
update: add Dijkstra era support for cardano-node 11.0
johnalotoski May 13, 2026
b6108fa
fix: properly support DijkstraEra instead of unsafeCoerce through Con…
erikd May 14, 2026
00b332b
fix: use proper type-safe conversions for DijkstraEra BinaryData
erikd May 14, 2026
af68a61
fix: use DijkstraNativeScript for NativeScript type alias
erikd May 14, 2026
3a15c93
docs: explain OVERLAPPING pragma on ToJSON Point instance
erikd May 14, 2026
8f32e3b
fix: replace remaining unsafeBinaryDataFromBytes calls in BinaryData
erikd May 14, 2026
22c0060
refactor: remove unused toConwayDatum and fromConwayDatum
erikd May 14, 2026
4cfbb6c
fix: use OS-assigned ports in state-machine test
johnalotoski May 14, 2026
d7c50de
Comment about Hydra and its transaction encoding
erikd May 14, 2026
fc37976
restore previous Ogmios revision in cabal.project
KtorZ May 26, 2026
9f916a4
Merge branch 'feature/node-11.0'
KtorZ Jul 18, 2026
fd21bcd
replace buildjet instances with github runners;
KtorZ Jul 18, 2026
e68001a
bump workflow actions, mostly getting rid of node.js v20
KtorZ Jul 18, 2026
6685d68
Start separate test suite for flaky tests; extract 'read-only'
notunrandom Jun 18, 2026
029deca
Polish test-accept instructions and remove old read-only endToEnd test
notunrandom Jun 29, 2026
4d7cd1a
Extract 'can connect' test to new test-accept
notunrandom Jun 30, 2026
3e1a2c0
Refactor to introduce 'restart' test
notunrandom Jul 1, 2026
9a69973
Refactor to use Aeson
notunrandom Jul 1, 2026
2685969
Extract 'can restart' test to new test-accept
notunrandom Jul 2, 2026
5c8da43
Extract 'cannot restart with later since' test to new test-accept
notunrandom Jul 2, 2026
27b93b4
Extract 'cannot restart with different pattern' test to new test-accept
notunrandom Jul 2, 2026
a20f37e
Extract 'Auto-magically restart (--defer-db-indexes)' test to new tes…
notunrandom Jul 7, 2026
184ef4c
Extract 'Dynamically add pattern' test to new test-accept
notunrandom Jul 9, 2026
7b822bf
Improvements:
notunrandom Jul 9, 2026
94fdbd3
Refactor variable name
notunrandom Jul 13, 2026
30c25b6
Extract 'Dynamically add pattern (while syncing)' test to new test-ac…
notunrandom Jul 13, 2026
322c825
Refactor: remove redundant imports
notunrandom Jul 13, 2026
b2035e9
Refactor: improve test-accept reliability on pr-204 branch
notunrandom Jul 13, 2026
a0545d6
Refactor: improve reliability on pr-204 by not reusing port between t…
notunrandom Jul 13, 2026
c164855
Fix: correct an error in the ports of test-accept tests
notunrandom Jul 14, 2026
65611ea
ensure 'kupo' is required as a build-tool
KtorZ Jul 15, 2026
bf5558b
reformat test-accept files.
KtorZ Jul 15, 2026
2a9bd08
collect logs while running and annotate tests with logs (shown on fai…
KtorZ Jul 15, 2026
c2f857b
fix missing socket path for the cardano-cli command.
KtorZ Jul 15, 2026
f06f951
simplify DSL for writing specification by asserting in 'eventually'.
KtorZ Jul 15, 2026
b4b1232
fix dynamic pattern addition spec
KtorZ Jul 15, 2026
91a7ee1
fix default options now missing on KupoH
KtorZ Jul 15, 2026
04820f7
address linter warnings.
KtorZ Jul 15, 2026
babd241
Merge branch 'flaky'
KtorZ Jul 18, 2026
c4e14e2
use 'build-tool-depends' instead of 'build-tools' in .cabal file
KtorZ Jul 18, 2026
304db43
fill-in CHANGELOG for v2.12.0
KtorZ Jul 18, 2026
f201d9c
fix typo 'build-tool-depends'
KtorZ Jul 18, 2026
c12f942
fix asset quantity encoding wrongly defaulting to string in some cases.
KtorZ Jul 18, 2026
2107456
Allow custom database indexes via environment variables
KtorZ Jul 18, 2026
2c45f3b
update compatibility matrix.
KtorZ Jul 18, 2026
10ab69d
bump version to 2.12.0
KtorZ Jul 18, 2026
491918a
rotate and bump API docs to v2.12.0
KtorZ Jul 18, 2026
a65e156
Merge branch 'release/v2.12'
KtorZ Jul 18, 2026
50b0c51
Update Benchmarks
notunrandom Jul 22, 2026
26d8407
Create preprod.md
notunrandom Jul 22, 2026
2502466
New preprod benchmarks for v2.12.0
notunrandom Jul 22, 2026
7ee832c
v2.12.0 mainnet benchmarks
notunrandom Aug 20, 2026
aaaa507
test-accept: improve robustness
notunrandom Aug 3, 2026
86dc75f
test-accept: formatting: keep lines under 80
notunrandom Aug 3, 2026
5f517ea
test-accept: refactor
notunrandom Aug 3, 2026
df15bcd
test-accept: refactor
notunrandom Aug 4, 2026
9ebfc0d
test-accept: now can run against Ogmios as well as against a node
notunrandom Aug 5, 2026
de2bfad
test-accept: refactor
notunrandom Aug 11, 2026
7b04413
test-accept: replace assert which was not working
notunrandom Aug 11, 2026
34ef67d
test-accept: fix two tests whose failure was masked
notunrandom Aug 12, 2026
a45864a
test-accept: auto-refresh recent point to ensure defer-db test always…
notunrandom Aug 18, 2026
3948a48
test-accept: update test points (recent/tip)
notunrandom Aug 20, 2026
32163d2
test-accept: fix 'Dynamically... when at tip'
notunrandom Aug 26, 2026
ffa42aa
test-accept: change frequency of 'eventually' to pass 'dynamically' t…
notunrandom Aug 27, 2026
1c73467
test-accept: update test points
notunrandom Sep 1, 2026
63f8338
Merge upstream CardanoSolutions/kupo master at 1c73467
carbolymer Nov 23, 2026
02ae596
ci: run the accept suite against the preprod node
carbolymer Nov 23, 2026
c8e61cd
Avoid partial list functions in the accept suite
carbolymer Nov 23, 2026
f8f981d
Bound the statistics scan of PRAGMA optimize
carbolymer Nov 24, 2026
fdf5b00
Wait for the rolled-back matches in the accept suite
carbolymer Nov 26, 2026
f9192e3
Make the read-only DB files unwritable in the accept suite
carbolymer Nov 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 63 additions & 29 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,47 +87,54 @@ jobs:
# Use the PR head SHA on pull_request events (not $GITHUB_SHA, which is the
# ephemeral merge commit GitHub creates server-side and that Hydra doesn't see).
# Falls back to $GITHUB_SHA on push events.
- name: Wait for kupo-tests in Hydra cache
- name: Wait for kupo binaries in Hydra cache
env:
TARGET_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
set -o pipefail
echo "Target SHA: $TARGET_SHA"
if ! out=$(nix eval --raw "git+https://github.com/$GITHUB_REPOSITORY?rev=$TARGET_SHA&submodules=1#kupo-tests"); then
echo "nix eval failed"
exit 1
fi
if [ -z "$out" ]; then
echo "nix eval returned an empty path"
exit 1
fi
drv=$(nix eval --raw "git+https://github.com/$GITHUB_REPOSITORY?rev=$TARGET_SHA&submodules=1#kupo-tests.drvPath" 2>/dev/null || true)
echo "Resolved store path: $out"
echo "Derivation path: $drv"
echo "Waiting for $out in cache..."
flake_ref="git+https://github.com/$GITHUB_REPOSITORY?rev=$TARGET_SHA&submodules=1"
deadline=$((SECONDS + 1800))
while true; do
if nix path-info --refresh --store https://cache.iog.io "$out" >/dev/null 2>&1; then
echo "Found in cache"
break
for attr in kupo-tests kupo-tests-accept kupo; do
if ! out=$(nix eval --raw "$flake_ref#$attr"); then
echo "nix eval failed for $attr"
exit 1
fi
if [ "$SECONDS" -ge "$deadline" ]; then
echo "Timed out after 30 minutes waiting for Hydra cache (path: $out)"
if [ -z "$out" ]; then
echo "nix eval returned an empty path for $attr"
exit 1
fi
echo "Not in cache yet, waiting 30s..."
sleep 30
drv=$(nix eval --raw "$flake_ref#$attr.drvPath" 2>/dev/null || true)
echo "[$attr] resolved store path: $out"
echo "[$attr] derivation path: $drv"
echo "[$attr] waiting for $out in cache..."
while true; do
if nix path-info --refresh --store https://cache.iog.io "$out" >/dev/null 2>&1; then
echo "[$attr] found in cache"
break
fi
if [ "$SECONDS" -ge "$deadline" ]; then
echo "Timed out after 30 minutes waiting for Hydra cache ($attr path: $out)"
exit 1
fi
echo "[$attr] not in cache yet, waiting 30s..."
sleep 30
done
done

- name: Download test binary from Hydra cache
- name: Download binaries from Hydra cache
env:
TARGET_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
nix build "git+https://github.com/$GITHUB_REPOSITORY?rev=$TARGET_SHA&submodules=1#kupo-tests" \
--builders "" --max-jobs 0
flake_ref="git+https://github.com/$GITHUB_REPOSITORY?rev=$TARGET_SHA&submodules=1"
mkdir -p bin
cp result/bin/unit bin/unit
chmod +x bin/unit
for pair in "kupo-tests:unit" "kupo-tests-accept:accept" "kupo:kupo"; do
attr="${pair%%:*}"
exe="${pair##*:}"
nix build "$flake_ref#$attr" --builders "" --max-jobs 0 -o "result-$exe"
cp "result-$exe/bin/$exe" "bin/$exe"
chmod +x "bin/$exe"
done

- name: Download cardano-node configs
env:
Expand Down Expand Up @@ -164,14 +171,41 @@ jobs:
run: ./.github/workflows/scripts/preprod-node-sync.sh 0.9999

- name: Run integration tests
env:
CARDANO_NODE_SOCKET: ${{ runner.temp }}/ipc/node.socket
CARDANO_NODE_CONFIG: ${{ github.workspace }}/config/preprod/config.json
run: sudo -E ./bin/unit

# The accept suite asks `cardano-cli` for the node tip. The attribute is
# cached on cache.iog.io; --max-jobs 0 stops CI from ever building it.
- name: Provide cardano-cli
run: |
nix build "github:IntersectMBO/cardano-node/$CARDANO_NODE_VERSION#cardano-cli" \
--builders "" --max-jobs 0 -o result-cardano-cli
cp result-cardano-cli/bin/cardano-cli bin/cardano-cli

# Runs before the sudo step, which leaves root-owned test-accept/point-*.dat.
# Root ignores file permissions, so only a normal user enforces them.
- name: Run read-only acceptance test without root
env:
CARDANO_NODE_SOCKET: ${{ runner.temp }}/ipc/node.socket
CARDANO_NODE_CONFIG: ${{ github.workspace }}/config/preprod/config.json
run: |
sudo chmod a+w "$CARDANO_NODE_SOCKET"
PATH="$PWD/bin:$PATH" ./bin/accept --match "Can start in readonly mode on readonly DB"

# Run from the checkout: the suite reads and writes test-accept/point-*.dat.
# sudo resets PATH, so pass it explicitly.
- name: Run acceptance tests
env:
CARDANO_NODE_SOCKET: ${{ runner.temp }}/ipc/node.socket
CARDANO_NODE_CONFIG: ${{ github.workspace }}/config/preprod/config.json
# Skipped tests are known to be flaky.
run: |
sudo -E ./bin/unit \
--skip "Dynamically add pattern and restart to a past point when at the tip" \
--skip "Auto-magically restart when reaching the tip"
sudo -E env "PATH=$PWD/bin:$PATH" ./bin/accept \
--skip "Auto-magically restarts when --defer-db-indexes is enabled" \
--skip "Dynamically adds pattern and rolls back (when at tip)" \
--skip "Can start in readonly mode on readonly DB"

- name: Stop cardano-node
if: always() && steps.node.outputs.node-started == 'true'
Expand Down
34 changes: 31 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### [2.12.0] - UNRELEASED
### [Unreleased]

#### Added

Expand Down Expand Up @@ -29,14 +29,42 @@

- Kupo is now built against the ledger and consensus libraries of cardano-node 11.2 (cardano-ledger-core 1.23 and ouroboros-consensus 5.4).

- Fixed network synchronisation calculations (see [#191](https://github.com/CardanoSolutions/kupo/issues/191)).

- Fixed the input index and the redeemer reported in `spent_at` (`input_index` and `redeemer`) for transactions that spend two or more inputs. Since 2.10.0, Kupo numbered the inputs from the last one, so the index and the redeemer did not match the ledger. They now follow the ledger's input order. For the spends recorded before the upgrade, Kupo registers a data repair, and warns at every start until it is applied. If the index matches `*`, was synchronised from origin and was never pruned with `--prune-utxo`, run `kupo db migrate --confirm-complete-index` to apply it; otherwise, resynchronise.

- At startup, Kupo adds three empty columns to the `inputs` table of an existing database, to prepare the indexing of Dijkstra sub-transactions. The change is automatic and instant, and needs no action.

- Kupo now returns datums and redeemers from Babbage and Conway transaction witnesses with their on-chain bytes, as it already does for inline datums and other eras. Earlier versions returned a re-encoding of the same value, which cannot be used as-is to spend an output locked by that datum's hash. Databases built by earlier versions keep the re-encoded bytes.

- Kupo now limits the statistics scan of SQLite's `PRAGMA optimize`, which it runs at start-up, after `kupo copy` and on every garbage collection pass. On large databases the unbounded scan could take hours and stall chain sync. See https://github.com/CardanoSolutions/kupo/issues/209.

#### Removed

N/A

### [2.12.0] - 2026-07-18

#### Added

- Allow controlling return type of asset quantities through a media query. Allowing string instead of integer when using `Accept: application/json:asset-quantity=string`.

- New slot-range index usage for wildcard (*) match queries (see [#194](https://github.com/CardanoSolutions/kupo/issues/194)).

- Custom indexes can now be added via environment variable, prefixed with `KUPO_INDEX_`. They behave as standard indexes with regards to `--defer-db-indexes` and are only installed if not already present. Indexes are named after the environment variable (after the dropping the prefix). So for example, to add an index for unspent inputs by payment credential, you can now provide:

```console
KUPO_INDEX_inputsByPaymentCredentialUnspent="inputs(payment_credential COLLATE NOCASE) WHERE spent_at IS NULL" kupo ...
```

#### Changed

- Bumped internal dependencies to cardano-node==11.0.1.

- Fixed network synchronisation calculations (see [#191](https://github.com/CardanoSolutions/kupo/issues/191)).

- Rework some integration tests to avoid issues with closed file handles.

- Fixed read-only mode requiring write permissions on the database directory.

#### Removed

N/A
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ archive: kupo-$(TAG)-$(ARCH)-$(OS).tar.gz # Package the application as a tarball
kupo.sqlite3-$(NETWORK).tar.gz:
@echo "Taking snapshot of NETWORK=$(NETWORK)."
sqlite3 $(CACHEDIR)/kupo.sqlite3 "VACUUM;"
sqlite3 $(CACHEDIR)/kupo.sqlite3 "PRAGMA optimize;"
sqlite3 $(CACHEDIR)/kupo.sqlite3 "PRAGMA analysis_limit = 1000; PRAGMA optimize;"
GZIP=-9 tar cvzf kupo.sqlite3-$(NETWORK).tar.gz --cd $(CACHEDIR) kupo.sqlite3

snapshot: kupo.sqlite3-$(NETWORK).tar.gz # Take database snapshots. Use NETWORK=XXX to specify target network.
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ Finally, [discussions 💡][discussions] contains ongoing discussions regarding

# Compatibility

Kupo | Cardano-node | Ogmios | Hydra
--- | --- | --- | ---
`v2.11.*` | `10.1.*`, `10.0.*` | `v6.*.*` | `0.20.0`, `0.21.0`
`v2.10.*` | `10.1.*`, `10.0.*`, `9.0.0` | `v6.*.*` | `0.16.0`
`v2.9.*` | `10.1.*`, `10.0.*`, `9.0.0` | `v6.*.*` | `0.16.0`
`v2.8.*` | `8.7.*` | `v6.*.*` | `0.13.0`
`v2.7.*` | `8.1.*`, `8.6.*` | `v6.*.*` | `0.13.0`
`v2.6.*` | `8.1.*` | `v6.*.*` | N/A
`v2.5.*` | `1.35.*`, `8.1.*` | `v5.*.*` | N/A
Kupo | Cardano-node | Ogmios | Hydra
--- | --- | --- | ---
`v2.12.*` | `11.1.*`, `11.2.*` | `v7.*.*`, `v6.*.*` | `0.20.0`, `0.21.0`
`v2.11.*` | `10.1.*`, `10.0.*` | `v6.*.*` | `0.20.0`, `0.21.0`
`v2.10.*` | `10.1.*`, `10.0.*`, `9.0.0` | `v6.*.*` | `0.16.0`
`v2.9.*` | `10.1.*`, `10.0.*`, `9.0.0` | `v6.*.*` | `0.16.0`
`v2.8.*` | `8.7.*` | `v6.*.*` | `0.13.0`
`v2.7.*` | `8.1.*`, `8.6.*` | `v6.*.*` | `0.13.0`
`v2.6.*` | `8.1.*` | `v6.*.*` | N/A
`v2.5.*` | `1.35.*`, `8.1.*` | `v5.*.*` | N/A

# System Requirements

Expand Down
Loading
Loading