Skip to content

Commit

Permalink
Update dependencies (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maelkum authored Feb 8, 2024
1 parent cd93722 commit d2a26af
Show file tree
Hide file tree
Showing 13 changed files with 187 additions and 508 deletions.
4 changes: 2 additions & 2 deletions cmd/keyforge/key_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func LoadOrCreateKeys(privKeyFile string, outputDir string) (crypto.PrivKey, cry
}

identityFile := filepath.Join(outputDir, identityName)
err = os.WriteFile(identityFile, []byte(identity.Pretty()), pubKeyPermissions)
err = os.WriteFile(identityFile, []byte(identity.String()), pubKeyPermissions)
if err != nil {
log.Fatalf("Could not write identity to file: %s", err)
}
Expand All @@ -76,7 +76,7 @@ func LoadOrCreateKeys(privKeyFile string, outputDir string) (crypto.PrivKey, cry

// Write peer ID to file
peerIDFile := filepath.Join(outputDir, peerIDFileName)
err = os.WriteFile(peerIDFile, []byte(identity.Pretty()), pubKeyPermissions)
err = os.WriteFile(peerIDFile, []byte(identity.String()), pubKeyPermissions)
if err != nil {
log.Fatalf("Could not write peer ID to file: %s", err)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func loadPrivateKey(filePath string) (crypto.PrivKey, error) {
}

func getHostAddress(ha host.Host) string {
hostAddr, _ := ma.NewMultiaddr(fmt.Sprintf("/p2p/%s", ha.ID().Pretty()))
hostAddr, _ := ma.NewMultiaddr(fmt.Sprintf("/p2p/%s", ha.ID().String()))
addr := ha.Addrs()[0]
return addr.Encapsulate(hostAddr).String()
}
Expand All @@ -100,7 +100,7 @@ func startListener(ctx context.Context, ha host.Host, listenPort int, insecure b
logger.Info().Msgf("I am %s", fullAddr)

ha.SetStreamHandler("/b7s/manager/1.0.0", func(s network.Stream) {
if allowedPeer == "" && s.Conn().RemotePeer().Pretty() != allowedPeer {
if allowedPeer == "" && s.Conn().RemotePeer().String() != allowedPeer {
logger.Info().Msg("Connection from disallowed peer")
s.Reset()
return
Expand Down
7 changes: 1 addition & 6 deletions fstore/fstore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package fstore

import (
"fmt"
"net/http"

"github.com/cavaliergopher/grab/v3"
Expand Down Expand Up @@ -44,10 +43,6 @@ func New(log zerolog.Logger, store Store, workdir string) *FStore {

// InstalledFunctions will return the CIDs of all functions found in local storage.
func (h *FStore) InstalledFunctions() ([]string, error) {
ids, err := h.store.Keys()
if err != nil {
return nil, fmt.Errorf("could not list installed functions: %w", err)
}

ids := h.store.Keys()
return ids, nil
}
4 changes: 2 additions & 2 deletions fstore/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func TestFunction_InstalledFunctions(t *testing.T) {
defer os.RemoveAll(workdir)

store := mocks.BaselineStore(t)
store.KeysFunc = func() ([]string, error) {
return installed, nil
store.KeysFunc = func() []string {
return installed
}

fh := fstore.New(mocks.NoopLogger, store, workdir)
Expand Down
2 changes: 1 addition & 1 deletion fstore/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package fstore
type Store interface {
GetRecord(string, interface{}) error
SetRecord(string, interface{}) error
Keys() ([]string, error)
Keys() []string
}
109 changes: 53 additions & 56 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ go 1.21.0
require (
github.com/Microsoft/go-winio v0.6.1
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/blocklessnetwork/b7s-attributes v0.0.0-20231003175355-c87ad3eae97e
github.com/blocklessnetwork/b7s-attributes v0.0.0
github.com/cavaliergopher/grab/v3 v3.0.1
github.com/cockroachdb/pebble v0.0.0-20230903225801-a4fe05009372
github.com/containerd/cgroups/v3 v3.0.2
github.com/fatih/color v1.15.0
github.com/cockroachdb/pebble v1.0.0
github.com/containerd/cgroups/v3 v3.0.3
github.com/fatih/color v1.16.0
github.com/hashicorp/go-hclog v1.3.0
github.com/hashicorp/raft v1.4.0
github.com/hashicorp/raft-boltdb/v2 v2.2.2
github.com/ipfs/boxo v0.13.1
github.com/labstack/echo/v4 v4.11.1
github.com/libp2p/go-libp2p v0.31.0
github.com/libp2p/go-libp2p-kad-dht v0.25.0
github.com/libp2p/go-libp2p-pubsub v0.9.3
github.com/ipfs/boxo v0.17.0
github.com/labstack/echo/v4 v4.11.4
github.com/libp2p/go-libp2p v0.32.2
github.com/libp2p/go-libp2p-kad-dht v0.25.2
github.com/libp2p/go-libp2p-pubsub v0.10.0
github.com/libp2p/go-libp2p-raft v0.4.0
github.com/multiformats/go-multiaddr v0.11.0
github.com/rs/zerolog v1.30.0
github.com/spf13/afero v1.9.5
github.com/multiformats/go-multiaddr v0.12.2
github.com/rs/zerolog v1.31.0
github.com/spf13/afero v1.11.0
github.com/stretchr/testify v1.8.4
github.com/ziflex/lecho/v3 v3.5.0
gopkg.in/yaml.v2 v2.4.0
Expand All @@ -30,40 +30,40 @@ require (
require (
github.com/armon/go-metrics v0.4.1 // indirect
github.com/boltdb/bolt v1.3.1 // indirect
github.com/cilium/ebpf v0.11.0 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cilium/ebpf v0.12.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/getsentry/sentry-go v0.23.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/getsentry/sentry-go v0.26.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/google/pprof v0.0.0-20230901174712-0191c66da455 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/google/pprof v0.0.0-20240130152714-0ed6a68c8d9e // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-msgpack v0.5.5 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.6 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/libp2p/go-libp2p-consensus v0.0.1 // indirect
github.com/libp2p/go-libp2p-gostream v0.6.0 // indirect
github.com/libp2p/go-libp2p-routing-helpers v0.7.3 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/onsi/ginkgo/v2 v2.12.0 // indirect
github.com/onsi/ginkgo/v2 v2.15.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-20 v0.3.3 // indirect
github.com/quic-go/quic-go v0.38.1 // indirect
github.com/quic-go/webtransport-go v0.5.3 // indirect
github.com/quic-go/quic-go v0.41.0 // indirect
github.com/quic-go/webtransport-go v0.6.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
go.opentelemetry.io/otel v1.18.0 // indirect
go.opentelemetry.io/otel/metric v1.18.0 // indirect
go.opentelemetry.io/otel/trace v1.18.0 // indirect
go.uber.org/dig v1.17.0 // indirect
go.uber.org/fx v1.20.0 // indirect
go.etcd.io/bbolt v1.3.8 // indirect
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
go.uber.org/dig v1.17.1 // indirect
go.uber.org/fx v1.20.1 // indirect
go.uber.org/mock v0.4.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/time v0.5.0 // indirect
gonum.org/v1/gonum v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand All @@ -82,16 +82,14 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/elastic/gosigar v0.14.2 // indirect
github.com/flynn/noise v1.0.0 // indirect
github.com/flynn/noise v1.1.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/protobuf v1.3.3 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/uuid v1.3.1
github.com/google/uuid v1.6.0
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/golang-lru v1.0.2 // indirect
Expand All @@ -104,15 +102,15 @@ require (
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/jbenet/goprocess v0.1.4 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/klauspost/compress v1.17.5 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/koron/go-ssdp v0.0.4 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-cidranger v1.1.0 // indirect
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
github.com/libp2p/go-libp2p-asn-util v0.3.0 // indirect
github.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect
github.com/libp2p/go-libp2p-kbucket v0.6.3 // indirect
github.com/libp2p/go-libp2p-record v0.2.0 // indirect
github.com/libp2p/go-msgio v0.3.0 // indirect
Expand All @@ -121,9 +119,8 @@ require (
github.com/libp2p/go-reuseport v0.4.0 // indirect
github.com/libp2p/go-yamux/v4 v4.0.1 // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/miekg/dns v1.1.56 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/miekg/dns v1.1.58 // indirect
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
Expand All @@ -135,34 +132,34 @@ require (
github.com/multiformats/go-multibase v0.2.0 // indirect
github.com/multiformats/go-multicodec v0.9.0 // indirect
github.com/multiformats/go-multihash v0.2.3 // indirect
github.com/multiformats/go-multistream v0.4.1 // indirect
github.com/multiformats/go-multistream v0.5.0 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/opencontainers/runtime-spec v1.1.0
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/polydawn/refmt v0.89.0 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/smartystreets/assertions v1.13.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.15.0
golang.org/x/tools v0.13.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0
golang.org/x/tools v0.17.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
)

Expand Down
Loading

0 comments on commit d2a26af

Please sign in to comment.