From b2c5936b1cc4017426de1b97aaa377b34dc74634 Mon Sep 17 00:00:00 2001 From: Rein Krul Date: Mon, 16 Mar 2026 19:51:05 +0100 Subject: [PATCH 1/5] #4063: Enable storage.debug flag to enable go-leia performance logging --- README.rst | 3 ++- docs/pages/deployment/cli-reference.rst | 1 + docs/pages/deployment/server_options.rst | 3 ++- e2e-tests/util.sh | 5 ++-- go.mod | 12 ++++----- go.sum | 31 ++++++++++++--------- storage/cmd/cmd.go | 1 + storage/config.go | 2 ++ storage/engine.go | 34 ++++++++++++++++++++---- storage/interface.go | 3 ++- vcr/issuer/leia_store.go | 3 ++- vcr/vcr.go | 11 ++++---- vcr/verifier/leia_store.go | 3 ++- 13 files changed, 77 insertions(+), 35 deletions(-) diff --git a/README.rst b/README.rst index ef3fad2ff8..62bb035b68 100644 --- a/README.rst +++ b/README.rst @@ -224,7 +224,7 @@ The following options can be configured on the server: http.default.auth.type Whether to enable authentication for the default interface, specify 'token_v2' for bearer token mode or 'token' for legacy bearer token mode. http.default.cors.origin [] When set, enables CORS from the specified origins on the default HTTP interface. **JSONLD** - jsonld.contexts.localmapping [https://nuts.nl/credentials/v1=assets/contexts/nuts.ldjson,https://www.w3.org/2018/credentials/v1=assets/contexts/w3c-credentials-v1.ldjson,https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json=assets/contexts/lds-jws2020-v1.ldjson,https://schema.org=assets/contexts/schema-org-v13.ldjson] This setting allows mapping external URLs to local files for e.g. preventing external dependencies. These mappings have precedence over those in remoteallowlist. + jsonld.contexts.localmapping [https://www.w3.org/2018/credentials/v1=assets/contexts/w3c-credentials-v1.ldjson,https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json=assets/contexts/lds-jws2020-v1.ldjson,https://schema.org=assets/contexts/schema-org-v13.ldjson,https://nuts.nl/credentials/v1=assets/contexts/nuts.ldjson] This setting allows mapping external URLs to local files for e.g. preventing external dependencies. These mappings have precedence over those in remoteallowlist. jsonld.contexts.remoteallowlist [https://schema.org,https://www.w3.org/2018/credentials/v1,https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json] In strict mode, fetching external JSON-LD contexts is not allowed except for context-URLs listed here. **Network** network.bootstrapnodes [] List of bootstrap nodes (':') which the node initially connect to. @@ -241,6 +241,7 @@ The following options can be configured on the server: pki.maxupdatefailhours 4 Maximum number of hours that a denylist update can fail pki.softfail true Do not reject certificates if their revocation status cannot be established when softfail is true **Storage** + storage.debug false When true, enables extra logging of storage-layer problems (e.g. performance issues). storage.bbolt.locktimeout 1s Maximum time to wait for acquiring a lock on the BBolt database before giving up and returning an error. Formatted as Golang duration (e.g. 1s, 1m). storage.bbolt.backup.directory Target directory for BBolt database backups. storage.bbolt.backup.interval 0s Interval, formatted as Golang duration (e.g. 10m, 1h) at which BBolt database backups will be performed. diff --git a/docs/pages/deployment/cli-reference.rst b/docs/pages/deployment/cli-reference.rst index b566051c52..cbab55e8ef 100755 --- a/docs/pages/deployment/cli-reference.rst +++ b/docs/pages/deployment/cli-reference.rst @@ -62,6 +62,7 @@ The following options apply to the server commands below: --storage.bbolt.backup.directory string Target directory for BBolt database backups. --storage.bbolt.backup.interval duration Interval, formatted as Golang duration (e.g. 10m, 1h) at which BBolt database backups will be performed. --storage.bbolt.locktimeout duration Maximum time to wait for acquiring a lock on the BBolt database before giving up and returning an error. Formatted as Golang duration (e.g. 1s, 1m). (default 1s) + --storage.debug When true, enables extra logging of storage-layer problems (e.g. performance issues). --storage.redis.address string Redis database server address. This can be a simple 'host:port' or a Redis connection URL with scheme, auth and other options. --storage.redis.database string Redis database name, which is used as prefix every key. Can be used to have multiple instances use the same Redis instance. --storage.redis.password string Redis database password. If set, it overrides the username in the connection URL. diff --git a/docs/pages/deployment/server_options.rst b/docs/pages/deployment/server_options.rst index 77dadf7ce9..c5f390c25c 100755 --- a/docs/pages/deployment/server_options.rst +++ b/docs/pages/deployment/server_options.rst @@ -50,7 +50,7 @@ http.default.auth.type Whether to enable authentication for the default interface, specify 'token_v2' for bearer token mode or 'token' for legacy bearer token mode. http.default.cors.origin [] When set, enables CORS from the specified origins on the default HTTP interface. **JSONLD** - jsonld.contexts.localmapping [https://nuts.nl/credentials/v1=assets/contexts/nuts.ldjson,https://www.w3.org/2018/credentials/v1=assets/contexts/w3c-credentials-v1.ldjson,https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json=assets/contexts/lds-jws2020-v1.ldjson,https://schema.org=assets/contexts/schema-org-v13.ldjson] This setting allows mapping external URLs to local files for e.g. preventing external dependencies. These mappings have precedence over those in remoteallowlist. + jsonld.contexts.localmapping [https://www.w3.org/2018/credentials/v1=assets/contexts/w3c-credentials-v1.ldjson,https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json=assets/contexts/lds-jws2020-v1.ldjson,https://schema.org=assets/contexts/schema-org-v13.ldjson,https://nuts.nl/credentials/v1=assets/contexts/nuts.ldjson] This setting allows mapping external URLs to local files for e.g. preventing external dependencies. These mappings have precedence over those in remoteallowlist. jsonld.contexts.remoteallowlist [https://schema.org,https://www.w3.org/2018/credentials/v1,https://w3c-ccg.github.io/lds-jws2020/contexts/lds-jws2020-v1.json] In strict mode, fetching external JSON-LD contexts is not allowed except for context-URLs listed here. **Network** network.bootstrapnodes [] List of bootstrap nodes (':') which the node initially connect to. @@ -67,6 +67,7 @@ pki.maxupdatefailhours 4 Maximum number of hours that a denylist update can fail pki.softfail true Do not reject certificates if their revocation status cannot be established when softfail is true **Storage** + storage.debug false When true, enables extra logging of storage-layer problems (e.g. performance issues). storage.bbolt.locktimeout 1s Maximum time to wait for acquiring a lock on the BBolt database before giving up and returning an error. Formatted as Golang duration (e.g. 1s, 1m). storage.bbolt.backup.directory Target directory for BBolt database backups. storage.bbolt.backup.interval 0s Interval, formatted as Golang duration (e.g. 10m, 1h) at which BBolt database backups will be performed. diff --git a/e2e-tests/util.sh b/e2e-tests/util.sh index e122d25ae6..4c89f59ecc 100644 --- a/e2e-tests/util.sh +++ b/e2e-tests/util.sh @@ -118,6 +118,7 @@ function readDiagnostic() { # Args: issuing node HTTP address, issuer DID, subject DID # Returns: the VC ID function createAuthCredential() { + local bsn=$(( (RANDOM * 32768 + RANDOM) % 900000000 + 100000000 )) printf '{ "type": "NutsAuthorizationCredential", "issuer": "%s", @@ -125,10 +126,10 @@ function createAuthCredential() { "id": "%s", "resources": [], "purposeOfUse": "example", - "subject": "urn:oid:2.16.840.1.113883.2.4.6.3:123456780" + "subject": "urn:oid:2.16.840.1.113883.2.4.6.3:%s" }, "visibility": "private" - }' "$2" "$3" | curl -s -X POST "$1/internal/vcr/v2/issuer/vc" -H "Content-Type: application/json" --data-binary @- | jq ".id" | sed "s/\"//g" + }' "$2" "$3" "$bsn" | curl -s -X POST "$1/internal/vcr/v2/issuer/vc" -H "Content-Type: application/json" --data-binary @- | jq ".id" | sed "s/\"//g" } # registerStringService registers a service on a DID document, with a string as serviceEndpoint diff --git a/go.mod b/go.mod index 09a513d702..68f3549f8e 100644 --- a/go.mod +++ b/go.mod @@ -24,20 +24,20 @@ require ( github.com/nats-io/nats.go v1.48.0 github.com/nuts-foundation/crypto-ecies v0.0.0-20211207143025-5b84f9efce2b github.com/nuts-foundation/go-did v0.5.1 - github.com/nuts-foundation/go-leia/v4 v4.0.3 + github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316183556-507bf1bdd4ff github.com/nuts-foundation/go-stoabs v1.9.0 - github.com/piprate/json-gold v0.5.1-0.20230111113000-6ddbe6e6f19f + github.com/piprate/json-gold v0.7.0 github.com/privacybydesign/irmago v0.17.1 github.com/prometheus/client_golang v1.19.1 github.com/prometheus/client_model v0.6.1 github.com/redis/go-redis/v9 v9.7.3 github.com/shengdoushi/base58 v1.0.0 github.com/sirupsen/logrus v1.9.3 - github.com/spf13/cobra v1.8.0 - github.com/spf13/pflag v1.0.5 + github.com/spf13/cobra v1.8.1 + github.com/spf13/pflag v1.0.6 github.com/stretchr/testify v1.10.0 github.com/twmb/murmur3 v1.1.8 - go.etcd.io/bbolt v1.3.10 + go.etcd.io/bbolt v1.4.3 go.uber.org/atomic v1.11.0 go.uber.org/goleak v1.3.0 go.uber.org/mock v0.4.0 @@ -184,7 +184,7 @@ require ( github.com/tdewolff/parse/v2 v2.6.8 // indirect github.com/templexxx/cpu v0.1.0 // indirect github.com/templexxx/xorsimd v0.4.2 // indirect - github.com/tidwall/gjson v1.17.0 // indirect + github.com/tidwall/gjson v1.18.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/timshannon/bolthold v0.0.0-20231129192944-dca5178aa629 // indirect diff --git a/go.sum b/go.sum index 377b6072d6..632b0d5f5f 100644 --- a/go.sum +++ b/go.sum @@ -131,7 +131,7 @@ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGX github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -569,8 +569,14 @@ github.com/nuts-foundation/did-ockam v0.0.0-20230313074753-fafd938c948c h1:Q2Naw github.com/nuts-foundation/did-ockam v0.0.0-20230313074753-fafd938c948c/go.mod h1:n0NQI71qGVVShnPDjYdCoNStEW0zZoVWbeSQ+esXuhs= github.com/nuts-foundation/go-did v0.5.1 h1:akc4OzNGHdnliJFoxnnSmUI7j1yKz/BHNi6sXiWX30A= github.com/nuts-foundation/go-did v0.5.1/go.mod h1:Aw1pIRyB9naQ8z/dc4rrPhn+nHx5LUcGysBGlezL528= -github.com/nuts-foundation/go-leia/v4 v4.0.3 h1:xNZznXWvcIwonXIDmpDDvF7KmP9BOK0MFt9ir3RD2gI= -github.com/nuts-foundation/go-leia/v4 v4.0.3/go.mod h1:tYveGED8tSbQYhZNv2DVTc51c2zEWmSF+MG96PAtalY= +github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316113658-1fd795bcf817 h1:TcGmXyW1VU9Ckg2HHGKWNRhy/cZtQov9uQhURJ3lz34= +github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316113658-1fd795bcf817/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= +github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316153534-f1ac089074a8 h1:BRjYE17wIpN4PO3Nzzhc4+4GbmZ9cDUSucOqf95PLK4= +github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316153534-f1ac089074a8/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= +github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316182547-6a2fd3517635 h1:R4PDHsITaz8HasPSR5JZhlWXLufm/jAUd/hfiiPV3Kk= +github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316182547-6a2fd3517635/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= +github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316183556-507bf1bdd4ff h1:zpHjSo/RlRV1HSiuJsZXwkMXFip5DUkimunO6Q55iUw= +github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316183556-507bf1bdd4ff/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= github.com/nuts-foundation/go-stoabs v1.9.0 h1:zK+ugfolaJYyBvGwsRuavLVdycXk4Yw/1gI+tz17lWQ= github.com/nuts-foundation/go-stoabs v1.9.0/go.mod h1:htbUqSZiaihqAvJfHwtAbQusGaJtIeWpm1pmKjBYXlM= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -618,8 +624,8 @@ github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/piprate/json-gold v0.5.1-0.20230111113000-6ddbe6e6f19f h1:HlPa7RcxTCrva5izPfTEfvYecO7LTahgmMRD1Qp13xg= -github.com/piprate/json-gold v0.5.1-0.20230111113000-6ddbe6e6f19f/go.mod h1:WZ501QQMbZZ+3pXFPhQKzNwS1+jls0oqov3uQ2WasLs= +github.com/piprate/json-gold v0.7.0 h1:bEMirgA5y8Z2loTQfxyIFfY+EflxH1CTP6r/KIlcJNw= +github.com/piprate/json-gold v0.7.0/go.mod h1:RVhE35veDX19r5gfUAR+IYHkAUuPwJO8Ie/qVeFaIzw= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -699,10 +705,11 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs 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= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -740,8 +747,8 @@ github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b/go.mod h1:5XA7W9S6mn github.com/templexxx/xorsimd v0.4.1/go.mod h1:W+ffZz8jJMH2SXwuKu9WhygqBMbFnp14G2fqEr8qaNo= github.com/templexxx/xorsimd v0.4.2 h1:ocZZ+Nvu65LGHmCLZ7OoCtg8Fx8jnHKK37SjvngUoVI= github.com/templexxx/xorsimd v0.4.2/go.mod h1:HgwaPoDREdi6OnULpSfxhzaiiSUY4Fi3JPn1wpt28NI= -github.com/tidwall/gjson v1.17.0 h1:/Jocvlh98kcTfpN2+JzGQWQcqrPQwDrVEMApx/M5ZwM= -github.com/tidwall/gjson v1.17.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= +github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= @@ -792,8 +799,8 @@ github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= -go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= +go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo= +go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E= go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= diff --git a/storage/cmd/cmd.go b/storage/cmd/cmd.go index 51bbe6d8eb..4e6740aece 100644 --- a/storage/cmd/cmd.go +++ b/storage/cmd/cmd.go @@ -39,5 +39,6 @@ func FlagSet() *pflag.FlagSet { flagSet.StringSlice("storage.redis.sentinel.nodes", defs.Redis.Sentinel.Nodes, "Addresses of the Redis Sentinels to connect to initially. Setting this property enables Redis Sentinel.") flagSet.String("storage.redis.sentinel.username", defs.Redis.Sentinel.Username, "Username for authenticating to Redis Sentinels.") flagSet.String("storage.redis.sentinel.password", defs.Redis.Sentinel.Password, "Password for authenticating to Redis Sentinels.") + flagSet.Bool("storage.debug", defs.Debug, "When true, enables extra logging of storage-layer problems (e.g. performance issues).") return flagSet } diff --git a/storage/config.go b/storage/config.go index a3ca36e396..5a2ff4fd3e 100644 --- a/storage/config.go +++ b/storage/config.go @@ -24,6 +24,8 @@ import "time" type Config struct { BBolt BBoltConfig `koanf:"bbolt"` Redis RedisConfig `koanf:"redis"` + // Debug specifies whether to enable debug logging for the storage engine, e.g. performance metrics and query logging. + Debug bool `koanf:"debug"` } // DefaultConfig returns the default configuration for the module. diff --git a/storage/engine.go b/storage/engine.go index 5c8fdd57bb..f1530a5c30 100644 --- a/storage/engine.go +++ b/storage/engine.go @@ -1,5 +1,4 @@ -/* - * Copyright (C) 2022 Nuts community +/* Copyright (C) 2022 Nuts community * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,17 +21,21 @@ import ( "context" "errors" "fmt" + "strings" + "sync" + "time" + + "github.com/nuts-foundation/go-leia/v4" "github.com/nuts-foundation/go-stoabs" "github.com/nuts-foundation/nuts-node/core" "github.com/nuts-foundation/nuts-node/storage/log" "github.com/redis/go-redis/v9" - "strings" - "sync" - "time" ) const storeShutdownTimeout = 5 * time.Second +var LeiaQueryStatsCallback = leia.NoOpQueryStatsCallbacks + // New creates a new instance of the storage engine. func New() Engine { return &engine{ @@ -108,6 +111,27 @@ func (e *engine) Configure(config core.ServerConfig) error { return fmt.Errorf("unable to configure BBolt database: %w", err) } e.databases = append(e.databases, bboltDB) + + if e.config.Debug { + LeiaQueryStatsCallback = leia.QueryStatsCallbacks{ + OnIndexProblem: func(stats leia.IndexStats) { + entry := log.Logger(). + WithField("leia_collection", stats.Collection). + WithField("leia_documents_scanned", stats.DocumentsScanned). + WithField("leia_documents_scanned_bytes", stats.DocumentsScannedBytes). + WithField("leia_documents_matched", stats.DocumentsMatched). + WithField("leia_documents_matched_bytes", stats.DocumentsMatchedBytes). + WithField("leia_unindexed_fields", stats.UnindexedFields) + if stats.IndexUsed == "" { + entry.Warnf("leia: full table scan detected for query: %s", stats.Query) + } else { + entry.WithField("leia_index_used", stats.IndexUsed). + WithField("leia_filter_efficiency", stats.FilterEfficiency). + Warnf("leia: suboptimal index usage detected for query: %s", stats.Query) + } + }, + } + } return nil } diff --git a/storage/interface.go b/storage/interface.go index f9b3f9b662..b98a38a9d1 100644 --- a/storage/interface.go +++ b/storage/interface.go @@ -19,9 +19,10 @@ package storage import ( + "time" + "github.com/nuts-foundation/go-stoabs" "github.com/nuts-foundation/nuts-node/core" - "time" ) const lockAcquireTimeout = time.Second diff --git a/vcr/issuer/leia_store.go b/vcr/issuer/leia_store.go index d663ac1b0e..e14100069c 100644 --- a/vcr/issuer/leia_store.go +++ b/vcr/issuer/leia_store.go @@ -22,6 +22,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/nuts-foundation/go-leia/v4" "github.com/nuts-foundation/go-stoabs" "github.com/nuts-foundation/nuts-node/core" @@ -46,7 +47,7 @@ type leiaIssuerStore struct { // NewLeiaIssuerStore creates a new instance of leiaIssuerStore which implements the Store interface. func NewLeiaIssuerStore(dbPath string, backupStore stoabs.KVStore) (Store, error) { - store, err := leia.NewStore(dbPath) + store, err := leia.NewStore(dbPath, leia.WithQueryStatsCallbacks(storage.LeiaQueryStatsCallback)) if err != nil { return nil, fmt.Errorf("failed to create leiaIssuerStore: %w", err) } diff --git a/vcr/vcr.go b/vcr/vcr.go index 72d4ba79a7..742f75a4c0 100644 --- a/vcr/vcr.go +++ b/vcr/vcr.go @@ -24,16 +24,17 @@ import ( "encoding/json" "errors" "fmt" - "github.com/nuts-foundation/go-leia/v4" - "github.com/nuts-foundation/nuts-node/pki" - "github.com/nuts-foundation/nuts-node/vcr/openid4vci" - "github.com/nuts-foundation/nuts-node/vdr/didstore" "io/fs" "net/http" "path" "strings" "time" + "github.com/nuts-foundation/go-leia/v4" + "github.com/nuts-foundation/nuts-node/pki" + "github.com/nuts-foundation/nuts-node/vcr/openid4vci" + "github.com/nuts-foundation/nuts-node/vdr/didstore" + ssi "github.com/nuts-foundation/go-did" "github.com/nuts-foundation/go-did/did" "github.com/nuts-foundation/go-did/vc" @@ -258,7 +259,7 @@ func (c *vcr) createCredentialsStore() error { if err != nil { return err } - credentialsStore, err := leia.NewStore(credentialsStorePath, leia.WithDocumentLoader(c.jsonldManager.DocumentLoader())) + credentialsStore, err := leia.NewStore(credentialsStorePath, leia.WithDocumentLoader(c.jsonldManager.DocumentLoader()), leia.WithQueryStatsCallbacks(storage.LeiaQueryStatsCallback)) if err != nil { return err } diff --git a/vcr/verifier/leia_store.go b/vcr/verifier/leia_store.go index 29a1dc3809..010dc1d27b 100644 --- a/vcr/verifier/leia_store.go +++ b/vcr/verifier/leia_store.go @@ -22,6 +22,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/nuts-foundation/go-leia/v4" "github.com/nuts-foundation/go-stoabs" "github.com/nuts-foundation/nuts-node/core" @@ -42,7 +43,7 @@ type leiaVerifierStore struct { // NewLeiaVerifierStore creates a new instance of leiaVerifierStore which implements the Store interface. func NewLeiaVerifierStore(dbPath string, backupStore stoabs.KVStore) (Store, error) { - store, err := leia.NewStore(dbPath) + store, err := leia.NewStore(dbPath, leia.WithQueryStatsCallbacks(storage.LeiaQueryStatsCallback)) if err != nil { return nil, fmt.Errorf("failed to create leiaVerifierStore: %w", err) } From 0beea183d6443b0b81c19abc4fddf3a339a6659f Mon Sep 17 00:00:00 2001 From: Rein Krul Date: Tue, 17 Mar 2026 08:46:23 +0100 Subject: [PATCH 2/5] Update go-leia --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 68f3549f8e..242c5cd15b 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/nats-io/nats.go v1.48.0 github.com/nuts-foundation/crypto-ecies v0.0.0-20211207143025-5b84f9efce2b github.com/nuts-foundation/go-did v0.5.1 - github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316183556-507bf1bdd4ff + github.com/nuts-foundation/go-leia/v4 v4.3.0 github.com/nuts-foundation/go-stoabs v1.9.0 github.com/piprate/json-gold v0.7.0 github.com/privacybydesign/irmago v0.17.1 diff --git a/go.sum b/go.sum index 632b0d5f5f..72773efb71 100644 --- a/go.sum +++ b/go.sum @@ -577,6 +577,8 @@ github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316182547-6a2fd3517635 h1:R4 github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316182547-6a2fd3517635/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316183556-507bf1bdd4ff h1:zpHjSo/RlRV1HSiuJsZXwkMXFip5DUkimunO6Q55iUw= github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316183556-507bf1bdd4ff/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= +github.com/nuts-foundation/go-leia/v4 v4.3.0 h1:R0qGISIeg2q/PCQTC9cuoBtA6cFu4WBV2DbmSOWKZyM= +github.com/nuts-foundation/go-leia/v4 v4.3.0/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= github.com/nuts-foundation/go-stoabs v1.9.0 h1:zK+ugfolaJYyBvGwsRuavLVdycXk4Yw/1gI+tz17lWQ= github.com/nuts-foundation/go-stoabs v1.9.0/go.mod h1:htbUqSZiaihqAvJfHwtAbQusGaJtIeWpm1pmKjBYXlM= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= From 1dbd6ce97c29e32e8a3360f17b550d3e0837ddc0 Mon Sep 17 00:00:00 2001 From: Rein Krul Date: Tue, 17 Mar 2026 08:55:03 +0100 Subject: [PATCH 3/5] Tests --- go.sum | 8 ------- storage/engine.go | 34 ++++++++++++++-------------- storage/engine_test.go | 50 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 67 insertions(+), 25 deletions(-) diff --git a/go.sum b/go.sum index 72773efb71..c5513230d9 100644 --- a/go.sum +++ b/go.sum @@ -569,14 +569,6 @@ github.com/nuts-foundation/did-ockam v0.0.0-20230313074753-fafd938c948c h1:Q2Naw github.com/nuts-foundation/did-ockam v0.0.0-20230313074753-fafd938c948c/go.mod h1:n0NQI71qGVVShnPDjYdCoNStEW0zZoVWbeSQ+esXuhs= github.com/nuts-foundation/go-did v0.5.1 h1:akc4OzNGHdnliJFoxnnSmUI7j1yKz/BHNi6sXiWX30A= github.com/nuts-foundation/go-did v0.5.1/go.mod h1:Aw1pIRyB9naQ8z/dc4rrPhn+nHx5LUcGysBGlezL528= -github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316113658-1fd795bcf817 h1:TcGmXyW1VU9Ckg2HHGKWNRhy/cZtQov9uQhURJ3lz34= -github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316113658-1fd795bcf817/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= -github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316153534-f1ac089074a8 h1:BRjYE17wIpN4PO3Nzzhc4+4GbmZ9cDUSucOqf95PLK4= -github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316153534-f1ac089074a8/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= -github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316182547-6a2fd3517635 h1:R4PDHsITaz8HasPSR5JZhlWXLufm/jAUd/hfiiPV3Kk= -github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316182547-6a2fd3517635/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= -github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316183556-507bf1bdd4ff h1:zpHjSo/RlRV1HSiuJsZXwkMXFip5DUkimunO6Q55iUw= -github.com/nuts-foundation/go-leia/v4 v4.2.1-0.20260316183556-507bf1bdd4ff/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= github.com/nuts-foundation/go-leia/v4 v4.3.0 h1:R0qGISIeg2q/PCQTC9cuoBtA6cFu4WBV2DbmSOWKZyM= github.com/nuts-foundation/go-leia/v4 v4.3.0/go.mod h1:Gw6bXqJLOAmHSiXJJYbVoj+Mowp/PoBRywO0ZPsVzA0= github.com/nuts-foundation/go-stoabs v1.9.0 h1:zK+ugfolaJYyBvGwsRuavLVdycXk4Yw/1gI+tz17lWQ= diff --git a/storage/engine.go b/storage/engine.go index f1530a5c30..135f89ca48 100644 --- a/storage/engine.go +++ b/storage/engine.go @@ -114,27 +114,29 @@ func (e *engine) Configure(config core.ServerConfig) error { if e.config.Debug { LeiaQueryStatsCallback = leia.QueryStatsCallbacks{ - OnIndexProblem: func(stats leia.IndexStats) { - entry := log.Logger(). - WithField("leia_collection", stats.Collection). - WithField("leia_documents_scanned", stats.DocumentsScanned). - WithField("leia_documents_scanned_bytes", stats.DocumentsScannedBytes). - WithField("leia_documents_matched", stats.DocumentsMatched). - WithField("leia_documents_matched_bytes", stats.DocumentsMatchedBytes). - WithField("leia_unindexed_fields", stats.UnindexedFields) - if stats.IndexUsed == "" { - entry.Warnf("leia: full table scan detected for query: %s", stats.Query) - } else { - entry.WithField("leia_index_used", stats.IndexUsed). - WithField("leia_filter_efficiency", stats.FilterEfficiency). - Warnf("leia: suboptimal index usage detected for query: %s", stats.Query) - } - }, + OnIndexProblem: logLeiaQueryStats, } } return nil } +func logLeiaQueryStats(stats leia.IndexStats) { + entry := log.Logger(). + WithField("leia_collection", stats.Collection). + WithField("leia_documents_scanned", stats.DocumentsScanned). + WithField("leia_documents_scanned_bytes", stats.DocumentsScannedBytes). + WithField("leia_documents_matched", stats.DocumentsMatched). + WithField("leia_documents_matched_bytes", stats.DocumentsMatchedBytes). + WithField("leia_unindexed_fields", stats.UnindexedFields) + if stats.IndexUsed == "" { + entry.Warnf("leia: full table scan detected for query: %s", stats.Query) + } else { + entry.WithField("leia_index_used", stats.IndexUsed). + WithField("leia_filter_efficiency", stats.FilterEfficiency). + Warnf("leia: suboptimal index usage detected for query: %s", stats.Query) + } +} + func (e *engine) GetProvider(moduleName string) Provider { return &provider{ moduleName: strings.ToLower(moduleName), diff --git a/storage/engine_test.go b/storage/engine_test.go index 5a4edb660a..dc1308166e 100644 --- a/storage/engine_test.go +++ b/storage/engine_test.go @@ -20,13 +20,17 @@ package storage import ( "errors" + "testing" + + leia "github.com/nuts-foundation/go-leia/v4" "github.com/nuts-foundation/go-stoabs" "github.com/nuts-foundation/nuts-node/core" "github.com/nuts-foundation/nuts-node/test/io" + "github.com/sirupsen/logrus" + logTest "github.com/sirupsen/logrus/hooks/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" - "testing" ) func Test_New(t *testing.T) { @@ -97,3 +101,47 @@ func Test_engine_Shutdown(t *testing.T) { assert.EqualError(t, err, "one or more stores failed to close") }) } + +func Test_logLeiaQueryStats(t *testing.T) { + t.Run("full table scan logs warning without index", func(t *testing.T) { + hook := &logTest.Hook{} + logrus.AddHook(hook) + defer func() { logrus.StandardLogger().ReplaceHooks(logrus.LevelHooks{}) }() + + logLeiaQueryStats(leia.IndexStats{ + Collection: "testCollection", + DocumentsScanned: 100, + DocumentsScannedBytes: 1000, + DocumentsMatched: 5, + DocumentsMatchedBytes: 50, + UnindexedFields: []string{"field1", "field2"}, + IndexUsed: "", + FilterEfficiency: 0, + }) + + require.NotNil(t, hook.LastEntry()) + assert.Equal(t, logrus.WarnLevel, hook.LastEntry().Level) + assert.Contains(t, hook.LastEntry().Message, "full table scan") + }) + t.Run("suboptimal index usage logs warning with index name", func(t *testing.T) { + hook := &logTest.Hook{} + logrus.AddHook(hook) + defer func() { logrus.StandardLogger().ReplaceHooks(logrus.LevelHooks{}) }() + + logLeiaQueryStats(leia.IndexStats{ + Collection: "testCollection", + DocumentsScanned: 100, + DocumentsScannedBytes: 1000, + DocumentsMatched: 5, + DocumentsMatchedBytes: 50, + UnindexedFields: []string{"field2"}, + IndexUsed: "field1_index", + FilterEfficiency: 0.05, + }) + + require.NotNil(t, hook.LastEntry()) + assert.Equal(t, logrus.WarnLevel, hook.LastEntry().Level) + assert.Contains(t, hook.LastEntry().Message, "suboptimal index") + assert.Equal(t, "field1_index", hook.LastEntry().Data["leia_index_used"]) + }) +} From d8d788c281276ce505cc2dc7837e2b76d02f2db7 Mon Sep 17 00:00:00 2001 From: Rein Krul Date: Wed, 18 Mar 2026 10:02:51 +0100 Subject: [PATCH 4/5] PR feedback --- storage/engine.go | 29 +++++++++++++++++++++++++---- vcr/issuer/leia_store.go | 2 +- vcr/vcr.go | 2 +- vcr/verifier/leia_store.go | 2 +- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/storage/engine.go b/storage/engine.go index 135f89ca48..e42f5f7692 100644 --- a/storage/engine.go +++ b/storage/engine.go @@ -29,12 +29,19 @@ import ( "github.com/nuts-foundation/go-stoabs" "github.com/nuts-foundation/nuts-node/core" "github.com/nuts-foundation/nuts-node/storage/log" + "github.com/piprate/json-gold/ld" "github.com/redis/go-redis/v9" ) const storeShutdownTimeout = 5 * time.Second -var LeiaQueryStatsCallback = leia.NoOpQueryStatsCallbacks +// newDocumentStoreFunc is the function type for creating a new Leia document store. +type newDocumentStoreFunc func(path string, documentLoader interface{}) (leia.Store, error) + +// NewDocumentStore is the factory function for creating Leia stores. +var NewDocumentStore newDocumentStoreFunc = func(path string, documentLoader interface{}) (leia.Store, error) { + return createLeiaStore(path, documentLoader, false) +} // New creates a new instance of the storage engine. func New() Engine { @@ -112,12 +119,26 @@ func (e *engine) Configure(config core.ServerConfig) error { } e.databases = append(e.databases, bboltDB) - if e.config.Debug { - LeiaQueryStatsCallback = leia.QueryStatsCallbacks{ + NewDocumentStore = func(path string, documentLoader interface{}) (leia.Store, error) { + return createLeiaStore(path, documentLoader, e.config.Debug) + } + + return nil +} + +func createLeiaStore(path string, documentLoader interface{}, debug bool) (leia.Store, error) { + var options []leia.StoreOption + if debug { + options = append(options, leia.WithQueryStatsCallbacks(leia.QueryStatsCallbacks{ OnIndexProblem: logLeiaQueryStats, + })) + } + if documentLoader != nil { + if loader, ok := documentLoader.(ld.DocumentLoader); ok { + options = append(options, leia.WithDocumentLoader(loader)) } } - return nil + return leia.NewStore(path, options...) } func logLeiaQueryStats(stats leia.IndexStats) { diff --git a/vcr/issuer/leia_store.go b/vcr/issuer/leia_store.go index e14100069c..7be721f169 100644 --- a/vcr/issuer/leia_store.go +++ b/vcr/issuer/leia_store.go @@ -47,7 +47,7 @@ type leiaIssuerStore struct { // NewLeiaIssuerStore creates a new instance of leiaIssuerStore which implements the Store interface. func NewLeiaIssuerStore(dbPath string, backupStore stoabs.KVStore) (Store, error) { - store, err := leia.NewStore(dbPath, leia.WithQueryStatsCallbacks(storage.LeiaQueryStatsCallback)) + store, err := storage.NewDocumentStore(dbPath, nil) if err != nil { return nil, fmt.Errorf("failed to create leiaIssuerStore: %w", err) } diff --git a/vcr/vcr.go b/vcr/vcr.go index 742f75a4c0..a9f9989aa8 100644 --- a/vcr/vcr.go +++ b/vcr/vcr.go @@ -259,7 +259,7 @@ func (c *vcr) createCredentialsStore() error { if err != nil { return err } - credentialsStore, err := leia.NewStore(credentialsStorePath, leia.WithDocumentLoader(c.jsonldManager.DocumentLoader()), leia.WithQueryStatsCallbacks(storage.LeiaQueryStatsCallback)) + credentialsStore, err := storage.NewDocumentStore(credentialsStorePath, c.jsonldManager.DocumentLoader()) if err != nil { return err } diff --git a/vcr/verifier/leia_store.go b/vcr/verifier/leia_store.go index 010dc1d27b..cd52a141cf 100644 --- a/vcr/verifier/leia_store.go +++ b/vcr/verifier/leia_store.go @@ -43,7 +43,7 @@ type leiaVerifierStore struct { // NewLeiaVerifierStore creates a new instance of leiaVerifierStore which implements the Store interface. func NewLeiaVerifierStore(dbPath string, backupStore stoabs.KVStore) (Store, error) { - store, err := leia.NewStore(dbPath, leia.WithQueryStatsCallbacks(storage.LeiaQueryStatsCallback)) + store, err := storage.NewDocumentStore(dbPath, nil) if err != nil { return nil, fmt.Errorf("failed to create leiaVerifierStore: %w", err) } From 48c240bb96952a42c9e5a962a7dc91fd1c73cea8 Mon Sep 17 00:00:00 2001 From: Rein Krul Date: Wed, 18 Mar 2026 10:04:31 +0100 Subject: [PATCH 5/5] Update to json-gold 0.8.0 for potential performance improvements --- go.mod | 7 ++++--- go.sum | 14 ++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index cb57cecdef..6fb4af15f9 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/nuts-foundation/go-did v0.5.1 github.com/nuts-foundation/go-leia/v4 v4.3.0 github.com/nuts-foundation/go-stoabs v1.9.0 - github.com/piprate/json-gold v0.7.0 + github.com/piprate/json-gold v0.8.0 github.com/privacybydesign/irmago v0.17.1 github.com/prometheus/client_golang v1.19.1 github.com/prometheus/client_model v0.6.1 @@ -44,7 +44,7 @@ require ( golang.org/x/crypto v0.47.0 golang.org/x/time v0.14.0 google.golang.org/grpc v1.64.1 - google.golang.org/protobuf v1.34.1 + google.golang.org/protobuf v1.34.2 gopkg.in/Regis24GmbH/go-phonetics.v2 v2.0.3 gopkg.in/yaml.v3 v3.0.1 schneider.vip/problem v1.9.1 @@ -69,6 +69,7 @@ require ( github.com/bwesterb/go-pow v1.0.0 // indirect github.com/bwesterb/go-xmssmt v1.5.2 // indirect github.com/bytedance/sonic v1.10.2 // indirect + github.com/cayleygraph/quad v1.3.0 // indirect github.com/cenkalti/backoff/v3 v3.0.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -170,7 +171,7 @@ require ( github.com/pelletier/go-toml/v2 v2.0.9 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect + github.com/pquerna/cachecontrol v0.2.0 // indirect github.com/privacybydesign/gabi v0.0.0-20221212095008-68a086907750 // indirect github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect diff --git a/go.sum b/go.sum index c5513230d9..facded7e95 100644 --- a/go.sum +++ b/go.sum @@ -99,6 +99,8 @@ github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1 github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= github.com/bytedance/sonic v1.10.2 h1:GQebETVBxYB7JGWJtLBi07OVzWwt+8dWA00gEVW2ZFE= github.com/bytedance/sonic v1.10.2/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= +github.com/cayleygraph/quad v1.3.0 h1:xg7HOLWWPgvZ4CcvzEpfCwq42L8mzYUR+8V0jtYoBzc= +github.com/cayleygraph/quad v1.3.0/go.mod h1:NadtM7uMm78FskmX++XiOOrNvgkq0E1KvvhQdMseMz4= github.com/cbroglie/mustache v1.4.0 h1:Azg0dVhxTml5me+7PsZ7WPrQq1Gkf3WApcHMjMprYoU= github.com/cbroglie/mustache v1.4.0/go.mod h1:SS1FTIghy0sjse4DUVGV1k/40B1qE1XkD9DtDsHo9iM= github.com/cenkalti/backoff/v3 v3.0.0 h1:ske+9nBpD9qZsTBoF41nW5L+AIuFBKMeze18XQ3eG1c= @@ -618,8 +620,8 @@ github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0= github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/piprate/json-gold v0.7.0 h1:bEMirgA5y8Z2loTQfxyIFfY+EflxH1CTP6r/KIlcJNw= -github.com/piprate/json-gold v0.7.0/go.mod h1:RVhE35veDX19r5gfUAR+IYHkAUuPwJO8Ie/qVeFaIzw= +github.com/piprate/json-gold v0.8.0 h1:2NGd69cEpaW13eDlj6Q7q5vXAsvbqUftFwXg8IS7c4Q= +github.com/piprate/json-gold v0.8.0/go.mod h1:gcirrR3WDKegzR9SNouIB0uFhVqY2FXb2b46f4FN6Ec= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -631,8 +633,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAmPf4YLrFg6oQUotqHQeUNWwkvo7jZp1GLU= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/pquerna/cachecontrol v0.2.0 h1:vBXSNuE5MYP9IJ5kjsdo8uq+w41jSPgvba2DEnkRx9k= +github.com/pquerna/cachecontrol v0.2.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= github.com/privacybydesign/gabi v0.0.0-20221212095008-68a086907750 h1:3RuYOQTlArQ6Uw2TgySusmZGluP+18WdQL56YSfkM3Q= github.com/privacybydesign/gabi v0.0.0-20221212095008-68a086907750/go.mod h1:QZI8hX8Ff2GfZ7UJuxyWw3nAGgt2s5+U4hxY6rmwQvs= github.com/privacybydesign/irmago v0.17.1 h1:BWRfKEHsWUbtPkeIbeZAxGNkHKvnTb/mZxkbfoDOIjI= @@ -1069,8 +1071,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/Regis24GmbH/go-diacritics.v2 v2.0.3 h1:rz88vn1OH2B9kKorR+QCrcuw6WbizVwahU2Y9Q09xqU= gopkg.in/Regis24GmbH/go-diacritics.v2 v2.0.3/go.mod h1:vJmfdx2L0+30M90zUd0GCjLV14Ip3ZgWR5+MV1qljOo= gopkg.in/Regis24GmbH/go-phonetics.v2 v2.0.3 h1:pSSZonNnrORBQXIm3kl6P9EQTNqVds9zszK/BXbOItg=