Skip to content

Commit 5ede7a5

Browse files
authored
refactor: Rename sourcehub to remote/vera acp terminology (#5216)
## Relevant issue(s) Resolves #5215 ## Description - Rename Sourcehub -> Vera/Remote - Rename the `ChainID` -> `LogID` to avoid future breaking changes when vera does it. - Document in BREAKLOG.md ### Todo - [ ] Update the required ci jobs on github as the workflow job names changed, right before merge. ### BREAKING - This is a one time exceptional breaking change.
1 parent 0f7e144 commit 5ede7a5

166 files changed

Lines changed: 713 additions & 600 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/composites/get-sourcehub-image/action.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright 2026 Democratized Data Foundation
2+
#
3+
# Use of this software is governed by the Business Source License
4+
# included in the file licenses/BSL.txt.
5+
#
6+
# As of the Change Date specified in that file, in accordance with
7+
# the Business Source License, use of this software will be governed
8+
# by the Apache License, Version 2.0, included in the file
9+
# licenses/APL.txt.
10+
11+
name: 'Get Vera Docker Image Tag'
12+
13+
description: 'Composite action to determine the Vera Docker image matching go.mod'
14+
15+
outputs:
16+
image:
17+
description: "Vera image to use"
18+
value: ${{ steps.image-name.outputs.image }}
19+
20+
runs:
21+
# This is a composite action, setting this is required.
22+
using: "composite"
23+
24+
steps:
25+
# Go pseudo-versions contain the short commit for the required Vera revision.
26+
- name: Get Vera short commit
27+
id: vera-commit
28+
shell: bash
29+
run: |
30+
set -euo pipefail
31+
VERA_COMMIT=$(sed -En \
32+
's|^[[:space:]]*github.com/sourcenetwork/vera[[:space:]]+v[^[:space:]]+-([0-9a-f]+)[[:space:]]*$|\1|p' \
33+
go.mod)
34+
test -n "$VERA_COMMIT"
35+
echo "short=$VERA_COMMIT" >> "$GITHUB_OUTPUT"
36+
37+
# Fetch Vera to resolve the short pseudo-version commit to its full SHA.
38+
- name: Checkout Vera code into the directory
39+
uses: actions/checkout@v6
40+
with:
41+
repository: sourcenetwork/vera
42+
path: _vera
43+
fetch-depth: 0
44+
45+
- name: Build Vera image name
46+
id: image-name
47+
working-directory: _vera
48+
shell: bash
49+
run: |
50+
commit=$(git rev-parse "${{ steps.vera-commit.outputs.short }}^{commit}")
51+
echo "image=ghcr.io/sourcenetwork/vera:sha-$commit" >> "$GITHUB_OUTPUT"

.github/workflows/test-coverage.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ jobs:
126126
"
127127
coverage-path: coverage.txt
128128

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

133133
strategy:
134134
fail-fast: false
135135
matrix:
136136
client-type: [go, http, cli, c]
137-
document-acp-type: [source-hub]
137+
document-acp-type: [remote]
138138

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

161-
- name: Get SourceHub Docker Image Name
162-
id: sourcehub-image
163-
uses: ./.github/composites/get-sourcehub-image
161+
- name: Get Vera Docker Image Name
162+
id: vera-image
163+
uses: ./.github/composites/get-vera-image
164164

165165
- name: Test coverage & save coverage report in an artifact
166166
uses: ./.github/composites/test-coverage-with-artifact
167167
env:
168-
DEFRA_SOURCEHUB_IMAGE: ${{ steps.sourcehub-image.outputs.image }}
168+
DEFRA_VERA_IMAGE: ${{ steps.vera-image.outputs.image }}
169169
with:
170170
coverage-artifact-name: "coverage_document_acp\
171171
_${{ matrix.document-acp-type }}\

BREAKLOG.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Breaking Change Log
2+
3+
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.
4+
5+
Unreleased entries are grouped under their release version when they ship.
6+
7+
## Unreleased
8+
9+
### Rename SourceHub to Vera and SourceHub Document ACP to Remote DAC
10+
11+
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.
12+
13+
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.
14+
15+
Update Remote DAC deployments and integrations to use Vera endpoints and dependencies.
16+
17+
#### Configuration and tooling
18+
19+
| Surface | Previous | Replacement |
20+
|---------|----------|-------------|
21+
| Document ACP type | `source-hub` | `remote` |
22+
| Document ACP type flag | `--document-acp-type source-hub` | `--document-acp-type remote` |
23+
| Document ACP type environment variable | `DEFRA_ACP_DOCUMENT_TYPE=source-hub` | `DEFRA_ACP_DOCUMENT_TYPE=remote` |
24+
| Document ACP configuration namespace | `acp.document.sourceHub.*` | `acp.document.remote.*` |
25+
| Remote DAC log ID configuration | `acp.document.sourceHub.ChainID` | `acp.document.remote.LogID` |
26+
| Environment-based configuration namespace | `DEFRA_ACP_DOCUMENT_SOURCEHUB_*` | `DEFRA_ACP_DOCUMENT_REMOTE_*` |
27+
| Remote DAC log ID environment variable | `DEFRA_ACP_DOCUMENT_SOURCEHUB_CHAINID` | `DEFRA_ACP_DOCUMENT_REMOTE_LOGID` |
28+
| Client address flag | `--source-hub-address` | `--remote-dac-address` |
29+
| Go module | `github.com/sourcenetwork/sourcehub` | `github.com/sourcenetwork/vera` |
30+
| Container image | `ghcr.io/sourcenetwork/sourcehub` | `ghcr.io/sourcenetwork/vera` |
31+
| Integration test ACP type | `DEFRA_DOCUMENT_ACP_TYPE=source-hub` | `DEFRA_DOCUMENT_ACP_TYPE=remote` |
32+
| Integration test image | `DEFRA_SOURCEHUB_IMAGE` | `DEFRA_VERA_IMAGE` |
33+
| Make target | `make test:source-hub` | `make test:remote-dac` |
34+
35+
The namespace-only change applies to `GRPCAddress`, `CometRPCAddress`, `KeyName`, and `address`. The `ChainID` setting instead becomes `LogID`, as shown above.
36+
37+
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.
38+
39+
#### Go API
40+
41+
| Previous | Replacement |
42+
|----------|-------------|
43+
| `dac.NewSourceHubACP` | `dac.NewRemoteDocumentACP` |
44+
| `dac.NewACPSourceHub` | `dac.NewRemoteDocumentACPClient` |
45+
| `dac.NewSourceHubDocumentACP` (JS/WASM) | `dac.NewRemoteDocumentACP` |
46+
| `dac.SourceHubDocumentACP` | `dac.RemoteDocumentACP` |
47+
| `SourceHubDocumentACP` in `acp/types` | `RemoteDocumentACP` in `acp/types` |
48+
| `options.NodeSourceHubDocumentACPType` | `options.NodeRemoteDocumentACPType` |
49+
| `NodeDocumentACPOptions.SourceHubChainID` | `NodeDocumentACPOptions.RemoteDACLogID` |
50+
| `NodeDocumentACPOptions.SourceHubGRPCAddress` | `NodeDocumentACPOptions.RemoteDACGRPCAddress` |
51+
| `NodeDocumentACPOptions.SourceHubCometRPCAddress` | `NodeDocumentACPOptions.RemoteDACCometRPCAddress` |
52+
| `NodeDocumentACPOptionsBuilder.SetChainID` | `NodeDocumentACPOptionsBuilder.SetLogID` |
53+
| `node.ErrSignerMissingForSourceHubACP` | `node.ErrSignerMissingForRemoteDAC` |
54+
| `sourcehub.TxSigner` | `vera.TxSigner` |
55+
56+
#### C API
57+
58+
These mappings are included for migration completeness and do not change the C bindings' [current versioning status](./VERSIONING.md#the-c-embedded-client).
59+
60+
The Document ACP type stored in `NodeInitOptions.documentACPType` changes from `"source-hub"` to `"remote"`. The related fields are renamed as follows:
61+
62+
| Previous | Replacement |
63+
|----------|-------------|
64+
| `sourceHubChainID` | `remoteDACLogID` |
65+
| `sourceHubGRPCAddress` | `remoteDACGRPCAddress` |
66+
| `sourceHubCometRPCAddress` | `remoteDACCometRPCAddress` |

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ You don't need to be an expert in all of these to contribute - many contribution
8080

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

CONTRIBUTING_INTERNAL.md

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

196-
### 🌐 SourceHub ACP Tests
196+
### 🌐 Remote Document ACP Tests
197197

198198
> [!WARNING]
199-
> SourceHub ACP tests require **Docker** and are resource-heavy.
199+
> Remote Document ACP tests use a Vera container, require **Docker**, and are resource-heavy.
200200
201201
```shell
202-
DEFRA_CLIENT_HTTP=true DEFRA_CLIENT_GO=false DEFRA_DOCUMENT_ACP_TYPE=source-hub \
202+
DEFRA_CLIENT_HTTP=true DEFRA_CLIENT_GO=false DEFRA_DOCUMENT_ACP_TYPE=remote \
203203
DEFRA_BADGER_MEMORY=true go test ./tests/integration/acp/... -count=1 -timeout 20m
204204
```
205205

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

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,9 @@ test\:gql-mutations:
301301
test\:col-named-mutations:
302302
DEFRA_MUTATION_TYPE=collection-named DEFRA_BADGER_MEMORY=true gotestsum --format pkgname -- $(DEFAULT_TEST_DIRECTORIES)
303303

304-
.PHONY: test\:source-hub
305-
test\:source-hub:
306-
DEFRA_DOCUMENT_ACP_TYPE=source-hub gotestsum --format pkgname -- $(DEFAULT_TEST_DIRECTORIES)
304+
.PHONY: test\:remote-dac
305+
test\:remote-dac:
306+
DEFRA_DOCUMENT_ACP_TYPE=remote gotestsum --format pkgname -- $(DEFAULT_TEST_DIRECTORIES)
307307

308308
.PHONY: test\:go
309309
test\:go:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</picture>
1212
</p>
1313

14-
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.
14+
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.
1515

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

VERSIONING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ Generally, we will be incrementing the DefraDB release version in strict accorda
1212
1313
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.
1414

15+
## One-off breaking changes
16+
17+
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.
18+
19+
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.
20+
1521
## Errors
1622

1723
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).

0 commit comments

Comments
 (0)