From 62efcec18784a97766ae70ab32c454bf51a9c994 Mon Sep 17 00:00:00 2001 From: Shahzad Lone Date: Fri, 28 Aug 2026 00:34:19 +0400 Subject: [PATCH 1/6] PR(MAIN): Migrate SourceHub dependency to Vera Pin Vera module with a matching published container image, then update the SDK imports and runtime fixtures. NOTE: this is likely a breaking change as remote ACP connections must target Vera-compatible nodes now. --- acp/dac/source_hub.go | 56 ++++++++++++++--------------- acp/identity/identity.go | 2 +- go.mod | 13 ++++--- go.sum | 32 ++++++++++------- tests/action/acp_dac_setup.go | 6 ++-- tests/integration/acp_dac_config.go | 2 +- 6 files changed, 61 insertions(+), 50 deletions(-) diff --git a/acp/dac/source_hub.go b/acp/dac/source_hub.go index 467ada0278..f9eddb6d24 100644 --- a/acp/dac/source_hub.go +++ b/acp/dac/source_hub.go @@ -25,8 +25,8 @@ import ( acpErrors "github.com/sourcenetwork/acp_core/pkg/errors" coreTypes "github.com/sourcenetwork/acp_core/pkg/types" "github.com/sourcenetwork/immutable" - sourcehub "github.com/sourcenetwork/sourcehub/sdk" - sourcehubTypes "github.com/sourcenetwork/sourcehub/x/acp/types" + vera "github.com/sourcenetwork/vera/sdk" + veraTypes "github.com/sourcenetwork/vera/x/acp/types" "github.com/sourcenetwork/defradb/acp/identity" acpTypes "github.com/sourcenetwork/defradb/acp/types" @@ -36,7 +36,7 @@ func NewSourceHubACP( chainID string, grpcAddress string, cometRPCAddress string, - signer sourcehub.TxSigner, + signer vera.TxSigner, ) (DocumentACP, error) { acpSourceHub, err := NewACPSourceHub(chainID, grpcAddress, cometRPCAddress, signer) if err != nil { @@ -49,29 +49,29 @@ func NewSourceHubACP( } type SourceHubDocumentACP struct { - client *sourcehub.Client - txBuilder *sourcehub.TxBuilder - signer sourcehub.TxSigner + client *vera.Client + txBuilder *vera.TxBuilder + signer vera.TxSigner } func NewACPSourceHub( chainID string, grpcAddress string, cometRPCAddress string, - signer sourcehub.TxSigner, + signer vera.TxSigner, ) (*SourceHubDocumentACP, error) { - client, err := sourcehub.NewClient( - sourcehub.WithGRPCAddr(grpcAddress), - sourcehub.WithCometRPCAddr(cometRPCAddress), + client, err := vera.NewClient( + vera.WithGRPCAddr(grpcAddress), + vera.WithCometRPCAddr(cometRPCAddress), ) if err != nil { return nil, err } - txBuilder, err := sourcehub.NewTxBuilder( - sourcehub.WithSDKClient(client), - sourcehub.WithChainID(chainID), - sourcehub.WithGasLimit(400000), + txBuilder, err := vera.NewTxBuilder( + vera.WithSDKClient(client), + vera.WithChainID(chainID), + vera.WithGasLimit(400000), ) if err != nil { return nil, err @@ -95,9 +95,9 @@ func (a *SourceHubDocumentACP) AddPolicy( policyMarshalType acpTypes.PolicyMarshalType, creationTime *protoTypes.Timestamp, ) (string, error) { - msgSet := sourcehub.MsgSet{} + msgSet := vera.MsgSet{} policyMapper := msgSet.WithCreatePolicy( - sourcehubTypes.NewMsgCreatePolicy( + veraTypes.NewMsgCreatePolicy( a.signer.GetAccAddress(), policy, coreTypes.PolicyMarshalingType(policyMarshalType), @@ -135,7 +135,7 @@ func (a *SourceHubDocumentACP) Policy( ) (immutable.Option[acpTypes.Policy], error) { response, err := a.client.ACPQueryClient().Policy( ctx, - &sourcehubTypes.QueryPolicyRequest{Id: policyID}, + &veraTypes.QueryPolicyRequest{Id: policyID}, ) if err != nil { // todo: https://github.com/sourcenetwork/defradb/issues/2826 @@ -202,12 +202,12 @@ func (a *SourceHubDocumentACP) RegisterObject( return identity.ErrMustBeTokenIdentity } - msgSet := sourcehub.MsgSet{} - cmdMapper := msgSet.WithBearerPolicyCmd(&sourcehubTypes.MsgBearerPolicyCmd{ + msgSet := vera.MsgSet{} + cmdMapper := msgSet.WithBearerPolicyCmd(&veraTypes.MsgBearerPolicyCmd{ Creator: a.signer.GetAccAddress(), BearerToken: tokenIdentity.BearerToken(), PolicyId: policyID, - Cmd: sourcehubTypes.NewRegisterObjectCmd(coreTypes.NewObject(resourceName, objectID)), + Cmd: veraTypes.NewRegisterObjectCmd(coreTypes.NewObject(resourceName, objectID)), }) tx, err := a.txBuilder.Build(ctx, a.signer, &msgSet) if err != nil { @@ -241,7 +241,7 @@ func (a *SourceHubDocumentACP) ObjectOwner( resp, err := a.client.ACPQueryClient().ObjectOwner( ctx, - &sourcehubTypes.QueryObjectOwnerRequest{ + &veraTypes.QueryObjectOwnerRequest{ PolicyId: policyID, Object: coreTypes.NewObject(resourceName, objectID), }, @@ -269,7 +269,7 @@ func (a *SourceHubDocumentACP) VerifyAccessRequest( checkDocResponse, err := a.client.ACPQueryClient().VerifyAccessRequest( ctx, - &sourcehubTypes.QueryVerifyAccessRequestRequest{ + &veraTypes.QueryVerifyAccessRequestRequest{ PolicyId: policyID, AccessRequest: &coreTypes.AccessRequest{ Operations: []*coreTypes.Operation{ @@ -317,7 +317,7 @@ func (a *SourceHubDocumentACP) AddActorRelationship( return false, identity.ErrMustBeTokenIdentity } - msgSet := sourcehub.MsgSet{} + msgSet := vera.MsgSet{} var newActorRelationship *coreTypes.Relationship if targetActor == "*" { @@ -335,11 +335,11 @@ func (a *SourceHubDocumentACP) AddActorRelationship( ) } - cmdMapper := msgSet.WithBearerPolicyCmd(&sourcehubTypes.MsgBearerPolicyCmd{ + cmdMapper := msgSet.WithBearerPolicyCmd(&veraTypes.MsgBearerPolicyCmd{ Creator: a.signer.GetAccAddress(), BearerToken: tokenIdentity.BearerToken(), PolicyId: policyID, - Cmd: sourcehubTypes.NewSetRelationshipCmd(newActorRelationship), + Cmd: veraTypes.NewSetRelationshipCmd(newActorRelationship), }) tx, err := a.txBuilder.Build(ctx, a.signer, &msgSet) if err != nil { @@ -384,7 +384,7 @@ func (a *SourceHubDocumentACP) DeleteActorRelationship( return false, identity.ErrMustBeTokenIdentity } - msgSet := sourcehub.MsgSet{} + msgSet := vera.MsgSet{} var newActorRelationship *coreTypes.Relationship if targetActor == "*" { @@ -402,11 +402,11 @@ func (a *SourceHubDocumentACP) DeleteActorRelationship( ) } - cmdMapper := msgSet.WithBearerPolicyCmd(&sourcehubTypes.MsgBearerPolicyCmd{ + cmdMapper := msgSet.WithBearerPolicyCmd(&veraTypes.MsgBearerPolicyCmd{ Creator: a.signer.GetAccAddress(), BearerToken: tokenIdentity.BearerToken(), PolicyId: policyID, - Cmd: sourcehubTypes.NewDeleteRelationshipCmd(newActorRelationship), + Cmd: veraTypes.NewDeleteRelationshipCmd(newActorRelationship), }) tx, err := a.txBuilder.Build(ctx, a.signer, &msgSet) if err != nil { diff --git a/acp/identity/identity.go b/acp/identity/identity.go index 7f8d92e122..95a7d582e9 100644 --- a/acp/identity/identity.go +++ b/acp/identity/identity.go @@ -23,7 +23,7 @@ const ( // field containing the authorized account. // // This must be the same as `AuthorizedAccountClaim` - // defined in github.com/sourcenetwork/sourcehub/x/acp/types + // defined in github.com/sourcenetwork/vera/x/acp/bearer_token // // The type cannot be directly referenced here due // to compilation issues with JS targets. diff --git a/go.mod b/go.mod index 7ccc46937f..550dcc9ed4 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( github.com/onsi/gomega v1.42.1 github.com/philippgille/chromem-go v0.7.0 github.com/pkg/errors v0.9.1 - github.com/sourcenetwork/acp_core v0.8.1 + github.com/sourcenetwork/acp_core v0.8.2 github.com/sourcenetwork/corekv v0.3.2 github.com/sourcenetwork/corekv/badger v0.3.1 github.com/sourcenetwork/corekv/blockstore v0.3.1 @@ -54,8 +54,8 @@ require ( github.com/sourcenetwork/graphql-go v0.7.10-0.20260603160416-fba12ae14d3b github.com/sourcenetwork/immutable v0.3.0 github.com/sourcenetwork/lens/host-go v0.11.0 - github.com/sourcenetwork/sourcehub v0.4.1-0.20260128164915-1bce44032618 github.com/sourcenetwork/testo v0.2.0 + github.com/sourcenetwork/vera v0.4.1-0.20260827134642-8c1a760f2f83 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 github.com/spf13/viper v1.21.0 @@ -176,6 +176,7 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20250429170803-42689b6311bb // indirect github.com/cometbft/cometbft v0.38.21 // indirect github.com/cometbft/cometbft-db v0.14.1 // indirect + github.com/consensys/gnark-crypto v0.19.2 // indirect github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/errdefs/pkg v0.3.0 // indirect github.com/containerd/log v0.1.0 // indirect @@ -209,7 +210,7 @@ require ( github.com/envoyproxy/go-control-plane/envoy v1.37.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect - github.com/ethereum/go-ethereum v1.17.0 // indirect + github.com/ethereum/go-ethereum v1.17.2 // indirect github.com/fatih/color v1.18.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/filecoin-project/go-clock v0.1.0 // indirect @@ -332,6 +333,7 @@ require ( github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mizufinance/decaf377-go v0.2.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/go-archive v0.3.0 // indirect github.com/moby/moby/api v1.54.2 // indirect @@ -407,15 +409,16 @@ require ( github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/sourcenetwork/go-libp2p-pubsub-rpc v0.0.14 // indirect github.com/sourcenetwork/goleveldb v0.0.0-20251217012629-27249d06b81b // indirect - github.com/sourcenetwork/raccoondb v0.2.1-0.20240722161350-d4a78b691ec8 // indirect + github.com/sourcenetwork/raccoondb v0.2.1-0.20260514175348-017fdf639300 // indirect github.com/sourcenetwork/raccoondb/v2 v2.0.0 // indirect - github.com/sourcenetwork/zanzi v0.3.1-0.20251104182341-4b1bd0f7be5a // indirect + github.com/sourcenetwork/zanzi v0.3.1-0.20260731133738-53cb4f16fe3e // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.15.0 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/spiffe/go-spiffe/v2 v2.6.0 // indirect github.com/stretchr/objx v0.5.3 // indirect github.com/subosito/gotenv v1.6.0 // indirect + github.com/supranational/blst v0.3.16 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tendermint/tendermint v0.35.9 // indirect diff --git a/go.sum b/go.sum index c3996c8bf9..054e42c291 100644 --- a/go.sum +++ b/go.sum @@ -425,6 +425,8 @@ github.com/cometbft/cometbft v0.38.21 h1:qcIJSH9LiwU5s6ZgKR5eRbsLNucbubfraDs5bzg github.com/cometbft/cometbft v0.38.21/go.mod h1:UCu8dlHqvkAsmAFmWDRWNZJPlu6ya2fTWZlDrWsivwo= github.com/cometbft/cometbft-db v0.14.1 h1:SxoamPghqICBAIcGpleHbmoPqy+crij/++eZz3DlerQ= github.com/cometbft/cometbft-db v0.14.1/go.mod h1:KHP1YghilyGV/xjD5DP3+2hyigWx0WTp9X+0Gnx0RxQ= +github.com/consensys/gnark-crypto v0.19.2 h1:qrEAIXq3T4egxqiliFFoNrepkIWVEeIYwt3UL0fvS80= +github.com/consensys/gnark-crypto v0.19.2/go.mod h1:rT23F0XSZqE0mUA0+pRtnL56IbPxs6gp4CeRsBk4XS0= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= @@ -586,8 +588,8 @@ github.com/envoyproxy/protoc-gen-validate v1.3.3/go.mod h1:TsndJ/ngyIdQRhMcVVGDD github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= -github.com/ethereum/go-ethereum v1.17.0 h1:2D+1Fe23CwZ5tQoAS5DfwKFNI1HGcTwi65/kRlAVxes= -github.com/ethereum/go-ethereum v1.17.0/go.mod h1:2W3msvdosS/MCWytpqTcqgFiRYbTH59FxDJzqah120o= +github.com/ethereum/go-ethereum v1.17.2 h1:ag6geu0kn8Hv5FLKTpH+Hm2DHD+iuFtuqKxEuwUsDOI= +github.com/ethereum/go-ethereum v1.17.2/go.mod h1:KHcRXfGOUfUmKg51IhQ0IowiqZ6PqZf08CMtk0g5K1o= github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU= github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM= @@ -864,8 +866,8 @@ github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20250202011525-fc3143867406 h1:wlQI2cYY0BsWmmPPAnxfQ8SDW0S3Jasn+4B8kXFxprg= -github.com/google/pprof v0.0.0-20250202011525-fc3143867406/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 h1:EEHtgt9IwisQ2AZ4pIsMjahcegHh6rmhqxzIRQIyepY= +github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6/go.mod h1:I6V7YzU0XDpsHqbsyrghnFZLO1gwK6NPTNvmetQIk9U= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= @@ -1200,6 +1202,8 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+ github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= +github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= +github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= @@ -1356,6 +1360,8 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mizufinance/decaf377-go v0.2.0 h1:izT9ymso5nOvn3YtQk4RipU/hQm950d/WfDBZFklm/0= +github.com/mizufinance/decaf377-go v0.2.0/go.mod h1:tApKZYqMgt6XZW7EWvPolaHxD1Adp4b2Ub1XxZxje9w= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/go-archive v0.3.0 h1:nos4BtzzUIqB406BgQnWGMI4qib9BZ8XUHU+ucv/n1c= @@ -1761,8 +1767,8 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= -github.com/sourcenetwork/acp_core v0.8.1 h1:xCbFGs9HqQTG/LjfNa7aoD8dc6XhIYLgRdZCQrRcML0= -github.com/sourcenetwork/acp_core v0.8.1/go.mod h1:vmxU/mBphMaU2NjKYEFJLSpk5lbRdWDqgsJZNd+WfZ0= +github.com/sourcenetwork/acp_core v0.8.2 h1:k33r0c7vJxHRUPc80PmZ9QKOYNwTDUJVegQMIF/O7AM= +github.com/sourcenetwork/acp_core v0.8.2/go.mod h1:UBjrCrI09Q02Fgy4G2NQzKx+P5RQVlR9Lf16qzuA6JY= github.com/sourcenetwork/anet v0.0.0-20250417190629-7c87cba7799e h1:sSvLVomsLBjQpojIu+e32LJlnE8M4nuIsX1mGeU8qo8= github.com/sourcenetwork/anet v0.0.0-20250417190629-7c87cba7799e/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= github.com/sourcenetwork/corekv v0.3.2 h1:dOnlAQsvoOXnmEBpLdp97XLqUOu7l87sVrrA8OnsqH0= @@ -1797,16 +1803,16 @@ github.com/sourcenetwork/immutable v0.3.0 h1:gHPtGvLrTBTK5YpDAhMU+u+S8v1F6iYmc3n github.com/sourcenetwork/immutable v0.3.0/go.mod h1:GD7ceuh/HD7z6cdIwzKK2ctzgZ1qqYFJpsFp+8qYnbI= github.com/sourcenetwork/lens/host-go v0.11.0 h1:B9aNdRaYh6P5gBxhUOTUS9geyq8Pl3I/ps0w6Y4xt9k= github.com/sourcenetwork/lens/host-go v0.11.0/go.mod h1:LHIuko88fgxOX996hvRNuBbgdTeFIPLQO6OXj24vmsM= -github.com/sourcenetwork/raccoondb v0.2.1-0.20240722161350-d4a78b691ec8 h1:d0jNogSYqMt+dC05tnd+x7lmzEcBHpKoIU5woZSSHFM= -github.com/sourcenetwork/raccoondb v0.2.1-0.20240722161350-d4a78b691ec8/go.mod h1:/WJdZWouiY199DypsN0xaP5PF0zy3rka3FxH5Y8o9Bc= +github.com/sourcenetwork/raccoondb v0.2.1-0.20260514175348-017fdf639300 h1:Cg44ZTo3jot8806J91dFd0Un6gcYjheUy4sz7XnI7k4= +github.com/sourcenetwork/raccoondb v0.2.1-0.20260514175348-017fdf639300/go.mod h1:/WJdZWouiY199DypsN0xaP5PF0zy3rka3FxH5Y8o9Bc= github.com/sourcenetwork/raccoondb/v2 v2.0.0 h1:Gb0SjsZUbrbkHCEg7PyyNs0+2IzPxjE/BkEQnlu1nfA= github.com/sourcenetwork/raccoondb/v2 v2.0.0/go.mod h1:tPKAWHUgYcSoXNMt01iWJ+Y51AQYc2knY93IjmmbejY= -github.com/sourcenetwork/sourcehub v0.4.1-0.20260128164915-1bce44032618 h1:1AAfhBgTQ9Ab/iKM/Ona4aVVB5GYPvIQjRaTumW7KgY= -github.com/sourcenetwork/sourcehub v0.4.1-0.20260128164915-1bce44032618/go.mod h1:TLdwaDpbM9C8oOW3WS4JnjixC2xB1N/C7kTtsyb55o8= github.com/sourcenetwork/testo v0.2.0 h1:jy0e/VLuDKLErHbnsjWezzChffUkx5bto7B30d1vRN0= github.com/sourcenetwork/testo v0.2.0/go.mod h1:CwCk0OPI7XLc0ypBS2QVoCtwOxyybv5x8gJxDkNCd14= -github.com/sourcenetwork/zanzi v0.3.1-0.20251104182341-4b1bd0f7be5a h1:TlnRmk1v4+nIKGUdzMht4qnrf8AxCUAvpxSIqJ2CX94= -github.com/sourcenetwork/zanzi v0.3.1-0.20251104182341-4b1bd0f7be5a/go.mod h1:j7QmuHK+zfA0JO6FliJzQHijVNSXDuQy8hUzFC5pucA= +github.com/sourcenetwork/vera v0.4.1-0.20260827134642-8c1a760f2f83 h1:X9SXi8GDpruMd4yXDD/aX73eNbaoShEDeBY9UW9pEXM= +github.com/sourcenetwork/vera v0.4.1-0.20260827134642-8c1a760f2f83/go.mod h1:iTQV+wpKBnrh+WzE4MiOuauZolTkp5wtceA/s+HTRRE= +github.com/sourcenetwork/zanzi v0.3.1-0.20260731133738-53cb4f16fe3e h1:Q+qzo49PMTHIrWAAgdkz9PR3R85Gpo7NwAUODHIeigA= +github.com/sourcenetwork/zanzi v0.3.1-0.20260731133738-53cb4f16fe3e/go.mod h1:Elj7mNEfkthXGmHOdyfbPMBaJQqKIZlTRmSD0R5FYfs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -1878,6 +1884,8 @@ github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/supranational/blst v0.3.16 h1:bTDadT+3fK497EvLdWRQEjiGnUtzJ7jjIUMF0jqwYhE= +github.com/supranational/blst v0.3.16/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= diff --git a/tests/action/acp_dac_setup.go b/tests/action/acp_dac_setup.go index 77e39a6e56..242ea6e254 100644 --- a/tests/action/acp_dac_setup.go +++ b/tests/action/acp_dac_setup.go @@ -38,7 +38,7 @@ import ( "github.com/sourcenetwork/defradb/client/options" "github.com/sourcenetwork/defradb/keyring" "github.com/sourcenetwork/defradb/tests/state" - "github.com/sourcenetwork/sourcehub/sdk" + "github.com/sourcenetwork/vera/sdk" ) const ( @@ -47,9 +47,9 @@ const ( faucetMnemonic = "comic very pond victory suit tube ginger antique life then core warm loyal deliver iron fashion erupt husband weekend monster sunny artist empty uphold" //nolint:lll // faucetAddr is the account address matching the faucetMnemonic - faucetAddr = "source12d9hjf0639k995venpv675sju9ltsvf8u5c9jt" + faucetAddr = "vera12d9hjf0639k995venpv675sju9ltsvf8v73hjv" - sourcehubTestChainID string = "sourcehub-dev" + sourcehubTestChainID string = "vera-dev" ) func setupSourceHub(s *state.State, cfg NodeSetupConfig) (*options.NodeDocumentACPOptions, error) { diff --git a/tests/integration/acp_dac_config.go b/tests/integration/acp_dac_config.go index ef72d8cd43..c1acb1147b 100644 --- a/tests/integration/acp_dac_config.go +++ b/tests/integration/acp_dac_config.go @@ -37,6 +37,6 @@ func init() { } sourcehubImage = os.Getenv(sourcehubImageEnvName) if sourcehubImage == "" { - sourcehubImage = "ghcr.io/sourcenetwork/sourcehub:dev" + sourcehubImage = "ghcr.io/sourcenetwork/vera:dev" } } From 7bf21173b00094950109b31d5945fc4080a05c48 Mon Sep 17 00:00:00 2001 From: Shahzad Lone Date: Fri, 28 Aug 2026 00:35:52 +0400 Subject: [PATCH 2/6] PR(CI): Use Vera image for document ACP workflow --- .../composites/get-sourcehub-image/action.yml | 49 ------------------ .github/composites/get-vera-image/action.yml | 51 +++++++++++++++++++ .github/workflows/test-coverage.yml | 8 +-- 3 files changed, 55 insertions(+), 53 deletions(-) delete mode 100644 .github/composites/get-sourcehub-image/action.yml create mode 100644 .github/composites/get-vera-image/action.yml diff --git a/.github/composites/get-sourcehub-image/action.yml b/.github/composites/get-sourcehub-image/action.yml deleted file mode 100644 index f950b16ca4..0000000000 --- a/.github/composites/get-sourcehub-image/action.yml +++ /dev/null @@ -1,49 +0,0 @@ -# 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 SourceHub Docker Image Tag' - -description: 'Composite action to figure out the correct docker image to use for SourceHub' - -outputs: - image: - description: "SourceHub image to use" - value: ${{ steps.image-name.outputs.image }} - -runs: - # This is a composite action, setting this is required. - using: "composite" - - steps: - # Uses the go.mod file to determine the version of SorceHub to be fetched for jobs - - name: Get SourceHub short commit - id: sourcehub-commit - shell: bash - run: | - SOURCEHUB_COMMIT=$(sed -rn 's/.*sourcehub.*-([0-9a-f]+)/\1/p' go.mod) - echo "short=$SOURCEHUB_COMMIT" >> "$GITHUB_ENV" - - # Fetch sourcehub repo to get the full commit sha. - # note: go.mod's automatically generated placeholder version only stores the short commit. - - name: Checkout sourcehub code into the directory - uses: actions/checkout@v6 - with: - repository: sourcenetwork/sourcehub - path: _sourcehub - fetch-depth: 0 - - - name: Build SourceHub image name - id: image-name - working-directory: _sourcehub - shell: bash - run: | - commit=$(git rev-parse $short) - echo "image=ghcr.io/sourcenetwork/sourcehub:sha-$commit" >> "$GITHUB_ENV" - echo "image=ghcr.io/sourcenetwork/sourcehub:sha-$commit" >> "$GITHUB_OUTPUT" diff --git a/.github/composites/get-vera-image/action.yml b/.github/composites/get-vera-image/action.yml new file mode 100644 index 0000000000..87516f63c2 --- /dev/null +++ b/.github/composites/get-vera-image/action.yml @@ -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" diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index 02e25f9aff..6cc21b4617 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -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_SOURCEHUB_IMAGE: ${{ steps.vera-image.outputs.image }} with: coverage-artifact-name: "coverage_document_acp\ _${{ matrix.document-acp-type }}\ From 9aec1c06f42b05a74c121c3d22581b1b9652c3b3 Mon Sep 17 00:00:00 2001 From: Shahzad Lone Date: Fri, 28 Aug 2026 01:30:39 +0400 Subject: [PATCH 3/6] PR(MAIN): Rename SourceHub ACP to Remote DAC (Vera) Replace DefraDB-facing SourceHub terminology with Remote DAC while reserving Vera for the backing repository and network. Rename Go and C APIs, configuration and CLI surfaces, test harnesses, and generated docs. Note: breaking change becuase the document ACP type source-hub is now remote. Configuration moved from acp.document.sourceHub.* to acp.document.remote.*, --source-hub-address is now --remote-dac-address, and SourceHub Go/C symbols, test targets, and image variables were replaced by Remote DAC or Vera names. --- .github/workflows/test-coverage.yml | 6 +- CONTRIBUTING.md | 2 +- CONTRIBUTING_INTERNAL.md | 10 +-- Makefile | 6 +- README.md | 2 +- acp/dac/bridge.go | 61 +++++++++-------- acp/dac/dac.go | 2 +- acp/dac/doc.go | 6 +- acp/dac/local.go | 6 +- acp/dac/{source_hub.go => remote.go} | 68 ++++++++++--------- acp/dac/{source_hub_js.go => remote_js.go} | 66 +++++++++--------- ...{source_hub_object.go => remote_object.go} | 4 +- ...b_object_test.go => remote_object_test.go} | 8 +-- acp/errors.go | 24 +++---- acp/types/types.go | 18 ++++- acp/validation.go | 2 +- cbindings/cutils.go | 6 +- cbindings/defra_structs.h | 8 +-- cbindings/node_new.go | 12 ++-- cbindings/test_node_options.go | 24 +++---- cbindings/utils.go | 6 +- cli/client.go | 6 +- cli/config/config.go | 2 +- cli/start.go | 16 ++--- cli/utils.go | 10 +-- client/acp.go | 10 ++- client/options/node.go | 32 ++++----- docs/config.md | 30 ++++---- docs/website/BSL-License.md | 4 +- docs/website/getting-started.md | 2 +- docs/website/references/cli/defradb_client.md | 2 +- .../references/cli/defradb_client_acp.md | 2 +- .../cli/defradb_client_acp_document.md | 2 +- .../cli/defradb_client_acp_document_policy.md | 2 +- .../defradb_client_acp_document_policy_add.md | 2 +- ...efradb_client_acp_document_relationship.md | 2 +- ...db_client_acp_document_relationship_add.md | 2 +- ...client_acp_document_relationship_delete.md | 2 +- .../references/cli/defradb_client_acp_node.md | 2 +- .../cli/defradb_client_acp_node_disable.md | 2 +- .../cli/defradb_client_acp_node_re-enable.md | 2 +- .../defradb_client_acp_node_relationship.md | 2 +- ...efradb_client_acp_node_relationship_add.md | 2 +- ...adb_client_acp_node_relationship_delete.md | 2 +- .../cli/defradb_client_acp_node_status.md | 2 +- .../references/cli/defradb_client_action.md | 2 +- .../cli/defradb_client_action_list.md | 2 +- .../references/cli/defradb_client_backup.md | 2 +- .../cli/defradb_client_backup_export.md | 2 +- .../cli/defradb_client_backup_import.md | 2 +- .../references/cli/defradb_client_block.md | 2 +- .../defradb_client_block_verify-signature.md | 2 +- .../cli/defradb_client_collection.md | 2 +- .../cli/defradb_client_collection_add.md | 2 +- .../cli/defradb_client_collection_delete.md | 2 +- .../cli/defradb_client_collection_describe.md | 2 +- .../cli/defradb_client_collection_patch.md | 2 +- .../defradb_client_collection_set-active.md | 2 +- .../cli/defradb_client_collection_truncate.md | 2 +- .../references/cli/defradb_client_document.md | 2 +- .../cli/defradb_client_document_add.md | 2 +- .../cli/defradb_client_document_delete.md | 2 +- .../cli/defradb_client_document_get.md | 2 +- .../cli/defradb_client_document_update.md | 2 +- .../references/cli/defradb_client_dump.md | 2 +- .../cli/defradb_client_encrypted-index.md | 2 +- .../defradb_client_encrypted-index_delete.md | 2 +- .../defradb_client_encrypted-index_list.md | 2 +- .../cli/defradb_client_encrypted-index_new.md | 2 +- .../references/cli/defradb_client_index.md | 2 +- .../cli/defradb_client_index_delete.md | 2 +- .../cli/defradb_client_index_list.md | 2 +- .../cli/defradb_client_index_new.md | 2 +- .../references/cli/defradb_client_lens.md | 2 +- .../references/cli/defradb_client_lens_add.md | 2 +- .../cli/defradb_client_lens_list.md | 2 +- .../references/cli/defradb_client_lens_set.md | 2 +- .../cli/defradb_client_node-identity.md | 2 +- .../cli/defradb_client_node-options.md | 2 +- .../references/cli/defradb_client_p2p.md | 2 +- .../cli/defradb_client_p2p_active-peers.md | 2 +- .../cli/defradb_client_p2p_collection.md | 2 +- .../cli/defradb_client_p2p_collection_add.md | 2 +- .../defradb_client_p2p_collection_delete.md | 2 +- .../cli/defradb_client_p2p_collection_list.md | 2 +- ...b_client_p2p_collection_sync-branchable.md | 2 +- ...adb_client_p2p_collection_sync-versions.md | 2 +- .../cli/defradb_client_p2p_connect.md | 2 +- .../cli/defradb_client_p2p_disconnect.md | 2 +- .../cli/defradb_client_p2p_document.md | 2 +- .../cli/defradb_client_p2p_document_add.md | 2 +- .../cli/defradb_client_p2p_document_delete.md | 2 +- .../cli/defradb_client_p2p_document_list.md | 2 +- .../cli/defradb_client_p2p_document_sync.md | 2 +- .../references/cli/defradb_client_p2p_info.md | 2 +- .../cli/defradb_client_p2p_replicator.md | 2 +- .../cli/defradb_client_p2p_replicator_add.md | 2 +- .../defradb_client_p2p_replicator_delete.md | 2 +- .../cli/defradb_client_p2p_replicator_list.md | 2 +- .../references/cli/defradb_client_purge.md | 2 +- .../references/cli/defradb_client_query.md | 2 +- .../references/cli/defradb_client_tx.md | 2 +- .../cli/defradb_client_tx_commit.md | 2 +- .../cli/defradb_client_tx_discard.md | 2 +- .../references/cli/defradb_client_tx_new.md | 2 +- .../references/cli/defradb_client_view.md | 2 +- .../references/cli/defradb_client_view_add.md | 2 +- .../cli/defradb_client_view_refresh.md | 2 +- docs/website/references/cli/defradb_start.md | 4 +- docs/website/references/http/openapi.json | 2 +- examples/collection/permissioned/book.graphql | 7 +- .../collection/permissioned/users.graphql | 6 +- http/openapi.go | 4 +- internal/db/collection_acp.go | 2 +- internal/db/db_dac.go | 4 +- node/acp_dac.go | 8 +-- ...cp_dac_source_hub.go => acp_dac_remote.go} | 14 ++-- ..._source_hub_js.go => acp_dac_remote_js.go} | 6 +- node/errors.go | 8 +-- tests/action/acp_dac_setup.go | 48 ++++++------- tests/action/acp_dac_setup_js.go | 4 +- .../add_dac_collection_actor_relationship.go | 6 +- tests/action/client_setup.go | 2 +- tests/action/identity.go | 4 +- tests/action/node_options.go | 6 +- tests/action/node_setup.go | 6 +- tests/action/node_setup_js.go | 6 +- tests/action/subscription_request.go | 2 +- tests/bench/acp/acp_local_test.go | 2 +- tests/clients/cli/wrapper.go | 8 +-- tests/clients/cli/wrapper_cli.go | 10 +-- .../integration/acp/dac/add_policy/README.md | 6 +- .../dac/add_policy/with_no_resources_test.go | 8 +-- .../acp/dac/branchable/peer_test.go | 4 +- tests/integration/acp/dac/p2p/add_test.go | 8 +-- tests/integration/acp/dac/p2p/delete_test.go | 4 +- .../acp/dac/p2p/replicator_test.go | 4 +- ...icator_with_doc_actor_relationship_test.go | 4 +- .../acp/dac/p2p/subscribe_grant_race_test.go | 4 +- .../integration/acp/dac/p2p/subscribe_test.go | 4 +- ...scribe_with_doc_actor_relationship_test.go | 4 +- .../acp/dac/p2p/sync_shared_field_test.go | 2 +- .../p2p/update_by_non_creator_on_peer_test.go | 4 +- tests/integration/acp/dac/p2p/update_test.go | 4 +- tests/integration/acp_dac.go | 20 +++--- tests/integration/acp_dac_config.go | 12 ++-- .../encryption/peer_acp_branchable_test.go | 8 +-- tests/integration/encryption/peer_acp_test.go | 8 +-- tests/integration/identity.go | 4 +- tests/integration/test_case.go | 6 +- tests/integration/utils.go | 2 +- tests/state/state.go | 12 ++-- tools/cloud/akash/README.md | 2 +- 153 files changed, 471 insertions(+), 447 deletions(-) rename acp/dac/{source_hub.go => remote.go} (83%) rename acp/dac/{source_hub_js.go => remote_js.go} (86%) rename acp/dac/{source_hub_object.go => remote_object.go} (80%) rename acp/dac/{source_hub_object_test.go => remote_object_test.go} (70%) rename node/{acp_dac_source_hub.go => acp_dac_remote.go} (75%) rename node/{acp_dac_source_hub_js.go => acp_dac_remote_js.go} (85%) diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index 6cc21b4617..789e360a01 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -126,7 +126,7 @@ 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 @@ -134,7 +134,7 @@ jobs: 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 @@ -165,7 +165,7 @@ jobs: - name: Test coverage & save coverage report in an artifact uses: ./.github/composites/test-coverage-with-artifact env: - DEFRA_SOURCEHUB_IMAGE: ${{ steps.vera-image.outputs.image }} + DEFRA_VERA_IMAGE: ${{ steps.vera-image.outputs.image }} with: coverage-artifact-name: "coverage_document_acp\ _${{ matrix.document-acp-type }}\ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 078e626c88..8fa70b0cc8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 | diff --git a/CONTRIBUTING_INTERNAL.md b/CONTRIBUTING_INTERNAL.md index ad382c8320..6d10de6a98 100644 --- a/CONTRIBUTING_INTERNAL.md +++ b/CONTRIBUTING_INTERNAL.md @@ -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) @@ -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 ``` diff --git a/Makefile b/Makefile index 8a3385bf3c..8129fb86a3 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/README.md b/README.md index b6662c4cba..65e6bd24d7 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@

-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/). diff --git a/acp/dac/bridge.go b/acp/dac/bridge.go index 19d88be6b6..07eae28317 100644 --- a/acp/dac/bridge.go +++ b/acp/dac/bridge.go @@ -22,7 +22,7 @@ import ( acpTypes "github.com/sourcenetwork/defradb/acp/types" ) -var _ acp.ACPSystemClient = (*SourceHubDocumentACP)(nil) +var _ acp.ACPSystemClient = (*RemoteDocumentACP)(nil) var _ DocumentACP = (*bridgeDocumentACP)(nil) @@ -30,6 +30,9 @@ var _ DocumentACP = (*bridgeDocumentACP)(nil) // from ACP client specific code. type bridgeDocumentACP struct { clientACP acp.ACPSystemClient + // documentACPType must only be set to [acpTypes.LocalDocumentACP] or + // [acpTypes.RemoteDocumentACP]. [acpTypes.NodeACP] and future NAC types are invalid. + documentACPType acpTypes.ACPSystemType } func (a *bridgeDocumentACP) Start(ctx context.Context) error { @@ -57,7 +60,7 @@ func (a *bridgeDocumentACP) AddPolicy(ctx context.Context, creator identity.Iden ) if err != nil { - return "", acp.NewErrFailedToAddPolicy(err, "Local", creator.DID()) + return "", acp.NewErrFailedToAddPolicy(err, a.documentACPType.String(), creator.DID()) } log.InfoContext(ctx, "Created Policy", corelog.Any("PolicyID", policyID)) @@ -69,29 +72,18 @@ func (a *bridgeDocumentACP) ValidateResourceInterface( policyID string, resourceName string, ) error { - var err error - switch a.clientACP.(type) { - case *LocalDocumentACP: - err = acp.ValidateResourceInterface( - ctx, - policyID, - resourceName, - acpTypes.LocalDocumentACP, - a.clientACP, - ) - case *SourceHubDocumentACP: - err = acp.ValidateResourceInterface( - ctx, - policyID, - resourceName, - acpTypes.SourceHubDocumentACP, - a.clientACP, - ) - default: + if a.documentACPType != acpTypes.LocalDocumentACP && + a.documentACPType != acpTypes.RemoteDocumentACP { return acp.ErrInvalidACPSystem } - return err + return acp.ValidateResourceInterface( + ctx, + policyID, + resourceName, + a.documentACPType, + a.clientACP, + ) } func (a *bridgeDocumentACP) RegisterDocObject( @@ -117,7 +109,14 @@ func (a *bridgeDocumentACP) RegisterDocObject( if ownerErr == nil && owner.HasValue() && owner.Value() == identity.DID() { return nil } - return acp.NewErrFailedToRegisterDoc(err, "Local", policyID, identity.DID(), resourceName, docID) + return acp.NewErrFailedToRegisterDoc( + err, + a.documentACPType.String(), + policyID, + identity.DID(), + resourceName, + docID, + ) } return nil @@ -136,7 +135,13 @@ func (a *bridgeDocumentACP) IsDocRegistered( docID, ) if err != nil { - return false, acp.NewErrFailedToCheckIfDocIsRegistered(err, "Local", policyID, resourceName, docID) + return false, acp.NewErrFailedToCheckIfDocIsRegistered( + err, + a.documentACPType.String(), + policyID, + resourceName, + docID, + ) } return maybeActor.HasValue(), nil @@ -169,7 +174,7 @@ func (a *bridgeDocumentACP) CheckDocAccess( if err != nil { return false, acp.NewErrFailedToVerifyDocAccess( err, - "Local", + a.documentACPType.String(), permissionThatImpliesRead.String(), policyID, actorID, @@ -198,7 +203,7 @@ func (a *bridgeDocumentACP) CheckDocAccess( if err != nil { return false, acp.NewErrFailedToVerifyDocAccess( err, - "Local", + a.documentACPType.String(), permission.String(), policyID, actorID, @@ -253,7 +258,7 @@ func (a *bridgeDocumentACP) AddDocActorRelationship( if err != nil { return false, acp.NewErrFailedToAddDocActorRelationship( err, - "Local", + a.documentACPType.String(), policyID, resourceName, docID, @@ -321,7 +326,7 @@ func (a *bridgeDocumentACP) DeleteDocActorRelationship( if err != nil { return false, acp.NewErrFailedToDeleteDocActorRelationship( err, - "Local", + a.documentACPType.String(), policyID, resourceName, docID, diff --git a/acp/dac/dac.go b/acp/dac/dac.go index b5454a33e6..6286c4c845 100644 --- a/acp/dac/dac.go +++ b/acp/dac/dac.go @@ -46,7 +46,7 @@ type DocumentACP interface { // by assuming YAML format if JSON validation fails. Upon success a policyID is returned, // otherwise returns error. // - // A policy can not be added without a creator identity (sourcehub address). + // A policy cannot be added without a creator identity (a Vera address for Remote DAC). AddPolicy(ctx context.Context, creator identity.Identity, policy string) (string, error) // ValidateResourceInterface performs resource interface validation of the linked/matching diff --git a/acp/dac/doc.go b/acp/dac/doc.go index ca8170ca92..94995b76d6 100644 --- a/acp/dac/doc.go +++ b/acp/dac/doc.go @@ -9,10 +9,10 @@ // licenses/APL.txt. /* -This package implements local and sourcehub document access control systems. +This package implements Local and Remote Document Access Control (DAC) systems. -Local document access control provides acp local to a node. +Local DAC provides access control local to a node. -SourceHub document access control enables acp beyond just the local node. +Remote DAC, backed by Vera, provides access control shared across nodes. */ package dac diff --git a/acp/dac/local.go b/acp/dac/local.go index daf1e367d0..732c5480d4 100644 --- a/acp/dac/local.go +++ b/acp/dac/local.go @@ -13,13 +13,14 @@ package dac import ( "github.com/sourcenetwork/defradb/acp" "github.com/sourcenetwork/defradb/acp/local" + acpTypes "github.com/sourcenetwork/defradb/acp/types" ) const localStoreName = "local_document_acp" var _ acp.ACPSystemClient = (*LocalDocumentACP)(nil) -// LocalDocumentACP represents a local document acp implementation that makes no remote calls. +// LocalDocumentACP represents the Local DAC implementation, which makes no remote calls. type LocalDocumentACP struct { *local.LocalACP } @@ -31,6 +32,7 @@ func NewLocalDocumentACP(pathToStore string) (DocumentACP, error) { } return &bridgeDocumentACP{ - clientACP: &LocalDocumentACP{LocalACP: localACP}, + clientACP: &LocalDocumentACP{LocalACP: localACP}, + documentACPType: acpTypes.LocalDocumentACP, }, nil } diff --git a/acp/dac/source_hub.go b/acp/dac/remote.go similarity index 83% rename from acp/dac/source_hub.go rename to acp/dac/remote.go index f9eddb6d24..68494ee6ff 100644 --- a/acp/dac/source_hub.go +++ b/acp/dac/remote.go @@ -8,8 +8,8 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -// SourceHub ACP implementation for non-JS environments. -// JS environments are handled by source_hub_js.go +// Remote DAC implementation for non-JS environments. +// JS environments are handled by remote_js.go. // //go:build !js @@ -32,34 +32,38 @@ import ( acpTypes "github.com/sourcenetwork/defradb/acp/types" ) -func NewSourceHubACP( +// NewRemoteDocumentACP returns a Vera-backed Remote DAC instance. +func NewRemoteDocumentACP( chainID string, grpcAddress string, cometRPCAddress string, signer vera.TxSigner, ) (DocumentACP, error) { - acpSourceHub, err := NewACPSourceHub(chainID, grpcAddress, cometRPCAddress, signer) + remoteDAC, err := NewRemoteDocumentACPClient(chainID, grpcAddress, cometRPCAddress, signer) if err != nil { return nil, err } return &bridgeDocumentACP{ - clientACP: acpSourceHub, + clientACP: remoteDAC, + documentACPType: acpTypes.RemoteDocumentACP, }, nil } -type SourceHubDocumentACP struct { +// RemoteDocumentACP is the Vera-backed client used by Remote DAC. +type RemoteDocumentACP struct { client *vera.Client txBuilder *vera.TxBuilder signer vera.TxSigner } -func NewACPSourceHub( +// NewRemoteDocumentACPClient returns a Vera-backed Remote DAC client. +func NewRemoteDocumentACPClient( chainID string, grpcAddress string, cometRPCAddress string, signer vera.TxSigner, -) (*SourceHubDocumentACP, error) { +) (*RemoteDocumentACP, error) { client, err := vera.NewClient( vera.WithGRPCAddr(grpcAddress), vera.WithCometRPCAddr(cometRPCAddress), @@ -77,18 +81,18 @@ func NewACPSourceHub( return nil, err } - return &SourceHubDocumentACP{ + return &RemoteDocumentACP{ client: client, txBuilder: &txBuilder, signer: signer, }, nil } -func (a *SourceHubDocumentACP) Start(ctx context.Context) error { +func (a *RemoteDocumentACP) Start(ctx context.Context) error { return nil } -func (a *SourceHubDocumentACP) AddPolicy( +func (a *RemoteDocumentACP) AddPolicy( ctx context.Context, creator identity.Identity, policy string, @@ -129,7 +133,7 @@ func (a *SourceHubDocumentACP) AddPolicy( return policyResponse.Record.Policy.Id, nil } -func (a *SourceHubDocumentACP) Policy( +func (a *RemoteDocumentACP) Policy( ctx context.Context, policyID string, ) (immutable.Option[acpTypes.Policy], error) { @@ -139,7 +143,7 @@ func (a *SourceHubDocumentACP) Policy( ) if err != nil { // todo: https://github.com/sourcenetwork/defradb/issues/2826 - // Sourcehub errors do not currently work with errors.Is, errors.Is + // Vera errors do not currently work with errors.Is, so errors.Is // should be used here instead of strings.Contains when that is fixed. if strings.Contains(err.Error(), acpErrors.ErrorType_NOT_FOUND.Error()) { return immutable.None[acpTypes.Policy](), nil @@ -149,14 +153,14 @@ func (a *SourceHubDocumentACP) Policy( } return immutable.Some( - fromSourceHubPolicy(response.Record.Policy), + fromRemoteDACPolicy(response.Record.Policy), ), nil } -func fromSourceHubPolicy(pol *coreTypes.Policy) acpTypes.Policy { +func fromRemoteDACPolicy(pol *coreTypes.Policy) acpTypes.Policy { resources := make(map[string]*acpTypes.Resource) for _, coreResource := range pol.Resources { - resource := fromSourceHubResource(coreResource) + resource := fromRemoteDACResource(coreResource) resources[resource.Name] = resource } @@ -166,10 +170,10 @@ func fromSourceHubPolicy(pol *coreTypes.Policy) acpTypes.Policy { } } -func fromSourceHubResource(policy *coreTypes.Resource) *acpTypes.Resource { +func fromRemoteDACResource(policy *coreTypes.Resource) *acpTypes.Resource { perms := make(map[string]*acpTypes.Permission) for _, corePermission := range policy.Permissions { - perm := fromSourceHubPermission(corePermission) + perm := fromRemoteDACPermission(corePermission) perms[perm.Name] = perm } @@ -179,14 +183,14 @@ func fromSourceHubResource(policy *coreTypes.Resource) *acpTypes.Resource { } } -func fromSourceHubPermission(perm *coreTypes.Permission) *acpTypes.Permission { +func fromRemoteDACPermission(perm *coreTypes.Permission) *acpTypes.Permission { return &acpTypes.Permission{ Name: perm.Name, Expression: perm.Expression, } } -func (a *SourceHubDocumentACP) RegisterObject( +func (a *RemoteDocumentACP) RegisterObject( ctx context.Context, ident identity.Identity, policyID string, @@ -194,7 +198,7 @@ func (a *SourceHubDocumentACP) RegisterObject( objectID string, creationTime *protoTypes.Timestamp, ) error { - objectID = sourceHubObjectID(objectID) + objectID = remoteDACObjectID(objectID) // Check if the identity is a TokenIdentity (has BearerToken) tokenIdentity, ok := ident.(identity.TokenIdentity) @@ -231,13 +235,13 @@ func (a *SourceHubDocumentACP) RegisterObject( return err } -func (a *SourceHubDocumentACP) ObjectOwner( +func (a *RemoteDocumentACP) ObjectOwner( ctx context.Context, policyID string, resourceName string, objectID string, ) (immutable.Option[string], error) { - objectID = sourceHubObjectID(objectID) + objectID = remoteDACObjectID(objectID) resp, err := a.client.ACPQueryClient().ObjectOwner( ctx, @@ -257,7 +261,7 @@ func (a *SourceHubDocumentACP) ObjectOwner( return immutable.Some(resp.Record.Metadata.OwnerDid), nil } -func (a *SourceHubDocumentACP) VerifyAccessRequest( +func (a *RemoteDocumentACP) VerifyAccessRequest( ctx context.Context, permission acpTypes.ResourceInterfacePermission, actorID string, @@ -265,7 +269,7 @@ func (a *SourceHubDocumentACP) VerifyAccessRequest( resourceName string, objectID string, ) (bool, error) { - objectID = sourceHubObjectID(objectID) + objectID = remoteDACObjectID(objectID) checkDocResponse, err := a.client.ACPQueryClient().VerifyAccessRequest( ctx, @@ -291,15 +295,15 @@ func (a *SourceHubDocumentACP) VerifyAccessRequest( return checkDocResponse.Valid, nil } -func (a *SourceHubDocumentACP) Close() error { +func (a *RemoteDocumentACP) Close() error { return nil } -func (a *SourceHubDocumentACP) ResetState(_ context.Context) error { - return fmt.Errorf("sourcehub acp ResetState() unimplemented") +func (a *RemoteDocumentACP) ResetState(_ context.Context) error { + return fmt.Errorf("remote DAC ResetState() is not implemented") } -func (a *SourceHubDocumentACP) AddActorRelationship( +func (a *RemoteDocumentACP) AddActorRelationship( ctx context.Context, policyID string, resourceName string, @@ -309,7 +313,7 @@ func (a *SourceHubDocumentACP) AddActorRelationship( targetActor string, creationTime *protoTypes.Timestamp, ) (bool, error) { - objectID = sourceHubObjectID(objectID) + objectID = remoteDACObjectID(objectID) // Check if the requester is a TokenIdentity (has BearerToken) tokenIdentity, ok := requester.(identity.TokenIdentity) @@ -366,7 +370,7 @@ func (a *SourceHubDocumentACP) AddActorRelationship( return cmdResult.GetResult().GetSetRelationshipResult().GetRecordExisted(), nil } -func (a *SourceHubDocumentACP) DeleteActorRelationship( +func (a *RemoteDocumentACP) DeleteActorRelationship( ctx context.Context, policyID string, resourceName string, @@ -376,7 +380,7 @@ func (a *SourceHubDocumentACP) DeleteActorRelationship( targetActor string, creationTime *protoTypes.Timestamp, ) (bool, error) { - objectID = sourceHubObjectID(objectID) + objectID = remoteDACObjectID(objectID) // Check if the requester is a TokenIdentity (has BearerToken) tokenIdentity, ok := requester.(identity.TokenIdentity) diff --git a/acp/dac/source_hub_js.go b/acp/dac/remote_js.go similarity index 86% rename from acp/dac/source_hub_js.go rename to acp/dac/remote_js.go index c159444422..158d07fac2 100644 --- a/acp/dac/source_hub_js.go +++ b/acp/dac/remote_js.go @@ -8,10 +8,10 @@ // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. -// SourceHub ACP implementation for JS/WASM environments. +// Remote DAC implementation for JS/WASM environments. // // Client applications must include the acp-js library, which exposes the following -// bridge functions that interface with SourceHub ACP: +// bridge functions that interface with the Remote DAC: // // - acp_AddPolicy(policy: string, policyMarshalType: number) -> Promise<[string | null, Error | null]> // Adds a new access control policy and returns its ID @@ -53,12 +53,14 @@ import ( acpTypes "github.com/sourcenetwork/defradb/acp/types" ) -type SourceHubDocumentACP struct{} +// RemoteDocumentACP is the JavaScript bridge client used by Remote DAC. +type RemoteDocumentACP struct{} -// NewSourceHubDocumentACP returns a new SourceHub ACP instance for JavaScript environments. -func NewSourceHubDocumentACP() DocumentACP { +// NewRemoteDocumentACP returns a new Remote DAC instance for JavaScript environments. +func NewRemoteDocumentACP() DocumentACP { return &bridgeDocumentACP{ - clientACP: &SourceHubDocumentACP{}, + clientACP: &RemoteDocumentACP{}, + documentACPType: acpTypes.RemoteDocumentACP, } } @@ -85,14 +87,14 @@ func callJSFunction(funcName string, args ...interface{}) ([]sysjs.Value, error) return results, nil } -// fromSourceHubPolicyJS converts a JavaScript policy object to acpTypes.Policy -func fromSourceHubPolicyJS(jsPolicy map[string]interface{}) acpTypes.Policy { +// fromRemoteDACPolicyJS converts a JavaScript policy object to acpTypes.Policy. +func fromRemoteDACPolicyJS(jsPolicy map[string]interface{}) acpTypes.Policy { resources := make(map[string]*acpTypes.Resource) if resourcesData, ok := jsPolicy["resources"].([]interface{}); ok { for _, resourceData := range resourcesData { if resourceMap, ok := resourceData.(map[string]interface{}); ok { if resourceName, ok := resourceMap["name"].(string); ok { - resource := fromSourceHubResourceJS(resourceName, resourceMap) + resource := fromRemoteDACResourceJS(resourceName, resourceMap) resources[resource.Name] = resource } } @@ -100,7 +102,7 @@ func fromSourceHubPolicyJS(jsPolicy map[string]interface{}) acpTypes.Policy { } else if resourcesData, ok := jsPolicy["resources"].(map[string]interface{}); ok { for resourceName, resourceData := range resourcesData { if resourceMap, ok := resourceData.(map[string]interface{}); ok { - resource := fromSourceHubResourceJS(resourceName, resourceMap) + resource := fromRemoteDACResourceJS(resourceName, resourceMap) resources[resource.Name] = resource } } @@ -111,14 +113,14 @@ func fromSourceHubPolicyJS(jsPolicy map[string]interface{}) acpTypes.Policy { } } -// fromSourceHubResourceJS converts a JavaScript resource object to acpTypes.Resource -func fromSourceHubResourceJS(resourceName string, resourceMap map[string]interface{}) *acpTypes.Resource { +// fromRemoteDACResourceJS converts a JavaScript resource object to acpTypes.Resource. +func fromRemoteDACResourceJS(resourceName string, resourceMap map[string]interface{}) *acpTypes.Resource { perms := make(map[string]*acpTypes.Permission) if permissionsData, ok := resourceMap["permissions"].([]interface{}); ok { for _, permData := range permissionsData { if permMap, ok := permData.(map[string]interface{}); ok { if permName, ok := permMap["name"].(string); ok { - perm := fromSourceHubPermissionJS(permName, permMap) + perm := fromRemoteDACPermissionJS(permName, permMap) perms[perm.Name] = perm } } @@ -126,7 +128,7 @@ func fromSourceHubResourceJS(resourceName string, resourceMap map[string]interfa } else if permissionsData, ok := resourceMap["permissions"].(map[string]interface{}); ok { for permName, permData := range permissionsData { if permMap, ok := permData.(map[string]interface{}); ok { - perm := fromSourceHubPermissionJS(permName, permMap) + perm := fromRemoteDACPermissionJS(permName, permMap) perms[perm.Name] = perm } } @@ -137,8 +139,8 @@ func fromSourceHubResourceJS(resourceName string, resourceMap map[string]interfa } } -// fromSourceHubPermissionJS converts a JavaScript permission object to acpTypes.Permission -func fromSourceHubPermissionJS(permName string, permMap map[string]interface{}) *acpTypes.Permission { +// fromRemoteDACPermissionJS converts a JavaScript permission object to acpTypes.Permission. +func fromRemoteDACPermissionJS(permName string, permMap map[string]interface{}) *acpTypes.Permission { expression := "" if expr, ok := permMap["expr"].(string); ok { expression = expr @@ -170,12 +172,12 @@ func fromSourceHubPermissionJS(permName string, permMap map[string]interface{}) } } -func (a *SourceHubDocumentACP) Start(ctx context.Context) error { +func (a *RemoteDocumentACP) Start(ctx context.Context) error { // No-op: client is initialized during node creation return nil } -func (a *SourceHubDocumentACP) AddPolicy( +func (a *RemoteDocumentACP) AddPolicy( ctx context.Context, creator identity.Identity, policy string, @@ -208,7 +210,7 @@ func (a *SourceHubDocumentACP) AddPolicy( return policyID, nil } -func (a *SourceHubDocumentACP) Policy( +func (a *RemoteDocumentACP) Policy( ctx context.Context, policyID string, ) (immutable.Option[acpTypes.Policy], error) { @@ -249,11 +251,11 @@ func (a *SourceHubDocumentACP) Policy( if err := json.Unmarshal([]byte(policyStr), &jsPolicy); err != nil { return immutable.None[acpTypes.Policy](), err } - policy := fromSourceHubPolicyJS(jsPolicy) + policy := fromRemoteDACPolicyJS(jsPolicy) return immutable.Some(policy), nil } -func (a *SourceHubDocumentACP) RegisterObject( +func (a *RemoteDocumentACP) RegisterObject( ctx context.Context, id identity.Identity, policyID string, @@ -261,19 +263,19 @@ func (a *SourceHubDocumentACP) RegisterObject( objectID string, creationTime *protoTypes.Timestamp, ) error { - objectID = sourceHubObjectID(objectID) + objectID = remoteDACObjectID(objectID) _, err := callJSFunction("acp_RegisterObject", policyID, resourceName, objectID) return err } -func (a *SourceHubDocumentACP) ObjectOwner( +func (a *RemoteDocumentACP) ObjectOwner( ctx context.Context, policyID string, resourceName string, objectID string, ) (immutable.Option[string], error) { - objectID = sourceHubObjectID(objectID) + objectID = remoteDACObjectID(objectID) results, err := callJSFunction("acp_ObjectOwner", policyID, resourceName, objectID) if err != nil { @@ -285,7 +287,7 @@ func (a *SourceHubDocumentACP) ObjectOwner( return immutable.None[string](), nil } -func (a *SourceHubDocumentACP) VerifyAccessRequest( +func (a *RemoteDocumentACP) VerifyAccessRequest( ctx context.Context, permission acpTypes.ResourceInterfacePermission, actorID string, @@ -293,7 +295,7 @@ func (a *SourceHubDocumentACP) VerifyAccessRequest( resourceName string, objectID string, ) (bool, error) { - objectID = sourceHubObjectID(objectID) + objectID = remoteDACObjectID(objectID) results, err := callJSFunction( "acp_VerifyAccessRequest", @@ -335,15 +337,15 @@ func (a *SourceHubDocumentACP) VerifyAccessRequest( } } -func (a *SourceHubDocumentACP) Close() error { +func (a *RemoteDocumentACP) Close() error { return nil } -func (a *SourceHubDocumentACP) ResetState(_ context.Context) error { +func (a *RemoteDocumentACP) ResetState(_ context.Context) error { return nil } -func (a *SourceHubDocumentACP) AddActorRelationship( +func (a *RemoteDocumentACP) AddActorRelationship( ctx context.Context, policyID string, resourceName string, @@ -353,7 +355,7 @@ func (a *SourceHubDocumentACP) AddActorRelationship( targetActor string, creationTime *protoTypes.Timestamp, ) (bool, error) { - objectID = sourceHubObjectID(objectID) + objectID = remoteDACObjectID(objectID) results, err := callJSFunction( "acp_AddActorRelationship", @@ -401,7 +403,7 @@ func (a *SourceHubDocumentACP) AddActorRelationship( return false, nil } -func (a *SourceHubDocumentACP) DeleteActorRelationship( +func (a *RemoteDocumentACP) DeleteActorRelationship( ctx context.Context, policyID string, resourceName string, @@ -411,7 +413,7 @@ func (a *SourceHubDocumentACP) DeleteActorRelationship( targetActor string, creationTime *protoTypes.Timestamp, ) (bool, error) { - objectID = sourceHubObjectID(objectID) + objectID = remoteDACObjectID(objectID) results, err := callJSFunction( "acp_DeleteActorRelationship", diff --git a/acp/dac/source_hub_object.go b/acp/dac/remote_object.go similarity index 80% rename from acp/dac/source_hub_object.go rename to acp/dac/remote_object.go index 859955b238..91c5a90851 100644 --- a/acp/dac/source_hub_object.go +++ b/acp/dac/remote_object.go @@ -12,8 +12,8 @@ package dac import "github.com/sourcenetwork/defradb/client" -// SourceHub stores DocID objects by their UUID payload, not the DefraDB versioned string. -func sourceHubObjectID(objectID string) string { +// Vera stores DocID objects by their UUID payload, not the DefraDB versioned string. +func remoteDACObjectID(objectID string) string { docID, err := client.NewDocIDFromString(objectID) if err != nil { return objectID diff --git a/acp/dac/source_hub_object_test.go b/acp/dac/remote_object_test.go similarity index 70% rename from acp/dac/source_hub_object_test.go rename to acp/dac/remote_object_test.go index 8d1753ceb1..8d92e4ba60 100644 --- a/acp/dac/source_hub_object_test.go +++ b/acp/dac/remote_object_test.go @@ -12,14 +12,14 @@ package dac import "testing" -func TestSourceHubObjectID(t *testing.T) { +func TestRemoteDACObjectID(t *testing.T) { const docID = "bae-9793af00-a131-5ef2-b2c9-22b8053a11e7" - if got := sourceHubObjectID(docID); got != "9793af00-a131-5ef2-b2c9-22b8053a11e7" { - t.Fatalf("Expected SourceHub object ID to use the DocID UUID, got %q", got) + if got := remoteDACObjectID(docID); got != "9793af00-a131-5ef2-b2c9-22b8053a11e7" { + t.Fatalf("expected Vera object ID to use the DocID UUID, got %q", got) } - if got := sourceHubObjectID("custom-object-id"); got != "custom-object-id" { + if got := remoteDACObjectID("custom-object-id"); got != "custom-object-id" { t.Fatalf("Expected non-DocID object ID to pass through, got %q", got) } } diff --git a/acp/errors.go b/acp/errors.go index 1dfca51b02..32aa7089d4 100644 --- a/acp/errors.go +++ b/acp/errors.go @@ -84,20 +84,20 @@ func NewErrInitializationOfACPFailed( func NewErrFailedToAddPolicy( inner error, - Type string, + acpType string, creatorID string, ) error { return errors.Wrap( errFailedToAddPolicy, inner, - errors.NewKV("Type", Type), + errors.NewKV("Type", acpType), errors.NewKV("CreatorID", creatorID), ) } func NewErrFailedToRegisterDoc( inner error, - Type string, + acpType string, policyID string, creatorID string, resourceName string, @@ -106,7 +106,7 @@ func NewErrFailedToRegisterDoc( return errors.Wrap( errFailedToRegisterDoc, inner, - errors.NewKV("Type", Type), + errors.NewKV("Type", acpType), errors.NewKV("PolicyID", policyID), errors.NewKV("CreatorID", creatorID), errors.NewKV("ResourceName", resourceName), @@ -116,7 +116,7 @@ func NewErrFailedToRegisterDoc( func NewErrFailedToCheckIfDocIsRegistered( inner error, - Type string, + acpType string, policyID string, resourceName string, docID string, @@ -124,7 +124,7 @@ func NewErrFailedToCheckIfDocIsRegistered( return errors.Wrap( errFailedToCheckIfDocIsRegistered, inner, - errors.NewKV("Type", Type), + errors.NewKV("Type", acpType), errors.NewKV("PolicyID", policyID), errors.NewKV("ResourceName", resourceName), errors.NewKV("DocID", docID), @@ -152,7 +152,7 @@ func NewErrFailedToVerifyNodeAccess( func NewErrFailedToVerifyDocAccess( inner error, - Type string, + acpType string, permission string, policyID string, actorID string, @@ -162,7 +162,7 @@ func NewErrFailedToVerifyDocAccess( return errors.Wrap( errFailedToVerifyDocAccess, inner, - errors.NewKV("Type", Type), + errors.NewKV("Type", acpType), errors.NewKV("Permission", permission), errors.NewKV("PolicyID", policyID), errors.NewKV("ActorID", actorID), @@ -173,7 +173,7 @@ func NewErrFailedToVerifyDocAccess( func NewErrFailedToAddDocActorRelationship( inner error, - Type string, + acpType string, policyID string, resourceName string, docID string, @@ -184,7 +184,7 @@ func NewErrFailedToAddDocActorRelationship( return errors.Wrap( errFailedToAddDocActorRelationship, inner, - errors.NewKV("Type", Type), + errors.NewKV("Type", acpType), errors.NewKV("PolicyID", policyID), errors.NewKV("ResourceName", resourceName), errors.NewKV("DocID", docID), @@ -196,7 +196,7 @@ func NewErrFailedToAddDocActorRelationship( func NewErrFailedToDeleteDocActorRelationship( inner error, - Type string, + acpType string, policyID string, resourceName string, docID string, @@ -207,7 +207,7 @@ func NewErrFailedToDeleteDocActorRelationship( return errors.Wrap( errFailedToDeleteDocActorRelationship, inner, - errors.NewKV("Type", Type), + errors.NewKV("Type", acpType), errors.NewKV("PolicyID", policyID), errors.NewKV("ResourceName", resourceName), errors.NewKV("DocID", docID), diff --git a/acp/types/types.go b/acp/types/types.go index b16e6670af..a840d3a5ec 100644 --- a/acp/types/types.go +++ b/acp/types/types.go @@ -23,10 +23,24 @@ type ACPSystemType int const ( LocalDocumentACP ACPSystemType = iota - SourceHubDocumentACP + RemoteDocumentACP NodeACP ) +// String returns the user-facing name of the ACP system type. +func (acpType ACPSystemType) String() string { + switch acpType { + case LocalDocumentACP: + return "Local DAC" + case RemoteDocumentACP: + return "Remote DAC" + case NodeACP: + return "Node ACP" + default: + return "Unknown ACP" + } +} + var _ ResourceInterfacePermission = (*DocumentResourcePermission)(nil) var _ ResourceInterfacePermission = (*NodeResourcePermission)(nil) @@ -328,7 +342,7 @@ func (resourcePermission NodeResourcePermission) IsForNACOperation() bool { } } -// RegistrationResult is an enum type which indicates the result of a RegisterObject call to SourceHub / ACP Core +// RegistrationResult indicates the result of a RegisterObject call to Vera / ACP Core. type RegistrationResult int32 const ( diff --git a/acp/validation.go b/acp/validation.go index 632c3bc948..d2923a3c5e 100644 --- a/acp/validation.go +++ b/acp/validation.go @@ -54,7 +54,7 @@ func ValidateResourceInterface( var requiredResourcePermissions []string switch acpType { - case acpTypes.LocalDocumentACP, acpTypes.SourceHubDocumentACP: + case acpTypes.LocalDocumentACP, acpTypes.RemoteDocumentACP: requiredResourcePermissions = acpTypes.RequiredResourcePermissionsForDocument case acpTypes.NodeACP: requiredResourcePermissions = acpTypes.RequiredResourcePermissionsForNode diff --git a/cbindings/cutils.go b/cbindings/cutils.go index 38cf4b1764..fc54add60e 100644 --- a/cbindings/cutils.go +++ b/cbindings/cutils.go @@ -149,9 +149,9 @@ func convertNodeInitOptionsToGoNodeInitOptions(cOptions C.NodeInitOptions) (GoNo HTTPIdleTimeoutMs: int64(cOptions.httpIdleTimeoutMs), DocumentACPType: C.GoString(cOptions.documentACPType), DocumentACPPath: C.GoString(cOptions.documentACPPath), - SourceHubChainID: C.GoString(cOptions.sourceHubChainID), - SourceHubGRPCAddress: C.GoString(cOptions.sourceHubGRPCAddress), - SourceHubCometRPCAddress: C.GoString(cOptions.sourceHubCometRPCAddress), + RemoteDACChainID: C.GoString(cOptions.remoteDACChainID), + RemoteDACGRPCAddress: C.GoString(cOptions.remoteDACGRPCAddress), + RemoteDACCometRPCAddress: C.GoString(cOptions.remoteDACCometRPCAddress), NodeACPPath: C.GoString(cOptions.nodeACPPath), }, nil } diff --git a/cbindings/defra_structs.h b/cbindings/defra_structs.h index 61c58e3e3a..a44c369ce0 100644 --- a/cbindings/defra_structs.h +++ b/cbindings/defra_structs.h @@ -79,11 +79,11 @@ typedef struct { int64_t httpIdleTimeoutMs; // 0 = use default // Document ACP options - const char* documentACPType; // "none" | "local" | "source-hub" | "" (default) + const char* documentACPType; // "none" | "local" | "remote" | "" (default) const char* documentACPPath; - const char* sourceHubChainID; - const char* sourceHubGRPCAddress; - const char* sourceHubCometRPCAddress; + const char* remoteDACChainID; + const char* remoteDACGRPCAddress; + const char* remoteDACCometRPCAddress; // Node ACP options const char* nodeACPPath; diff --git a/cbindings/node_new.go b/cbindings/node_new.go index 8d9ed1be92..f6284bdd0b 100644 --- a/cbindings/node_new.go +++ b/cbindings/node_new.go @@ -157,14 +157,14 @@ func NewNode(cOptions C.NodeInitOptions) C.NewNodeResult { if gocOptions.DocumentACPPath != "" { opts.DocumentACP().SetPath(gocOptions.DocumentACPPath) } - if gocOptions.SourceHubChainID != "" { - opts.DocumentACP().SetChainID(gocOptions.SourceHubChainID) + if gocOptions.RemoteDACChainID != "" { + opts.DocumentACP().SetChainID(gocOptions.RemoteDACChainID) } - if gocOptions.SourceHubGRPCAddress != "" { - opts.DocumentACP().SetGRPCAddress(gocOptions.SourceHubGRPCAddress) + if gocOptions.RemoteDACGRPCAddress != "" { + opts.DocumentACP().SetGRPCAddress(gocOptions.RemoteDACGRPCAddress) } - if gocOptions.SourceHubCometRPCAddress != "" { - opts.DocumentACP().SetCometRPCAddress(gocOptions.SourceHubCometRPCAddress) + if gocOptions.RemoteDACCometRPCAddress != "" { + opts.DocumentACP().SetCometRPCAddress(gocOptions.RemoteDACCometRPCAddress) } // Node ACP options diff --git a/cbindings/test_node_options.go b/cbindings/test_node_options.go index f8b7c43a22..0e66e41bce 100644 --- a/cbindings/test_node_options.go +++ b/cbindings/test_node_options.go @@ -199,9 +199,9 @@ func TestGetNodeOptions_SetA(t *testing.T) { // Document ACP opts.documentACPType = dacType opts.documentACPPath = dacPath - opts.sourceHubChainID = chainID - opts.sourceHubGRPCAddress = grpcAddr - opts.sourceHubCometRPCAddress = cometAddr + opts.remoteDACChainID = chainID + opts.remoteDACGRPCAddress = grpcAddr + opts.remoteDACCometRPCAddress = cometAddr // Identity + Node ACP opts.identityPtr = identResult.identityPtr opts.enableNodeACP = 1 @@ -249,9 +249,9 @@ func TestGetNodeOptions_SetA(t *testing.T) { // Document ACP assertNodeOptionField(t, m, "local", "DocumentACP", "DocumentACPType") assertNodeOptionField(t, m, dacPathStr, "DocumentACP", "Path") - assertNodeOptionField(t, m, "chain-a", "DocumentACP", "SourceHubChainID") - assertNodeOptionField(t, m, "grpc-a:9090", "DocumentACP", "SourceHubGRPCAddress") - assertNodeOptionField(t, m, "comet-a:26657", "DocumentACP", "SourceHubCometRPCAddress") + assertNodeOptionField(t, m, "chain-a", "DocumentACP", "RemoteDACChainID") + assertNodeOptionField(t, m, "grpc-a:9090", "DocumentACP", "RemoteDACGRPCAddress") + assertNodeOptionField(t, m, "comet-a:26657", "DocumentACP", "RemoteDACCometRPCAddress") // Node ACP assertNodeOptionField(t, m, true, "NodeACP", "IsEnabled") @@ -323,9 +323,9 @@ func TestGetNodeOptions_SetB(t *testing.T) { opts.httpWriteTimeoutMs = C.int64_t(5000) opts.httpIdleTimeoutMs = C.int64_t(6000) // Document ACP - opts.sourceHubChainID = chainID - opts.sourceHubGRPCAddress = grpcAddr - opts.sourceHubCometRPCAddress = cometAddr + opts.remoteDACChainID = chainID + opts.remoteDACGRPCAddress = grpcAddr + opts.remoteDACCometRPCAddress = cometAddr // Node ACP // enableNodeACP is not set, defaulting to false (vs true in set A) opts.nodeACPPath = nodeACPPath @@ -373,9 +373,9 @@ func TestGetNodeOptions_SetB(t *testing.T) { // Type is not set, defaulting to "local" (vs explicit "local" in set A) assertNodeOptionField(t, m, "local", "DocumentACP", "DocumentACPType") assertNodeOptionField(t, m, "", "DocumentACP", "Path") - assertNodeOptionField(t, m, "chain-b", "DocumentACP", "SourceHubChainID") - assertNodeOptionField(t, m, "grpc-b:9090", "DocumentACP", "SourceHubGRPCAddress") - assertNodeOptionField(t, m, "comet-b:26657", "DocumentACP", "SourceHubCometRPCAddress") + assertNodeOptionField(t, m, "chain-b", "DocumentACP", "RemoteDACChainID") + assertNodeOptionField(t, m, "grpc-b:9090", "DocumentACP", "RemoteDACGRPCAddress") + assertNodeOptionField(t, m, "comet-b:26657", "DocumentACP", "RemoteDACCometRPCAddress") // Node ACP // enableNodeACP is not set, defaulting to false (vs true in set A) diff --git a/cbindings/utils.go b/cbindings/utils.go index 429a6503bc..3f50543b19 100644 --- a/cbindings/utils.go +++ b/cbindings/utils.go @@ -74,9 +74,9 @@ type GoNodeInitOptions struct { // Document ACP options DocumentACPType string DocumentACPPath string - SourceHubChainID string - SourceHubGRPCAddress string - SourceHubCometRPCAddress string + RemoteDACChainID string + RemoteDACGRPCAddress string + RemoteDACCometRPCAddress string // Node ACP options NodeACPPath string diff --git a/cli/client.go b/cli/client.go index 056e75aea5..75bd847fba 100644 --- a/cli/client.go +++ b/cli/client.go @@ -62,8 +62,8 @@ func setClientConnectionFlags(cmd *cobra.Command) { "Audience to set on minted auth tokens. Defaults to the host of --url", ) cmd.PersistentFlags().String( - "source-hub-address", - cfg.GetString(config.ConfigFlags["source-hub-address"]), - "The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor", + "remote-dac-address", + cfg.GetString(config.ConfigFlags["remote-dac-address"]), + "Vera address authorized to make Remote DAC transactions on behalf of the actor", ) } diff --git a/cli/config/config.go b/cli/config/config.go index 6489da134d..571d766a4f 100644 --- a/cli/config/config.go +++ b/cli/config/config.go @@ -82,7 +82,7 @@ var ConfigFlags = map[string]string{ "keyring-path": "keyring.path", "no-keyring": "keyring.disabled", "document-acp-type": "acp.document.type", - "source-hub-address": "acp.document.sourceHub.address", + "remote-dac-address": "acp.document.remote.address", "development": "development", "secret-file": "secretfile", "no-telemetry": "telemetry.disabled", diff --git a/cli/start.go b/cli/start.go index 8b3f2a484b..9f42b984c9 100644 --- a/cli/start.go +++ b/cli/start.go @@ -123,9 +123,9 @@ func MakeStartCommand(ctx context.Context) *cobra.Command { SetCertPath(tlsCertPath). SetKeyPath(tlsKeyPath) opts.DocumentACP(). - SetChainID(cfg.GetString("acp.document.sourceHub.ChainID")). - SetGRPCAddress(cfg.GetString("acp.document.sourceHub.GRPCAddress")). - SetCometRPCAddress(cfg.GetString("acp.document.sourceHub.CometRPCAddress")) + SetChainID(cfg.GetString("acp.document.remote.ChainID")). + SetGRPCAddress(cfg.GetString("acp.document.remote.GRPCAddress")). + SetCometRPCAddress(cfg.GetString("acp.document.remote.CometRPCAddress")) opts.NodeACP(). SetEnabled(enableNAC) @@ -180,10 +180,10 @@ func MakeStartCommand(ctx context.Context) *cobra.Command { } opts.DB().SetNodeIdentity(ident) - // setup the sourcehub transaction signer - sourceHubKeyName := cfg.GetString("acp.document.sourceHub.KeyName") - if sourceHubKeyName != "" { - signer, err := keyring.NewTxSignerFromKeyringKey(kr, sourceHubKeyName) + // Set up the Vera transaction signer used by the Remote DAC. + remoteDACKeyName := cfg.GetString("acp.document.remote.KeyName") + if remoteDACKeyName != "" { + signer, err := keyring.NewTxSignerFromKeyringKey(kr, remoteDACKeyName) if err != nil { return err } @@ -373,7 +373,7 @@ func MakeStartCommand(ctx context.Context) *cobra.Command { cmd.PersistentFlags().String( "document-acp-type", cfg.GetString(config.ConfigFlags["document-acp-type"]), - "Specify the document acp engine to use (supported: local (default), source-hub)") + "Document Access Control (DAC) backend to use: local (default) or remote") cmd.PersistentFlags().IntSlice( "replicator-retry-intervals", cfg.GetIntSlice(config.ConfigFlags["replicator-retry-intervals"]), diff --git a/cli/utils.go b/cli/utils.go index 367d1db16d..35d2b4be51 100644 --- a/cli/utils.go +++ b/cli/utils.go @@ -145,10 +145,10 @@ func setContextIdentity(cmd *cobra.Command, privateKeyHex string) error { cfg := mustGetContextConfig(cmd) - sourcehubAddressString := cfg.GetString("acp.document.sourceHub.address") - var sourcehubAddress immutable.Option[string] - if sourcehubAddressString != "" { - sourcehubAddress = immutable.Some(sourcehubAddressString) + addressString := cfg.GetString("acp.document.remote.address") + var address immutable.Option[string] + if addressString != "" { + address = immutable.Some(addressString) } // Default the audience to the host of --url (the Host the server checks @@ -169,7 +169,7 @@ func setContextIdentity(cmd *cobra.Command, privateKeyHex string) error { err = ident.UpdateToken( authTokenExpiration, immutable.Some(audience), - sourcehubAddress) + address) if err != nil { return err } diff --git a/client/acp.go b/client/acp.go index ccffce1f14..f5ffa5df5a 100644 --- a/client/acp.go +++ b/client/acp.go @@ -10,14 +10,12 @@ package client -// PolicyDescription describes a policy using it's ID and it's resource name, where: -// 1) the ID is the policyID of the registered policy on the document acp system and -// 2) the resource name is of a valid resource that adheres to the corresponding +// PolicyDescription describes a policy by its ID and resource name, where: +// 1) the ID identifies the policy registered with the ACP system and +// 2) the resource name identifies a valid resource that adheres to the corresponding // resource interface (RI) rules. type PolicyDescription struct { - // ID is the local policyID when using local acp, and global policyID when - // using remote acp with sourcehub. This identifier is externally managed - // by the acp system. + // ID is the policy identifier managed by the configured ACP system. ID string // ResourceName is the name of the corresponding resource within the policy. diff --git a/client/options/node.go b/client/options/node.go index d6bc4c2097..af1cdcd955 100644 --- a/client/options/node.go +++ b/client/options/node.go @@ -46,10 +46,10 @@ const ( type NodeDocumentACPType string const ( - // NodeLocalDocumentACPType uses the local document ACP implementation. + // NodeLocalDocumentACPType uses the Local DAC implementation. NodeLocalDocumentACPType NodeDocumentACPType = "local" - // NodeSourceHubDocumentACPType uses the SourceHub ACP implementation. - NodeSourceHubDocumentACPType NodeDocumentACPType = "source-hub" + // NodeRemoteDocumentACPType uses the Remote DAC implementation backed by Vera. + NodeRemoteDocumentACPType NodeDocumentACPType = "remote" ) // NodeLensRuntimeType represents the lens runtime type. @@ -157,14 +157,14 @@ type NodeDocumentACPOptions struct { DocumentACPType NodeDocumentACPType // Path is the filesystem path for the document ACP system. Path string - // Signer is the transaction signer for SourceHub ACP. + // Signer signs Vera transactions made by the Remote DAC. Signer immutable.Option[NodeTxSigner] - // SourceHubChainID is the chain ID for SourceHub. - SourceHubChainID string - // SourceHubGRPCAddress is the gRPC address for SourceHub. - SourceHubGRPCAddress string - // SourceHubCometRPCAddress is the Comet RPC address for SourceHub. - SourceHubCometRPCAddress string + // RemoteDACChainID is the chain ID for Vera. + RemoteDACChainID string + // RemoteDACGRPCAddress is the gRPC address for Vera. + RemoteDACGRPCAddress string + // RemoteDACCometRPCAddress is the Comet RPC address for Vera. + RemoteDACCometRPCAddress string } // NodeACPOptions contains node ACP configuration values. @@ -665,21 +665,21 @@ func (sb *NodeDocumentACPOptionsBuilder) SetTxnSigner(signer NodeTxSigner) *Node return sb } -// SetChainID sets the chainID of the SourceHub chain. +// SetChainID sets the chainID of the Vera chain. func (sb *NodeDocumentACPOptionsBuilder) SetChainID(chainID string) *NodeDocumentACPOptionsBuilder { - sb.append(func(opts *NodeDocumentACPOptions) { opts.SourceHubChainID = chainID }) + sb.append(func(opts *NodeDocumentACPOptions) { opts.RemoteDACChainID = chainID }) return sb } -// SetGRPCAddress sets the GRPC address of the SourceHub node. +// SetGRPCAddress sets the GRPC address of the Vera node. func (sb *NodeDocumentACPOptionsBuilder) SetGRPCAddress(address string) *NodeDocumentACPOptionsBuilder { - sb.append(func(opts *NodeDocumentACPOptions) { opts.SourceHubGRPCAddress = address }) + sb.append(func(opts *NodeDocumentACPOptions) { opts.RemoteDACGRPCAddress = address }) return sb } -// SetCometRPCAddress sets the Comet RPC address of the SourceHub node. +// SetCometRPCAddress sets the Comet RPC address of the Vera node. func (sb *NodeDocumentACPOptionsBuilder) SetCometRPCAddress(address string) *NodeDocumentACPOptionsBuilder { - sb.append(func(opts *NodeDocumentACPOptions) { opts.SourceHubCometRPCAddress = address }) + sb.append(func(opts *NodeDocumentACPOptions) { opts.RemoteDACCometRPCAddress = address }) return sb } diff --git a/docs/config.md b/docs/config.md index 159e5d9152..1f1c15eb5f 100644 --- a/docs/config.md +++ b/docs/config.md @@ -133,31 +133,31 @@ Possible values: The type of Document ACP to use. Possible values: -- `local` (default): local-only Document ACP -- `source-hub` source hub Document ACP: https://github.com/sourcenetwork/sourcehub +- `local` (default): Local DAC +- `remote`: Remote DAC (backed by [Vera](https://github.com/sourcenetwork/vera)) -## `acp.document.sourceHub.ChainID` +## `acp.document.remote.ChainID` -The ID of the SourceHub chain to store ACP data in. Required when using `acp.document.type`:`source-hub`. +The ID of the Vera chain to store ACP data in. Required when using `acp.document.type`:`remote`. -## `acp.document.sourceHub.GRPCAddress` +## `acp.document.remote.GRPCAddress` -The address of the SourceHub GRPC server. Required when using `acp.document.type`:`source-hub`. +The address of the Vera GRPC server. Required when using `acp.document.type`:`remote`. -## `acp.document.sourceHub.CometRPCAddress` +## `acp.document.remote.CometRPCAddress` -The address of the SourceHub Comet RPC server. Required when using `acp.document.type`:`source-hub`. +The address of the Vera Comet RPC server. Required when using `acp.document.type`:`remote`. -## `acp.document.sourceHub.KeyName` +## `acp.document.remote.KeyName` -The name of the key in the keyring where the SourceHub credentials used to sign (and pay for) SourceHub -transactions created by the node is stored. Required when using `acp.document.type`:`source-hub`. +The name of the key in the keyring that stores the Vera credentials used to sign (and pay for) +Vera transactions created by the node. Required when using `acp.document.type`:`remote`. -## `acp.document.sourceHub.address` +## `acp.document.remote.address` -The SourceHub address of the actor that client-side actions should permit to make SourceHub actions on -their behalf. This is a client-side only config param. It is required if the client wishes to make -SourceHub ACP requests in order to create protected data. +The Vera address that client-side actions should authorize to make Remote DAC transactions on the +actor's behalf. This is a client-side-only configuration parameter and is required when the client +uses Remote DAC to create protected data. ## `secretfile` diff --git a/docs/website/BSL-License.md b/docs/website/BSL-License.md index a5018a4ef8..3b4853c0f8 100644 --- a/docs/website/BSL-License.md +++ b/docs/website/BSL-License.md @@ -33,8 +33,8 @@ The license design provides a balance between open-source principles and commerc ### Production Use Criteria As you can see, the non-production use of the source code does not benefit the community's financial sustainability. Thus, to allow running DefraDB in production, we created the following four criteria under the Additional Use Grant Conditions. In summary, the production use is allowed if: -1. The application is connected to the Source Hub Mainnet, with ongoing support through the OPEN utility token. -2. The application is connected to any sidechain protocol integrated with the Source Hub Mainnet. +1. The application is connected to the Vera Mainnet, with ongoing support through the OPEN utility token. +2. The application is connected to any sidechain protocol integrated with the Vera Mainnet. 3. The applications use the Source Network Access Control Policy on any public protocols. 4. The project is a non-profit project. If none of the above criteria apply to your use case, you can obtain commercial licensing by contacting Source. diff --git a/docs/website/getting-started.md b/docs/website/getting-started.md index c3234f2a36..d9c8ec3b94 100644 --- a/docs/website/getting-started.md +++ b/docs/website/getting-started.md @@ -4,7 +4,7 @@ title: Getting Started slug: / --- -DefraDB is a user-centric database that prioritizes data ownership, personal 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](./references/query-specification/query-language-overview.md), 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 user-centric database that prioritizes data ownership, personal 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](./references/query-specification/query-language-overview.md), 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. DISCLAIMER: At this early stage, DefraDB does not offer access control or data encryption, and the default configuration exposes the database to the network. The software is provided "as is" and is not guaranteed to be stable, secure, or error-free. We encourage you to experiment with DefraDB and provide feedback, but please do not use it for production purposes until it has been thoroughly tested and developed. diff --git a/docs/website/references/cli/defradb_client.md b/docs/website/references/cli/defradb_client.md index 555e7a1261..1bfe658778 100644 --- a/docs/website/references/cli/defradb_client.md +++ b/docs/website/references/cli/defradb_client.md @@ -13,7 +13,7 @@ Execute queries, add collections, obtain node info, etc. --audience string Audience to set on minted auth tokens. Defaults to the host of --url -h, --help help for client -i, --identity string Hex formatted private key used to authenticate with ACP - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp.md b/docs/website/references/cli/defradb_client_acp.md index 14524dbf5e..350c55d5c5 100644 --- a/docs/website/references/cli/defradb_client_acp.md +++ b/docs/website/references/cli/defradb_client_acp.md @@ -31,8 +31,8 @@ systems. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_document.md b/docs/website/references/cli/defradb_client_acp_document.md index b9625aa98b..6f75cfc22a 100644 --- a/docs/website/references/cli/defradb_client_acp_document.md +++ b/docs/website/references/cli/defradb_client_acp_document.md @@ -30,8 +30,8 @@ system. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_document_policy.md b/docs/website/references/cli/defradb_client_acp_document_policy.md index 3ed2d9acd6..9c5f17b812 100644 --- a/docs/website/references/cli/defradb_client_acp_document_policy.md +++ b/docs/website/references/cli/defradb_client_acp_document_policy.md @@ -24,8 +24,8 @@ Interact with the document acp policy features of DefraDB instance --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_document_policy_add.md b/docs/website/references/cli/defradb_client_acp_document_policy_add.md index e4783592bd..66d2dc0f0c 100644 --- a/docs/website/references/cli/defradb_client_acp_document_policy_add.md +++ b/docs/website/references/cli/defradb_client_acp_document_policy_add.md @@ -78,8 +78,8 @@ Add from stdin: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_document_relationship.md b/docs/website/references/cli/defradb_client_acp_document_relationship.md index de47f83c56..48d9f82991 100644 --- a/docs/website/references/cli/defradb_client_acp_document_relationship.md +++ b/docs/website/references/cli/defradb_client_acp_document_relationship.md @@ -24,8 +24,8 @@ Interact with the document acp relationship features of DefraDB instance --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_document_relationship_add.md b/docs/website/references/cli/defradb_client_acp_document_relationship_add.md index 997aaeeea3..5956718aee 100644 --- a/docs/website/references/cli/defradb_client_acp_document_relationship_add.md +++ b/docs/website/references/cli/defradb_client_acp_document_relationship_add.md @@ -71,8 +71,8 @@ Let all actors read a private document: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_document_relationship_delete.md b/docs/website/references/cli/defradb_client_acp_document_relationship_delete.md index 8acffc9296..dea097abbe 100644 --- a/docs/website/references/cli/defradb_client_acp_document_relationship_delete.md +++ b/docs/website/references/cli/defradb_client_acp_document_relationship_delete.md @@ -63,8 +63,8 @@ Remove an actor from reading a private document: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_node.md b/docs/website/references/cli/defradb_client_acp_node.md index 51d23f16b9..c589461bbc 100644 --- a/docs/website/references/cli/defradb_client_acp_node.md +++ b/docs/website/references/cli/defradb_client_acp_node.md @@ -44,8 +44,8 @@ system. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_node_disable.md b/docs/website/references/cli/defradb_client_acp_node_disable.md index d55dc96993..436db8e2a2 100644 --- a/docs/website/references/cli/defradb_client_acp_node_disable.md +++ b/docs/website/references/cli/defradb_client_acp_node_disable.md @@ -46,8 +46,8 @@ Disable node access control: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_node_re-enable.md b/docs/website/references/cli/defradb_client_acp_node_re-enable.md index c32e072236..1d5c216afa 100644 --- a/docs/website/references/cli/defradb_client_acp_node_re-enable.md +++ b/docs/website/references/cli/defradb_client_acp_node_re-enable.md @@ -45,8 +45,8 @@ Re-enable node access control: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_node_relationship.md b/docs/website/references/cli/defradb_client_acp_node_relationship.md index 3be21bd917..edc6a75eb6 100644 --- a/docs/website/references/cli/defradb_client_acp_node_relationship.md +++ b/docs/website/references/cli/defradb_client_acp_node_relationship.md @@ -24,8 +24,8 @@ Interact with the node acp relationship features of DefraDB instance --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_node_relationship_add.md b/docs/website/references/cli/defradb_client_acp_node_relationship_add.md index b8b6a32da9..db549bd5f3 100644 --- a/docs/website/references/cli/defradb_client_acp_node_relationship_add.md +++ b/docs/website/references/cli/defradb_client_acp_node_relationship_add.md @@ -53,8 +53,8 @@ Make another actor an admin user: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_node_relationship_delete.md b/docs/website/references/cli/defradb_client_acp_node_relationship_delete.md index 260fe0a563..6ae2f3f572 100644 --- a/docs/website/references/cli/defradb_client_acp_node_relationship_delete.md +++ b/docs/website/references/cli/defradb_client_acp_node_relationship_delete.md @@ -52,8 +52,8 @@ Revoke node access from an admin user: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_acp_node_status.md b/docs/website/references/cli/defradb_client_acp_node_status.md index f9ce61b1ef..9364dfb064 100644 --- a/docs/website/references/cli/defradb_client_acp_node_status.md +++ b/docs/website/references/cli/defradb_client_acp_node_status.md @@ -46,8 +46,8 @@ Check Node ACP status: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_action.md b/docs/website/references/cli/defradb_client_action.md index 91974b00dc..1b260d0302 100644 --- a/docs/website/references/cli/defradb_client_action.md +++ b/docs/website/references/cli/defradb_client_action.md @@ -33,8 +33,8 @@ List information about actions: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_action_list.md b/docs/website/references/cli/defradb_client_action_list.md index 3aec62d3f3..79b0373d72 100644 --- a/docs/website/references/cli/defradb_client_action_list.md +++ b/docs/website/references/cli/defradb_client_action_list.md @@ -36,8 +36,8 @@ List information about actions: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_backup.md b/docs/website/references/cli/defradb_client_backup.md index 9a67d137de..65453719f1 100644 --- a/docs/website/references/cli/defradb_client_backup.md +++ b/docs/website/references/cli/defradb_client_backup.md @@ -25,8 +25,8 @@ Currently only supports JSON format. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_backup_export.md b/docs/website/references/cli/defradb_client_backup_export.md index 2471c097a3..260f370d0a 100644 --- a/docs/website/references/cli/defradb_client_backup_export.md +++ b/docs/website/references/cli/defradb_client_backup_export.md @@ -51,8 +51,8 @@ Export data for the 'Users' collection: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_backup_import.md b/docs/website/references/cli/defradb_client_backup_import.md index f14b81cd75..8221f2ab14 100644 --- a/docs/website/references/cli/defradb_client_backup_import.md +++ b/docs/website/references/cli/defradb_client_backup_import.md @@ -35,8 +35,8 @@ Import data to the database: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_block.md b/docs/website/references/cli/defradb_client_block.md index 53df4e4e88..1fd9ba0a22 100644 --- a/docs/website/references/cli/defradb_client_block.md +++ b/docs/website/references/cli/defradb_client_block.md @@ -24,8 +24,8 @@ Manage blocks of a running DefraDB instance. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_block_verify-signature.md b/docs/website/references/cli/defradb_client_block_verify-signature.md index c4a1b5d76f..2a226d7cc1 100644 --- a/docs/website/references/cli/defradb_client_block_verify-signature.md +++ b/docs/website/references/cli/defradb_client_block_verify-signature.md @@ -40,8 +40,8 @@ verify the signature of a block: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_collection.md b/docs/website/references/cli/defradb_client_collection.md index 2726feac88..e002a4e417 100644 --- a/docs/website/references/cli/defradb_client_collection.md +++ b/docs/website/references/cli/defradb_client_collection.md @@ -25,8 +25,8 @@ Add, describe, patch, set-active, delete, and truncate collections. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_collection_add.md b/docs/website/references/cli/defradb_client_collection_add.md index d2cde620d7..1f3fbb5e81 100644 --- a/docs/website/references/cli/defradb_client_collection_add.md +++ b/docs/website/references/cli/defradb_client_collection_add.md @@ -55,8 +55,8 @@ add from stdin: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_collection_delete.md b/docs/website/references/cli/defradb_client_collection_delete.md index 2de1c0a2eb..f0a487b1be 100644 --- a/docs/website/references/cli/defradb_client_collection_delete.md +++ b/docs/website/references/cli/defradb_client_collection_delete.md @@ -55,8 +55,8 @@ delete only the active head version, keeping earlier versions: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_collection_describe.md b/docs/website/references/cli/defradb_client_collection_describe.md index 7518541dac..bfd76d4c3f 100644 --- a/docs/website/references/cli/defradb_client_collection_describe.md +++ b/docs/website/references/cli/defradb_client_collection_describe.md @@ -48,8 +48,8 @@ view collection by version id: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_collection_patch.md b/docs/website/references/cli/defradb_client_collection_patch.md index 553687e61d..e7a3256d85 100644 --- a/docs/website/references/cli/defradb_client_collection_patch.md +++ b/docs/website/references/cli/defradb_client_collection_patch.md @@ -47,8 +47,8 @@ patch from stdin: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_collection_set-active.md b/docs/website/references/cli/defradb_client_collection_set-active.md index cc58511a83..ad3486cf24 100644 --- a/docs/website/references/cli/defradb_client_collection_set-active.md +++ b/docs/website/references/cli/defradb_client_collection_set-active.md @@ -29,8 +29,8 @@ defradb client collection set-active [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_collection_truncate.md b/docs/website/references/cli/defradb_client_collection_truncate.md index cfb2007b06..0a5ad38dee 100644 --- a/docs/website/references/cli/defradb_client_collection_truncate.md +++ b/docs/website/references/cli/defradb_client_collection_truncate.md @@ -35,8 +35,8 @@ defradb client collection truncate [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_document.md b/docs/website/references/cli/defradb_client_document.md index 1fe75bf01c..85fc8e127b 100644 --- a/docs/website/references/cli/defradb_client_document.md +++ b/docs/website/references/cli/defradb_client_document.md @@ -25,8 +25,8 @@ Add, read, update, and delete documents within a collection. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_document_add.md b/docs/website/references/cli/defradb_client_document_add.md index c83fee0305..28f9c02d68 100644 --- a/docs/website/references/cli/defradb_client_document_add.md +++ b/docs/website/references/cli/defradb_client_document_add.md @@ -72,8 +72,8 @@ Add from stdin: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_document_delete.md b/docs/website/references/cli/defradb_client_document_delete.md index 251a845a7e..eadf5b48bd 100644 --- a/docs/website/references/cli/defradb_client_document_delete.md +++ b/docs/website/references/cli/defradb_client_document_delete.md @@ -53,8 +53,8 @@ delete by filter: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_document_get.md b/docs/website/references/cli/defradb_client_document_get.md index 77cbf40ffa..89f70ba0c0 100644 --- a/docs/website/references/cli/defradb_client_document_get.md +++ b/docs/website/references/cli/defradb_client_document_get.md @@ -44,8 +44,8 @@ Get a private document using an identity: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_document_update.md b/docs/website/references/cli/defradb_client_document_update.md index 7ac916aee8..57a24ccb30 100644 --- a/docs/website/references/cli/defradb_client_document_update.md +++ b/docs/website/references/cli/defradb_client_document_update.md @@ -53,8 +53,8 @@ update private docID, with identity: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_dump.md b/docs/website/references/cli/defradb_client_dump.md index 171f04cdce..4f2c42b23e 100644 --- a/docs/website/references/cli/defradb_client_dump.md +++ b/docs/website/references/cli/defradb_client_dump.md @@ -24,8 +24,8 @@ defradb client dump [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_encrypted-index.md b/docs/website/references/cli/defradb_client_encrypted-index.md index a95edf8739..a2dba63b18 100644 --- a/docs/website/references/cli/defradb_client_encrypted-index.md +++ b/docs/website/references/cli/defradb_client_encrypted-index.md @@ -24,8 +24,8 @@ Manage collections' encrypted indexes on a running DefraDB node. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_encrypted-index_delete.md b/docs/website/references/cli/defradb_client_encrypted-index_delete.md index 7b211a331b..e74ed8d795 100644 --- a/docs/website/references/cli/defradb_client_encrypted-index_delete.md +++ b/docs/website/references/cli/defradb_client_encrypted-index_delete.md @@ -37,8 +37,8 @@ delete an encrypted index for 'Users' collection on 'name' field: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_encrypted-index_list.md b/docs/website/references/cli/defradb_client_encrypted-index_list.md index e8aa8a4207..a69e00f1d9 100644 --- a/docs/website/references/cli/defradb_client_encrypted-index_list.md +++ b/docs/website/references/cli/defradb_client_encrypted-index_list.md @@ -39,8 +39,8 @@ show all encrypted indexes for 'Users' collection: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_encrypted-index_new.md b/docs/website/references/cli/defradb_client_encrypted-index_new.md index 0e8b068f52..0ac58cfefb 100644 --- a/docs/website/references/cli/defradb_client_encrypted-index_new.md +++ b/docs/website/references/cli/defradb_client_encrypted-index_new.md @@ -42,8 +42,8 @@ make a new index for 'Users' collection on 'name' field: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_index.md b/docs/website/references/cli/defradb_client_index.md index 9130dd8f6b..f43d1d0573 100644 --- a/docs/website/references/cli/defradb_client_index.md +++ b/docs/website/references/cli/defradb_client_index.md @@ -24,8 +24,8 @@ Manage (new, delete, or list) collection indexes on a DefraDB node. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_index_delete.md b/docs/website/references/cli/defradb_client_index_delete.md index 07e576dfdd..44a4900e54 100644 --- a/docs/website/references/cli/defradb_client_index_delete.md +++ b/docs/website/references/cli/defradb_client_index_delete.md @@ -40,8 +40,8 @@ delete the index 'UsersByName' for 'Users' collection: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_index_list.md b/docs/website/references/cli/defradb_client_index_list.md index f8deecb847..facf43e70b 100644 --- a/docs/website/references/cli/defradb_client_index_list.md +++ b/docs/website/references/cli/defradb_client_index_list.md @@ -42,8 +42,8 @@ show all index for 'Users' collection: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_index_new.md b/docs/website/references/cli/defradb_client_index_new.md index 83ff39822e..2a6b0d0936 100644 --- a/docs/website/references/cli/defradb_client_index_new.md +++ b/docs/website/references/cli/defradb_client_index_new.md @@ -70,8 +70,8 @@ make a new vector index tuning the HNSW params: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_lens.md b/docs/website/references/cli/defradb_client_lens.md index 8c666654c1..b90fb18387 100644 --- a/docs/website/references/cli/defradb_client_lens.md +++ b/docs/website/references/cli/defradb_client_lens.md @@ -24,8 +24,8 @@ Make set or look for existing collection migrations on a DefraDB node. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_lens_add.md b/docs/website/references/cli/defradb_client_lens_add.md index d02f4525d0..11369f5621 100644 --- a/docs/website/references/cli/defradb_client_lens_add.md +++ b/docs/website/references/cli/defradb_client_lens_add.md @@ -45,8 +45,8 @@ add from stdin: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_lens_list.md b/docs/website/references/cli/defradb_client_lens_list.md index be27a2babd..4cd4426d81 100644 --- a/docs/website/references/cli/defradb_client_lens_list.md +++ b/docs/website/references/cli/defradb_client_lens_list.md @@ -37,8 +37,8 @@ list all lenses: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_lens_set.md b/docs/website/references/cli/defradb_client_lens_set.md index f5474293b4..bf04396612 100644 --- a/docs/website/references/cli/defradb_client_lens_set.md +++ b/docs/website/references/cli/defradb_client_lens_set.md @@ -45,8 +45,8 @@ set from stdin: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_node-identity.md b/docs/website/references/cli/defradb_client_node-identity.md index 18ec3a9ee7..2b19d47cff 100644 --- a/docs/website/references/cli/defradb_client_node-identity.md +++ b/docs/website/references/cli/defradb_client_node-identity.md @@ -35,8 +35,8 @@ defradb client node-identity [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_node-options.md b/docs/website/references/cli/defradb_client_node-options.md index 7d4dd501fd..fb7cd5dec1 100644 --- a/docs/website/references/cli/defradb_client_node-options.md +++ b/docs/website/references/cli/defradb_client_node-options.md @@ -28,8 +28,8 @@ defradb client node-options [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p.md b/docs/website/references/cli/defradb_client_p2p.md index 3a345ca562..59d51ff276 100644 --- a/docs/website/references/cli/defradb_client_p2p.md +++ b/docs/website/references/cli/defradb_client_p2p.md @@ -24,8 +24,8 @@ Interact with the DefraDB P2P system --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_active-peers.md b/docs/website/references/cli/defradb_client_p2p_active-peers.md index a1252683d9..92acd5a4f6 100644 --- a/docs/website/references/cli/defradb_client_p2p_active-peers.md +++ b/docs/website/references/cli/defradb_client_p2p_active-peers.md @@ -30,8 +30,8 @@ defradb client p2p active-peers [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_collection.md b/docs/website/references/cli/defradb_client_p2p_collection.md index d4fe32901a..88617e886a 100644 --- a/docs/website/references/cli/defradb_client_p2p_collection.md +++ b/docs/website/references/cli/defradb_client_p2p_collection.md @@ -25,8 +25,8 @@ The selected collections synchronize their events on the pubsub network. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_collection_add.md b/docs/website/references/cli/defradb_client_p2p_collection_add.md index 95b7ab255e..9e88f001a6 100644 --- a/docs/website/references/cli/defradb_client_p2p_collection_add.md +++ b/docs/website/references/cli/defradb_client_p2p_collection_add.md @@ -39,8 +39,8 @@ add multiple collections: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_collection_delete.md b/docs/website/references/cli/defradb_client_p2p_collection_delete.md index 40d5f925dc..733a485de8 100644 --- a/docs/website/references/cli/defradb_client_p2p_collection_delete.md +++ b/docs/website/references/cli/defradb_client_p2p_collection_delete.md @@ -39,8 +39,8 @@ delete multiple collections: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_collection_list.md b/docs/website/references/cli/defradb_client_p2p_collection_list.md index 40e490b3a6..355189ec5c 100644 --- a/docs/website/references/cli/defradb_client_p2p_collection_list.md +++ b/docs/website/references/cli/defradb_client_p2p_collection_list.md @@ -29,8 +29,8 @@ defradb client p2p collection list [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_collection_sync-branchable.md b/docs/website/references/cli/defradb_client_p2p_collection_sync-branchable.md index 544cc3d41b..8faa35b914 100644 --- a/docs/website/references/cli/defradb_client_p2p_collection_sync-branchable.md +++ b/docs/website/references/cli/defradb_client_p2p_collection_sync-branchable.md @@ -43,8 +43,8 @@ sync branchable collection with timeout: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_collection_sync-versions.md b/docs/website/references/cli/defradb_client_p2p_collection_sync-versions.md index 39808a2432..6b4be0714d 100644 --- a/docs/website/references/cli/defradb_client_p2p_collection_sync-versions.md +++ b/docs/website/references/cli/defradb_client_p2p_collection_sync-versions.md @@ -43,8 +43,8 @@ synchronize multiple collection versions: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_connect.md b/docs/website/references/cli/defradb_client_p2p_connect.md index f241316e71..5a5d64a745 100644 --- a/docs/website/references/cli/defradb_client_p2p_connect.md +++ b/docs/website/references/cli/defradb_client_p2p_connect.md @@ -38,8 +38,8 @@ Connect to multiple peers: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_disconnect.md b/docs/website/references/cli/defradb_client_p2p_disconnect.md index 4606baa996..266113db16 100644 --- a/docs/website/references/cli/defradb_client_p2p_disconnect.md +++ b/docs/website/references/cli/defradb_client_p2p_disconnect.md @@ -38,8 +38,8 @@ Disconnect from multiple peers: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_document.md b/docs/website/references/cli/defradb_client_p2p_document.md index 332d87f4ad..3363c1a91b 100644 --- a/docs/website/references/cli/defradb_client_p2p_document.md +++ b/docs/website/references/cli/defradb_client_p2p_document.md @@ -25,8 +25,8 @@ The selected documents synchronize their events on the pubsub network. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_document_add.md b/docs/website/references/cli/defradb_client_p2p_document_add.md index d7eb587598..5c76bd2b6f 100644 --- a/docs/website/references/cli/defradb_client_p2p_document_add.md +++ b/docs/website/references/cli/defradb_client_p2p_document_add.md @@ -39,8 +39,8 @@ add multiple documents: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_document_delete.md b/docs/website/references/cli/defradb_client_p2p_document_delete.md index 8c3fef6fb4..10e1b7b1f3 100644 --- a/docs/website/references/cli/defradb_client_p2p_document_delete.md +++ b/docs/website/references/cli/defradb_client_p2p_document_delete.md @@ -39,8 +39,8 @@ delete multiple documents: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_document_list.md b/docs/website/references/cli/defradb_client_p2p_document_list.md index 524fe25a4b..e3bc7bbf01 100644 --- a/docs/website/references/cli/defradb_client_p2p_document_list.md +++ b/docs/website/references/cli/defradb_client_p2p_document_list.md @@ -29,8 +29,8 @@ defradb client p2p document list [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_document_sync.md b/docs/website/references/cli/defradb_client_p2p_document_sync.md index 1b359a3553..d9cfbcdb3e 100644 --- a/docs/website/references/cli/defradb_client_p2p_document_sync.md +++ b/docs/website/references/cli/defradb_client_p2p_document_sync.md @@ -42,8 +42,8 @@ sync multiple documents: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_info.md b/docs/website/references/cli/defradb_client_p2p_info.md index e6c03f55a5..b7d4ef875f 100644 --- a/docs/website/references/cli/defradb_client_p2p_info.md +++ b/docs/website/references/cli/defradb_client_p2p_info.md @@ -28,8 +28,8 @@ defradb client p2p info [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_replicator.md b/docs/website/references/cli/defradb_client_p2p_replicator.md index 79605b61df..c0a98c8c31 100644 --- a/docs/website/references/cli/defradb_client_p2p_replicator.md +++ b/docs/website/references/cli/defradb_client_p2p_replicator.md @@ -25,8 +25,8 @@ A replicator replicates one or all collection(s) from one node to another. --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_replicator_add.md b/docs/website/references/cli/defradb_client_p2p_replicator_add.md index 2fc2f706de..2592fbebbb 100644 --- a/docs/website/references/cli/defradb_client_p2p_replicator_add.md +++ b/docs/website/references/cli/defradb_client_p2p_replicator_add.md @@ -40,8 +40,8 @@ Add a replicator to replicate the "Orders" collection to multiple peers: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_replicator_delete.md b/docs/website/references/cli/defradb_client_p2p_replicator_delete.md index fd90bb8c74..6af0de9842 100644 --- a/docs/website/references/cli/defradb_client_p2p_replicator_delete.md +++ b/docs/website/references/cli/defradb_client_p2p_replicator_delete.md @@ -37,8 +37,8 @@ Delete replicator: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_p2p_replicator_list.md b/docs/website/references/cli/defradb_client_p2p_replicator_list.md index c5cbb3acb9..dbe95c65c2 100644 --- a/docs/website/references/cli/defradb_client_p2p_replicator_list.md +++ b/docs/website/references/cli/defradb_client_p2p_replicator_list.md @@ -36,8 +36,8 @@ List all replicators: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_purge.md b/docs/website/references/cli/defradb_client_purge.md index aacda269e4..98dbbb4f4f 100644 --- a/docs/website/references/cli/defradb_client_purge.md +++ b/docs/website/references/cli/defradb_client_purge.md @@ -30,8 +30,8 @@ defradb client purge [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_query.md b/docs/website/references/cli/defradb_client_query.md index 6266cfb567..20206650bd 100644 --- a/docs/website/references/cli/defradb_client_query.md +++ b/docs/website/references/cli/defradb_client_query.md @@ -53,8 +53,8 @@ Read query from stdin: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_tx.md b/docs/website/references/cli/defradb_client_tx.md index 466531c287..6c70fb14a3 100644 --- a/docs/website/references/cli/defradb_client_tx.md +++ b/docs/website/references/cli/defradb_client_tx.md @@ -24,8 +24,8 @@ Create, commit, and discard DefraDB transactions --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_tx_commit.md b/docs/website/references/cli/defradb_client_tx_commit.md index 527ba29f30..f21086f1b5 100644 --- a/docs/website/references/cli/defradb_client_tx_commit.md +++ b/docs/website/references/cli/defradb_client_tx_commit.md @@ -28,8 +28,8 @@ defradb client tx commit [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_tx_discard.md b/docs/website/references/cli/defradb_client_tx_discard.md index 5bfbc4895e..a084aa3ecf 100644 --- a/docs/website/references/cli/defradb_client_tx_discard.md +++ b/docs/website/references/cli/defradb_client_tx_discard.md @@ -28,8 +28,8 @@ defradb client tx discard [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_tx_new.md b/docs/website/references/cli/defradb_client_tx_new.md index 6aa85381f7..ba88aa619c 100644 --- a/docs/website/references/cli/defradb_client_tx_new.md +++ b/docs/website/references/cli/defradb_client_tx_new.md @@ -30,8 +30,8 @@ defradb client tx new [flags] --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_view.md b/docs/website/references/cli/defradb_client_view.md index 9103346d2b..a53dc0d11b 100644 --- a/docs/website/references/cli/defradb_client_view.md +++ b/docs/website/references/cli/defradb_client_view.md @@ -24,8 +24,8 @@ Manage (add) views withing a running DefraDB instance --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_view_add.md b/docs/website/references/cli/defradb_client_view_add.md index 31a9f83da0..ce5845084c 100644 --- a/docs/website/references/cli/defradb_client_view_add.md +++ b/docs/website/references/cli/defradb_client_view_add.md @@ -50,8 +50,8 @@ add from file flags using an existing lens CID: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_client_view_refresh.md b/docs/website/references/cli/defradb_client_view_refresh.md index e6c6ec3943..17727a5745 100644 --- a/docs/website/references/cli/defradb_client_view_refresh.md +++ b/docs/website/references/cli/defradb_client_view_refresh.md @@ -53,8 +53,8 @@ refresh views by version id: --log-source Include source location in logs --log-stacktrace Include stacktrace in error and fatal logs --no-log-color Disable colored log output + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --rootdir string Directory for persistent data (default: $HOME/.defradb) - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --tx uint Transaction ID --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") ``` diff --git a/docs/website/references/cli/defradb_start.md b/docs/website/references/cli/defradb_start.md index 8dbbd182bb..cb3ed8fb8b 100644 --- a/docs/website/references/cli/defradb_start.md +++ b/docs/website/references/cli/defradb_start.md @@ -19,7 +19,7 @@ defradb start [flags] --development Enables a set of features that make development easier but should not be enabled in production: - allows purging of all persisted data - generates temporary node identity if one doesn't exist in the keyring - --document-acp-type string Specify the document acp engine to use (supported: local (default), source-hub) (default "local") + --document-acp-type string Document Access Control (DAC) backend to use: local (default) or remote (default "local") -h, --help help for start -i, --identity string Hex formatted private key used to authenticate with ACP --keyring-backend string Keyring backend to use. Options are file or system (default "file") @@ -39,9 +39,9 @@ defradb start [flags] --pubkeypath string Path to the public key for tls --pubsub Enable the pubsub system (default true) --relay Enable the p2p relay + --remote-dac-address string Vera address authorized to make Remote DAC transactions on behalf of the actor --replicator-retry-intervals ints Retry intervals for the replicator. Format is a comma-separated list of whole number seconds. Example: 10,20,40,80,160,320 (default [30,60,120,240,480,960,1920]) --secret-file string Path to the file containing secrets (default ".env") - --source-hub-address string The SourceHub address authorized by the client to make SourceHub transactions on behalf of the actor --store string Specify the datastore to use (supported: badger, memory) (default "badger") --url string URL of HTTP endpoint to listen on or connect to (default "127.0.0.1:9181") --valuelogfilesize int Specify the datastore value log file size (in bytes). In memory size will be 2*valuelogfilesize (default 1073741824) diff --git a/docs/website/references/http/openapi.json b/docs/website/references/http/openapi.json index d1c417d4f0..93350a76ae 100644 --- a/docs/website/references/http/openapi.json +++ b/docs/website/references/http/openapi.json @@ -711,7 +711,7 @@ "securitySchemes": { "bearerToken": { "bearerFormat": "JWT", - "description": "A JWT signed client-side with an identity's private key (`alg` is `EdDSA` for an `ed25519` key or `ES256K` for a `secp256k1` key).\n\nRequired payload claims:\n- `sub`: the identity's public key, in hex format.\n- `aud`: hostname(s) of the DefraDB HTTP API the token is valid for (string or list of strings).\n- `exp`: token expiration UNIX timestamp.\n- `nbf`: not-before UNIX timestamp.\n- `key_type`: must match the identity's key type (`secp256k1` or `ed25519`).\n\nFor SourceHub policies, also include `iss` (the identity's `did:key`), `iat`, and `authorized_account` (the SourceHub address).\n\nGenerate an identity with `defradb identity new`. Authentication is optional unless Document Access Control or Node Access Control is enabled, in which case requests on restricted resources must be authenticated; an invalid token yields `403 Forbidden`.\n\nSee https://docs.source.network/defradb/security/authentication for details.", + "description": "A JWT signed client-side with an identity's private key (`alg` is `EdDSA` for an `ed25519` key or `ES256K` for a `secp256k1` key).\n\nRequired payload claims:\n- `sub`: the identity's public key, in hex format.\n- `aud`: hostname(s) of the DefraDB HTTP API the token is valid for (string or list of strings).\n- `exp`: token expiration UNIX timestamp.\n- `nbf`: not-before UNIX timestamp.\n- `key_type`: must match the identity's key type (`secp256k1` or `ed25519`).\n\nFor Remote DAC policies, also include `iss` (the identity's `did:key`), `iat`, and `authorized_account` (the Vera address).\n\nGenerate an identity with `defradb identity new`. Authentication is optional unless Document Access Control or Node Access Control is enabled, in which case requests on restricted resources must be authenticated; an invalid token yields `403 Forbidden`.\n\nSee https://docs.source.network/defradb/security/authentication for details.", "scheme": "bearer", "type": "http" } diff --git a/examples/collection/permissioned/book.graphql b/examples/collection/permissioned/book.graphql index 5e1ca571eb..d6fd6e335d 100644 --- a/examples/collection/permissioned/book.graphql +++ b/examples/collection/permissioned/book.graphql @@ -1,7 +1,7 @@ -# The below sdl contains an example `Book` object with an example source hub policy id and resource name. +# The SDL below contains an example `Book` object with a Remote DAC policy ID and resource name. # -# The policy id must exist in sourcehub (for remote document acp) or local document acp system first, -# and the resource name must exist on the corresponding policy to the policy id. +# The policy ID must first exist in Remote DAC or Local DAC, and the resource name must exist on +# the corresponding policy. # # The resource name does not need to be similar to the collection name. # @@ -15,4 +15,3 @@ type Book @policy(id:"7dc51aabc0248cf106265c902bf56faa1989ec41a6bbd36b6e438cfade name: String rating: Float } - diff --git a/examples/collection/permissioned/users.graphql b/examples/collection/permissioned/users.graphql index 0f9e03b488..f5f1a10470 100644 --- a/examples/collection/permissioned/users.graphql +++ b/examples/collection/permissioned/users.graphql @@ -1,7 +1,7 @@ -# The below sdl contains an example `Users` object with an example source hub policy id and resource name. +# The SDL below contains an example `Users` object with a Remote DAC policy ID and resource name. # -# The policy id must exist in sourcehub (for remote acp) or local acp first, and the resource name -# must exist on the corresponding policy to the policy id. +# The policy ID must first exist in Remote DAC or Local DAC, and the resource name must exist on +# the corresponding policy. # # The resource name does not need to be similar to the collection name. # diff --git a/http/openapi.go b/http/openapi.go index c5f130f3e4..8faaa23372 100644 --- a/http/openapi.go +++ b/http/openapi.go @@ -113,8 +113,8 @@ func NewOpenAPISpec() (*openapi3.T, error) { "- `exp`: token expiration UNIX timestamp.\n" + "- `nbf`: not-before UNIX timestamp.\n" + "- `key_type`: must match the identity's key type (`secp256k1` or `ed25519`).\n\n" + - "For SourceHub policies, also include `iss` (the identity's `did:key`), `iat`, and " + - "`authorized_account` (the SourceHub address).\n\n" + + "For Remote DAC policies, also include `iss` (the identity's `did:key`), `iat`, and " + + "`authorized_account` (the Vera address).\n\n" + "Generate an identity with `defradb identity new`. Authentication is optional unless " + "Document Access Control or Node Access Control is enabled, in which case requests on " + "restricted resources must be authenticated; an invalid token yields `403 Forbidden`.\n\n" + diff --git a/internal/db/collection_acp.go b/internal/db/collection_acp.go index ceabf97450..2ff56d57a3 100644 --- a/internal/db/collection_acp.go +++ b/internal/db/collection_acp.go @@ -55,7 +55,7 @@ func (c *collection) registerDoc( // collection has a policy, and the request carries an identity (see [acpDB.RegisterObject]). // // Unlike a document (created on a single node), the same collection is added on every node, so on a -// shared acp instance (e.g. SourceHub) a second node re-registers the same collection object. The +// shared ACP instance (e.g. Remote DAC) a second node re-registers the same collection object. The // underlying registration is idempotent for a same-owner re-register (and still errors on a // different owner), so no special handling is needed here (see [dac.bridgeDocumentACP.RegisterDocObject]). func (c *collection) registerCollection( diff --git a/internal/db/db_dac.go b/internal/db/db_dac.go index 564df19ae2..1a9dcd2856 100644 --- a/internal/db/db_dac.go +++ b/internal/db/db_dac.go @@ -41,8 +41,8 @@ func (db *DB) PurgeDACState(ctx context.Context) error { documentACP := db.documentACP.Value() err := documentACP.ResetState(ctx) if err != nil { - // for now we will just log this error, since SourceHub ACP doesn't yet - // implement the ResetState. + // For now we only log this error because Remote DAC does not yet + // implement ResetState. log.ErrorE("Failed to reset document ACP state", err) } } diff --git a/node/acp_dac.go b/node/acp_dac.go index 345dd8db5b..3f4d894dfe 100644 --- a/node/acp_dac.go +++ b/node/acp_dac.go @@ -22,8 +22,8 @@ import ( // NewDocumentACP returns a new document ACP module for the given options. // // Document ACP is always enabled and can not be disabled; an unspecified type -// defaults to the local implementation. The source-hub implementation is chosen at -// build time (see acp_dac_source_hub.go and acp_dac_source_hub_js.go). +// defaults to Local DAC. The Remote DAC implementation is chosen at +// build time (see acp_dac_remote.go and acp_dac_remote_js.go). func NewDocumentACP( ctx context.Context, opts *options.NodeDocumentACPOptions, @@ -31,8 +31,8 @@ func NewDocumentACP( switch opts.DocumentACPType { case "", options.NodeLocalDocumentACPType: return newLocalDocumentACP(ctx, opts) - case options.NodeSourceHubDocumentACPType: - return newSourceHubDocumentACP(ctx, opts) + case options.NodeRemoteDocumentACPType: + return newRemoteDocumentACP(ctx, opts) default: return immutable.None[dac.DocumentACP](), NewErrACPTypeNotSupported(opts.DocumentACPType) } diff --git a/node/acp_dac_source_hub.go b/node/acp_dac_remote.go similarity index 75% rename from node/acp_dac_source_hub.go rename to node/acp_dac_remote.go index 0109ba1ab3..f171548d9d 100644 --- a/node/acp_dac_source_hub.go +++ b/node/acp_dac_remote.go @@ -21,21 +21,21 @@ import ( "github.com/sourcenetwork/immutable" ) -func newSourceHubDocumentACP( +func newRemoteDocumentACP( ctx context.Context, opts *options.NodeDocumentACPOptions, ) (immutable.Option[dac.DocumentACP], error) { if !opts.Signer.HasValue() { - return dac.NoDocumentACP, ErrSignerMissingForSourceHubACP + return dac.NoDocumentACP, ErrSignerMissingForRemoteDAC } - acpSourceHub, err := dac.NewSourceHubACP( - opts.SourceHubChainID, - opts.SourceHubGRPCAddress, - opts.SourceHubCometRPCAddress, + remoteDAC, err := dac.NewRemoteDocumentACP( + opts.RemoteDACChainID, + opts.RemoteDACGRPCAddress, + opts.RemoteDACCometRPCAddress, opts.Signer.Value(), ) if err != nil { return dac.NoDocumentACP, err } - return immutable.Some(acpSourceHub), nil + return immutable.Some(remoteDAC), nil } diff --git a/node/acp_dac_source_hub_js.go b/node/acp_dac_remote_js.go similarity index 85% rename from node/acp_dac_source_hub_js.go rename to node/acp_dac_remote_js.go index 640820c13d..ff226ad5c1 100644 --- a/node/acp_dac_source_hub_js.go +++ b/node/acp_dac_remote_js.go @@ -21,10 +21,10 @@ import ( "github.com/sourcenetwork/immutable" ) -func newSourceHubDocumentACP( +func newRemoteDocumentACP( ctx context.Context, opts *options.NodeDocumentACPOptions, ) (immutable.Option[dac.DocumentACP], error) { - acpSourceHub := dac.NewSourceHubDocumentACP() - return immutable.Some(acpSourceHub), nil + remoteDAC := dac.NewRemoteDocumentACP() + return immutable.Some(remoteDAC), nil } diff --git a/node/errors.go b/node/errors.go index 168ab1ba38..6c46a8b21d 100644 --- a/node/errors.go +++ b/node/errors.go @@ -22,10 +22,10 @@ const ( ) var ( - ErrSignerMissingForSourceHubACP = errors.New("a txn signer must be provided for SourceHub ACP") - ErrStoreTypeNotSupported = errors.New(errStoreTypeNotSupported) - ErrP2PNotSupported = errors.New("p2p networking is not supported by this build") - ErrNodeACPTypeNotSupported = errors.New(errNodeACPTypeNotSupported) + ErrSignerMissingForRemoteDAC = errors.New("a transaction signer must be provided for Remote DAC") + ErrStoreTypeNotSupported = errors.New(errStoreTypeNotSupported) + ErrP2PNotSupported = errors.New("p2p networking is not supported by this build") + ErrNodeACPTypeNotSupported = errors.New(errNodeACPTypeNotSupported) ) func NewErrStoreTypeNotSupported(store options.NodeStoreType) error { diff --git a/tests/action/acp_dac_setup.go b/tests/action/acp_dac_setup.go index 242ea6e254..ddb114d660 100644 --- a/tests/action/acp_dac_setup.go +++ b/tests/action/acp_dac_setup.go @@ -43,20 +43,20 @@ import ( const ( // faucetMnemonic is the mnemonic for a static faucet account present in the - // STANDALONE version of the SourceHub image + // STANDALONE version of the Vera image. faucetMnemonic = "comic very pond victory suit tube ginger antique life then core warm loyal deliver iron fashion erupt husband weekend monster sunny artist empty uphold" //nolint:lll // faucetAddr is the account address matching the faucetMnemonic faucetAddr = "vera12d9hjf0639k995venpv675sju9ltsvf8v73hjv" - sourcehubTestChainID string = "vera-dev" + veraTestChainID string = "vera-dev" ) -func setupSourceHub(s *state.State, cfg NodeSetupConfig) (*options.NodeDocumentACPOptions, error) { +func setupRemoteDAC(s *state.State, cfg NodeSetupConfig) (*options.NodeDocumentACPOptions, error) { if !cfg.IsDocumentACPTest { - // Spinning up SourceHub instances is a bit slow, so we should be quite aggressive in trimming down the - // runtime of the test suite when SourceHub ACP is selected. - s.T.Skipf("test has no document ACP elements when testing with SourceHub ACP") + // Spinning up Vera instances is a bit slow, so we should be quite aggressive in trimming down the + // runtime of the test suite when Remote DAC is selected. + s.T.Skipf("test has no document ACP elements when testing with Remote DAC") } ctx := context.Background() @@ -64,13 +64,13 @@ func setupSourceHub(s *state.State, cfg NodeSetupConfig) (*options.NodeDocumentA name := uuid.New() container, err := testcontainers.Run(ctx, - cfg.SourceHubImage, + cfg.VeraImage, testcontainers.WithName(name.String()), testcontainers.WithExposedPorts("26657/tcp"), testcontainers.WithExposedPorts("9090/tcp"), testcontainers.WithLogger(testLogger), testcontainers.WithEnv(map[string]string{ - // STANDALONE configures the SH container to create an isolated chain, + // STANDALONE configures the Vera container to create an isolated chain, // instead of connecting to an existing one. "STANDALONE": "1", }), @@ -103,11 +103,11 @@ func setupSourceHub(s *state.State, cfg NodeSetupConfig) (*options.NodeDocumentA if err != nil { return nil, err } - s.T.Logf("sourcehub endpoints: grpc=%v, rpc=%v", grpcEndpoint, rpcEndpoint) + s.T.Logf("Vera endpoints: grpc=%v, rpc=%v", grpcEndpoint, rpcEndpoint) - s.SourcehubAddress = faucetAddr + s.RemoteDACAddress = faucetAddr - err = waitForSourceHub(s.T, grpcEndpoint, rpcEndpoint, faucetAddr) + err = waitForVera(s.T, grpcEndpoint, rpcEndpoint, faucetAddr) if err != nil { return nil, err } @@ -132,15 +132,15 @@ func setupSourceHub(s *state.State, cfg NodeSetupConfig) (*options.NodeDocumentA } return &options.NodeDocumentACPOptions{ - DocumentACPType: options.NodeSourceHubDocumentACPType, + DocumentACPType: options.NodeRemoteDocumentACPType, Signer: immutable.Some[options.NodeTxSigner](signer), - SourceHubChainID: sourcehubTestChainID, - SourceHubGRPCAddress: grpcEndpoint, - SourceHubCometRPCAddress: rpcEndpoint, + RemoteDACChainID: veraTestChainID, + RemoteDACGRPCAddress: grpcEndpoint, + RemoteDACCometRPCAddress: rpcEndpoint, }, nil } -func waitForSourceHub(t testing.TB, grpcEndpoint, cometRpcEndpoint string, accAddr string) error { +func waitForVera(t testing.TB, grpcEndpoint, cometRpcEndpoint string, accAddr string) error { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() @@ -152,23 +152,23 @@ func waitForSourceHub(t testing.TB, grpcEndpoint, cometRpcEndpoint string, accAd i++ select { case <-ctx.Done(): - t.Logf("time out waiting for sourcehub to start") - return fmt.Errorf("error setting up SourceHub: connection not ready after deadline") + t.Logf("timed out waiting for Vera to start") + return fmt.Errorf("error setting up Vera: connection not ready after deadline") case <-timer: - ok := probeSourceHub(ctx, grpcEndpoint, cometRpcEndpoint, accAddr) + ok := probeVera(ctx, grpcEndpoint, cometRpcEndpoint, accAddr) if ok { elapsed := time.Since(startTs) - t.Logf("sourcehub ready to receive connections: after %v", elapsed) + t.Logf("Vera ready to receive connections after %v", elapsed) return nil } } } } -// probeSourceHub is a readiness probe which tries to connect to SourceHub's +// probeVera is a readiness probe which tries to connect to Vera's // RPC endpoint to determine if it is ready to receive connections. // Returns true if the probe succeeded. -func probeSourceHub(ctx context.Context, grpcAddr, cometRpcAddr, knownAddr string) bool { +func probeVera(ctx context.Context, grpcAddr, cometRpcAddr, knownAddr string) bool { client, err := sdk.NewClient( sdk.WithGRPCAddr(grpcAddr), sdk.WithCometRPCAddr(cometRpcAddr), @@ -193,8 +193,8 @@ func probeSourceHub(ctx context.Context, grpcAddr, cometRpcAddr, knownAddr strin } // getAccountDataFromMnemonic returns the private key bytes -// from a given sourcehub mnemonic. -// assumes the mnemonic is for a secp256k1 key +// from a given Vera mnemonic. +// It assumes the mnemonic is for a secp256k1 key. func getAccountDataFromMnemonic(t testing.TB, mnemonic string) []byte { registry := cdctypes.NewInterfaceRegistry() cryptocdc.RegisterInterfaces(registry) diff --git a/tests/action/acp_dac_setup_js.go b/tests/action/acp_dac_setup_js.go index b09693f252..970ab8582d 100644 --- a/tests/action/acp_dac_setup_js.go +++ b/tests/action/acp_dac_setup_js.go @@ -16,7 +16,7 @@ import ( "github.com/sourcenetwork/defradb/tests/state" ) -// cfg is unused: the js build has no SourceHub container to gate on. -func setupSourceHub(s *state.State, cfg NodeSetupConfig) (*options.NodeDocumentACPOptions, error) { +// cfg is unused: the js build has no Vera container to gate on. +func setupRemoteDAC(s *state.State, cfg NodeSetupConfig) (*options.NodeDocumentACPOptions, error) { return s.DocumentACPOptions, nil } diff --git a/tests/action/add_dac_collection_actor_relationship.go b/tests/action/add_dac_collection_actor_relationship.go index 83ed5c234b..99e233d9eb 100644 --- a/tests/action/add_dac_collection_actor_relationship.go +++ b/tests/action/add_dac_collection_actor_relationship.go @@ -31,7 +31,7 @@ type AddDACCollectionActorRelationship struct { // NodeID may hold the ID (index) of the node we want to add the collection actor relationship on. // // If a value is not provided the relationship will be added in all nodes, unless testing with - // sourcehub ACP, in which case the relationship will only be defined once. + // Remote DAC, in which case the relationship will only be defined once. NodeID immutable.Option[int] // The collection whose commit DAG we want to add a relationship for. @@ -96,9 +96,9 @@ func (a *AddDACCollectionActorRelationship) Execute() { require.Equal(a.s.T, a.ExpectedExistence, exists.ExistedAlready) } - // The relationship should only be added to a SourceHub chain once - there is no need to loop + // The relationship should only be added to a Vera chain once - there is no need to loop // through the nodes. - if a.s.DocumentACPType == state.SourceHubDocumentACPType { + if a.s.DocumentACPType == state.RemoteDocumentACPType { break } } diff --git a/tests/action/client_setup.go b/tests/action/client_setup.go index f341338867..babef0e341 100644 --- a/tests/action/client_setup.go +++ b/tests/action/client_setup.go @@ -34,7 +34,7 @@ func setupClient(s *state.State, nodeObj *node.Node) (clients.Client, error) { return http.NewWrapper(nodeObj) case state.CLIClientType: - return cli.NewWrapper(nodeObj, s.SourcehubAddress) + return cli.NewWrapper(nodeObj, s.RemoteDACAddress) case state.GoClientType: return newGoClientWrapper(nodeObj), nil diff --git a/tests/action/identity.go b/tests/action/identity.go index 53137ce1ad..ec8e35590f 100644 --- a/tests/action/identity.go +++ b/tests/action/identity.go @@ -60,11 +60,11 @@ func getIdentityForRequest(s *state.State, identity state.Identity, nodeIndex in // address the node no longer listens on: an external node binds a new port // every start, and the node rejects a token minted for the old one. if !ok || (audience.HasValue() && !state.TokenHasAudience(token, audience.Value())) { - if s.DocumentACPType == state.SourceHubDocumentACPType || audience.HasValue() { + if s.DocumentACPType == state.RemoteDocumentACPType || audience.HasValue() { err := fullIdent.UpdateToken( AuthTokenExpiration, audience, - immutable.Some(s.SourcehubAddress), + immutable.Some(s.RemoteDACAddress), ) require.NoError(s.T, err) identHolder.NodeTokens[nodeIndex] = fullIdent.BearerToken() diff --git a/tests/action/node_options.go b/tests/action/node_options.go index 93a0e6fb6f..29e49d30ed 100644 --- a/tests/action/node_options.go +++ b/tests/action/node_options.go @@ -44,10 +44,10 @@ type NodeSetupConfig struct { // HTTP overrides the node's HTTP server settings when set. HTTP immutable.Option[options.NodeHTTPOptions] // IsDocumentACPTest reports whether the test uses document ACP, which - // decides whether a SourceHub instance is needed at all. + // decides whether a Vera instance is needed at all. IsDocumentACPTest bool - // SourceHubImage is the container image used to run SourceHub. - SourceHubImage string + // VeraImage is the container image used to run Vera. + VeraImage string // DatabaseDir, when set, is the path a restarting node reopens its store // from. Empty means a fresh directory. DatabaseDir string diff --git a/tests/action/node_setup.go b/tests/action/node_setup.go index 4dff913964..7406d7d80f 100644 --- a/tests/action/node_setup.go +++ b/tests/action/node_setup.go @@ -106,9 +106,9 @@ func SetupNode( case state.LocalDocumentACPType: opts.DocumentACP().SetType(options.NodeLocalDocumentACPType) - case state.SourceHubDocumentACPType: + case state.RemoteDocumentACPType: if s.DocumentACPOptions == nil { - s.DocumentACPOptions, err = setupSourceHub(s, cfg) + s.DocumentACPOptions, err = setupRemoteDAC(s, cfg) require.NoError(s.T, err) } opts.DocumentACP().SetAll(*s.DocumentACPOptions) @@ -317,7 +317,7 @@ func externalNodeFlags(s *state.State, cfg NodeSetupConfig) (flags []string, uns } if s.DocumentACPType != "" && s.DocumentACPType != state.LocalDocumentACPType { - // source-hub needs an address and a signer the test holds in process. + // Remote DAC needs an address and a signer the test holds in process. unsupported = append(unsupported, "document ACP type "+string(s.DocumentACPType)) } diff --git a/tests/action/node_setup_js.go b/tests/action/node_setup_js.go index ae50a67eb9..0381e7eb19 100644 --- a/tests/action/node_setup_js.go +++ b/tests/action/node_setup_js.go @@ -54,14 +54,14 @@ func SetupNode( case state.LocalDocumentACPType: opts.DocumentACP().SetType(options.NodeLocalDocumentACPType) - case state.SourceHubDocumentACPType: + case state.RemoteDocumentACPType: if s.DocumentACPOptions == nil { var err error - s.DocumentACPOptions, err = setupSourceHub(s, cfg) + s.DocumentACPOptions, err = setupRemoteDAC(s, cfg) require.NoError(s.T, err) } opts.DocumentACP(). - SetType(options.NodeSourceHubDocumentACPType). + SetType(options.NodeRemoteDocumentACPType). SetAll(*s.DocumentACPOptions) default: diff --git a/tests/action/subscription_request.go b/tests/action/subscription_request.go index 26f71e08ec..ec0c98ce57 100644 --- a/tests/action/subscription_request.go +++ b/tests/action/subscription_request.go @@ -27,7 +27,7 @@ import ( // // Each delivered event triggers a fresh plan run inside handleSubscription so // the per-subscriber view can be re-evaluated. On ACP-gated collections that -// plan does a DAC check, and under the source-hub backend the check takes time. +// plan does a DAC check, and with Remote DAC that check takes time. const subscriptionTimeout = 5 * time.Second // postActionsGrace is how long we keep listening after all expected events diff --git a/tests/bench/acp/acp_local_test.go b/tests/bench/acp/acp_local_test.go index a02a109308..62d390b2c6 100644 --- a/tests/bench/acp/acp_local_test.go +++ b/tests/bench/acp/acp_local_test.go @@ -80,7 +80,7 @@ func newLocalDocumentACPSetup(b *testing.B, inMem bool) dac.DocumentACP { return localACP } -// resetLocalDocumentACPKeepPolicy resets the local document acp instance then adds our desired policy back. +// resetLocalDocumentACPKeepPolicy resets the Local DAC instance then adds our desired policy back. func resetLocalDocumentACPKeepPolicy(b *testing.B, ctx context.Context, localACP dac.DocumentACP) { resetErr := localACP.ResetState(ctx) require.Nil(b, resetErr) diff --git a/tests/clients/cli/wrapper.go b/tests/clients/cli/wrapper.go index 1cbfde69b0..26decc3555 100644 --- a/tests/clients/cli/wrapper.go +++ b/tests/clients/cli/wrapper.go @@ -49,10 +49,10 @@ type Wrapper struct { serverCancel context.CancelFunc } -// NewWrapper takes a Node, and a SourceHub address used to pay for SourceHub transactions. +// NewWrapper takes a Node and a Remote DAC address used to pay for Vera transactions. // -// sourceHubAddress can (and will) be empty when testing non sourceHub ACP implementations. -func NewWrapper(node *node.Node, sourceHubAddress string) (*Wrapper, error) { +// remoteDACAddress can be empty when testing configurations other than Remote DAC. +func NewWrapper(node *node.Node, remoteDACAddress string) (*Wrapper, error) { handler, err := http.NewHandler(node.DB, node.Options()) if err != nil { return nil, err @@ -61,7 +61,7 @@ func NewWrapper(node *node.Node, sourceHubAddress string) (*Wrapper, error) { ctx, cancel := context.WithCancel(context.Background()) handlerWithCtx := http.InjectServerContext(ctx)(handler) httpServer := httptest.NewServer(handlerWithCtx) - cmd := newCliWrapper(httpServer.URL, sourceHubAddress) + cmd := newCliWrapper(httpServer.URL, remoteDACAddress) return &Wrapper{ node: node, diff --git a/tests/clients/cli/wrapper_cli.go b/tests/clients/cli/wrapper_cli.go index 15e551e3cb..0ce51fcc27 100644 --- a/tests/clients/cli/wrapper_cli.go +++ b/tests/clients/cli/wrapper_cli.go @@ -23,13 +23,13 @@ import ( type cliWrapper struct { address string - sourceHubAddress string + remoteDACAddress string } -func newCliWrapper(address string, sourceHubAddress string) *cliWrapper { +func newCliWrapper(address string, remoteDACAddress string) *cliWrapper { return &cliWrapper{ address: strings.TrimPrefix(address, "http://"), - sourceHubAddress: sourceHubAddress, + remoteDACAddress: remoteDACAddress, } } @@ -60,8 +60,8 @@ func (w *cliWrapper) executeStream(ctx context.Context, args []string) (io.ReadC if ok { args = append(args, "--tx", fmt.Sprintf("%d", tx.ID())) } - if len(w.sourceHubAddress) > 0 { - args = append(args, "--source-hub-address", w.sourceHubAddress) + if len(w.remoteDACAddress) > 0 { + args = append(args, "--remote-dac-address", w.remoteDACAddress) } args = append(args, "--url", w.address) diff --git a/tests/integration/acp/dac/add_policy/README.md b/tests/integration/acp/dac/add_policy/README.md index eb426bf5eb..b2bc1eea3c 100644 --- a/tests/integration/acp/dac/add_policy/README.md +++ b/tests/integration/acp/dac/add_policy/README.md @@ -3,9 +3,9 @@ ### These are NOT DefraDB Resource Interface (DRI) Tests There are certain requirements for a DRI. A resource must be a valid DRI to link to a collection. However it's important to note that DefraDB does allow adding policies that might not have DRI -compliant resources. But as long as sourcehub (acp system) deems them to be valid they are allowed +compliant resources. But as long as the Remote DAC backend deems them to be valid they are allowed to be added. There are various reasons for this, mostly because DefraDB is a tool that can be used -to upload policies to sourcehub that might not be only for use with collections. Nonetheless +to upload policies to Remote DAC that might not be only for use with collections. Nonetheless we still need a way to validate that the resource specified on the collection that is being added is DRI compliant resource on a already registered policy. Therefore, when a collection is being added, and it has the policyID and resource defined using the `@policy` directive, then during the 'adding of the collection' @@ -14,7 +14,7 @@ collection, if it is, then the collection is rejected. ### Non-DRI Compliant Policies Documented In Tests These test files document some cases where DefraDB would upload policies that aren't DRI compliant, -but are sourcehub compatible, might be worthwhile to look at the documented tests and notes there: +but are Vera-compatible, it might be worthwhile to look at the documented tests and notes there: - `./with_no_perms_test.go` - `./with_no_resources_test.go` - `./with_permissionless_owner_test.go` diff --git a/tests/integration/acp/dac/add_policy/with_no_resources_test.go b/tests/integration/acp/dac/add_policy/with_no_resources_test.go index 7fd3e8b908..e644c28dc4 100644 --- a/tests/integration/acp/dac/add_policy/with_no_resources_test.go +++ b/tests/integration/acp/dac/add_policy/with_no_resources_test.go @@ -21,7 +21,7 @@ import ( ) // Eventhough empty resources make no sense from a DefraDB (DRI) perspective, -// it is still a valid sourcehub policy for now. +// it is still a valid Remote DAC policy for now. func TestACP_AddPolicy_NoResource_ValidID(t *testing.T) { test := testUtils.TestCase{ @@ -42,7 +42,7 @@ func TestACP_AddPolicy_NoResource_ValidID(t *testing.T) { } // Eventhough empty resources make no sense from a DefraDB (DRI) perspective, -// it is still a valid sourcehub policy for now. +// it is still a valid Remote DAC policy for now. func TestACP_AddPolicy_NoResourceLabel_ValidID(t *testing.T) { test := testUtils.TestCase{ @@ -65,8 +65,8 @@ func TestACP_AddPolicy_NoResourceLabel_ValidID(t *testing.T) { func TestACP_AddPolicy_PolicyWithOnlySpace_NameIsRequired(t *testing.T) { test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some([]state.DocumentACPType{ - // This is currently a local-acp only limitation, this test-restriction - // can be lifted if/when SourceHub introduces the same limitation. + // This is currently a Local DAC-only limitation; this test restriction + // can be lifted if/when Vera introduces the same limitation. state.LocalDocumentACPType, }), Actions: []any{ diff --git a/tests/integration/acp/dac/branchable/peer_test.go b/tests/integration/acp/dac/branchable/peer_test.go index 3731608c0d..10d8744128 100644 --- a/tests/integration/acp/dac/branchable/peer_test.go +++ b/tests/integration/acp/dac/branchable/peer_test.go @@ -132,7 +132,7 @@ func TestACP_P2PBranchableCollectionSyncedWithNodeCollectionAccess_LocalACP(t *t }, // Grant node 1's node identity read access to the collection object so the sync layer will - // let its related blocks through. Granted on all nodes (local ACP). + // let its related blocks through. Granted on all nodes (Local DAC). &action.AddDACCollectionActorRelationship{ CollectionID: 0, Relation: "reader", @@ -201,7 +201,7 @@ func TestACP_P2PBranchableCollectionSyncedWithNodeCollectionAccess_LocalACP(t *t // With the collection synced to the peer node (via node-identity access), the owner can then share // read access to the collection commit DAG with a stranger. The relationship is added on every node -// (local ACP), so the peer node enforces the grant locally and the stranger can read the synced DAG. +// (Local DAC), so the peer node enforces the grant locally and the stranger can read the synced DAG. func TestACP_P2PBranchableCollectionSharedReaderCanReadOnPeer_LocalACP(t *testing.T) { afterCid := testUtils.NewUniqueValue() diff --git a/tests/integration/acp/dac/p2p/add_test.go b/tests/integration/acp/dac/p2p/add_test.go index af78f1b316..642c51dd3f 100644 --- a/tests/integration/acp/dac/p2p/add_test.go +++ b/tests/integration/acp/dac/p2p/add_test.go @@ -21,12 +21,12 @@ import ( "github.com/sourcenetwork/defradb/tests/state" ) -func TestACP_P2PAddPrivateDocumentsOnDifferentNodes_SourceHubACP(t *testing.T) { +func TestACP_P2PAddPrivateDocumentsOnDifferentNodes_RemoteDAC(t *testing.T) { test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), @@ -115,11 +115,11 @@ resources: testUtils.ExecuteTestCase(t, test) } -func TestACP_P2PAddPrivateDocumentAndSyncAfterAddingRelationship_SourceHubACP(t *testing.T) { +func TestACP_P2PAddPrivateDocumentAndSyncAfterAddingRelationship_RemoteDAC(t *testing.T) { test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), Actions: []any{ diff --git a/tests/integration/acp/dac/p2p/delete_test.go b/tests/integration/acp/dac/p2p/delete_test.go index a069926d4d..82ada1ad42 100644 --- a/tests/integration/acp/dac/p2p/delete_test.go +++ b/tests/integration/acp/dac/p2p/delete_test.go @@ -21,12 +21,12 @@ import ( "github.com/sourcenetwork/defradb/tests/state" ) -func TestACP_P2PDeletePrivateDocumentsOnDifferentNodes_SourceHubACP(t *testing.T) { +func TestACP_P2PDeletePrivateDocumentsOnDifferentNodes_RemoteDAC(t *testing.T) { test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), diff --git a/tests/integration/acp/dac/p2p/replicator_test.go b/tests/integration/acp/dac/p2p/replicator_test.go index 75a346b1bb..fcb67b9523 100644 --- a/tests/integration/acp/dac/p2p/replicator_test.go +++ b/tests/integration/acp/dac/p2p/replicator_test.go @@ -75,11 +75,11 @@ resources: testUtils.ExecuteTestCase(t, test) } -func TestACP_P2POneToOneReplicatorWithPermissionedCollection_SourceHubACP(t *testing.T) { +func TestACP_P2POneToOneReplicatorWithPermissionedCollection_RemoteDAC(t *testing.T) { test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), Actions: []any{ diff --git a/tests/integration/acp/dac/p2p/replicator_with_doc_actor_relationship_test.go b/tests/integration/acp/dac/p2p/replicator_with_doc_actor_relationship_test.go index 20b78dd889..c4e2cbc990 100644 --- a/tests/integration/acp/dac/p2p/replicator_with_doc_actor_relationship_test.go +++ b/tests/integration/acp/dac/p2p/replicator_with_doc_actor_relationship_test.go @@ -21,12 +21,12 @@ import ( "github.com/sourcenetwork/defradb/tests/state" ) -func TestACP_P2PReplicatorWithPermissionedCollectionAddDocActorRelationship_SourceHubACP(t *testing.T) { +func TestACP_P2PReplicatorWithPermissionedCollectionAddDocActorRelationship_RemoteDAC(t *testing.T) { test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), diff --git a/tests/integration/acp/dac/p2p/subscribe_grant_race_test.go b/tests/integration/acp/dac/p2p/subscribe_grant_race_test.go index 252167e5cb..d4bcc85b5e 100644 --- a/tests/integration/acp/dac/p2p/subscribe_grant_race_test.go +++ b/tests/integration/acp/dac/p2p/subscribe_grant_race_test.go @@ -30,11 +30,11 @@ import ( // // The test asserts the user-visible outcome the race breaks: once the grants land, the // non-creator can read the fully-synced document on the receiving node. -func TestACP_P2PSubscribe_MultiBlockDoc_NonCreatorReadsAfterGrantsLand_SourceHubACP(t *testing.T) { +func TestACP_P2PSubscribe_MultiBlockDoc_NonCreatorReadsAfterGrantsLand_RemoteDAC(t *testing.T) { test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), diff --git a/tests/integration/acp/dac/p2p/subscribe_test.go b/tests/integration/acp/dac/p2p/subscribe_test.go index e1f5bc59cc..3a39411ada 100644 --- a/tests/integration/acp/dac/p2p/subscribe_test.go +++ b/tests/integration/acp/dac/p2p/subscribe_test.go @@ -91,11 +91,11 @@ resources: testUtils.ExecuteTestCase(t, test) } -func TestACP_P2PSubscribeAddGetSingleWithPermissionedCollection_SourceHubACP(t *testing.T) { +func TestACP_P2PSubscribeAddGetSingleWithPermissionedCollection_RemoteDAC(t *testing.T) { test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), Actions: []any{ diff --git a/tests/integration/acp/dac/p2p/subscribe_with_doc_actor_relationship_test.go b/tests/integration/acp/dac/p2p/subscribe_with_doc_actor_relationship_test.go index 0944fcd649..a1b0c1054e 100644 --- a/tests/integration/acp/dac/p2p/subscribe_with_doc_actor_relationship_test.go +++ b/tests/integration/acp/dac/p2p/subscribe_with_doc_actor_relationship_test.go @@ -21,12 +21,12 @@ import ( "github.com/sourcenetwork/defradb/tests/state" ) -func TestACP_P2PSubscribeAddGetSingleWithPermissionedCollectionAddDocActorRelationship_SourceHubACP(t *testing.T) { +func TestACP_P2PSubscribeAddGetSingleWithPermissionedCollectionAddDocActorRelationship_RemoteDAC(t *testing.T) { test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), diff --git a/tests/integration/acp/dac/p2p/sync_shared_field_test.go b/tests/integration/acp/dac/p2p/sync_shared_field_test.go index 5afaf9bd8f..9b05b4333f 100644 --- a/tests/integration/acp/dac/p2p/sync_shared_field_test.go +++ b/tests/integration/acp/dac/p2p/sync_shared_field_test.go @@ -73,7 +73,7 @@ func sharedFieldSyncTestCase(grantedAge, otherAge int) testUtils.TestCase { SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ state.LocalDocumentACPType, - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), // Signing/encryption change block cids per document, which would break the diff --git a/tests/integration/acp/dac/p2p/update_by_non_creator_on_peer_test.go b/tests/integration/acp/dac/p2p/update_by_non_creator_on_peer_test.go index 5c9c885227..e6403711e0 100644 --- a/tests/integration/acp/dac/p2p/update_by_non_creator_on_peer_test.go +++ b/tests/integration/acp/dac/p2p/update_by_non_creator_on_peer_test.go @@ -68,7 +68,7 @@ func TestACP_P2P_NonCreatorUpdatesIndexedFieldOnPeerNode_Succeeds(t *testing.T) test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), Actions: []any{ @@ -176,7 +176,7 @@ func TestACP_P2P_NonCreatorUpdatesNonIndexedFieldOnPeerNode_Succeeds(t *testing. test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), Actions: []any{ diff --git a/tests/integration/acp/dac/p2p/update_test.go b/tests/integration/acp/dac/p2p/update_test.go index 3e0d0759ff..8e69407bf4 100644 --- a/tests/integration/acp/dac/p2p/update_test.go +++ b/tests/integration/acp/dac/p2p/update_test.go @@ -21,12 +21,12 @@ import ( "github.com/sourcenetwork/defradb/tests/state" ) -func TestACP_P2PUpdatePrivateDocumentsOnDifferentNodes_SourceHubACP(t *testing.T) { +func TestACP_P2PUpdatePrivateDocumentsOnDifferentNodes_RemoteDAC(t *testing.T) { test := testUtils.TestCase{ SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), diff --git a/tests/integration/acp_dac.go b/tests/integration/acp_dac.go index b6f1855c2e..8f679dfe56 100644 --- a/tests/integration/acp_dac.go +++ b/tests/integration/acp_dac.go @@ -39,7 +39,7 @@ type AddDACPolicy struct { // NodeID may hold the ID (index) of the node we want to add policy to. // // If a value is not provided the policy will be added in all nodes, unless testing with - // sourcehub ACP, in which case the policy will only be defined once. + // Remote DAC, in which case the policy will only be defined once. NodeID immutable.Option[int] // The raw policy string. @@ -103,11 +103,11 @@ func addDACPolicy( s.PolicyIDs[nodeID] = append(s.PolicyIDs[nodeID], policyResult.PolicyID) } - // The policy should only be added to a SourceHub chain once - there is no need to loop through + // The policy should only be added to a Vera chain once - there is no need to loop through // the nodes. - if s.DocumentACPType == state.SourceHubDocumentACPType { + if s.DocumentACPType == state.RemoteDocumentACPType { // Note: If we break here the state will only preserve the policyIDs result on the - // first node if acp type is sourcehub, make sure to replicate the policyIDs state + // first node if Remote DAC is selected, replicate the policy ID state // on all the nodes, so we don't have to handle all the edge cases later in actions. for otherIndexes := index + 1; otherIndexes < len(nodes); otherIndexes++ { s.PolicyIDs[nodeIDs[otherIndexes]] = s.PolicyIDs[nodeID] @@ -122,7 +122,7 @@ type AddDACActorRelationship struct { // NodeID may hold the ID (index) of the node we want to add doc actor relationship on. // // If a value is not provided the relationship will be added in all nodes, unless testing with - // sourcehub ACP, in which case the relationship will only be defined once. + // Remote DAC, in which case the relationship will only be defined once. NodeID immutable.Option[int] // The collection in which this document we want to add a relationship for exists. @@ -195,9 +195,9 @@ func addDACActorRelationship( require.Equal(s.T, action.ExpectedExistence, exists.ExistedAlready) } - // The relationship should only be added to a SourceHub chain once - there is no need to loop through + // The relationship should only be added to a Vera chain once - there is no need to loop through // the nodes. - if s.DocumentACPType == state.SourceHubDocumentACPType { + if s.DocumentACPType == state.RemoteDocumentACPType { actionNodeID = immutable.Some(0) break } @@ -217,7 +217,7 @@ type DeleteDACActorRelationship struct { // NodeID may hold the ID (index) of the node we want to delete doc actor relationship on. // // If a value is not provided the relationship will be deleted on all nodes, unless testing with - // sourcehub document ACP, in which case the relationship will only be deleted once. + // Remote DAC, in which case the relationship will only be deleted once. NodeID immutable.Option[int] // The collection in which the target document we want to delete relationship for exists. @@ -288,9 +288,9 @@ func deleteDACActorRelationship( require.Equal(s.T, action.ExpectedRecordFound, deleteActorRelationshipResult.RecordFound) } - // The relationship should only be added to a SourceHub chain once - there is no need to loop through + // The relationship should only be added to a Vera chain once - there is no need to loop through // the nodes. - if s.DocumentACPType == state.SourceHubDocumentACPType { + if s.DocumentACPType == state.RemoteDocumentACPType { break } } diff --git a/tests/integration/acp_dac_config.go b/tests/integration/acp_dac_config.go index c1acb1147b..dc139798a0 100644 --- a/tests/integration/acp_dac_config.go +++ b/tests/integration/acp_dac_config.go @@ -19,15 +19,15 @@ import ( const ( documentACPTypeEnvName = "DEFRA_DOCUMENT_ACP_TYPE" - sourcehubImageEnvName = "DEFRA_SOURCEHUB_IMAGE" + veraImageEnvName = "DEFRA_VERA_IMAGE" ) var ( // documentACPType is the document ACP implementation under test. documentACPType state.DocumentACPType - // sourcehubImage is the container image used to run SourceHub. - sourcehubImage string + // veraImage is the container image used to run Vera. + veraImage string ) func init() { @@ -35,8 +35,8 @@ func init() { if documentACPType == "" { documentACPType = state.LocalDocumentACPType } - sourcehubImage = os.Getenv(sourcehubImageEnvName) - if sourcehubImage == "" { - sourcehubImage = "ghcr.io/sourcenetwork/vera:dev" + veraImage = os.Getenv(veraImageEnvName) + if veraImage == "" { + veraImage = "ghcr.io/sourcenetwork/vera:dev" } } diff --git a/tests/integration/encryption/peer_acp_branchable_test.go b/tests/integration/encryption/peer_acp_branchable_test.go index b7686bdc0d..dea0399fd0 100644 --- a/tests/integration/encryption/peer_acp_branchable_test.go +++ b/tests/integration/encryption/peer_acp_branchable_test.go @@ -24,8 +24,8 @@ import ( func TestDocEncryptionACP_BranchableCollection_AuthorizedPeerCanFetch(t *testing.T) { test := testUtils.TestCase{ KMS: testUtils.KMS{Activated: true}, - // Like the other multi-node branchable tests, this is restricted to local document acp: the - // collection object is registered per node, whereas a shared SourceHub chain would reject the + // Like the other multi-node branchable tests, this is restricted to Local DAC: the + // collection object is registered per node, whereas a shared Vera chain would reject the // second node re-registering the same collection object. SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ @@ -99,12 +99,12 @@ func TestDocEncryptionACP_BranchableCollection_AuthorizedPeerCanFetch(t *testing testUtils.ExecuteTestCase(t, test) } -func TestDocEncryptionACP_BranchableCollectionWithSourceHub_AuthorizedPeerCanFetch(t *testing.T) { +func TestDocEncryptionACP_BranchableCollectionWithRemoteDAC_AuthorizedPeerCanFetch(t *testing.T) { test := testUtils.TestCase{ KMS: testUtils.KMS{Activated: true}, SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), Actions: []any{ diff --git a/tests/integration/encryption/peer_acp_test.go b/tests/integration/encryption/peer_acp_test.go index 5a0fae3676..81dbaa6eef 100644 --- a/tests/integration/encryption/peer_acp_test.go +++ b/tests/integration/encryption/peer_acp_test.go @@ -64,7 +64,7 @@ func TestDocEncryptionACP_IfUserAndNodeHaveAccess_ShouldFetch(t *testing.T) { KMS: testUtils.KMS{Activated: true}, SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), Actions: []any{ @@ -144,7 +144,7 @@ func TestDocEncryptionACP_IfUserHasAccessButNotNode_ShouldNotFetch(t *testing.T) KMS: testUtils.KMS{Activated: true}, SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), Actions: []any{ @@ -233,7 +233,7 @@ func TestDocEncryptionACP_IfNodeHasAccessToSomeDocs_ShouldFetchOnlyThem(t *testi KMS: testUtils.KMS{Activated: true}, SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), Actions: []any{ @@ -373,7 +373,7 @@ func TestDocEncryptionACP_IfClientNodeHasDocPermissionButServerNodeIsNotAvailabl KMS: testUtils.KMS{Activated: true}, SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ - state.SourceHubDocumentACPType, + state.RemoteDocumentACPType, }, ), Actions: []any{ diff --git a/tests/integration/identity.go b/tests/integration/identity.go index 4bd141a6c5..e09d889882 100644 --- a/tests/integration/identity.go +++ b/tests/integration/identity.go @@ -91,11 +91,11 @@ func getIdentityForRequest(s *state.State, identity state.Identity, nodeIndex in // address the node no longer listens on: an external node binds a new port // every start, and the node rejects a token minted for the old one. if !ok || (audience.HasValue() && !state.TokenHasAudience(token, audience.Value())) { - if s.DocumentACPType == state.SourceHubDocumentACPType || audience.HasValue() { + if s.DocumentACPType == state.RemoteDocumentACPType || audience.HasValue() { err := fullIdent.UpdateToken( action.AuthTokenExpiration, audience, - immutable.Some(s.SourcehubAddress), + immutable.Some(s.RemoteDACAddress), ) require.NoError(s.T, err) identHolder.NodeTokens[nodeIndex] = fullIdent.BearerToken() diff --git a/tests/integration/test_case.go b/tests/integration/test_case.go index 63b3a54382..db4dd21f3c 100644 --- a/tests/integration/test_case.go +++ b/tests/integration/test_case.go @@ -130,7 +130,7 @@ func (tc TestCase) nodeSetupConfig() action.NodeSetupConfig { EnableSigning: tc.EnableSigning, HTTP: tc.HTTP, IsDocumentACPTest: hasDocumentACPActions(tc.Actions), - SourceHubImage: sourcehubImage, + VeraImage: veraImage, DatabaseDir: databaseDir, BadgerEncryption: badgerEncryption, LensRuntime: lensType, @@ -140,8 +140,8 @@ func (tc TestCase) nodeSetupConfig() action.NodeSetupConfig { // hasDocumentACPActions reports whether the action set uses document ACP. // -// Spinning up a SourceHub instance is slow, so tests that do not need one are -// skipped when SourceHub ACP is selected. +// Spinning up a Vera instance is slow, so tests that do not need one are +// skipped when Remote DAC is selected. func hasDocumentACPActions(actions []any) bool { for _, a := range actions { switch a.(type) { diff --git a/tests/integration/utils.go b/tests/integration/utils.go index e580a46489..ee04cb1bb4 100644 --- a/tests/integration/utils.go +++ b/tests/integration/utils.go @@ -1129,7 +1129,7 @@ func refreshTokens( err := fullIdentityToUpdate.UpdateToken( action.AuthTokenExpiration, audience, - immutable.Some(s.SourcehubAddress), + immutable.Some(s.RemoteDACAddress), ) require.NoError(s.T, err) nodeTokensToUpdate[nodeKey] = fullIdentityToUpdate.BearerToken() diff --git a/tests/state/state.go b/tests/state/state.go index edb36a98d2..a6e9ddfc10 100644 --- a/tests/state/state.go +++ b/tests/state/state.go @@ -73,8 +73,8 @@ type KMSType string type DocumentACPType string const ( - SourceHubDocumentACPType DocumentACPType = "source-hub" - LocalDocumentACPType DocumentACPType = "local" + RemoteDocumentACPType DocumentACPType = "remote" + LocalDocumentACPType DocumentACPType = "local" ) type ColDocIndex struct { @@ -276,7 +276,7 @@ type State struct { // The type of Document ACP DocumentACPType DocumentACPType - // The Document ACP options to share between each node (currently only used for sourcehub). + // The Document ACP options to share between each node (currently only used for Remote DAC). DocumentACPOptions *options.NodeDocumentACPOptions // Any explicit transactions active in this test. @@ -303,7 +303,7 @@ type State struct { // Policy IDs, by node index, by policyID index (in the order they were added). // - // Note: In case acp type is sourcehub, all nodes will have the same state of PolicyIDs. + // When Remote DAC is selected, all nodes share the same policy ID state. PolicyIDs [][]string // Will receive an item once all actions have finished processing. @@ -340,8 +340,8 @@ type State struct { // IsBench indicates wether the test is currently being benchmarked. IsBench bool - // The SourceHub address used to pay for SourceHub transactions. - SourcehubAddress string + // RemoteDACAddress is the Vera address used by Remote DAC to pay for transactions. + RemoteDACAddress string // IsNetworkEnabled indicates whether the network is enabled. IsNetworkEnabled bool diff --git a/tools/cloud/akash/README.md b/tools/cloud/akash/README.md index 0c69ebfbdf..52362cefd3 100644 --- a/tools/cloud/akash/README.md +++ b/tools/cloud/akash/README.md @@ -1,6 +1,6 @@ # DefraDB -DefraDB is a user-centric database that prioritizes data ownership, personal 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/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 user-centric database that prioritizes data ownership, personal 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/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/). From d228426bfda564c505e46967874f702090458286 Mon Sep 17 00:00:00 2001 From: Shahzad Lone Date: Mon, 31 Aug 2026 04:16:56 +0400 Subject: [PATCH 4/6] PR(NITPICK): Fix NAC terminology docs --- acp/doc.go | 4 +-- acp/nac/doc.go | 2 +- acp/nac/nac.go | 2 +- cli/start.go | 2 +- client/acp.go | 10 ++++---- client/db.go | 26 ++++++++++---------- client/options/node.go | 14 +++++------ docs/website/references/cli/defradb_start.md | 2 +- tests/integration/acp_nac.go | 25 +++++++++---------- 9 files changed, 43 insertions(+), 44 deletions(-) diff --git a/acp/doc.go b/acp/doc.go index 664d47fe59..4669b25215 100644 --- a/acp/doc.go +++ b/acp/doc.go @@ -9,10 +9,10 @@ // licenses/APL.txt. /* -This package implements admin and document access control systems. +This package implements node and document access control systems. Document access control systems provide acp for individual documents of a collection. -Admin access control systems provide acp for a node's operations. +Node access control systems provide acp for a node's operations. */ package acp diff --git a/acp/nac/doc.go b/acp/nac/doc.go index 3fb61fbea6..0db51c4c5b 100644 --- a/acp/nac/doc.go +++ b/acp/nac/doc.go @@ -9,6 +9,6 @@ // licenses/APL.txt. /* -This package implements admin access control system(s). +This package implements the Local Node Access Control (NAC) system. */ package nac diff --git a/acp/nac/nac.go b/acp/nac/nac.go index 0ec67ba422..7fb8348648 100644 --- a/acp/nac/nac.go +++ b/acp/nac/nac.go @@ -22,7 +22,7 @@ const localStoreName = "local_node_acp" var _ acp.ACPSystemClient = (*NodeACP)(nil) -// NodeACP represents a node acp (local to the node) implementation that makes no remote calls. +// NodeACP represents the Local NAC implementation, which makes no remote calls. type NodeACP struct { *local.LocalACP } diff --git a/cli/start.go b/cli/start.go index 9f42b984c9..d411638c5d 100644 --- a/cli/start.go +++ b/cli/start.go @@ -368,7 +368,7 @@ func MakeStartCommand(ctx context.Context) *cobra.Command { &enableNAC, "node-acp-enable", false, - "Enable the node access control system.", + "Enable the Local Node Access Control (NAC) system.", ) cmd.PersistentFlags().String( "document-acp-type", diff --git a/client/acp.go b/client/acp.go index f5ffa5df5a..a978963000 100644 --- a/client/acp.go +++ b/client/acp.go @@ -43,19 +43,19 @@ type DeleteActorRelationshipResult struct { RecordFound bool } -// NACStatus represents the current state/status of the Node ACP system. +// NACStatus represents the current state of the Local NAC system. type NACStatus int const ( - // NACNotConfigured indicates that NAC system is in a clean state, meaning it has not been started/configured yet. + // NACNotConfigured indicates that Local NAC has not been configured yet. // // Note: Upon purge or reset, NAC will be set back to this state as well. NACNotConfigured NACStatus = iota - // NACEnabled indicates that NAC system was started and is currently enabled. + // NACEnabled indicates that Local NAC was started and is currently enabled. NACEnabled - // NACDisabledTemporarily indicates that NAC system was started but is temporarily disabled. + // NACDisabledTemporarily indicates that Local NAC was started but is temporarily disabled. NACDisabledTemporarily ) @@ -72,7 +72,7 @@ func (status NACStatus) String() string { } } -// NACStatusResult wraps the result of current node acp status. +// NACStatusResult wraps the current Local NAC status. type NACStatusResult struct { Status string } diff --git a/client/db.go b/client/db.go index 1af898f695..95d447a828 100644 --- a/client/db.go +++ b/client/db.go @@ -102,7 +102,7 @@ type Store interface { // be true if the relationship already existed (no-op), and false if a new relationship was made. // // Note: - // - The request actor must either be the owner or manager of the document. + // - The request actor must either be the owner or manager of the node. // - If the target actor arg is "*", then the relationship applies to all actors implicitly. AddNACActorRelationship( ctx context.Context, @@ -118,7 +118,7 @@ type Store interface { // will be false if the relationship record was not found (no-op). // // Note: - // - The request actor must either be the owner or manager of the document. + // - The request actor must either be the owner or manager of the node. // - If the target actor arg is "*", then the implicitly added relationship with all actors is // removed, however this does not revoke access from actors that had explicit relationships. DeleteNACActorRelationship( @@ -128,31 +128,31 @@ type Store interface { opts ...options.Enumerable[options.DeleteNACActorRelationshipOptions], ) (DeleteActorRelationshipResult, error) - // ReEnableNAC will re-enable node acp that was temporarily disabled (and configured). This will - // recover previously saved nac state with all the relationships formed. + // ReEnableNAC will re-enable Local NAC that was temporarily disabled (and configured). This will + // recover the previously saved NAC state and all formed relationships. // - // If node acp is already enabled, then returns an error reflecting that it is already enabled. + // If Local NAC is already enabled, it returns an error reflecting that it is already enabled. // - // If node acp is not already configured or the previous state was purged then this will return an error, - // as the user must use the node's start command to configure/enable the node acp the first time. + // If Local NAC is not already configured or the previous state was purged, this returns an error, + // as the user must use the node's start command to configure and enable Local NAC the first time. // // Returns an [client.ErrNotAuthorizedToPerformOperation] error if the requesting identity is not // authorized to perform this operation. ReEnableNAC(ctx context.Context, opts ...options.Enumerable[options.ReEnableNACOptions]) error - // DisableNAC will disable node acp for the users temporarily. This will keep the current node acp - // state saved so that if it is re-enabled in the future, then we can recover all the relationships formed. + // DisableNAC will temporarily disable Local NAC while preserving its current state so that all + // formed relationships can be recovered when it is re-enabled. // - // If node acp is already disabled, then returns an error reflecting that it is already disabled. + // If Local NAC is already disabled, it returns an error reflecting that it is already disabled. // - // If node acp is not already configured or the previous state was purged then this will return an error. + // If Local NAC is not already configured or the previous state was purged, this returns an error. // // Returns an [client.ErrNotAuthorizedToPerformOperation] error if the requesting identity is not // authorized to perform this operation. DisableNAC(ctx context.Context, opts ...options.Enumerable[options.DisableNACOptions]) error - // GetNACStatus returns the node acp status that tells us if node access was ever configured, - // or if node acp is currently enabled or temporarily disabled. + // GetNACStatus returns whether Local NAC was configured and whether it is currently enabled or + // temporarily disabled. GetNACStatus(ctx context.Context, opts ...options.Enumerable[options.GetNACStatusOptions]) (NACStatusResult, error) // GetNodeIdentity returns the identity of the node. diff --git a/client/options/node.go b/client/options/node.go index af1cdcd955..4085c6370e 100644 --- a/client/options/node.go +++ b/client/options/node.go @@ -87,7 +87,7 @@ type NodeOptions struct { Store NodeStoreOptions // DocumentACP contains document ACP configuration. DocumentACP NodeDocumentACPOptions - // NodeACP contains node ACP configuration. + // NodeACP contains Local NAC configuration. NodeACP NodeACPOptions // DB contains database configuration. DB NodeDBOptions @@ -167,11 +167,11 @@ type NodeDocumentACPOptions struct { RemoteDACCometRPCAddress string } -// NodeACPOptions contains node ACP configuration values. +// NodeACPOptions contains Local NAC configuration values. type NodeACPOptions struct { - // IsEnabled specifies whether node ACP is enabled. + // IsEnabled specifies whether Local NAC is enabled. IsEnabled bool - // Path is the filesystem path for the node ACP system. + // Path is the filesystem path for the Local NAC system. Path string } @@ -700,19 +700,19 @@ func NodeACP() *NodeACPOptionsBuilder { return &NodeACPOptionsBuilder{} } -// SetEnabled sets whether node ACP is enabled. +// SetEnabled sets whether Local NAC is enabled. func (sb *NodeACPOptionsBuilder) SetEnabled(enabled bool) *NodeACPOptionsBuilder { sb.append(func(opts *NodeACPOptions) { opts.IsEnabled = enabled }) return sb } -// SetPath sets the node ACP system path. +// SetPath sets the Local NAC system path. func (sb *NodeACPOptionsBuilder) SetPath(path string) *NodeACPOptionsBuilder { sb.append(func(opts *NodeACPOptions) { opts.Path = path }) return sb } -// SetAll sets all node ACP options from a plain data struct. +// SetAll sets all Local NAC options from a plain data struct. func (sb *NodeACPOptionsBuilder) SetAll(nacOpts NodeACPOptions) *NodeACPOptionsBuilder { sb.append(func(opts *NodeACPOptions) { *opts = nacOpts }) return sb diff --git a/docs/website/references/cli/defradb_start.md b/docs/website/references/cli/defradb_start.md index cb3ed8fb8b..8b38d17a60 100644 --- a/docs/website/references/cli/defradb_start.md +++ b/docs/website/references/cli/defradb_start.md @@ -32,7 +32,7 @@ defradb start [flags] --no-searchable-encryption Skip generating a searchable encryption key. Searchable encryption will be disabled. --no-signing Disable signing of commits. --no-telemetry Disables telemetry reporting. Telemetry is only enabled in builds that use the telemetry flag. - --node-acp-enable Enable the node access control system. + --node-acp-enable Enable the Local Node Access Control (NAC) system. --p2paddr strings Listen addresses for the p2p network (formatted as a libp2p MultiAddr) (default [/ip4/127.0.0.1/tcp/9171]) --peers stringArray List of peers to connect to --privkeypath string Path to the private key for tls diff --git a/tests/integration/acp_nac.go b/tests/integration/acp_nac.go index 28ba8c53eb..f919e18d6b 100644 --- a/tests/integration/acp_nac.go +++ b/tests/integration/acp_nac.go @@ -21,15 +21,15 @@ import ( "github.com/sourcenetwork/defradb/tests/state" ) -// ReEnableNAC will attempt to re-enable a temporarily disabled Node ACP system. +// ReEnableNAC will attempt to re-enable a temporarily disabled Local NAC system. type ReEnableNAC struct { - // NodeID may hold the ID (index) of the node we want to re-enable the node acp on. + // NodeID may hold the ID (index) of the node on which we want to re-enable Local NAC. // - // If a value is not provided, then will start node acp on all nodes. + // If a value is not provided, Local NAC will be re-enabled on all nodes. NodeID immutable.Option[int] - // The identity of the user that is re-enabling node acp, this user must be authorized - // to re-enable node acp, otherwise error will be returned. + // The identity of the user re-enabling Local NAC. The user must be authorized, + // otherwise an error will be returned. Identity immutable.Option[state.Identity] // Any error expected from the action. Optional. @@ -39,7 +39,7 @@ type ReEnableNAC struct { ExpectedError string } -// reEnableNAC will attempt to re-enable the node access control system. +// reEnableNAC will attempt to re-enable the Local NAC system. func reEnableNAC( s *state.State, action ReEnableNAC, @@ -58,16 +58,15 @@ func reEnableNAC( } } -// DisableNAC will attempt to temporarily disable DefraDB's Node ACP system. +// DisableNAC will attempt to temporarily disable DefraDB's Local NAC system. type DisableNAC struct { - // NodeID may hold the ID (index) of the node we want to disable the node acp on. + // NodeID may hold the ID (index) of the node on which we want to disable Local NAC. // - // If a value is not provided, then will disable node acp on all nodes. + // If a value is not provided, Local NAC will be disabled on all nodes. NodeID immutable.Option[int] - // The identity of a user that is authorized to disable the node acp. - // The identity of the user that is disabling node acp, this user must be authorized - // to disable node acp, otherwise error will be returned. + // The identity of the user disabling Local NAC. The user must be authorized, + // otherwise an error will be returned. Identity immutable.Option[state.Identity] // Any error expected from the action. Optional. @@ -77,7 +76,7 @@ type DisableNAC struct { ExpectedError string } -// disableNAC will attempt to start the node access control system. +// disableNAC will attempt to disable the Local NAC system. func disableNAC( s *state.State, action DisableNAC, From b922f84bbe138e19133b430892d991217e4e70a7 Mon Sep 17 00:00:00 2001 From: Shahzad Lone Date: Thu, 3 Sep 2026 05:12:13 +0400 Subject: [PATCH 5/6] PR(MAIN): Rename Remote DAC ChainID to LogID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adopt the planned Vera LogID terminology across DefraDB Go and C APIs, configuration, and tests while adapting it to Vera’s current ChainID SDK option at the integration boundary. BREAKING CHANGE: Remote DAC ChainID fields, builders, and configuration are now named LogID. Use RemoteDACLogID, SetLogID, acp.document.remote.LogID, DEFRA_ACP_DOCUMENT_REMOTE_LOGID, and remoteDACLogID. --- acp/dac/remote.go | 8 ++++---- cbindings/cutils.go | 2 +- cbindings/defra_structs.h | 2 +- cbindings/node_new.go | 4 ++-- cbindings/test_node_options.go | 16 ++++++++-------- cbindings/utils.go | 2 +- cli/start.go | 2 +- .../node_options/node_options_test.go | 5 +++++ client/options/node.go | 10 +++++----- docs/config.md | 4 ++-- node/acp_dac_remote.go | 2 +- tests/action/acp_dac_setup.go | 7 +++---- .../add_dac_collection_actor_relationship.go | 2 +- tests/integration/acp_dac.go | 6 +++--- .../encryption/peer_acp_branchable_test.go | 2 +- 15 files changed, 39 insertions(+), 35 deletions(-) diff --git a/acp/dac/remote.go b/acp/dac/remote.go index 68494ee6ff..cb8ad1ea40 100644 --- a/acp/dac/remote.go +++ b/acp/dac/remote.go @@ -34,12 +34,12 @@ import ( // NewRemoteDocumentACP returns a Vera-backed Remote DAC instance. func NewRemoteDocumentACP( - chainID string, + logID string, grpcAddress string, cometRPCAddress string, signer vera.TxSigner, ) (DocumentACP, error) { - remoteDAC, err := NewRemoteDocumentACPClient(chainID, grpcAddress, cometRPCAddress, signer) + remoteDAC, err := NewRemoteDocumentACPClient(logID, grpcAddress, cometRPCAddress, signer) if err != nil { return nil, err } @@ -59,7 +59,7 @@ type RemoteDocumentACP struct { // NewRemoteDocumentACPClient returns a Vera-backed Remote DAC client. func NewRemoteDocumentACPClient( - chainID string, + logID string, grpcAddress string, cometRPCAddress string, signer vera.TxSigner, @@ -74,7 +74,7 @@ func NewRemoteDocumentACPClient( txBuilder, err := vera.NewTxBuilder( vera.WithSDKClient(client), - vera.WithChainID(chainID), + vera.WithChainID(logID), vera.WithGasLimit(400000), ) if err != nil { diff --git a/cbindings/cutils.go b/cbindings/cutils.go index fc54add60e..65202e6beb 100644 --- a/cbindings/cutils.go +++ b/cbindings/cutils.go @@ -149,7 +149,7 @@ func convertNodeInitOptionsToGoNodeInitOptions(cOptions C.NodeInitOptions) (GoNo HTTPIdleTimeoutMs: int64(cOptions.httpIdleTimeoutMs), DocumentACPType: C.GoString(cOptions.documentACPType), DocumentACPPath: C.GoString(cOptions.documentACPPath), - RemoteDACChainID: C.GoString(cOptions.remoteDACChainID), + RemoteDACLogID: C.GoString(cOptions.remoteDACLogID), RemoteDACGRPCAddress: C.GoString(cOptions.remoteDACGRPCAddress), RemoteDACCometRPCAddress: C.GoString(cOptions.remoteDACCometRPCAddress), NodeACPPath: C.GoString(cOptions.nodeACPPath), diff --git a/cbindings/defra_structs.h b/cbindings/defra_structs.h index a44c369ce0..1e5be1c95b 100644 --- a/cbindings/defra_structs.h +++ b/cbindings/defra_structs.h @@ -81,7 +81,7 @@ typedef struct { // Document ACP options const char* documentACPType; // "none" | "local" | "remote" | "" (default) const char* documentACPPath; - const char* remoteDACChainID; + const char* remoteDACLogID; const char* remoteDACGRPCAddress; const char* remoteDACCometRPCAddress; diff --git a/cbindings/node_new.go b/cbindings/node_new.go index f6284bdd0b..798fee35e1 100644 --- a/cbindings/node_new.go +++ b/cbindings/node_new.go @@ -157,8 +157,8 @@ func NewNode(cOptions C.NodeInitOptions) C.NewNodeResult { if gocOptions.DocumentACPPath != "" { opts.DocumentACP().SetPath(gocOptions.DocumentACPPath) } - if gocOptions.RemoteDACChainID != "" { - opts.DocumentACP().SetChainID(gocOptions.RemoteDACChainID) + if gocOptions.RemoteDACLogID != "" { + opts.DocumentACP().SetLogID(gocOptions.RemoteDACLogID) } if gocOptions.RemoteDACGRPCAddress != "" { opts.DocumentACP().SetGRPCAddress(gocOptions.RemoteDACGRPCAddress) diff --git a/cbindings/test_node_options.go b/cbindings/test_node_options.go index 0e66e41bce..bb70389722 100644 --- a/cbindings/test_node_options.go +++ b/cbindings/test_node_options.go @@ -142,8 +142,8 @@ func TestGetNodeOptions_SetA(t *testing.T) { dacPathStr := t.TempDir() dacPath := C.CString(dacPathStr) defer C.free(unsafe.Pointer(dacPath)) - chainID := C.CString("chain-a") - defer C.free(unsafe.Pointer(chainID)) + logID := C.CString("log-a") + defer C.free(unsafe.Pointer(logID)) grpcAddr := C.CString("grpc-a:9090") defer C.free(unsafe.Pointer(grpcAddr)) cometAddr := C.CString("comet-a:26657") @@ -199,7 +199,7 @@ func TestGetNodeOptions_SetA(t *testing.T) { // Document ACP opts.documentACPType = dacType opts.documentACPPath = dacPath - opts.remoteDACChainID = chainID + opts.remoteDACLogID = logID opts.remoteDACGRPCAddress = grpcAddr opts.remoteDACCometRPCAddress = cometAddr // Identity + Node ACP @@ -249,7 +249,7 @@ func TestGetNodeOptions_SetA(t *testing.T) { // Document ACP assertNodeOptionField(t, m, "local", "DocumentACP", "DocumentACPType") assertNodeOptionField(t, m, dacPathStr, "DocumentACP", "Path") - assertNodeOptionField(t, m, "chain-a", "DocumentACP", "RemoteDACChainID") + assertNodeOptionField(t, m, "log-a", "DocumentACP", "RemoteDACLogID") assertNodeOptionField(t, m, "grpc-a:9090", "DocumentACP", "RemoteDACGRPCAddress") assertNodeOptionField(t, m, "comet-a:26657", "DocumentACP", "RemoteDACCometRPCAddress") @@ -284,8 +284,8 @@ func TestGetNodeOptions_SetB(t *testing.T) { defer C.free(unsafe.Pointer(keyPath)) // DocumentACPType is left unset, defaulting to "local" because of the in-memory flag. // DocumentACPPath left unset, defaulting to "" - chainID := C.CString("chain-b") - defer C.free(unsafe.Pointer(chainID)) + logID := C.CString("log-b") + defer C.free(unsafe.Pointer(logID)) grpcAddr := C.CString("grpc-b:9090") defer C.free(unsafe.Pointer(grpcAddr)) cometAddr := C.CString("comet-b:26657") @@ -323,7 +323,7 @@ func TestGetNodeOptions_SetB(t *testing.T) { opts.httpWriteTimeoutMs = C.int64_t(5000) opts.httpIdleTimeoutMs = C.int64_t(6000) // Document ACP - opts.remoteDACChainID = chainID + opts.remoteDACLogID = logID opts.remoteDACGRPCAddress = grpcAddr opts.remoteDACCometRPCAddress = cometAddr // Node ACP @@ -373,7 +373,7 @@ func TestGetNodeOptions_SetB(t *testing.T) { // Type is not set, defaulting to "local" (vs explicit "local" in set A) assertNodeOptionField(t, m, "local", "DocumentACP", "DocumentACPType") assertNodeOptionField(t, m, "", "DocumentACP", "Path") - assertNodeOptionField(t, m, "chain-b", "DocumentACP", "RemoteDACChainID") + assertNodeOptionField(t, m, "log-b", "DocumentACP", "RemoteDACLogID") assertNodeOptionField(t, m, "grpc-b:9090", "DocumentACP", "RemoteDACGRPCAddress") assertNodeOptionField(t, m, "comet-b:26657", "DocumentACP", "RemoteDACCometRPCAddress") diff --git a/cbindings/utils.go b/cbindings/utils.go index 3f50543b19..9ee29dc4d3 100644 --- a/cbindings/utils.go +++ b/cbindings/utils.go @@ -74,7 +74,7 @@ type GoNodeInitOptions struct { // Document ACP options DocumentACPType string DocumentACPPath string - RemoteDACChainID string + RemoteDACLogID string RemoteDACGRPCAddress string RemoteDACCometRPCAddress string diff --git a/cli/start.go b/cli/start.go index d411638c5d..5776187db4 100644 --- a/cli/start.go +++ b/cli/start.go @@ -123,7 +123,7 @@ func MakeStartCommand(ctx context.Context) *cobra.Command { SetCertPath(tlsCertPath). SetKeyPath(tlsKeyPath) opts.DocumentACP(). - SetChainID(cfg.GetString("acp.document.remote.ChainID")). + SetLogID(cfg.GetString("acp.document.remote.LogID")). SetGRPCAddress(cfg.GetString("acp.document.remote.GRPCAddress")). SetCometRPCAddress(cfg.GetString("acp.document.remote.CometRPCAddress")) opts.NodeACP(). diff --git a/cli/test/integration/node_options/node_options_test.go b/cli/test/integration/node_options/node_options_test.go index f54a8dd711..ba5bd32115 100644 --- a/cli/test/integration/node_options/node_options_test.go +++ b/cli/test/integration/node_options/node_options_test.go @@ -30,6 +30,8 @@ const testIdentityKeyHex = "e3b722906ee4e56368f581cd8b18ab0f48af1ea53e635e3f7b8a // TestGetNodeOptions_SetA starts a node with set A values and verifies that all // configurable options are reflected in `client node-options`. func TestGetNodeOptions_SetA(t *testing.T) { + t.Setenv("DEFRA_ACP_DOCUMENT_REMOTE_LOGID", "log-a") + test := &integration.Test{ Actions: []action.Action{ action.StartWithArgs([]string{ @@ -78,6 +80,7 @@ func TestGetNodeOptions_SetA(t *testing.T) { // Document ACP {Path: []string{"DocumentACP", "DocumentACPType"}, Value: "local"}, {Path: []string{"DocumentACP", "Path"}, Value: ""}, + {Path: []string{"DocumentACP", "RemoteDACLogID"}, Value: "log-a"}, // Node ACP {Path: []string{"NodeACP", "IsEnabled"}, Value: false}, {Path: []string{"NodeACP", "Path"}, Value: ""}, @@ -94,6 +97,7 @@ func TestGetNodeOptions_SetA(t *testing.T) { func TestGetNodeOptions_SetB(t *testing.T) { // The file keyring backend requires a secret t.Setenv("DEFRA_KEYRING_SECRET", "test-secret-for-node-options-setb") + t.Setenv("DEFRA_ACP_DOCUMENT_REMOTE_LOGID", "log-b") test := &integration.Test{ // Disk-mode + P2P startup is slower than in-memory; allow more time. @@ -143,6 +147,7 @@ func TestGetNodeOptions_SetB(t *testing.T) { // Document ACP {Path: []string{"DocumentACP", "DocumentACPType"}, Value: "local"}, {Path: []string{"DocumentACP", "Path"}, UseRootDir: true}, + {Path: []string{"DocumentACP", "RemoteDACLogID"}, Value: "log-b"}, // Node ACP {Path: []string{"NodeACP", "IsEnabled"}, Value: true}, {Path: []string{"NodeACP", "Path"}, UseRootDir: true}, diff --git a/client/options/node.go b/client/options/node.go index 4085c6370e..65fabd3ce3 100644 --- a/client/options/node.go +++ b/client/options/node.go @@ -159,8 +159,8 @@ type NodeDocumentACPOptions struct { Path string // Signer signs Vera transactions made by the Remote DAC. Signer immutable.Option[NodeTxSigner] - // RemoteDACChainID is the chain ID for Vera. - RemoteDACChainID string + // RemoteDACLogID is the log ID for Vera. + RemoteDACLogID string // RemoteDACGRPCAddress is the gRPC address for Vera. RemoteDACGRPCAddress string // RemoteDACCometRPCAddress is the Comet RPC address for Vera. @@ -665,9 +665,9 @@ func (sb *NodeDocumentACPOptionsBuilder) SetTxnSigner(signer NodeTxSigner) *Node return sb } -// SetChainID sets the chainID of the Vera chain. -func (sb *NodeDocumentACPOptionsBuilder) SetChainID(chainID string) *NodeDocumentACPOptionsBuilder { - sb.append(func(opts *NodeDocumentACPOptions) { opts.RemoteDACChainID = chainID }) +// SetLogID sets the Vera log ID used by Remote DAC. +func (sb *NodeDocumentACPOptionsBuilder) SetLogID(logID string) *NodeDocumentACPOptionsBuilder { + sb.append(func(opts *NodeDocumentACPOptions) { opts.RemoteDACLogID = logID }) return sb } diff --git a/docs/config.md b/docs/config.md index 1f1c15eb5f..05f4fd8181 100644 --- a/docs/config.md +++ b/docs/config.md @@ -136,9 +136,9 @@ Possible values: - `local` (default): Local DAC - `remote`: Remote DAC (backed by [Vera](https://github.com/sourcenetwork/vera)) -## `acp.document.remote.ChainID` +## `acp.document.remote.LogID` -The ID of the Vera chain to store ACP data in. Required when using `acp.document.type`:`remote`. +The ID of the Vera log in which to store ACP data. Required when using `acp.document.type`:`remote`. ## `acp.document.remote.GRPCAddress` diff --git a/node/acp_dac_remote.go b/node/acp_dac_remote.go index f171548d9d..fbc55a283b 100644 --- a/node/acp_dac_remote.go +++ b/node/acp_dac_remote.go @@ -29,7 +29,7 @@ func newRemoteDocumentACP( return dac.NoDocumentACP, ErrSignerMissingForRemoteDAC } remoteDAC, err := dac.NewRemoteDocumentACP( - opts.RemoteDACChainID, + opts.RemoteDACLogID, opts.RemoteDACGRPCAddress, opts.RemoteDACCometRPCAddress, opts.Signer.Value(), diff --git a/tests/action/acp_dac_setup.go b/tests/action/acp_dac_setup.go index ddb114d660..901b4503b8 100644 --- a/tests/action/acp_dac_setup.go +++ b/tests/action/acp_dac_setup.go @@ -49,7 +49,7 @@ const ( // faucetAddr is the account address matching the faucetMnemonic faucetAddr = "vera12d9hjf0639k995venpv675sju9ltsvf8v73hjv" - veraTestChainID string = "vera-dev" + remoteDACTestLogID string = "vera-dev" ) func setupRemoteDAC(s *state.State, cfg NodeSetupConfig) (*options.NodeDocumentACPOptions, error) { @@ -70,8 +70,7 @@ func setupRemoteDAC(s *state.State, cfg NodeSetupConfig) (*options.NodeDocumentA testcontainers.WithExposedPorts("9090/tcp"), testcontainers.WithLogger(testLogger), testcontainers.WithEnv(map[string]string{ - // STANDALONE configures the Vera container to create an isolated chain, - // instead of connecting to an existing one. + // STANDALONE configures the container to create an isolated Vera instance. "STANDALONE": "1", }), ) @@ -134,7 +133,7 @@ func setupRemoteDAC(s *state.State, cfg NodeSetupConfig) (*options.NodeDocumentA return &options.NodeDocumentACPOptions{ DocumentACPType: options.NodeRemoteDocumentACPType, Signer: immutable.Some[options.NodeTxSigner](signer), - RemoteDACChainID: veraTestChainID, + RemoteDACLogID: remoteDACTestLogID, RemoteDACGRPCAddress: grpcEndpoint, RemoteDACCometRPCAddress: rpcEndpoint, }, nil diff --git a/tests/action/add_dac_collection_actor_relationship.go b/tests/action/add_dac_collection_actor_relationship.go index 99e233d9eb..8faf978cfb 100644 --- a/tests/action/add_dac_collection_actor_relationship.go +++ b/tests/action/add_dac_collection_actor_relationship.go @@ -96,7 +96,7 @@ func (a *AddDACCollectionActorRelationship) Execute() { require.Equal(a.s.T, a.ExpectedExistence, exists.ExistedAlready) } - // The relationship should only be added to a Vera chain once - there is no need to loop + // The relationship should only be added to a Vera log once - there is no need to loop // through the nodes. if a.s.DocumentACPType == state.RemoteDocumentACPType { break diff --git a/tests/integration/acp_dac.go b/tests/integration/acp_dac.go index 8f679dfe56..5f270a4ac7 100644 --- a/tests/integration/acp_dac.go +++ b/tests/integration/acp_dac.go @@ -103,7 +103,7 @@ func addDACPolicy( s.PolicyIDs[nodeID] = append(s.PolicyIDs[nodeID], policyResult.PolicyID) } - // The policy should only be added to a Vera chain once - there is no need to loop through + // The policy should only be added to a Vera log once - there is no need to loop through // the nodes. if s.DocumentACPType == state.RemoteDocumentACPType { // Note: If we break here the state will only preserve the policyIDs result on the @@ -195,7 +195,7 @@ func addDACActorRelationship( require.Equal(s.T, action.ExpectedExistence, exists.ExistedAlready) } - // The relationship should only be added to a Vera chain once - there is no need to loop through + // The relationship should only be added to a Vera log once - there is no need to loop through // the nodes. if s.DocumentACPType == state.RemoteDocumentACPType { actionNodeID = immutable.Some(0) @@ -288,7 +288,7 @@ func deleteDACActorRelationship( require.Equal(s.T, action.ExpectedRecordFound, deleteActorRelationshipResult.RecordFound) } - // The relationship should only be added to a Vera chain once - there is no need to loop through + // The relationship should only be added to a Vera log once - there is no need to loop through // the nodes. if s.DocumentACPType == state.RemoteDocumentACPType { break diff --git a/tests/integration/encryption/peer_acp_branchable_test.go b/tests/integration/encryption/peer_acp_branchable_test.go index dea0399fd0..ac37b7d990 100644 --- a/tests/integration/encryption/peer_acp_branchable_test.go +++ b/tests/integration/encryption/peer_acp_branchable_test.go @@ -25,7 +25,7 @@ func TestDocEncryptionACP_BranchableCollection_AuthorizedPeerCanFetch(t *testing test := testUtils.TestCase{ KMS: testUtils.KMS{Activated: true}, // Like the other multi-node branchable tests, this is restricted to Local DAC: the - // collection object is registered per node, whereas a shared Vera chain would reject the + // collection object is registered per node, whereas a shared Vera log would reject the // second node re-registering the same collection object. SupportedDocumentACPTypes: immutable.Some( []state.DocumentACPType{ From 662bcf54fbc43232870433e003f9ae0025e2dd95 Mon Sep 17 00:00:00 2001 From: Shahzad Lone Date: Wed, 2 Sep 2026 20:49:10 +0400 Subject: [PATCH 6/6] PR(DOCS): Add one-off breaking change log Document the SourceHub-to-Vera and Remote DAC migration in BREAKLOG.md. Explain how intentional one-off breaking changes outside the standing VERSIONING.md exceptions are communicated and add contributor guidance. --- BREAKLOG.md | 66 ++++++++++++++++++++++++++++++++++++++++ CONTRIBUTING_INTERNAL.md | 3 +- VERSIONING.md | 6 ++++ 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 BREAKLOG.md diff --git a/BREAKLOG.md b/BREAKLOG.md new file mode 100644 index 0000000000..9d90293826 --- /dev/null +++ b/BREAKLOG.md @@ -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` | diff --git a/CONTRIBUTING_INTERNAL.md b/CONTRIBUTING_INTERNAL.md index 6d10de6a98..aa69ceb1b1 100644 --- a/CONTRIBUTING_INTERNAL.md +++ b/CONTRIBUTING_INTERNAL.md @@ -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 --- diff --git a/VERSIONING.md b/VERSIONING.md index fe11ab6634..36f1253b34 100644 --- a/VERSIONING.md +++ b/VERSIONING.md @@ -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).