ipfs store + cache store impl
This commit is contained in:
parent
7167b71a90
commit
a894f42e05
118
common/commonfile/ipfsstore/cachestore.go
Normal file
118
common/commonfile/ipfsstore/cachestore.go
Normal file
@ -0,0 +1,118 @@
|
||||
package ipfsstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
blocks "github.com/ipfs/go-block-format"
|
||||
"github.com/ipfs/go-cid"
|
||||
format "github.com/ipfs/go-ipld-format"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type CacheStore struct {
|
||||
Cache IPFSStore
|
||||
Origin IPFSStore
|
||||
}
|
||||
|
||||
func (c *CacheStore) Get(ctx context.Context, k cid.Cid) (b blocks.Block, err error) {
|
||||
if b, err = c.Cache.Get(ctx, k); err != nil {
|
||||
if format.IsNotFound(err) {
|
||||
err = nil
|
||||
} else {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
return
|
||||
}
|
||||
if b, err = c.Origin.Get(ctx, k); err != nil {
|
||||
return
|
||||
}
|
||||
if addErr := c.Cache.Add(ctx, []blocks.Block{b}); addErr != nil {
|
||||
log.Error("block fetched from origin but got error for add to cache", zap.Error(addErr))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *CacheStore) GetMany(ctx context.Context, ks []cid.Cid) <-chan blocks.Block {
|
||||
cachedCids, localErr := c.Cache.ExistsCids(ctx, ks)
|
||||
var originCids []cid.Cid
|
||||
if localErr != nil {
|
||||
log.Error("hasCIDs error", zap.Error(localErr))
|
||||
originCids = ks
|
||||
} else {
|
||||
if len(cachedCids) != len(ks) {
|
||||
set := cid.NewSet()
|
||||
for _, cCid := range cachedCids {
|
||||
set.Add(cCid)
|
||||
}
|
||||
originCids = ks[:0]
|
||||
for _, k := range ks {
|
||||
if !set.Has(k) {
|
||||
originCids = append(originCids, k)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(originCids) == 0 {
|
||||
return c.Cache.GetMany(ctx, cachedCids)
|
||||
}
|
||||
|
||||
var results = make(chan blocks.Block)
|
||||
|
||||
go func() {
|
||||
defer close(results)
|
||||
localResults := c.Cache.GetMany(ctx, cachedCids)
|
||||
originResults := c.Origin.GetMany(ctx, originCids)
|
||||
for {
|
||||
var cb, ob blocks.Block
|
||||
var cOk, oOk bool
|
||||
select {
|
||||
case cb, cOk = <-localResults:
|
||||
if cOk {
|
||||
results <- cb
|
||||
}
|
||||
case ob, oOk = <-originResults:
|
||||
if oOk {
|
||||
if addErr := c.Cache.Add(ctx, []blocks.Block{ob}); addErr != nil {
|
||||
log.Error("add block to cache error", zap.Error(addErr))
|
||||
}
|
||||
results <- ob
|
||||
}
|
||||
case <-ctx.Done():
|
||||
return
|
||||
}
|
||||
if !oOk && !cOk {
|
||||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
return results
|
||||
}
|
||||
|
||||
func (c *CacheStore) ExistsCids(ctx context.Context, ks []cid.Cid) (exists []cid.Cid, err error) {
|
||||
return c.Cache.ExistsCids(ctx, ks)
|
||||
}
|
||||
|
||||
func (c *CacheStore) Add(ctx context.Context, b []blocks.Block) error {
|
||||
if localErr := c.Cache.Add(ctx, b); localErr != nil {
|
||||
log.Error("cache add error", zap.Error(localErr))
|
||||
}
|
||||
return c.Origin.Add(ctx, b)
|
||||
}
|
||||
|
||||
func (c *CacheStore) Delete(ctx context.Context, k cid.Cid) error {
|
||||
if localErr := c.Cache.Delete(ctx, k); localErr != nil {
|
||||
if !format.IsNotFound(localErr) {
|
||||
log.Error("error while delete block", zap.Error(localErr))
|
||||
}
|
||||
}
|
||||
return c.Origin.Delete(ctx, k)
|
||||
}
|
||||
|
||||
func (c *CacheStore) Close() (err error) {
|
||||
if localErr := c.Cache.Close(); localErr != nil {
|
||||
log.Error("error while closing cache store", zap.Error(localErr))
|
||||
}
|
||||
return c.Origin.Close()
|
||||
}
|
||||
217
common/commonfile/ipfsstore/cachestore_test.go
Normal file
217
common/commonfile/ipfsstore/cachestore_test.go
Normal file
@ -0,0 +1,217 @@
|
||||
package ipfsstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
blocks "github.com/ipfs/go-block-format"
|
||||
"github.com/ipfs/go-cid"
|
||||
format "github.com/ipfs/go-ipld-format"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
var ctx = context.Background()
|
||||
|
||||
func TestCacheStore_Add(t *testing.T) {
|
||||
t.Run("success", func(t *testing.T) {
|
||||
cs := &CacheStore{
|
||||
Cache: newTestStore(nil),
|
||||
Origin: newTestStore(nil),
|
||||
}
|
||||
defer cs.Close()
|
||||
testBlocks := newTestBocks("1", "2", "3")
|
||||
require.NoError(t, cs.Add(ctx, testBlocks))
|
||||
for _, b := range testBlocks {
|
||||
gb, err := cs.Cache.Get(ctx, b.Cid())
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, gb)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestCacheStore_Get(t *testing.T) {
|
||||
t.Run("exists local", func(t *testing.T) {
|
||||
testBlocks := newTestBocks("1", "2", "3")
|
||||
cs := &CacheStore{
|
||||
Cache: newTestStore(testBlocks),
|
||||
Origin: newTestStore(testBlocks),
|
||||
}
|
||||
defer cs.Close()
|
||||
for _, b := range testBlocks {
|
||||
gb, err := cs.Get(ctx, b.Cid())
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, gb)
|
||||
}
|
||||
})
|
||||
t.Run("exists remote", func(t *testing.T) {
|
||||
testBlocks := newTestBocks("1", "2", "3")
|
||||
cs := &CacheStore{
|
||||
Cache: newTestStore(testBlocks[:1]),
|
||||
Origin: newTestStore(testBlocks),
|
||||
}
|
||||
defer cs.Close()
|
||||
for _, b := range testBlocks {
|
||||
gb, err := cs.Get(ctx, b.Cid())
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, gb)
|
||||
}
|
||||
for _, b := range testBlocks {
|
||||
lb, err := cs.Cache.Get(ctx, b.Cid())
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, lb)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestCacheStore_GetMany(t *testing.T) {
|
||||
t.Run("all local", func(t *testing.T) {
|
||||
testBlocks := newTestBocks("1", "2", "3")
|
||||
cs := &CacheStore{
|
||||
Cache: newTestStore(testBlocks),
|
||||
Origin: newTestStore(testBlocks),
|
||||
}
|
||||
defer cs.Close()
|
||||
|
||||
var cids, resCids []cid.Cid
|
||||
for _, b := range testBlocks {
|
||||
cids = append(cids, b.Cid())
|
||||
}
|
||||
ch := cs.GetMany(ctx, cids)
|
||||
for {
|
||||
select {
|
||||
case b, ok := <-ch:
|
||||
if !ok {
|
||||
return
|
||||
} else {
|
||||
resCids = append(resCids, b.Cid())
|
||||
}
|
||||
case <-time.After(time.Second):
|
||||
assert.NoError(t, fmt.Errorf("timeout"))
|
||||
return
|
||||
}
|
||||
}
|
||||
assert.ElementsMatch(t, cids, resCids)
|
||||
})
|
||||
t.Run("partial local", func(t *testing.T) {
|
||||
testBlocks := newTestBocks("1", "2", "3")
|
||||
cs := &CacheStore{
|
||||
Cache: newTestStore(testBlocks[:1]),
|
||||
Origin: newTestStore(testBlocks),
|
||||
}
|
||||
defer cs.Close()
|
||||
|
||||
var cids, resCids []cid.Cid
|
||||
for _, b := range testBlocks {
|
||||
cids = append(cids, b.Cid())
|
||||
}
|
||||
ch := cs.GetMany(ctx, cids)
|
||||
for {
|
||||
select {
|
||||
case b, ok := <-ch:
|
||||
if !ok {
|
||||
return
|
||||
} else {
|
||||
resCids = append(resCids, b.Cid())
|
||||
}
|
||||
case <-time.After(time.Second):
|
||||
assert.NoError(t, fmt.Errorf("timeout"))
|
||||
return
|
||||
}
|
||||
}
|
||||
assert.ElementsMatch(t, cids, resCids)
|
||||
for _, b := range testBlocks {
|
||||
gb, err := cs.Cache.Get(ctx, b.Cid())
|
||||
assert.NoError(t, err)
|
||||
assert.NotNil(t, gb)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func TestCacheStore_Delete(t *testing.T) {
|
||||
testBlocks := newTestBocks("1", "2", "3")
|
||||
cs := &CacheStore{
|
||||
Cache: newTestStore(testBlocks[:1]),
|
||||
Origin: newTestStore(testBlocks),
|
||||
}
|
||||
defer cs.Close()
|
||||
for _, b := range testBlocks {
|
||||
require.NoError(t, cs.Delete(ctx, b.Cid()))
|
||||
gb, err := cs.Get(ctx, b.Cid())
|
||||
assert.Nil(t, gb)
|
||||
assert.True(t, format.IsNotFound(err))
|
||||
}
|
||||
}
|
||||
|
||||
func newTestStore(bs []blocks.Block) *testStore {
|
||||
ts := &testStore{
|
||||
store: make(map[cid.Cid]blocks.Block),
|
||||
}
|
||||
ts.Add(context.Background(), bs)
|
||||
return ts
|
||||
}
|
||||
|
||||
type testStore struct {
|
||||
store map[cid.Cid]blocks.Block
|
||||
}
|
||||
|
||||
func (t *testStore) Get(ctx context.Context, k cid.Cid) (blocks.Block, error) {
|
||||
if b, ok := t.store[k]; ok {
|
||||
return b, nil
|
||||
}
|
||||
return nil, &format.ErrNotFound{Cid: k}
|
||||
}
|
||||
|
||||
func (t *testStore) GetMany(ctx context.Context, ks []cid.Cid) <-chan blocks.Block {
|
||||
var result = make(chan blocks.Block)
|
||||
go func() {
|
||||
defer close(result)
|
||||
for _, k := range ks {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
default:
|
||||
}
|
||||
if b, err := t.Get(ctx, k); err == nil {
|
||||
result <- b
|
||||
}
|
||||
}
|
||||
}()
|
||||
return result
|
||||
}
|
||||
|
||||
func (t *testStore) ExistsCids(ctx context.Context, ks []cid.Cid) (exists []cid.Cid, err error) {
|
||||
for _, k := range ks {
|
||||
if _, ok := t.store[k]; ok {
|
||||
exists = append(exists, k)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (t *testStore) Add(ctx context.Context, bs []blocks.Block) error {
|
||||
for _, b := range bs {
|
||||
t.store[b.Cid()] = b
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *testStore) Delete(ctx context.Context, c cid.Cid) error {
|
||||
if _, ok := t.store[c]; ok {
|
||||
delete(t.store, c)
|
||||
return nil
|
||||
}
|
||||
return &format.ErrNotFound{Cid: c}
|
||||
}
|
||||
|
||||
func (t *testStore) Close() (err error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
func newTestBocks(ids ...string) (bs []blocks.Block) {
|
||||
for _, id := range ids {
|
||||
bs = append(bs, blocks.NewBlock([]byte(id)))
|
||||
}
|
||||
return
|
||||
}
|
||||
19
common/commonfile/ipfsstore/ipfsstore.go
Normal file
19
common/commonfile/ipfsstore/ipfsstore.go
Normal file
@ -0,0 +1,19 @@
|
||||
package ipfsstore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/anytypeio/go-anytype-infrastructure-experiments/common/app/logger"
|
||||
blocks "github.com/ipfs/go-block-format"
|
||||
"github.com/ipfs/go-cid"
|
||||
)
|
||||
|
||||
var log = logger.NewNamed("filenode.ipfsstore")
|
||||
|
||||
type IPFSStore interface {
|
||||
Get(ctx context.Context, k cid.Cid) (blocks.Block, error)
|
||||
GetMany(ctx context.Context, ks []cid.Cid) <-chan blocks.Block
|
||||
ExistsCids(ctx context.Context, ks []cid.Cid) (exists []cid.Cid, err error)
|
||||
Add(ctx context.Context, b []blocks.Block) error
|
||||
Delete(ctx context.Context, c cid.Cid) error
|
||||
Close() (err error)
|
||||
}
|
||||
@ -3,6 +3,7 @@ module github.com/anytypeio/go-anytype-infrastructure-experiments/common
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/anytypeio/go-anytype-infrastructure-experiments/consensus v0.0.0-20221107145605-92bdf7d57b48
|
||||
github.com/anytypeio/go-chash v0.0.0-20220629194632-4ad1154fe232
|
||||
github.com/awalterschulze/gographviz v2.0.3+incompatible
|
||||
github.com/cespare/xxhash v1.1.0
|
||||
@ -10,7 +11,9 @@ require (
|
||||
github.com/gogo/protobuf v1.3.2
|
||||
github.com/golang/mock v1.6.0
|
||||
github.com/huandu/skiplist v1.2.0
|
||||
github.com/ipfs/go-block-format v0.0.3
|
||||
github.com/ipfs/go-cid v0.3.2
|
||||
github.com/ipfs/go-ipld-format v0.4.0
|
||||
github.com/libp2p/go-libp2p v0.23.2
|
||||
github.com/minio/sha256-simd v1.0.0
|
||||
github.com/multiformats/go-multibase v0.1.1
|
||||
@ -33,6 +36,7 @@ require (
|
||||
github.com/fogleman/gg v1.3.0 // indirect
|
||||
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/ipfs/go-ipfs-util v0.0.2 // indirect
|
||||
github.com/ipfs/go-log/v2 v2.5.1 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.1.1 // indirect
|
||||
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
|
||||
@ -55,7 +59,7 @@ require (
|
||||
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
||||
go.uber.org/atomic v1.10.0 // indirect
|
||||
go.uber.org/multierr v1.8.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
|
||||
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
|
||||
@ -40,6 +40,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
|
||||
github.com/anytypeio/go-anytype-infrastructure-experiments/consensus v0.0.0-20221107145605-92bdf7d57b48 h1:fCZ8db6yJBLPd6bP59zwfjuokL7SLbeTKrk3kBSy034=
|
||||
github.com/anytypeio/go-anytype-infrastructure-experiments/consensus v0.0.0-20221107145605-92bdf7d57b48/go.mod h1:w0i62cRB2jVpjFb2CpPNj5J+ihKqqmBBG9X2+Odekjw=
|
||||
github.com/anytypeio/go-chash v0.0.0-20220629194632-4ad1154fe232 h1:kMPPZYmJgbs4AJfodbg2OCXg5cp+9LPAJcLZJqmcghk=
|
||||
github.com/anytypeio/go-chash v0.0.0-20220629194632-4ad1154fe232/go.mod h1:+PeHBAWp7gUh/yw6uAauKc5ku0w4cFNg6DUddGxoGq0=
|
||||
github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E=
|
||||
@ -149,6 +151,8 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU=
|
||||
github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c=
|
||||
@ -156,8 +160,19 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr
|
||||
github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw=
|
||||
github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY=
|
||||
github.com/ipfs/go-block-format v0.0.3 h1:r8t66QstRp/pd/or4dpnbVfXT5Gt7lOqRvC+/dDTpMc=
|
||||
github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk=
|
||||
github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=
|
||||
github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=
|
||||
github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I=
|
||||
github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc=
|
||||
github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw=
|
||||
github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc=
|
||||
github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8=
|
||||
github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ=
|
||||
github.com/ipfs/go-ipld-format v0.4.0 h1:yqJSaJftjmjc9jEOFYlpkwOLVKv68OD27jFLlSghBlQ=
|
||||
github.com/ipfs/go-ipld-format v0.4.0/go.mod h1:co/SdBE8h99968X0hViiw1MNlh6fvxxnHpvVLnH7jSM=
|
||||
github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY=
|
||||
github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
@ -198,6 +213,9 @@ github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o
|
||||
github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ=
|
||||
github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U=
|
||||
github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
|
||||
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g=
|
||||
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
@ -205,20 +223,29 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
|
||||
github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
||||
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
|
||||
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
||||
github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA=
|
||||
github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE=
|
||||
github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI=
|
||||
github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4=
|
||||
github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM=
|
||||
github.com/multiformats/go-multiaddr v0.7.0 h1:gskHcdaCyPtp9XskVwtvEeQOG465sCohbQIirSyqxrc=
|
||||
github.com/multiformats/go-multiaddr v0.7.0/go.mod h1:Fs50eBDWvZu+l3/9S6xAE7ZYj6yhxlvaVZjakWN7xRs=
|
||||
github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs=
|
||||
github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc=
|
||||
github.com/multiformats/go-multibase v0.1.1 h1:3ASCDsuLX8+j4kx58qnJ4YFq/JWTJpCyDW27ztsVTOI=
|
||||
github.com/multiformats/go-multibase v0.1.1/go.mod h1:ZEjHE+IsUrgp5mhlEAYjMtZwK1k4haNkcaPg9aoe1a8=
|
||||
github.com/multiformats/go-multicodec v0.6.0 h1:KhH2kSuCARyuJraYMFxrNO3DqIaYhOdS039kbhgVwpE=
|
||||
github.com/multiformats/go-multicodec v0.6.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw=
|
||||
github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U=
|
||||
github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc=
|
||||
github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc=
|
||||
github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108=
|
||||
github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc=
|
||||
github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
|
||||
github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY=
|
||||
github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
@ -305,14 +332,16 @@ go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
|
||||
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-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/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-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM=
|
||||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY=
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
@ -401,6 +430,7 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user