Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
49 changes: 0 additions & 49 deletions .github/composites/get-sourcehub-image/action.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/composites/get-vera-image/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 2026 Democratized Data Foundation
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.txt.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0, included in the file
# licenses/APL.txt.

name: 'Get Vera Docker Image Tag'

description: 'Composite action to determine the Vera Docker image matching go.mod'

outputs:
image:
description: "Vera image to use"
value: ${{ steps.image-name.outputs.image }}

runs:
# This is a composite action, setting this is required.
using: "composite"

steps:
# Go pseudo-versions contain the short commit for the required Vera revision.
- name: Get Vera short commit
id: vera-commit
shell: bash
run: |
set -euo pipefail
VERA_COMMIT=$(sed -En \
's|^[[:space:]]*github.com/sourcenetwork/vera[[:space:]]+v[^[:space:]]+-([0-9a-f]+)[[:space:]]*$|\1|p' \
go.mod)
test -n "$VERA_COMMIT"
echo "short=$VERA_COMMIT" >> "$GITHUB_OUTPUT"

# Fetch Vera to resolve the short pseudo-version commit to its full SHA.
- name: Checkout Vera code into the directory
uses: actions/checkout@v6
with:
repository: sourcenetwork/vera
path: _vera
fetch-depth: 0

- name: Build Vera image name
id: image-name
working-directory: _vera
shell: bash
run: |
commit=$(git rev-parse "${{ steps.vera-commit.outputs.short }}^{commit}")
echo "image=ghcr.io/sourcenetwork/vera:sha-$commit" >> "$GITHUB_OUTPUT"
12 changes: 6 additions & 6 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ jobs:
"
coverage-path: coverage.txt

# The document acp matrix job tests the combinations of source-hub acp and client types on linux.
# The document ACP matrix job tests the combinations of document ACP types and client types on Linux.
test-coverage-document-acp:
name: Test coverage document acp job

strategy:
fail-fast: false
matrix:
client-type: [go, http, cli, c]
document-acp-type: [source-hub]
document-acp-type: [remote]

runs-on: runs-on=${{ github.run_id }}-${{ github.run_attempt }}-${{ strategy.job-index }}/\
spot=pco/cpu=16+32/family=c6*+c7*/disk=large/extras=s3-cache
Expand All @@ -158,14 +158,14 @@ jobs:
- name: Setup defradb
uses: ./.github/composites/setup-defradb

- name: Get SourceHub Docker Image Name
id: sourcehub-image
uses: ./.github/composites/get-sourcehub-image
- name: Get Vera Docker Image Name
id: vera-image
uses: ./.github/composites/get-vera-image

- name: Test coverage & save coverage report in an artifact
uses: ./.github/composites/test-coverage-with-artifact
env:
DEFRA_SOURCEHUB_IMAGE: ${{ steps.sourcehub-image.outputs.image }}
DEFRA_VERA_IMAGE: ${{ steps.vera-image.outputs.image }}
with:
coverage-artifact-name: "coverage_document_acp\
_${{ matrix.document-acp-type }}\
Expand Down
66 changes: 66 additions & 0 deletions BREAKLOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Breaking Change Log

This log records intentional one-off compatibility breaks that DefraDB ships without waiting for a major release, as described by the [versioning policy](./VERSIONING.md). These are genuine breaking changes, not the standing exceptions in that policy.

Unreleased entries are grouped under their release version when they ship.

## Unreleased

### Rename SourceHub to Vera and SourceHub Document ACP to Remote DAC

The SourceHub project has been renamed to [Vera](https://github.com/sourcenetwork/vera). DefraDB now calls the Vera-backed Document ACP implementation Remote DAC, alongside the existing Local DAC. DefraDB does not retain the former configuration values or API names as compatibility aliases.

DefraDB also adopts Vera's planned `LogID` terminology for the Remote DAC log identifier instead of retaining SourceHub's `ChainID` terminology. The current Vera SDK still accepts this value through `WithChainID`; that implementation detail remains inside the Remote DAC adapter so DefraDB users will not face another rename when Vera updates its API.

Update Remote DAC deployments and integrations to use Vera endpoints and dependencies.

#### Configuration and tooling

| Surface | Previous | Replacement |
|---------|----------|-------------|
| Document ACP type | `source-hub` | `remote` |
| Document ACP type flag | `--document-acp-type source-hub` | `--document-acp-type remote` |
| Document ACP type environment variable | `DEFRA_ACP_DOCUMENT_TYPE=source-hub` | `DEFRA_ACP_DOCUMENT_TYPE=remote` |
| Document ACP configuration namespace | `acp.document.sourceHub.*` | `acp.document.remote.*` |
| Remote DAC log ID configuration | `acp.document.sourceHub.ChainID` | `acp.document.remote.LogID` |
| Environment-based configuration namespace | `DEFRA_ACP_DOCUMENT_SOURCEHUB_*` | `DEFRA_ACP_DOCUMENT_REMOTE_*` |
| Remote DAC log ID environment variable | `DEFRA_ACP_DOCUMENT_SOURCEHUB_CHAINID` | `DEFRA_ACP_DOCUMENT_REMOTE_LOGID` |
| Client address flag | `--source-hub-address` | `--remote-dac-address` |
| Go module | `github.com/sourcenetwork/sourcehub` | `github.com/sourcenetwork/vera` |
| Container image | `ghcr.io/sourcenetwork/sourcehub` | `ghcr.io/sourcenetwork/vera` |
| Integration test ACP type | `DEFRA_DOCUMENT_ACP_TYPE=source-hub` | `DEFRA_DOCUMENT_ACP_TYPE=remote` |
| Integration test image | `DEFRA_SOURCEHUB_IMAGE` | `DEFRA_VERA_IMAGE` |
| Make target | `make test:source-hub` | `make test:remote-dac` |

The namespace-only change applies to `GRPCAddress`, `CometRPCAddress`, `KeyName`, and `address`. The `ChainID` setting instead becomes `LogID`, as shown above.

Addresses supplied through `acp.document.remote.address` or `--remote-dac-address`, including the JWT `authorized_account` claim, must use Vera's `vera` Bech32 prefix instead of SourceHub's `source` prefix.

#### Go API

| Previous | Replacement |
|----------|-------------|
| `dac.NewSourceHubACP` | `dac.NewRemoteDocumentACP` |
| `dac.NewACPSourceHub` | `dac.NewRemoteDocumentACPClient` |
| `dac.NewSourceHubDocumentACP` (JS/WASM) | `dac.NewRemoteDocumentACP` |
| `dac.SourceHubDocumentACP` | `dac.RemoteDocumentACP` |
| `SourceHubDocumentACP` in `acp/types` | `RemoteDocumentACP` in `acp/types` |
| `options.NodeSourceHubDocumentACPType` | `options.NodeRemoteDocumentACPType` |
| `NodeDocumentACPOptions.SourceHubChainID` | `NodeDocumentACPOptions.RemoteDACLogID` |
| `NodeDocumentACPOptions.SourceHubGRPCAddress` | `NodeDocumentACPOptions.RemoteDACGRPCAddress` |
| `NodeDocumentACPOptions.SourceHubCometRPCAddress` | `NodeDocumentACPOptions.RemoteDACCometRPCAddress` |
| `NodeDocumentACPOptionsBuilder.SetChainID` | `NodeDocumentACPOptionsBuilder.SetLogID` |
| `node.ErrSignerMissingForSourceHubACP` | `node.ErrSignerMissingForRemoteDAC` |
| `sourcehub.TxSigner` | `vera.TxSigner` |

#### C API

These mappings are included for migration completeness and do not change the C bindings' [current versioning status](./VERSIONING.md#the-c-embedded-client).

The Document ACP type stored in `NodeInitOptions.documentACPType` changes from `"source-hub"` to `"remote"`. The related fields are renamed as follows:

| Previous | Replacement |
|----------|-------------|
| `sourceHubChainID` | `remoteDACLogID` |
| `sourceHubGRPCAddress` | `remoteDACGRPCAddress` |
| `sourceHubCometRPCAddress` | `remoteDACCometRPCAddress` |
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ You don't need to be an expert in all of these to contribute - many contribution

| Tool | When You Need It |
|------|-----------------|
| **[SourceHub](https://github.com/sourcenetwork/sourcehub)** | Working on access control features |
| **[Vera](https://github.com/sourcenetwork/vera)** | Working on access control features |
| **[Ollama](https://ollama.com/download)** | AI/vector embedding tests |
| **[Make](https://www.gnu.org/software/make/)** | Convenient but not required - you can run `go` commands directly |

Expand Down
13 changes: 7 additions & 6 deletions CONTRIBUTING_INTERNAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
- [🔧 Quick Fix Checklist](#-quick-fix-checklist)
- [🧪 Testing - Advanced](#-testing--advanced)
- [🏃 Test Configuration Variables](#-test-configuration-variables)
- [🌐 SourceHub ACP Tests](#-sourcehub-acp-tests)
- [🌐 Remote Document ACP Tests](#-remote-document-acp-tests)
- [📈 Benchmarks](#-benchmarks)
- [🔍 Change Detector](#-change-detector)
- [📦 Dependency Management](#-dependency-management)
Expand Down Expand Up @@ -188,18 +188,18 @@ The test suite uses environment variables to control which configurations are te
| `DEFRA_BADGER_FILE` | `true`/`false` | Use file-based Badger store |
| `DEFRA_BADGER_ENCRYPTION` | `true`/`false` | Enable Badger encryption |
| `DEFRA_MUTATION_TYPE` | `gql` / `collection-named` / `collection-save` | Mutation type |
| `DEFRA_DOCUMENT_ACP_TYPE` | `local` / `source-hub` | ACP type |
| `DEFRA_DOCUMENT_ACP_TYPE` | `local` / `remote` | ACP type |
| `DEFRA_LENS_TYPE` | `wasm-time` / `wasm-er` | Lens WASM runtime |
| `DEFRA_VIEW_TYPE` | `cacheless` / `materialized` | View type |
| `DEFRA_VECTOR_EMBEDDING` | `true`/`false` | Enable vector embedding tests |

### 🌐 SourceHub ACP Tests
### 🌐 Remote Document ACP Tests

> [!WARNING]
> SourceHub ACP tests require **Docker** and are resource-heavy.
> Remote Document ACP tests use a Vera container, require **Docker**, and are resource-heavy.

```shell
DEFRA_CLIENT_HTTP=true DEFRA_CLIENT_GO=false DEFRA_DOCUMENT_ACP_TYPE=source-hub \
DEFRA_CLIENT_HTTP=true DEFRA_CLIENT_GO=false DEFRA_DOCUMENT_ACP_TYPE=remote \
DEFRA_BADGER_MEMORY=true go test ./tests/integration/acp/... -count=1 -timeout 20m
```

Expand Down Expand Up @@ -279,7 +279,8 @@ For significant architectural changes or major new features, write a **[Source I
>
> 1. Include the `BREAKING CHANGE` keyword in the **commit message body** (not the title)
> 2. Follow it with a description of what changed and why
> 3. Document the changes in [`docs/data_format_changes/`](./docs/data_format_changes/) for the change detector to pass
> 3. For an intentional one-off breaking change outside a major release, add the affected interfaces and migration guidance to [`BREAKLOG.md`](./BREAKLOG.md)
> 4. If the stored data format changes, document it in [`docs/data_format_changes/`](./docs/data_format_changes/) for the change detector to pass

---

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ test\:gql-mutations:
test\:col-named-mutations:
DEFRA_MUTATION_TYPE=collection-named DEFRA_BADGER_MEMORY=true gotestsum --format pkgname -- $(DEFAULT_TEST_DIRECTORIES)

.PHONY: test\:source-hub
test\:source-hub:
DEFRA_DOCUMENT_ACP_TYPE=source-hub gotestsum --format pkgname -- $(DEFAULT_TEST_DIRECTORIES)
.PHONY: test\:remote-dac
test\:remote-dac:
DEFRA_DOCUMENT_ACP_TYPE=remote gotestsum --format pkgname -- $(DEFAULT_TEST_DIRECTORIES)

.PHONY: test\:go
test\:go:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</picture>
</p>

DefraDB is a zero-trust database that prioritizes data verifiability, privacy, and information security. Its data model, powered by the convergence of [MerkleCRDTs](https://arxiv.org/pdf/2004.00107.pdf) and the content-addressability of [IPLD](https://docs.ipld.io/), enables a multi-write-master architecture. It features [DQL](https://docs.source.network/defradb/references/query-specification/query-language-overview), a query language compatible with GraphQL but providing extra convenience. By leveraging peer-to-peer networking it can be deployed nimbly in novel topologies. Access control is determined by a relationship-based DSL, supporting document or field-level policies, secured by the SourceHub network. DefraDB is a core part of the [Source technologies](https://source.network/) that enable new paradigms of decentralized data and access-control management, user-centric apps, data trustworthiness, and much more.
DefraDB is a zero-trust database that prioritizes data verifiability, privacy, and information security. Its data model, powered by the convergence of [MerkleCRDTs](https://arxiv.org/pdf/2004.00107.pdf) and the content-addressability of [IPLD](https://docs.ipld.io/), enables a multi-write-master architecture. It features [DQL](https://docs.source.network/defradb/references/query-specification/query-language-overview), a query language compatible with GraphQL but providing extra convenience. By leveraging peer-to-peer networking it can be deployed nimbly in novel topologies. Access control is determined by a relationship-based DSL, supporting document or field-level policies, secured by the Vera network. DefraDB is a core part of the [Source technologies](https://source.network/) that enable new paradigms of decentralized data and access-control management, user-centric apps, data trustworthiness, and much more.

Read the documentation on [docs.source.network](https://docs.source.network/).

Expand Down
6 changes: 6 additions & 0 deletions VERSIONING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ Generally, we will be incrementing the DefraDB release version in strict accorda

However, in some areas the line is blurry and controversial, and very occasionally deemed to be impractical in the short-term. The rest of this document outlines these special areas and our versioning policy on them.

## One-off breaking changes

In exceptional cases, we may intentionally ship an isolated breaking change without waiting for a major release. These are genuine compatibility breaks and one-off departures from our usual semantic-versioning policy; they do not establish a new category of unprotected API.

Every such change is recorded in the [breaking change log](./BREAKLOG.md), including the affected interfaces and migration guidance. Consumers should review the entries between their current and target versions before every upgrade.

## Errors

At the moment, our errors are largely string based - they are driven by a single concrete implementation of the standard Go `error` interface [here](./errors/defraError.go#L60).
Expand Down
Loading
Loading