Skip to content

Commit

Permalink
Merge pull request #195 from filecoin-project/chore/update-deps
Browse files Browse the repository at this point in the history
chore: upgrade venus and venus-auth
  • Loading branch information
hunjixin authored May 12, 2023
2 parents 85cf6e7 + ce00128 commit da63086
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 32 deletions.
24 changes: 0 additions & 24 deletions api/permissioned.go

This file was deleted.

14 changes: 12 additions & 2 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-jsonrpc"
"github.com/filecoin-project/venus/venus-shared/api/chain"
"github.com/filecoin-project/venus/venus-shared/api/permission"
"github.com/gorilla/mux"
"github.com/multiformats/go-multiaddr"
manet "github.com/multiformats/go-multiaddr/net"
Expand Down Expand Up @@ -204,7 +205,13 @@ var runCmd = &cli.Command{
},
}

func serveRPC(minerAPI lapi.MinerAPI, stop node.StopFunc, addr multiaddr.Multiaddr, shutdownChan chan struct{}, maxRequestSize int64, localJwtClient, remoteJwtAuthClient jwtclient.IJwtAuthClient) error {
func serveRPC(minerAPI lapi.MinerAPI,
stop node.StopFunc,
addr multiaddr.Multiaddr,
shutdownChan chan struct{},
maxRequestSize int64,
localJwtClient, remoteJwtAuthClient jwtclient.IJwtAuthClient,
) error {
lst, err := manet.Listen(addr)
if err != nil {
return fmt.Errorf("could not listen: %w", err)
Expand All @@ -215,8 +222,11 @@ func serveRPC(minerAPI lapi.MinerAPI, stop node.StopFunc, addr multiaddr.Multiad
serverOptions = append(serverOptions, jsonrpc.WithMaxRequestSize(maxRequestSize))
}

minerAPIStruct := &lapi.MinerAPIStruct{}
permission.PermissionProxy(minerAPI, minerAPIStruct)

rpcServer := jsonrpc.NewServer(serverOptions...)
rpcServer.Register("Filecoin", lapi.PermissionedMinerAPI(minerAPI))
rpcServer.Register("Filecoin", minerAPIStruct)

mux := mux.NewRouter()
mux.Handle("/rpc/v0", jwtclient.NewAuthMux(localJwtClient, remoteJwtAuthClient, rpcServer))
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ require (
github.com/filecoin-project/go-state-types v0.11.1
github.com/filecoin-project/specs-actors/v2 v2.3.6
github.com/filecoin-project/specs-actors/v7 v7.0.1
github.com/filecoin-project/venus v1.11.0
github.com/filecoin-project/venus-auth v1.11.0
github.com/filecoin-project/venus v1.11.2-0.20230511060025-c6ed196f613c
github.com/filecoin-project/venus-auth v1.11.1-0.20230511013901-7829b3effbcd
github.com/golang/mock v1.6.0
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,11 @@ github.com/filecoin-project/specs-storage v0.2.2/go.mod h1:6cc/lncmAxMUocPi0z1EP
github.com/filecoin-project/storetheindex v0.3.5/go.mod h1:0r3d0kSpK63O6AvLr1CjAINLi+nWD49clzcnKV+GLpI=
github.com/filecoin-project/test-vectors/schema v0.0.5/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E=
github.com/filecoin-project/venus v1.2.4/go.mod h1:hJULXHGAnWuq5S5KRtPkwbT8DqgM9II7NwyNU7t59D0=
github.com/filecoin-project/venus v1.11.0 h1:cH7ydd+O2dw7zg8tKfeiuwVd5SokZ8TBu+WoBU60pAA=
github.com/filecoin-project/venus v1.11.0/go.mod h1:H8A3djsrHKRWuKnJI/8Y6xZRudbV9V2x5NIP8/PVPfQ=
github.com/filecoin-project/venus v1.11.2-0.20230511060025-c6ed196f613c h1:f8ZwGwjnGTa4mlH8x7yqKTdw+AIcHMUd6hO2AtwRokQ=
github.com/filecoin-project/venus v1.11.2-0.20230511060025-c6ed196f613c/go.mod h1:DA73O3dB54B9dxxxQncq0ZGy5f+zwY+hRMgnaiHdhrk=
github.com/filecoin-project/venus-auth v1.3.2/go.mod h1:m5Jog2GYxztwP7w3m/iJdv/V1/bTcAVU9rm/CbhxRQU=
github.com/filecoin-project/venus-auth v1.11.0 h1:9PBswWxc113vqaHABMcRyMm+1BtlJCwOFTPQJg/OVtQ=
github.com/filecoin-project/venus-auth v1.11.0/go.mod h1:aBfIfNxQkdcY8Rk5wrQn9qRtJpH4RTDdc10Ac+ferzs=
github.com/filecoin-project/venus-auth v1.11.1-0.20230511013901-7829b3effbcd h1:l02UJuEbSUIBi3NC/+17K2gBbAzsUNQg42rNCXskOBc=
github.com/filecoin-project/venus-auth v1.11.1-0.20230511013901-7829b3effbcd/go.mod h1:PoTmfEn5lljjAQThBzX0+friJYGgi7Z3VLLujkOkCT4=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ=
github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag=
Expand Down

0 comments on commit da63086

Please sign in to comment.