diff --git a/component/vdr/jwk/go.mod b/component/vdr/jwk/go.mod index 94860f72..55d75780 100644 --- a/component/vdr/jwk/go.mod +++ b/component/vdr/jwk/go.mod @@ -8,7 +8,7 @@ go 1.19 require ( github.com/hyperledger/aries-framework-go v0.1.9-0.20221201073943-47b08f16c301 github.com/stretchr/testify v1.8.1 - github.com/trustbloc/sidetree-core-go v1.0.0-rc3.0.20221028171319-8d44bd1cace7 + github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 ) require ( diff --git a/component/vdr/jwk/go.sum b/component/vdr/jwk/go.sum index fcd5937e..93581217 100644 --- a/component/vdr/jwk/go.sum +++ b/component/vdr/jwk/go.sum @@ -21,8 +21,8 @@ github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/tink/go v1.7.0 h1:6Eox8zONGebBFcCBqkVmt60LaWZa6xg1cl/DwAh/J1w= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -75,8 +75,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/teserakt-io/golang-ed25519 v0.0.0-20210104091850-3888c087a4c8 h1:RBkacARv7qY5laaXGlF4wFB/tk5rnthhPb8oIBGoagY= github.com/teserakt-io/golang-ed25519 v0.0.0-20210104091850-3888c087a4c8/go.mod h1:9PdLyPiZIiW3UopXyRnPYyjUXSpiQNHRLu8fOsR3o8M= -github.com/trustbloc/sidetree-core-go v1.0.0-rc3.0.20221028171319-8d44bd1cace7 h1:/7Ak2CW7iJEVF/uYhOu3KUAKTTlNII0DnJlAkw/hGoQ= -github.com/trustbloc/sidetree-core-go v1.0.0-rc3.0.20221028171319-8d44bd1cace7/go.mod h1:SOuPJu8u7DSs2c494HPFAkkZ3KlfR/4swQ+YWqxZ2C8= +github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 h1:8J/lEaFqWfGugvt5u/d5l9OvJoZZpE2XU3bR/U6iKjM= +github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692/go.mod h1:jdxAFuorlIwFOGVW6O455/lZqxg2mZkRHNTEolcZdDI= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= diff --git a/component/vdr/longform/go.mod b/component/vdr/longform/go.mod index 911b7f97..032eb75e 100644 --- a/component/vdr/longform/go.mod +++ b/component/vdr/longform/go.mod @@ -12,7 +12,7 @@ require ( github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20220610133818-119077b0ec85 github.com/piprate/json-gold v0.4.2 github.com/stretchr/testify v1.8.1 - github.com/trustbloc/sidetree-core-go v1.0.0-rc3.0.20221028171319-8d44bd1cace7 + github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 ) require ( @@ -36,12 +36,15 @@ require ( github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/square/go-jose/v3 v3.0.0-20200630053402-0a67ce9b0693 // indirect github.com/teserakt-io/golang-ed25519 v0.0.0-20210104091850-3888c087a4c8 // indirect + github.com/trustbloc/logutil-go v1.0.0-rc1 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect + go.opentelemetry.io/otel v1.12.0 // indirect + go.opentelemetry.io/otel/trace v1.12.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.17.0 // indirect + go.uber.org/zap v1.23.0 // indirect golang.org/x/crypto v0.1.0 // indirect golang.org/x/sys v0.1.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/component/vdr/longform/go.sum b/component/vdr/longform/go.sum index a695f6cb..0ff97dc0 100644 --- a/component/vdr/longform/go.sum +++ b/component/vdr/longform/go.sum @@ -1,5 +1,6 @@ github.com/VictoriaMetrics/fastcache v1.5.7 h1:4y6y0G8PRzszQUYIQHHssv/jgPHAb5qQuuDNdCbyAgw= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= @@ -23,11 +24,13 @@ github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0 github.com/evanphx/json-patch v4.1.0+incompatible h1:K1MDoo4AZ4wU0GIU/fPmtZg7VpzLjCxu+UwBD1FvwOc= github.com/evanphx/json-patch v4.1.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/tink/go v1.7.0 h1:6Eox8zONGebBFcCBqkVmt60LaWZa6xg1cl/DwAh/J1w= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -77,7 +80,6 @@ github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5 github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/piprate/json-gold v0.4.2 h1:Rq8V+637HOFcj20KdTqW/g/llCwX2qtau0g5d1pD79o= github.com/piprate/json-gold v0.4.2/go.mod h1:OK1z7UgtBZk06n2cDE2OSq1kffmjFFp5/2yhLLCz9UM= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -95,15 +97,16 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/teserakt-io/golang-ed25519 v0.0.0-20210104091850-3888c087a4c8 h1:RBkacARv7qY5laaXGlF4wFB/tk5rnthhPb8oIBGoagY= github.com/teserakt-io/golang-ed25519 v0.0.0-20210104091850-3888c087a4c8/go.mod h1:9PdLyPiZIiW3UopXyRnPYyjUXSpiQNHRLu8fOsR3o8M= -github.com/trustbloc/sidetree-core-go v1.0.0-rc3.0.20221028171319-8d44bd1cace7 h1:/7Ak2CW7iJEVF/uYhOu3KUAKTTlNII0DnJlAkw/hGoQ= -github.com/trustbloc/sidetree-core-go v1.0.0-rc3.0.20221028171319-8d44bd1cace7/go.mod h1:SOuPJu8u7DSs2c494HPFAkkZ3KlfR/4swQ+YWqxZ2C8= +github.com/trustbloc/logutil-go v1.0.0-rc1 h1:rRJbvgQfrlUfyej+mY0nuQJymGqjRW4oZEwKi544F4c= +github.com/trustbloc/logutil-go v1.0.0-rc1/go.mod h1:JlxT0oZfNKgIlSNtgc001WEeDMxlnAvOM43gNm8DQVc= +github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 h1:8J/lEaFqWfGugvt5u/d5l9OvJoZZpE2XU3bR/U6iKjM= +github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692/go.mod h1:jdxAFuorlIwFOGVW6O455/lZqxg2mZkRHNTEolcZdDI= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -111,12 +114,18 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +go.opentelemetry.io/otel v1.12.0 h1:IgfC7kqQrRccIKuB7Cl+SRUmsKbEwSGPr0Eu+/ht1SQ= +go.opentelemetry.io/otel v1.12.0/go.mod h1:geaoz0L0r1BEOR81k7/n9W4TCXYCJ7bPO7K374jQHG0= +go.opentelemetry.io/otel/sdk v1.12.0 h1:8npliVYV7qc0t1FKdpU08eMnOjgPFMnriPhn0HH4q3o= +go.opentelemetry.io/otel/trace v1.12.0 h1:p28in++7Kd0r2d8gSt931O57fdjUyWxkVbESuILAeUc= +go.opentelemetry.io/otel/trace v1.12.0/go.mod h1:pHlgBynn6s25qJ2szD+Bv+iwKJttjHSI3lUAyf0GNuQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= +go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -145,9 +154,6 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/component/vdr/sidetree/client.go b/component/vdr/sidetree/client.go index 62486ec4..c7f787f3 100644 --- a/component/vdr/sidetree/client.go +++ b/component/vdr/sidetree/client.go @@ -41,12 +41,15 @@ type authTokenProvider interface { AuthToken() (string, error) } +// GetEndpointsFunc retrieves sidetree endpoints. +type GetEndpointsFunc = func(disableCache bool) ([]string, error) + // Client sidetree client. type Client struct { client *http.Client authToken string authTokenProvider authTokenProvider - sendRequest func(req []byte, getEndpoints func() ([]string, error)) ([]byte, error) + sendRequest func(req []byte, getEndpoints GetEndpointsFunc) ([]byte, error) } // New return sidetree client. @@ -64,7 +67,7 @@ func New(opts ...Option) *Client { } // CreateDID create did doc. -func (c *Client) CreateDID(opts ...create.Option) (*docdid.DocResolution, error) { // +func (c *Client) CreateDID(opts ...create.Option) (*docdid.DocResolution, error) { createDIDOpts := &create.Opts{MultiHashAlgorithm: defaultHashAlgorithm} // Apply options for _, opt := range opts { @@ -416,16 +419,32 @@ func buildDeactivateRequest(did string, deactivateDIDOpts *deactivate.Opts) ([]b }) } -func (c *Client) defaultSendRequest(req []byte, getEndpoints func() ([]string, error)) ([]byte, error) { +func (c *Client) defaultSendRequest(req []byte, getEndpoints GetEndpointsFunc) ([]byte, error) { if getEndpoints == nil { return nil, fmt.Errorf("sidetree get endpoints func is required") } - endpoints, err := getEndpoints() + responseBytes, err := c.doSendRequest(req, getEndpoints, false) + if err != nil { + logger.Warnf("Error sending request. Trying again with endpoint cache disabled.: %s", err) + + responseBytes, err = c.doSendRequest(req, getEndpoints, true) + if err != nil { + return nil, fmt.Errorf("sidetree get endpoints: %w", err) + } + } + + return responseBytes, nil +} + +func (c *Client) doSendRequest(req []byte, getEndpoints GetEndpointsFunc, disableCache bool) ([]byte, error) { + endpoints, err := getEndpoints(disableCache) if err != nil { return nil, fmt.Errorf("sidetree get endpoints: %w", err) } + logger.Debugf("Got sidetree endpoints: %s", endpoints) + // TODO add logic for using different sidetree endpoint // for now will use the first one endpointURL := endpoints[0] diff --git a/component/vdr/sidetree/client_test.go b/component/vdr/sidetree/client_test.go index 24355f9d..ac7d43e2 100644 --- a/component/vdr/sidetree/client_test.go +++ b/component/vdr/sidetree/client_test.go @@ -86,7 +86,7 @@ func TestClient_DeactivateDID(t *testing.T) { err = v.DeactivateDID("did:ex:123", deactivate.WithOperationCommitment(rv), deactivate.WithSigner(newSignerMock(t, privKey)), - deactivate.WithSidetreeEndpoint(func() ([]string, error) { + deactivate.WithSidetreeEndpoint(func(bool) ([]string, error) { return nil, fmt.Errorf("failed to get endpoint") })) require.Error(t, err) @@ -101,7 +101,7 @@ func TestClient_DeactivateDID(t *testing.T) { err = v.DeactivateDID("wrong", deactivate.WithOperationCommitment("value"), deactivate.WithSigner(newSignerMock(t, privKey)), - deactivate.WithSidetreeEndpoint(func() ([]string, error) { + deactivate.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil })) require.Error(t, err) @@ -127,7 +127,7 @@ func TestClient_DeactivateDID(t *testing.T) { err = v.DeactivateDID("did:ex:123", deactivate.WithOperationCommitment(rv), - deactivate.WithSigner(newSignerMock(t, privKey)), deactivate.WithSidetreeEndpoint(func() ([]string, error) { + deactivate.WithSigner(newSignerMock(t, privKey)), deactivate.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil })) require.Error(t, err) @@ -142,7 +142,7 @@ func TestClient_DeactivateDID(t *testing.T) { err = v.DeactivateDID("did:ex:123", deactivate.WithOperationCommitment("value"), - deactivate.WithSigner(newSignerMock(t, privKey)), deactivate.WithSidetreeEndpoint(func() ([]string, error) { + deactivate.WithSigner(newSignerMock(t, privKey)), deactivate.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil })) require.Error(t, err) @@ -167,7 +167,7 @@ func TestClient_DeactivateDID(t *testing.T) { require.NoError(t, err) err = v.DeactivateDID("did:ex:123", deactivate.WithSigner(newSignerMock(t, privKey)), - deactivate.WithOperationCommitment(rv), deactivate.WithSidetreeEndpoint(func() ([]string, error) { + deactivate.WithOperationCommitment(rv), deactivate.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{serv.URL}, nil })) require.NoError(t, err) @@ -244,6 +244,8 @@ func TestClient_RecoverDID(t *testing.T) { require.Error(t, err) require.Contains(t, err.Error(), "sidetree get endpoints func is required") + i := 0 + err = v.RecoverDID("did:ex:123", recovery.WithSigner(newSignerMock(t, signingKey)), recovery.WithOperationCommitment(rv), recovery.WithNextRecoveryPublicKey(pubKey), @@ -252,7 +254,15 @@ func TestClient_RecoverDID(t *testing.T) { Type: doc.Ed25519VerificationKey2018, JWK: jwk.JWK{JSONWebKey: gojose.JSONWebKey{Key: pubKey}}, }), - recovery.WithSidetreeEndpoint(func() ([]string, error) { + recovery.WithSidetreeEndpoint(func(disableCache bool) ([]string, error) { + i++ + + if i == 1 { + require.False(t, disableCache, "expecting disableCache to be false on the first call") + } else { + require.True(t, disableCache, "expecting disableCache to be true on the second call") + } + return nil, fmt.Errorf("failed to get endpoint") })) @@ -269,7 +279,7 @@ func TestClient_RecoverDID(t *testing.T) { err = v.RecoverDID("did:ex:123", recovery.WithOperationCommitment("value"), recovery.WithSigner(newSignerMock(t, privKey)), recovery.WithNextRecoveryPublicKey([]byte("wrong")), recovery.WithNextUpdatePublicKey(pubKey), - recovery.WithSidetreeEndpoint(func() ([]string, error) { + recovery.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil })) require.Error(t, err) @@ -285,7 +295,7 @@ func TestClient_RecoverDID(t *testing.T) { err = v.RecoverDID("did:ex:123", recovery.WithOperationCommitment("value"), recovery.WithSigner(newSignerMock(t, privKey)), recovery.WithNextUpdatePublicKey([]byte("wrong")), recovery.WithNextRecoveryPublicKey(pubKey), - recovery.WithSidetreeEndpoint(func() ([]string, error) { + recovery.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil })) require.Error(t, err) @@ -301,7 +311,7 @@ func TestClient_RecoverDID(t *testing.T) { err = v.RecoverDID("wrong", recovery.WithOperationCommitment("value"), recovery.WithSigner(newSignerMock(t, privKey)), recovery.WithNextUpdatePublicKey(pubKey), recovery.WithNextRecoveryPublicKey(pubKey), - recovery.WithSidetreeEndpoint(func() ([]string, error) { + recovery.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil })) require.Error(t, err) @@ -319,7 +329,7 @@ func TestClient_RecoverDID(t *testing.T) { err = v.RecoverDID("did:ex:123", recovery.WithOperationCommitment("value"), recovery.WithSigner(newSignerMock(t, ecPrivKey)), recovery.WithNextRecoveryPublicKey(pubKey), - recovery.WithSidetreeEndpoint(func() ([]string, error) { + recovery.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil }), recovery.WithNextUpdatePublicKey(pubKey), recovery.WithPublicKey(&doc.PublicKey{ ID: "key3", @@ -351,7 +361,7 @@ func TestClient_RecoverDID(t *testing.T) { require.NoError(t, err) err = v.RecoverDID("did:ex:123", recovery.WithOperationCommitment(rv), - recovery.WithSidetreeEndpoint(func() ([]string, error) { + recovery.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{serv.URL}, nil }), recovery.WithSigner(newSignerMock(t, ecPrivKey)), recovery.WithNextRecoveryPublicKey(pubKey), @@ -375,7 +385,7 @@ func TestClient_RecoverDID(t *testing.T) { require.NoError(t, err) err = v.RecoverDID("did:ex:123", recovery.WithOperationCommitment("value"), - recovery.WithSidetreeEndpoint(func() ([]string, error) { + recovery.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil }), recovery.WithSigner(newSignerMock(t, ecPrivKey)), recovery.WithNextRecoveryPublicKey(pubKey), @@ -417,7 +427,7 @@ func TestClient_RecoverDID(t *testing.T) { rv, err := commitment.GetRevealValue(signingPubKeyJWK, 18) require.NoError(t, err) - err = v.RecoverDID("did:ex:123", recovery.WithSidetreeEndpoint(func() ([]string, error) { + err = v.RecoverDID("did:ex:123", recovery.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{serv.URL}, nil }), recovery.WithSigner(newSignerMock(t, signingKey)), recovery.WithOperationCommitment(rv), recovery.WithNextRecoveryPublicKey(pubKey), @@ -491,7 +501,7 @@ func TestClient_UpdateDID(t *testing.T) { update.WithSigner(newSignerMock(t, signingKey)), update.WithOperationCommitment(rv), update.WithNextUpdatePublicKey(pubKey), - update.WithSidetreeEndpoint(func() ([]string, error) { + update.WithSidetreeEndpoint(func(bool) ([]string, error) { return nil, fmt.Errorf("failed to get endpoints") }), update.WithRemoveService("svc1")) @@ -507,7 +517,7 @@ func TestClient_UpdateDID(t *testing.T) { err = v.UpdateDID("did:ex:123", update.WithOperationCommitment("value"), update.WithSigner(newSignerMock(t, privKey)), - update.WithNextUpdatePublicKey([]byte("wrong")), update.WithSidetreeEndpoint(func() ([]string, error) { + update.WithNextUpdatePublicKey([]byte("wrong")), update.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil })) require.Error(t, err) @@ -524,7 +534,7 @@ func TestClient_UpdateDID(t *testing.T) { update.WithOperationCommitment("value"), update.WithSigner(newSignerMock(t, privKey)), update.WithNextUpdatePublicKey(pubKey), - update.WithSidetreeEndpoint(func() ([]string, error) { + update.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil }), } @@ -550,7 +560,7 @@ func TestClient_UpdateDID(t *testing.T) { err = v.UpdateDID("wrong", update.WithOperationCommitment("value"), update.WithSigner(newSignerMock(t, privKey)), - update.WithNextUpdatePublicKey(pubKey), update.WithSidetreeEndpoint(func() ([]string, error) { + update.WithNextUpdatePublicKey(pubKey), update.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil })) require.Error(t, err) @@ -577,7 +587,7 @@ func TestClient_UpdateDID(t *testing.T) { rv, err := commitment.GetRevealValue(signingPubKeyJWK, 18) require.NoError(t, err) - err = v.UpdateDID("did:ex:123", update.WithSidetreeEndpoint(func() ([]string, error) { + err = v.UpdateDID("did:ex:123", update.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{serv.URL}, nil }), update.WithSigner(newSignerMock(t, signingKey)), update.WithOperationCommitment(rv), update.WithNextUpdatePublicKey(pubKey), update.WithRemoveService("svc1"), @@ -601,7 +611,7 @@ func TestClient_UpdateDID(t *testing.T) { signingKey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) require.NoError(t, err) - err = v.UpdateDID("did:ex:123", update.WithSidetreeEndpoint(func() ([]string, error) { + err = v.UpdateDID("did:ex:123", update.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil }), update.WithSigner(newSignerMock(t, signingKey)), update.WithOperationCommitment("value"), update.WithNextUpdatePublicKey(pubKey), update.WithRemoveService("svc1"), @@ -636,7 +646,7 @@ func TestClient_UpdateDID(t *testing.T) { rv, err := commitment.GetRevealValue(signingPubKeyJWK, 18) require.NoError(t, err) - err = v.UpdateDID("did:ex:123", update.WithSidetreeEndpoint(func() ([]string, error) { + err = v.UpdateDID("did:ex:123", update.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{serv.URL}, nil }), update.WithSigner(newSignerMock(t, signingKey)), update.WithOperationCommitment(rv), update.WithNextUpdatePublicKey(pubKey), update.WithRemoveService("svc1"), @@ -684,7 +694,7 @@ func TestClient_CreateDID(t *testing.T) { JWK: jwk.JWK{JSONWebKey: gojose.JSONWebKey{Key: ed25519RecoveryPubKey}}, Purposes: []string{doc.KeyPurposeAuthentication}, }), - create.WithSidetreeEndpoint(func() ([]string, error) { + create.WithSidetreeEndpoint(func(bool) ([]string, error) { return nil, fmt.Errorf("failed to get endpoints") })) @@ -703,7 +713,7 @@ func TestClient_CreateDID(t *testing.T) { require.NoError(t, err) didResol, err := v.CreateDID(create.WithRecoveryPublicKey(ed25519RecoveryPubKey), - create.WithUpdatePublicKey(ed25519UpdatePubKey), create.WithSidetreeEndpoint(func() ([]string, error) { + create.WithUpdatePublicKey(ed25519UpdatePubKey), create.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil })) require.Error(t, err) @@ -717,7 +727,7 @@ func TestClient_CreateDID(t *testing.T) { defer serv.Close() didResol, err = v.CreateDID(create.WithRecoveryPublicKey(ed25519RecoveryPubKey), - create.WithUpdatePublicKey(ed25519UpdatePubKey), create.WithSidetreeEndpoint(func() ([]string, error) { + create.WithUpdatePublicKey(ed25519UpdatePubKey), create.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{serv.URL}, nil })) require.Error(t, err) @@ -734,7 +744,7 @@ func TestClient_CreateDID(t *testing.T) { defer serv.Close() didResol, err = v.CreateDID(create.WithRecoveryPublicKey(ed25519RecoveryPubKey), - create.WithUpdatePublicKey(ed25519UpdatePubKey), create.WithSidetreeEndpoint(func() ([]string, error) { + create.WithUpdatePublicKey(ed25519UpdatePubKey), create.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{serv.URL}, nil })) require.Error(t, err) @@ -743,7 +753,7 @@ func TestClient_CreateDID(t *testing.T) { }) t.Run("test error from sidetree operation request function", func(t *testing.T) { - v := sidetree.New(sidetree.WithSidetreeOperationRequestFnc(func(req []byte, getEndpoints func() ([]string, error)) ([]byte, error) { + v := sidetree.New(sidetree.WithSidetreeOperationRequestFnc(func(req []byte, getEndpoints func(bool) ([]string, error)) ([]byte, error) { return nil, fmt.Errorf("send operation request error") })) @@ -754,7 +764,7 @@ func TestClient_CreateDID(t *testing.T) { require.NoError(t, err) didResol, err := v.CreateDID(create.WithRecoveryPublicKey(ed25519RecoveryPubKey), - create.WithUpdatePublicKey(ed25519UpdatePubKey), create.WithSidetreeEndpoint(func() ([]string, error) { + create.WithUpdatePublicKey(ed25519UpdatePubKey), create.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"https://www.domain.com"}, nil })) require.Error(t, err) @@ -788,7 +798,7 @@ func TestClient_CreateDID(t *testing.T) { v := sidetree.New(sidetree.WithHTTPClient(&http.Client{})) didResol, err := v.CreateDID(create.WithRecoveryPublicKey(ed25519RecoveryPubKey), - create.WithSidetreeEndpoint(func() ([]string, error) { + create.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{serv.URL}, nil }), create.WithUpdatePublicKey(ecUpdatePrivKey.Public()), create.WithAlsoKnownAs("https://first.blog.example"), @@ -836,7 +846,7 @@ func TestClient_CreateDID(t *testing.T) { v := sidetree.New(sidetree.WithHTTPClient(&http.Client{})) _, err = v.CreateDID(create.WithRecoveryPublicKey(ed25519RecoveryPubKey), - create.WithSidetreeEndpoint(func() ([]string, error) { + create.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{serv.URL}, nil }), create.WithUpdatePublicKey(ecUpdatePrivKey.Public()), create.WithService(&did.Service{ @@ -862,7 +872,7 @@ func TestClient_CreateDID(t *testing.T) { didResol, err := v.CreateDID(create.WithRecoveryPublicKey("wrongkey"), create.WithUpdatePublicKey("wrongvalue"), - create.WithSidetreeEndpoint(func() ([]string, error) { + create.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil })) require.Error(t, err) @@ -902,7 +912,7 @@ func TestClient_CreateDID(t *testing.T) { v := sidetree.New() didResol, err := v.CreateDID(create.WithRecoveryPublicKey(pubKey), - create.WithSidetreeEndpoint(func() ([]string, error) { + create.WithSidetreeEndpoint(func(bool) ([]string, error) { return []string{"url"}, nil })) require.Error(t, err) diff --git a/component/vdr/sidetree/doc/doc.go b/component/vdr/sidetree/doc/doc.go index f0b1676b..2dc5b162 100644 --- a/component/vdr/sidetree/doc/doc.go +++ b/component/vdr/sidetree/doc/doc.go @@ -93,7 +93,7 @@ func (doc *Doc) JSONBytes() ([]byte, error) { byteDoc, err := json.Marshal(raw) if err != nil { - return nil, fmt.Errorf("JSON unmarshalling of document failed: %w", err) + return nil, fmt.Errorf("JSON marshalling of document failed: %w", err) } return byteDoc, nil diff --git a/component/vdr/sidetree/go.mod b/component/vdr/sidetree/go.mod index d52975ba..e23acb66 100644 --- a/component/vdr/sidetree/go.mod +++ b/component/vdr/sidetree/go.mod @@ -10,7 +10,7 @@ require ( github.com/hyperledger/aries-framework-go v0.1.9-0.20221201073943-47b08f16c301 github.com/square/go-jose/v3 v3.0.0-20200630053402-0a67ce9b0693 github.com/stretchr/testify v1.8.1 - github.com/trustbloc/sidetree-core-go v1.0.0-rc3.0.20221028171319-8d44bd1cace7 + github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 ) require ( @@ -33,12 +33,15 @@ require ( github.com/pquerna/cachecontrol v0.1.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/teserakt-io/golang-ed25519 v0.0.0-20210104091850-3888c087a4c8 // indirect + github.com/trustbloc/logutil-go v1.0.0-rc1 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect + go.opentelemetry.io/otel v1.12.0 // indirect + go.opentelemetry.io/otel/trace v1.12.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.17.0 // indirect + go.uber.org/zap v1.23.0 // indirect golang.org/x/crypto v0.1.0 // indirect golang.org/x/sys v0.1.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/component/vdr/sidetree/go.sum b/component/vdr/sidetree/go.sum index a6ceae4e..f3ef9053 100644 --- a/component/vdr/sidetree/go.sum +++ b/component/vdr/sidetree/go.sum @@ -1,4 +1,5 @@ github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= @@ -19,10 +20,12 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/tink/go v1.7.0 h1:6Eox8zONGebBFcCBqkVmt60LaWZa6xg1cl/DwAh/J1w= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -66,7 +69,6 @@ github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5 github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/piprate/json-gold v0.4.2 h1:Rq8V+637HOFcj20KdTqW/g/llCwX2qtau0g5d1pD79o= github.com/piprate/json-gold v0.4.2/go.mod h1:OK1z7UgtBZk06n2cDE2OSq1kffmjFFp5/2yhLLCz9UM= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -84,15 +86,16 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/teserakt-io/golang-ed25519 v0.0.0-20210104091850-3888c087a4c8 h1:RBkacARv7qY5laaXGlF4wFB/tk5rnthhPb8oIBGoagY= github.com/teserakt-io/golang-ed25519 v0.0.0-20210104091850-3888c087a4c8/go.mod h1:9PdLyPiZIiW3UopXyRnPYyjUXSpiQNHRLu8fOsR3o8M= -github.com/trustbloc/sidetree-core-go v1.0.0-rc3.0.20221028171319-8d44bd1cace7 h1:/7Ak2CW7iJEVF/uYhOu3KUAKTTlNII0DnJlAkw/hGoQ= -github.com/trustbloc/sidetree-core-go v1.0.0-rc3.0.20221028171319-8d44bd1cace7/go.mod h1:SOuPJu8u7DSs2c494HPFAkkZ3KlfR/4swQ+YWqxZ2C8= +github.com/trustbloc/logutil-go v1.0.0-rc1 h1:rRJbvgQfrlUfyej+mY0nuQJymGqjRW4oZEwKi544F4c= +github.com/trustbloc/logutil-go v1.0.0-rc1/go.mod h1:JlxT0oZfNKgIlSNtgc001WEeDMxlnAvOM43gNm8DQVc= +github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 h1:8J/lEaFqWfGugvt5u/d5l9OvJoZZpE2XU3bR/U6iKjM= +github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692/go.mod h1:jdxAFuorlIwFOGVW6O455/lZqxg2mZkRHNTEolcZdDI= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -100,12 +103,18 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +go.opentelemetry.io/otel v1.12.0 h1:IgfC7kqQrRccIKuB7Cl+SRUmsKbEwSGPr0Eu+/ht1SQ= +go.opentelemetry.io/otel v1.12.0/go.mod h1:geaoz0L0r1BEOR81k7/n9W4TCXYCJ7bPO7K374jQHG0= +go.opentelemetry.io/otel/sdk v1.12.0 h1:8npliVYV7qc0t1FKdpU08eMnOjgPFMnriPhn0HH4q3o= +go.opentelemetry.io/otel/trace v1.12.0 h1:p28in++7Kd0r2d8gSt931O57fdjUyWxkVbESuILAeUc= +go.opentelemetry.io/otel/trace v1.12.0/go.mod h1:pHlgBynn6s25qJ2szD+Bv+iwKJttjHSI3lUAyf0GNuQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= +go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -134,9 +143,6 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/component/vdr/sidetree/option.go b/component/vdr/sidetree/option.go index 2d72d534..41da0f1d 100644 --- a/component/vdr/sidetree/option.go +++ b/component/vdr/sidetree/option.go @@ -34,7 +34,7 @@ func WithAuthTokenProvider(p authTokenProvider) Option { } // WithSidetreeOperationRequestFnc overrides default sidetree operation request. -func WithSidetreeOperationRequestFnc(fnc func(req []byte, getEndpoints func() ([]string, error)) ([]byte, error)) Option { +func WithSidetreeOperationRequestFnc(fnc func(req []byte, getEndpoints GetEndpointsFunc) ([]byte, error)) Option { return func(opts *Client) { opts.sendRequest = fnc } diff --git a/component/vdr/sidetree/option/create/option.go b/component/vdr/sidetree/option/create/option.go index 2bf0f731..a025b651 100644 --- a/component/vdr/sidetree/option/create/option.go +++ b/component/vdr/sidetree/option/create/option.go @@ -19,7 +19,7 @@ type Opts struct { PublicKeys []doc.PublicKey Services []docdid.Service AlsoKnownAs []string - GetEndpoints func() ([]string, error) + GetEndpoints func(disableCache bool) ([]string, error) RecoveryPublicKey crypto.PublicKey UpdatePublicKey crypto.PublicKey SigningKey crypto.PrivateKey @@ -53,7 +53,7 @@ func WithAlsoKnownAs(uri string) Option { } // WithSidetreeEndpoint get sidetree endpoints. -func WithSidetreeEndpoint(getEndpoints func() ([]string, error)) Option { +func WithSidetreeEndpoint(getEndpoints func(disableCache bool) ([]string, error)) Option { return func(opts *Opts) { opts.GetEndpoints = getEndpoints } diff --git a/component/vdr/sidetree/option/deactivate/option.go b/component/vdr/sidetree/option/deactivate/option.go index f0e4aa34..4c5da646 100644 --- a/component/vdr/sidetree/option/deactivate/option.go +++ b/component/vdr/sidetree/option/deactivate/option.go @@ -12,7 +12,7 @@ import ( // Opts deactivate did opts. type Opts struct { - GetEndpoints func() ([]string, error) + GetEndpoints func(disableCache bool) ([]string, error) Signer api.Signer OperationCommitment string } @@ -21,7 +21,7 @@ type Opts struct { type Option func(opts *Opts) // WithSidetreeEndpoint get sidetree endpoints. -func WithSidetreeEndpoint(getEndpoints func() ([]string, error)) Option { +func WithSidetreeEndpoint(getEndpoints func(disableCache bool) ([]string, error)) Option { return func(opts *Opts) { opts.GetEndpoints = getEndpoints } diff --git a/component/vdr/sidetree/option/recovery/option.go b/component/vdr/sidetree/option/recovery/option.go index a48e737e..aa9ee1c8 100644 --- a/component/vdr/sidetree/option/recovery/option.go +++ b/component/vdr/sidetree/option/recovery/option.go @@ -20,7 +20,7 @@ type Opts struct { PublicKeys []doc.PublicKey Services []docdid.Service AlsoKnownAs []string - GetEndpoints func() ([]string, error) + GetEndpoints func(disableCache bool) ([]string, error) NextRecoveryPublicKey crypto.PublicKey NextUpdatePublicKey crypto.PublicKey Signer api.Signer @@ -54,7 +54,7 @@ func WithAlsoKnownAs(uri string) Option { } // WithSidetreeEndpoint get sidetree endpoints. -func WithSidetreeEndpoint(getEndpoints func() ([]string, error)) Option { +func WithSidetreeEndpoint(getEndpoints func(disableCache bool) ([]string, error)) Option { return func(opts *Opts) { opts.GetEndpoints = getEndpoints } diff --git a/component/vdr/sidetree/option/update/option.go b/component/vdr/sidetree/option/update/option.go index 8b178461..bc14a75b 100644 --- a/component/vdr/sidetree/option/update/option.go +++ b/component/vdr/sidetree/option/update/option.go @@ -26,7 +26,7 @@ type Opts struct { RemovePublicKeys []string RemoveServices []string RemoveAlsoKnownAs []string - GetEndpoints func() ([]string, error) + GetEndpoints func(disableCache bool) ([]string, error) NextUpdatePublicKey crypto.PublicKey Signer api.Signer OperationCommitment string @@ -90,7 +90,7 @@ func WithNextUpdatePublicKey(nextUpdatePublicKey crypto.PublicKey) Option { } // WithSidetreeEndpoint get sidetree endpoints. -func WithSidetreeEndpoint(getEndpoints func() ([]string, error)) Option { +func WithSidetreeEndpoint(getEndpoints func(disableCache bool) ([]string, error)) Option { return func(opts *Opts) { opts.GetEndpoints = getEndpoints } diff --git a/test/bdd/vdr/orb/fixtures/orb/.env b/test/bdd/vdr/orb/fixtures/orb/.env index 157b24af..632f29d5 100644 --- a/test/bdd/vdr/orb/fixtures/orb/.env +++ b/test/bdd/vdr/orb/fixtures/orb/.env @@ -4,8 +4,8 @@ # SPDX-License-Identifier: Apache-2.0 # -ORB_IMAGE=ghcr.io/trustbloc-cicd/orb -ORB_IMAGE_TAG=v1.0.0-rc5-snapshot-07e05f2 +ORB_IMAGE=ghcr.io/trustbloc/orb +ORB_IMAGE_TAG=v1.0.0-rc7 # MongoDB settings MONGODB_IMAGE=mongo diff --git a/test/bdd/vdr/orb/go.mod b/test/bdd/vdr/orb/go.mod index d9183802..296423a5 100644 --- a/test/bdd/vdr/orb/go.mod +++ b/test/bdd/vdr/orb/go.mod @@ -15,7 +15,7 @@ require ( github.com/hyperledger/aries-framework-go/component/storageutil v0.0.0-20220610133818-119077b0ec85 github.com/hyperledger/aries-framework-go/spi v0.0.0-20221025204933-b807371b6f1e github.com/trustbloc/edge-core v0.1.8 - github.com/trustbloc/sidetree-core-go v1.0.0-rc4 + github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 ) require ( @@ -86,10 +86,11 @@ require ( github.com/sirupsen/logrus v1.8.1 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/square/go-jose/v3 v3.0.0-20200630053402-0a67ce9b0693 // indirect - github.com/stretchr/testify v1.8.1 // indirect + github.com/stretchr/testify v1.8.2 // indirect github.com/teserakt-io/golang-ed25519 v0.0.0-20210104091850-3888c087a4c8 // indirect - github.com/trustbloc/orb v1.0.0-rc4.0.20221129223433-07e05f2f6e0a // indirect - github.com/trustbloc/vct v1.0.0-rc4 // indirect + github.com/trustbloc/logutil-go v1.0.0-rc1 // indirect + github.com/trustbloc/orb v1.0.0-rc7 // indirect + github.com/trustbloc/vct v1.0.0-rc5 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.1 // indirect @@ -100,13 +101,15 @@ require ( github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect go.mongodb.org/mongo-driver v1.9.1 // indirect go.opencensus.io v0.23.0 // indirect + go.opentelemetry.io/otel v1.14.0 // indirect + go.opentelemetry.io/otel/trace v1.14.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.17.0 // indirect + go.uber.org/zap v1.23.0 // indirect golang.org/x/crypto v0.1.0 // indirect golang.org/x/net v0.1.0 // indirect golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect - golang.org/x/sys v0.1.0 // indirect + golang.org/x/sys v0.5.0 // indirect golang.org/x/text v0.4.0 // indirect google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf // indirect google.golang.org/grpc v1.44.0 // indirect diff --git a/test/bdd/vdr/orb/go.sum b/test/bdd/vdr/orb/go.sum index 3b668451..94cddede 100644 --- a/test/bdd/vdr/orb/go.sum +++ b/test/bdd/vdr/orb/go.sum @@ -164,6 +164,7 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.37.0/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -447,6 +448,8 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= @@ -538,7 +541,7 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= github.com/google/go-licenses v0.0.0-20210329231322-ce1d9163b77d/go.mod h1:+TYOmkVoJOpwnS0wfdsJCV9CoD5nJYsHoFk/0CrTK4M= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= @@ -1070,8 +1073,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1094,12 +1097,14 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1 github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/trustbloc/edge-core v0.1.8 h1:m4X5XNDwiHJjGf8gHnpo6aLkBYuqDyNRq+npjxLc5cY= github.com/trustbloc/edge-core v0.1.8/go.mod h1:gfoyG/xquRXyHkww0ldM2jwOTuKKZpHYn+87f+TBQ8M= -github.com/trustbloc/orb v1.0.0-rc4.0.20221129223433-07e05f2f6e0a h1:hTNcFcgr6cGzQAqQMOzenV+ZRp3dqTjaq2KQzvjqRXM= -github.com/trustbloc/orb v1.0.0-rc4.0.20221129223433-07e05f2f6e0a/go.mod h1:pC74Ix6y2ivSUYOPRa3G6LNVJ67x3H4iLKYZVwy37JQ= -github.com/trustbloc/sidetree-core-go v1.0.0-rc4 h1:dkmNLKbHjr//JgJPLQgTNBgK40LAYXL9IV69gZCn2fo= -github.com/trustbloc/sidetree-core-go v1.0.0-rc4/go.mod h1:SOuPJu8u7DSs2c494HPFAkkZ3KlfR/4swQ+YWqxZ2C8= -github.com/trustbloc/vct v1.0.0-rc4 h1:XYvbsyy2mxdeILiT6lQH1EGXSSD6C2zHSr670Vppn+g= -github.com/trustbloc/vct v1.0.0-rc4/go.mod h1:2kzD3kdeD1LFVRpWo2/C8ktnsfJR3gtH3pf/AqfRqow= +github.com/trustbloc/logutil-go v1.0.0-rc1 h1:rRJbvgQfrlUfyej+mY0nuQJymGqjRW4oZEwKi544F4c= +github.com/trustbloc/logutil-go v1.0.0-rc1/go.mod h1:JlxT0oZfNKgIlSNtgc001WEeDMxlnAvOM43gNm8DQVc= +github.com/trustbloc/orb v1.0.0-rc7 h1:A6/LNd6bbYLDMMq27ef3zVy2EauuXmN9xfz+b9/12+E= +github.com/trustbloc/orb v1.0.0-rc7/go.mod h1:OkEm/Kf92kdp5ptnx6VNFe57jz9/lhiin00IM3ISXAo= +github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692 h1:8J/lEaFqWfGugvt5u/d5l9OvJoZZpE2XU3bR/U6iKjM= +github.com/trustbloc/sidetree-core-go v1.0.0-rc5.0.20230609191801-793cbea60692/go.mod h1:jdxAFuorlIwFOGVW6O455/lZqxg2mZkRHNTEolcZdDI= +github.com/trustbloc/vct v1.0.0-rc5 h1:fBn5xFi+D+vtDFu/UncsqwwOIuFfy0KANe470GXriOw= +github.com/trustbloc/vct v1.0.0-rc5/go.mod h1:TrS5PDqw6RPl4q1ISDys/aZZDZ7bglIXXBsvdBv48dM= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= @@ -1181,6 +1186,12 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= +go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= +go.opentelemetry.io/otel/exporters/jaeger v1.11.2 h1:ES8/j2+aB+3/BUw51ioxa50V9btN1eew/2J7N7n1tsE= +go.opentelemetry.io/otel/sdk v1.12.0 h1:8npliVYV7qc0t1FKdpU08eMnOjgPFMnriPhn0HH4q3o= +go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= +go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1189,6 +1200,7 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= @@ -1198,8 +1210,8 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= +go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= gocloud.dev v0.19.0/go.mod h1:SmKwiR8YwIMMJvQBKLsC3fHNyMwXLw3PMDO+VVteJMI= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1445,8 +1457,8 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1539,7 +1551,6 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= @@ -1724,7 +1735,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=