Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade gateway go mod #184

Merged
merged 3 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions api/clients/gateway_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,27 @@ package clients
import (
"context"

api "github.com/filecoin-project/venus/venus-shared/api/gateway/v1"

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-jsonrpc"
"github.com/filecoin-project/venus-market/v2/config"
"github.com/filecoin-project/venus-market/v2/minermgr"
"github.com/filecoin-project/venus-messager/gateway"
vCrypto "github.com/filecoin-project/venus/pkg/crypto"
types2 "github.com/filecoin-project/venus/venus-shared/types"
"github.com/ipfs-force-community/venus-common-utils/apiinfo"
"github.com/ipfs-force-community/venus-common-utils/metrics"
)

func newGatewayWalletClient(mctx metrics.MetricsCtx, mgr minermgr.IAddrMgr, nodeCfg *config.Signer) (ISinger, jsonrpc.ClientCloser, error) {
info := apiinfo.NewAPIInfo(nodeCfg.Url, nodeCfg.Token)
dialAddr, err := info.DialArgs("v0")
if err != nil {
return nil, nil, err
}

var client gateway.WalletClient
closer, err := jsonrpc.NewClient(mctx, dialAddr, "Gateway", &client, info.AuthHeader())

client, closer, err := api.DialIGatewayRPC(mctx, nodeCfg.Url, nodeCfg.Token, nil)
return &GatewayClient{
innerClient: client,
importMgr: mgr,
}, closer, err
}

type GatewayClient struct {
innerClient gateway.WalletClient
innerClient api.IWalletClient
importMgr minermgr.IAddrMgr
}

Expand Down
5 changes: 3 additions & 2 deletions api/clients/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/filecoin-project/venus-market/v2/config"
vCrypto "github.com/filecoin-project/venus/pkg/crypto"
v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1"
api "github.com/filecoin-project/venus/venus-shared/api/gateway/v1"
types2 "github.com/filecoin-project/venus/venus-shared/types"
"github.com/ipfs-force-community/venus-common-utils/builder"
"github.com/ipfs-force-community/venus-common-utils/metrics"
Expand Down Expand Up @@ -37,7 +38,7 @@ func NewMarketEvent(mctx metrics.MetricsCtx) (*marketevent.MarketEventStream, er
return stream, nil
}

func NewMarketEventAPI(stream *marketevent.MarketEventStream) (marketevent.IMarketEventAPI, error) {
func NewMarketEventAPI(stream *marketevent.MarketEventStream) (api.IMarketServiceProvider, error) {
return stream, nil
}

Expand Down Expand Up @@ -71,7 +72,7 @@ var ClientsOpts = func(server bool, mode string, mCfg *config.Messager, signerCf
return mode == "solo"
},
builder.Override(new(*marketevent.MarketEventStream), NewMarketEvent),
builder.Override(new(marketevent.IMarketEventAPI), NewMarketEventAPI),
builder.Override(new(api.IMarketServiceProvider), NewMarketEventAPI),
builder.Override(new(MarketRequestEvent), NewIMarketEvent),
),
)
Expand Down
53 changes: 11 additions & 42 deletions api/clients/sign_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,42 @@ import (
"context"
"fmt"

"github.com/filecoin-project/venus/venus-shared/api/wallet"

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-jsonrpc"
"github.com/filecoin-project/venus-market/v2/config"
"github.com/filecoin-project/venus-market/v2/minermgr"
vCrypto "github.com/filecoin-project/venus/pkg/crypto"
types2 "github.com/filecoin-project/venus/venus-shared/types"
"github.com/ipfs-force-community/venus-common-utils/apiinfo"
"github.com/ipfs-force-community/venus-common-utils/metrics"
"go.uber.org/fx"
)

type MsgMeta struct {
Type string
// Additional data related to what is signed. Should be verifiable with the
// signed bytes (e.g. CID(Extra).Bytes() == toSign)
Extra []byte
}

type ISinger interface {
WalletHas(ctx context.Context, addr address.Address) (bool, error)
WalletSign(ctx context.Context, k address.Address, msg []byte, meta types2.MsgMeta) (*vCrypto.Signature, error)
}

type WalletClient struct {
Internal struct {
WalletHas func(ctx context.Context, addr address.Address) (bool, error)
WalletSign func(ctx context.Context, k address.Address, msg []byte, meta types2.MsgMeta) (*vCrypto.Signature, error)
}
}

func (walletClient *WalletClient) WalletHas(ctx context.Context, addr address.Address) (bool, error) {
return walletClient.Internal.WalletHas(ctx, addr)
}

func (walletClient *WalletClient) WalletSign(ctx context.Context, k address.Address, msg []byte, meta types2.MsgMeta) (*vCrypto.Signature, error) {
return walletClient.Internal.WalletSign(ctx, k, msg, meta)
}

type SignerParams struct {
fx.In
SignerCfg *config.Signer
Mgr minermgr.IAddrMgr `optional:"true"`
}

func NewISignerClient(isServer bool) func(metrics.MetricsCtx, fx.Lifecycle, SignerParams) (ISinger, error) {

return func(mctx metrics.MetricsCtx, lc fx.Lifecycle, params SignerParams) (ISinger, error) {
var signer ISinger
var closer jsonrpc.ClientCloser
var err error
var (
cfg = params.SignerCfg
ctx = context.TODO()
signer ISinger
closer jsonrpc.ClientCloser
err error
)

switch params.SignerCfg.SignerType {
case config.SignerTypeWallet:
signer, closer, err = newWalletClient(context.Background(), params.SignerCfg.Token, params.SignerCfg.Url)
signer, closer, err = wallet.DialIFullAPIRPC(ctx, cfg.Url, cfg.Token, nil)
case config.SignerTypeGateway:
if !isServer {
return nil, fmt.Errorf("gateway signer not supported in client mode")
Expand All @@ -76,18 +59,4 @@ func NewISignerClient(isServer bool) func(metrics.MetricsCtx, fx.Lifecycle, Sign
})
return signer, err
}

}

func newWalletClient(ctx context.Context, token, url string) (*WalletClient, jsonrpc.ClientCloser, error) {
apiInfo := apiinfo.NewAPIInfo(url, token)
addr, err := apiInfo.DialArgs("v0")
if err != nil {
return nil, nil, err
}

walletClient := WalletClient{}
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin", []interface{}{&walletClient.Internal}, apiInfo.AuthHeader())

return &walletClient, closer, err
}
5 changes: 2 additions & 3 deletions api/impl/market_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import (
"context"
"fmt"

api "github.com/filecoin-project/venus/venus-shared/api/gateway/v1"
"github.com/filecoin-project/venus/venus-shared/types/gateway"
"github.com/ipfs-force-community/venus-gateway/marketevent"
"go.uber.org/fx"
)

type MarketEventAPI struct {
fx.In

Event marketevent.IMarketEventAPI `optional:"true"`
Event api.IMarketServiceProvider `optional:"true"`
}

var errNotSupportGateWayMode = fmt.Errorf("MarketEvent api supported only when it runs in 'solo' mode")
Expand Down
2 changes: 1 addition & 1 deletion cmd/venus-market/pool-run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/filecoin-project/venus-auth/cmd/jwtclient"
"github.com/filecoin-project/venus-auth/jwtclient"
"github.com/filecoin-project/venus-market/v2/api/clients"
"github.com/filecoin-project/venus-market/v2/api/impl"
cli2 "github.com/filecoin-project/venus-market/v2/cli"
Expand Down
2 changes: 1 addition & 1 deletion cmd/venus-market/solo-run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/filecoin-project/venus-auth/cmd/jwtclient"
"github.com/filecoin-project/venus-auth/jwtclient"
"github.com/filecoin-project/venus-market/v2/api/clients"
"github.com/filecoin-project/venus-market/v2/api/impl"
cli2 "github.com/filecoin-project/venus-market/v2/cli"
Expand Down
2 changes: 1 addition & 1 deletion fundmgr/fundmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func TestFundManagerBasic(t *testing.T) {
// Note: Expect failure because there is no available balance to withdraw:
// balance - reserved = 16 - 16 = 0
amt = abi.NewTokenAmount(1)
sentinel, err = s.fm.Withdraw(s.ctx, s.walletAddr, s.acctAddr, amt)
_, err = s.fm.Withdraw(s.ctx, s.walletAddr, s.acctAddr, amt)
require.Error(t, err)
}

Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ require (
github.com/filecoin-project/specs-actors/v8 v8.0.1
github.com/filecoin-project/specs-storage v0.4.1
github.com/filecoin-project/venus v1.6.1-0.20220809015458-f63fbca0f646
github.com/filecoin-project/venus-auth v1.6.0
github.com/filecoin-project/venus-auth v1.6.1-0.20220818060206-3313af6a9ba1
github.com/filecoin-project/venus-messager v1.6.2-0.20220722073101-cc0865f9be71
github.com/gbrlsnchs/jwt/v3 v3.0.1
github.com/golang/mock v1.6.0
Expand All @@ -40,7 +40,7 @@ require (
github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef
github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7
github.com/ipfs-force-community/venus-gateway v1.6.0
github.com/ipfs-force-community/venus-gateway v1.6.2-0.20220825071140-7fe252f3ab6b
github.com/ipfs/go-block-format v0.0.3
github.com/ipfs/go-blockservice v0.3.0
github.com/ipfs/go-cid v0.2.0
Expand Down Expand Up @@ -70,10 +70,8 @@ require (
github.com/libp2p/go-buffer-pool v0.0.2
github.com/libp2p/go-libp2p v0.20.1
github.com/libp2p/go-libp2p-core v0.16.1
github.com/libp2p/go-libp2p-noise v0.4.0
github.com/libp2p/go-libp2p-peerstore v0.7.0
github.com/libp2p/go-libp2p-resource-manager v0.3.0
github.com/libp2p/go-libp2p-tls v0.4.1
github.com/libp2p/go-libp2p-yamux v0.9.1
github.com/libp2p/go-maddr-filter v0.1.0
github.com/mitchellh/go-homedir v1.1.0
Expand Down Expand Up @@ -107,6 +105,7 @@ require (
github.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee // indirect
github.com/Stebalien/go-bitfield v0.0.1 // indirect
github.com/acobaugh/osrelease v0.0.0-20181218015638-a93a0a55a249 // indirect
github.com/ahmetb/go-linq/v3 v3.2.0 // indirect
github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect
github.com/awnumar/memcall v0.0.0-20191004114545-73db50fd9f80 // indirect
github.com/awnumar/memguard v0.22.2 // indirect
Expand Down Expand Up @@ -157,6 +156,7 @@ require (
github.com/flynn/noise v1.0.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/fxamacker/cbor/v2 v2.4.0 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/gin-gonic/gin v1.8.1 // indirect
github.com/go-kit/kit v0.12.0 // indirect
Expand Down Expand Up @@ -297,6 +297,7 @@ require (
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect
github.com/whyrusleeping/go-logging v0.0.1 // indirect
github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.0.2 // indirect
github.com/xdg-go/stringprep v1.0.2 // indirect
Expand Down
14 changes: 10 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi
github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/DataDog/zstd v1.4.1 h1:3oxKN3wbHibqx897utPC2LTQU4J+IHWWJO+glkAkpFM=
github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
Expand All @@ -89,6 +91,7 @@ github.com/acobaugh/osrelease v0.0.0-20181218015638-a93a0a55a249 h1:fMi9ZZ/it4or
github.com/acobaugh/osrelease v0.0.0-20181218015638-a93a0a55a249/go.mod h1:iU1PxQMQwoHZZWmMKrMkrNlY+3+p9vxIjpZOVyxWa0g=
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
github.com/ahmetb/go-linq/v3 v3.2.0 h1:BEuMfp+b59io8g5wYzNoFe9pWPalRklhlhbiU3hYZDE=
github.com/ahmetb/go-linq/v3 v3.2.0/go.mod h1:haQ3JfOeWK8HpVxMtHHEMPVgBKiYyQ+f1/kLZh/cj9U=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/akrylysov/pogreb v0.10.1/go.mod h1:pNs6QmpQ1UlTJKDezuRWmaqkgUE2TuU0YTWyqJZ7+lI=
Expand Down Expand Up @@ -452,11 +455,13 @@ github.com/filecoin-project/test-vectors/schema v0.0.5/go.mod h1:iQ9QXLpYWL3m7wa
github.com/filecoin-project/venus v1.2.4/go.mod h1:hJULXHGAnWuq5S5KRtPkwbT8DqgM9II7NwyNU7t59D0=
github.com/filecoin-project/venus v1.6.0/go.mod h1:ukA+xwqDs40lixoa+HDNfuN8b1G4jpm4k0ujceVejSk=
github.com/filecoin-project/venus v1.6.1-0.20220718091042-a51da69e1731/go.mod h1:ukA+xwqDs40lixoa+HDNfuN8b1G4jpm4k0ujceVejSk=
github.com/filecoin-project/venus v1.6.1-0.20220803064712-14d26a4e39f0/go.mod h1:Ibaxk3dWQuVjrwm656L8jogcv0heFsoNhlqT6MWX9Cg=
github.com/filecoin-project/venus v1.6.1-0.20220809015458-f63fbca0f646 h1:V27ZtZZobzi7aNedtU/Jg9MuQrqB/wi2qePtIDWHsp8=
github.com/filecoin-project/venus v1.6.1-0.20220809015458-f63fbca0f646/go.mod h1:Ibaxk3dWQuVjrwm656L8jogcv0heFsoNhlqT6MWX9Cg=
github.com/filecoin-project/venus-auth v1.3.2/go.mod h1:m5Jog2GYxztwP7w3m/iJdv/V1/bTcAVU9rm/CbhxRQU=
github.com/filecoin-project/venus-auth v1.6.0 h1:DLl7q5g1eh6UTpp98MLpRWAI79k6TUw1Myh/RLeaFpU=
github.com/filecoin-project/venus-auth v1.6.0/go.mod h1:x/Cv3zz9z5O+/uqIKgYtk5UsL7nYu+CtiPjyVQ8Lywg=
github.com/filecoin-project/venus-auth v1.6.1-0.20220818060206-3313af6a9ba1 h1:05GqP2sgTlGDLLSmMgkdz/1RgYBwnKDf08Qj5OrcjvU=
github.com/filecoin-project/venus-auth v1.6.1-0.20220818060206-3313af6a9ba1/go.mod h1:eqjx1U5sJ/3bqqc3PDJutap9A1GAO4fXVt25J6Sm9Fk=
github.com/filecoin-project/venus-messager v1.6.2-0.20220722073101-cc0865f9be71 h1:Cky7ZOsATAPDvkHv7Hw1lUeerjaeyvaVmT87mSSToaM=
github.com/filecoin-project/venus-messager v1.6.2-0.20220722073101-cc0865f9be71/go.mod h1:BpQcTuKelNSQQJJO69PQAzk3Y6ZAD3zBAr38wIZXwM8=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
Expand All @@ -478,6 +483,7 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88=
github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo=
github.com/gabriel-vasile/mimetype v1.4.0/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmxRtOJlERCzSmRvr8=
github.com/gammazero/keymutex v0.0.2/go.mod h1:qtzWCCLMisQUmVa4dvqHVgwfh4BP2YB7JxNDGXnsKrs=
Expand Down Expand Up @@ -817,8 +823,9 @@ github.com/ipfs-force-community/metrics v1.0.1-0.20220719063006-2c54bb379466/go.
github.com/ipfs-force-community/venus-common-utils v0.0.0-20210924063144-1d3a5b30de87/go.mod h1:RTVEOzM+hkpqmcEWpyLDkx1oGO5r9ZWCgYxG/CsXzJQ=
github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7 h1:v/1/INcqm3kHLauWQYB63MwWJRWGz+3WEuUPp0jzIl8=
github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7/go.mod h1:sSTUXgIu95tPHvgcYhdLuELmgPJWCP/pNMFtsrVtOyA=
github.com/ipfs-force-community/venus-gateway v1.6.0 h1:uFx01GI78ZhpfgIBXsoa0hK1p0zuARuK69weQ9ZHkZU=
github.com/ipfs-force-community/venus-gateway v1.6.0/go.mod h1:BvtUgOPZZSdVKzDmyABPY9D6CjavWnK9iYs+QjTG3LE=
github.com/ipfs-force-community/venus-gateway v1.6.2-0.20220825071140-7fe252f3ab6b h1:vQmQyLdZpHNMdAhLS0cZW2427aFmRyyU+eo6bJUOTB8=
github.com/ipfs-force-community/venus-gateway v1.6.2-0.20220825071140-7fe252f3ab6b/go.mod h1:OuFfayJFDNc2YTzdgyT0LA8IKME5IXapwNp5Z9P90lY=
github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI=
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
Expand Down Expand Up @@ -1342,7 +1349,6 @@ github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCTh
github.com/libp2p/go-libp2p-noise v0.1.1/go.mod h1:QDFLdKX7nluB7DEnlVPbz7xlLHdwHFA9HiohJRr3vwM=
github.com/libp2p/go-libp2p-noise v0.2.0/go.mod h1:IEbYhBBzGyvdLBoxxULL/SGbJARhUeqlO8lVSREYu2Q=
github.com/libp2p/go-libp2p-noise v0.3.0/go.mod h1:JNjHbociDJKHD64KTkzGnzqJ0FEV5gHJa6AB00kbCNQ=
github.com/libp2p/go-libp2p-noise v0.4.0 h1:khcMsGhHNdGqKE5LDLrnHwZvdGVMsrnD4GTkTWkwmLU=
github.com/libp2p/go-libp2p-noise v0.4.0/go.mod h1:BzzY5pyzCYSyJbQy9oD8z5oP2idsafjt4/X42h9DjZU=
github.com/libp2p/go-libp2p-peer v0.0.1/go.mod h1:nXQvOBbwVqoP+T5Y5nCjeH4sP9IX/J0AMzcDUVruVoo=
github.com/libp2p/go-libp2p-peer v0.1.1/go.mod h1:jkF12jGB4Gk/IOo+yomm+7oLWxF278F7UnrYUQ1Q8es=
Expand Down Expand Up @@ -1414,7 +1420,6 @@ github.com/libp2p/go-libp2p-testing v0.9.2/go.mod h1:Td7kbdkWqYTJYQGTwzlgXwaqldr
github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M=
github.com/libp2p/go-libp2p-tls v0.3.0/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY=
github.com/libp2p/go-libp2p-tls v0.3.1/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY=
github.com/libp2p/go-libp2p-tls v0.4.1 h1:1ByJUbyoMXvYXDoW6lLsMxqMViQNXmt+CfQqlnCpY+M=
github.com/libp2p/go-libp2p-tls v0.4.1/go.mod h1:EKCixHEysLNDlLUoKxv+3f/Lp90O2EXNjTr0UQDnrIw=
github.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk=
github.com/libp2p/go-libp2p-transport v0.0.5/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A=
Expand Down Expand Up @@ -2140,6 +2145,7 @@ github.com/whyrusleeping/pubsub v0.0.0-20190708150250-92bcb0691325/go.mod h1:g7c
github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee h1:lYbXeSvJi5zk5GLKVuid9TVjS9a0OmLIDKTfoZBL6Ow=
github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg=
github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c=
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
Expand Down
2 changes: 1 addition & 1 deletion minermgr/minermgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/venus-auth/auth"
"github.com/filecoin-project/venus-auth/cmd/jwtclient"
"github.com/filecoin-project/venus-auth/core"
"github.com/filecoin-project/venus-auth/jwtclient"
"github.com/filecoin-project/venus-market/v2/config"
"github.com/filecoin-project/venus/venus-shared/actors/builtin"
v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1"
Expand Down
6 changes: 3 additions & 3 deletions network/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package network

import (
"github.com/libp2p/go-libp2p"
metrics "github.com/libp2p/go-libp2p-core/metrics"
noise "github.com/libp2p/go-libp2p-noise"
tls "github.com/libp2p/go-libp2p-tls"
"github.com/libp2p/go-libp2p-core/metrics"
"github.com/libp2p/go-libp2p/p2p/security/noise"
tls "github.com/libp2p/go-libp2p/p2p/security/tls"
quic "github.com/libp2p/go-libp2p/p2p/transport/quic"
)

Expand Down
2 changes: 1 addition & 1 deletion rpc/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

auth2 "github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/venus-auth/auth"
"github.com/filecoin-project/venus-auth/cmd/jwtclient"
"github.com/filecoin-project/venus-auth/core"
"github.com/filecoin-project/venus-auth/jwtclient"
jwt3 "github.com/gbrlsnchs/jwt/v3"
)

Expand Down
2 changes: 1 addition & 1 deletion rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/multiformats/go-multiaddr"

auth2 "github.com/filecoin-project/venus-auth/auth"
"github.com/filecoin-project/venus-auth/cmd/jwtclient"
"github.com/filecoin-project/venus-auth/core"
"github.com/filecoin-project/venus-auth/jwtclient"
"github.com/filecoin-project/venus-market/v2/config"
"github.com/gorilla/mux"
logging "github.com/ipfs/go-log/v2"
Expand Down
2 changes: 1 addition & 1 deletion storageprovider/deal_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func (dealTracker *DealTracker) checkPreCommitAndCommit(ctx metrics.MetricsCtx,
dealProposal, err := dealTracker.fullNode.StateMarketStorageDeal(ctx, deal.DealID, tsk)
if err != nil {
//todo if deal not found maybe need to market storage deal as error
log.Errorf("get market deal for sector %d of miner %s %w", deal.SectorNumber, addr, err)
log.Errorf("get market deal for sector %d of miner %s %s", deal.SectorNumber, addr, err.Error())
continue
}
if dealProposal.State.SectorStartEpoch > -1 { //include in sector
Expand Down