diff --git a/.github/workflows/build_upload.yml b/.github/workflows/build_upload.yml index f34e9ee8..5da731ce 100644 --- a/.github/workflows/build_upload.yml +++ b/.github/workflows/build_upload.yml @@ -10,7 +10,7 @@ jobs: build_upload: uses: filecoin-project/venus/.github/workflows/common_build_upload.yml@master with: - bin_name: 'venus-market' + bin_name: 'droplet' has_ffi: true secrets: OSS_KEY_ID: ${{secrets.OSS_KEY_ID}} diff --git a/.gitignore b/.gitignore index 250910ac..4323a0c0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,8 @@ *.dylib badgerStAskDb/ *.puml -/market-client -/venus-market +/droplet-client +/droplet sequence_chart.md .idea .vscode diff --git a/CHANGELOG.md b/CHANGELOG.md index 53b6ba95..4014a534 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ -# venus-market changelog +# droplet changelog ## v2.7.2 -* 修复订单卡在 StorageDealStaged 状态 [[#324](https://github.com/filecoin-project/venus-market/pull/324)] +* 修复订单卡在 StorageDealStaged 状态 [[#324](https://github.com/ipfs-force-community/droplet/pull/324)] ## v2.7.1 @@ -17,30 +17,30 @@ ### New Features -* feat: add status api to detect api ready by @hunjixin /添加状态检测接口 [[#282](https://github.com/filecoin-project/venus-market/pull/282)] -* feat: Add miner manager related commands @diwufeiwen /增加 miner manager 相关命令 [[#293](https://github.com/filecoin-project/venus-market/pull/293)] -* feat: add command to print signer deal detail by @simlecode /增加两个命令行用于输出单个存储订单和检索的详情 [[#298](https://github.com/filecoin-project/venus-market/pull/298)] -* feat: unsealed from sp through venus-gateway / 通过venus-gateway给SP下发unsealed请求 by @diwufeiwen [[#267](https://github.com/filecoin-project/venus-market/pull/267)] -* feat: opt deal list cmds by @simlecode / 订单查询优化 [[#301](https://github.com/filecoin-project/venus-market/pull/301)] -* feat: new api ReleaseDeals by @0x5459 /新增 ReleaseDeals 接口 [[#305](https://github.com/filecoin-project/venus-market/pull/305)] -* feat: add command to cancel data transfer by @simlecode / 根据条件取消检索订单 [[#307](https://github.com/filecoin-project/venus-market/pull/307)] -* feat: more time for query retrieval ask by @hunjixin /querytimeout从5秒改成5分钟[[#304](https://github.com/filecoin-project/venus-market/pull/304)] -* feat: destroy shards by @simlecode /添加DagstoreDestroyShard命令 [[#309](https://github.com/filecoin-project/venus-market/pull/309)] -* feat: update unseal api / 更新 unseal 的接口 by @LinZexiao [[#314](https://github.com/filecoin-project/venus-market/pull/314)] -* feat: add docker push by @hunjixin /增加推送到镜像仓库的功能 [[#316](https://github.com/filecoin-project/venus-market/pull/316)] -* feat: add command to expend claim term by @simlecode /添加续期命令 [[#315](https://github.com/filecoin-project/venus-market/pull/315)] +* feat: add status api to detect api ready by @hunjixin /添加状态检测接口 [[#282](https://github.com/ipfs-force-community/droplet/pull/282)] +* feat: Add miner manager related commands @diwufeiwen /增加 miner manager 相关命令 [[#293](https://github.com/ipfs-force-community/droplet/pull/293)] +* feat: add command to print signer deal detail by @simlecode /增加两个命令行用于输出单个存储订单和检索的详情 [[#298](https://github.com/ipfs-force-community/droplet/pull/298)] +* feat: unsealed from sp through sophon-gateway / 通过sophon-gateway给SP下发unsealed请求 by @diwufeiwen [[#267](https://github.com/ipfs-force-community/droplet/pull/267)] +* feat: opt deal list cmds by @simlecode / 订单查询优化 [[#301](https://github.com/ipfs-force-community/droplet/pull/301)] +* feat: new api ReleaseDeals by @0x5459 /新增 ReleaseDeals 接口 [[#305](https://github.com/ipfs-force-community/droplet/pull/305)] +* feat: add command to cancel data transfer by @simlecode / 根据条件取消检索订单 [[#307](https://github.com/ipfs-force-community/droplet/pull/307)] +* feat: more time for query retrieval ask by @hunjixin /querytimeout从5秒改成5分钟[[#304](https://github.com/ipfs-force-community/droplet/pull/304)] +* feat: destroy shards by @simlecode /添加DagstoreDestroyShard命令 [[#309](https://github.com/ipfs-force-community/droplet/pull/309)] +* feat: update unseal api / 更新 unseal 的接口 by @LinZexiao [[#314](https://github.com/ipfs-force-community/droplet/pull/314)] +* feat: add docker push by @hunjixin /增加推送到镜像仓库的功能 [[#316](https://github.com/ipfs-force-community/droplet/pull/316)] +* feat: add command to expend claim term by @simlecode /添加续期命令 [[#315](https://github.com/ipfs-force-community/droplet/pull/315)] ### Bug Fixes -* fix: add composite indexes by @simlecode / 添加联合索引 [[#294](https://github.com/filecoin-project/venus-market/pull/294)] -* fix: check deal state in ReleaseDeals by @0x5459 / ReleaseDeals 方法需要判断订单状态 [[#308](https://github.com/filecoin-project/venus-market/pull/308)] -* fix: add check for miner config by @simlecode / 未找到矿工配置时返回错误 [[#311](https://github.com/filecoin-project/venus-market/pull/311)] -* fix: Circular search for deals by @simlecode / 循环检索订单 [[#310](https://github.com/filecoin-project/venus-market/pull/310)] -* fix: PaymentAddress uses a fake address when retrieval data does not exist by @simlecode / 当检索数据不存在时,paymentaddress用个假地址 [[#312](https://github.com/filecoin-project/venus-market/pull/312)] +* fix: add composite indexes by @simlecode / 添加联合索引 [[#294](https://github.com/ipfs-force-community/droplet/pull/294)] +* fix: check deal state in ReleaseDeals by @0x5459 / ReleaseDeals 方法需要判断订单状态 [[#308](https://github.com/ipfs-force-community/droplet/pull/308)] +* fix: add check for miner config by @simlecode / 未找到矿工配置时返回错误 [[#311](https://github.com/ipfs-force-community/droplet/pull/311)] +* fix: Circular search for deals by @simlecode / 循环检索订单 [[#310](https://github.com/ipfs-force-community/droplet/pull/310)] +* fix: PaymentAddress uses a fake address when retrieval data does not exist by @simlecode / 当检索数据不存在时,paymentaddress用个假地址 [[#312](https://github.com/ipfs-force-community/droplet/pull/312)] ## v2.6.0 -* 增加列出 storage/retrieval asks 命令行 [[#272](https://github.com/filecoin-project/venus-market/pull/272)] -* 重构 updatedealstatus 接口 [[#289](https://github.com/filecoin-project/venus-market/pull/289)] -* 升级 venus、venus-messager、venus-gateway 和 venus-auth 版本到 v1.10.0 +* 增加列出 storage/retrieval asks 命令行 [[#272](https://github.com/ipfs-force-community/droplet/pull/272)] +* 重构 updatedealstatus 接口 [[#289](https://github.com/ipfs-force-community/droplet/pull/289)] +* 升级 venus、sophon-messager、sophon-gateway 和 sophon-auth 版本到 v1.10.0 * 升级 go-jsonrpc 版本到 v0.1.7 diff --git a/Makefile b/Makefile index 97ebfa53..b3922a02 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ all: build # git modules that need to be loaded MODULES:= -ldflags=-X=github.com/filecoin-project/venus-market/v2/version.CurrentCommit=+git.$(subst -,.,$(shell git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)) +ldflags=-X=github.com/ipfs-force-community/droplet/v2/version.CurrentCommit=+git.$(subst -,.,$(shell git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)) ifneq ($(strip $(LDFLAGS)),) ldflags+=-extldflags=$(LDFLAGS) endif @@ -57,10 +57,10 @@ dist-clean: git submodule deinit --all -f build: $(BUILD_DEPS) - rm -f market-client - rm -f venus-market - go build -o ./market-client $(GOFLAGS) ./cmd/market-client - go build -o ./venus-market $(GOFLAGS) ./cmd/venus-market + rm -f droplet-client + rm -f droplet + go build -o ./droplet-client $(GOFLAGS) ./cmd/droplet-client + go build -o ./droplet $(GOFLAGS) ./cmd/droplet add-debug-flag: GOFLAGS+=-gcflags="all=-N -l" @@ -77,17 +77,17 @@ ifdef DOCKERFILE else curl -O https://raw.githubusercontent.com/filecoin-project/venus-docs/master/script/docker/dockerfile endif - docker build --build-arg HTTPS_PROXY=$(BUILD_DOCKER_PROXY) --build-arg BUILD_TARGET=venus-market -t venus-market . - docker build --build-arg HTTPS_PROXY=$(BUILD_DOCKER_PROXY) --build-arg BUILD_TARGET=market-client -t market-client . - docker tag venus-market filvenus/venus-market:$(TAG) - docker tag market-client filvenus/market-client:$(TAG) + docker build --build-arg HTTPS_PROXY=$(BUILD_DOCKER_PROXY) --build-arg BUILD_TARGET=droplet -t droplet . + docker build --build-arg HTTPS_PROXY=$(BUILD_DOCKER_PROXY) --build-arg BUILD_TARGET=droplet-client -t droplet-client . + docker tag droplet filvenus/droplet:$(TAG) + docker tag droplet-client filvenus/droplet-client:$(TAG) ifdef PRIVATE_REGISTRY - docker tag venus-market $(PRIVATE_REGISTRY)/filvenus/venus-market:$(TAG) - docker tag market-client $(PRIVATE_REGISTRY)/filvenus/market-client:$(TAG) + docker tag droplet $(PRIVATE_REGISTRY)/filvenus/droplet:$(TAG) + docker tag droplet-client $(PRIVATE_REGISTRY)/filvenus/droplet-client:$(TAG) endif docker-push: docker - docker push $(PRIVATE_REGISTRY)/filvenus/venus-market:$(TAG) - docker push $(PRIVATE_REGISTRY)/filvenus/market-client:$(TAG) + docker push $(PRIVATE_REGISTRY)/filvenus/droplet:$(TAG) + docker push $(PRIVATE_REGISTRY)/filvenus/droplet-client:$(TAG) diff --git a/README.md b/README.md index 2979260f..9e067726 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,73 @@ -

Venus Market

+

Droplet

- - - - + + + +

-Use [Venus Issues](https://github.com/filecoin-project/venus/issues) for reporting issues about this repository. +droplet will deliver a complete deal making experience as what lotus offers. This includes compatibility with lotus client where one can make deal with droplet using lotus client, retrieve deal/data in the same way as lotus retrieves its data, setup storage ask and etc. -venus-market will deliver a complete deal making experience as what lotus offers. This includes compatibility with lotus client where one can make deal with venus-market using lotus client, retrieve deal/data in the same way as lotus retrieves its data, setup storage ask and etc. - -Use [Venus Issues](https://github.com/filecoin-project/venus/issues) for reporting issues about this repository. +Use [Droplet Issues](https://github.com/ipfs-force-community/droplet/issues) for reporting issues about this repository. ## feature -1. market 2.0 mainly implements the aggregation of multiple storage miners. clients can issue orders or retrieve any providers registered to venus-market. +1. market 2.0 mainly implements the aggregation of multiple storage miners. clients can issue orders or retrieve any providers registered to droplet. 2. all metadata of provider server is stored in the mysql database that providing better data security. -3. providers do not need to pay attention for the details of the deal, only need to query the market regularly to see if you have any deal to seal. -4. market maintain a piece pool, that is, to provide the provider with the data for sealing deals, and it can also speed up the retrieval speed. ask miners for unseal operations, only when missing piece in venus-market. +3. providers do not need to pay attention for the details of the deal, only need to query the market regularly to see if you have any deal to seal. +4. market maintain a piece pool, that is, to provide the provider with the data for sealing deals, and it can also speed up the retrieval speed. ask miners for unseal operations, only when missing piece in droplet. 5. for clients, it is fully compatible with lotus. ## build ```sh -git clone https://github.com/filecoin-project/venus-market.git -cd venus-market +git clone https://github.com/ipfs-force-community/droplet.git +cd droplet make ``` -## how to set up venus-market +## how to set up droplet run: - run in chain service ```shell script -./venus-market run --auth-url= --node-url= --messager-url= --gateway-url= --cs-token= --signer-type="gateway" +./droplet run --auth-url= --node-url= --messager-url= --gateway-url= --cs-token= --signer-type="gateway" ``` - run in local, conn venus chain service and use lotus-wallet/venus-wallet to sign ```shell script -./venus-market run --auth-url= --node-url= --messager-url= --cs-token= --signer-type="wallet" --signer-url= --signer-token= +./droplet run --auth-url= --node-url= --messager-url= --cs-token= --signer-type="wallet" --signer-url= --signer-token= ``` - run in local, conn lotus full node and use lotus full node to sign ```shell script -./venus-market run --node-url= --messager-url= --cs-token= --signer-type="lotusnode" +./droplet run --node-url= --messager-url= --cs-token= --signer-type="lotusnode" ``` set peer id and address ```shell script -./venus-market net listen #query venus-market address and peerid -./venus-market actor set-peer-id --miner #set peer id -./venus-market actor set-addrs --miner #set miner address -./venus-market actor info --miner #query miner address and peerid on chain +./droplet net listen #query droplet address and peerid +./droplet actor set-peer-id --miner #set peer id +./droplet actor set-addrs --miner #set miner address +./droplet actor info --miner #query miner address and peerid on chain ``` set storage ask ```shell script -./venus-market storage-deals set-ask --price --verified-price --min-piece-size =256B> --max-piece-size --miner +./droplet storage-deals set-ask --price --verified-price --min-piece-size =256B> --max-piece-size --miner ``` set retrieval ask ```shell script -./venus-market retrieval-deals set-ask --price --unseal-price --payment-interval --payment-interval-increase --payment-addr +./droplet retrieval-deals set-ask --price --unseal-price --payment-interval --payment-interval-increase --payment-addr ``` -## how to setup market client +## how to setup droplet client ```shell script -./market-client run --node-url --node-token --signer-url --signer-token --addr +./droplet-client run --node-url --node-token --signer-url --signer-token --addr ``` -Note:**please use a seperate address, or maybe nonce confiction** +Note:**please use a separate address, or maybe nonce conflict** diff --git a/api/clients/mix_msgclient.go b/api/clients/mix_msgclient.go index 105d01ee..3c99d6e9 100644 --- a/api/clients/mix_msgclient.go +++ b/api/clients/mix_msgclient.go @@ -10,8 +10,8 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/ipfs/go-cid" - "github.com/filecoin-project/venus-market/v2/api/clients/signer" - "github.com/filecoin-project/venus-market/v2/utils" + "github.com/ipfs-force-community/droplet/v2/api/clients/signer" + "github.com/ipfs-force-community/droplet/v2/utils" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" "github.com/filecoin-project/venus/venus-shared/types" @@ -103,13 +103,13 @@ func (msgClient *MixMsgClient) PushMessage(ctx context.Context, msg *types.Messa return cid.Undef, err } - // from-account-signer handling moved to venus-gateway + // from-account-signer handling moved to sophon-gateway _, err = msgClient.venusMessager.PushMessageWithId(ctx, msgID.String(), msg, nil) if err != nil { return cid.Undef, err } - log.Infof("push message %s to venus-messager", msgID.String()) + log.Warnf("push message %s to sophon-messager", msgID.String()) return msgID, nil } diff --git a/api/clients/modules.go b/api/clients/modules.go index 7b322f4b..fb484d0b 100644 --- a/api/clients/modules.go +++ b/api/clients/modules.go @@ -1,13 +1,13 @@ package clients import ( - "github.com/filecoin-project/venus-auth/jwtclient" + "github.com/ipfs-force-community/sophon-auth/jwtclient" logging "github.com/ipfs/go-log/v2" "github.com/ipfs-force-community/venus-common-utils/builder" - "github.com/filecoin-project/venus-market/v2/api/clients/signer" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/api/clients/signer" + "github.com/ipfs-force-community/droplet/v2/config" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" ) diff --git a/api/clients/node_client.go b/api/clients/node_client.go index 5a478ef8..ba15303b 100644 --- a/api/clients/node_client.go +++ b/api/clients/node_client.go @@ -8,8 +8,8 @@ import ( "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/utils" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/utils" "github.com/filecoin-project/venus/venus-shared/api" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" diff --git a/api/clients/signer/gateway_client.go b/api/clients/signer/gateway_client.go index 8c67a405..5d6bedc1 100644 --- a/api/clients/signer/gateway_client.go +++ b/api/clients/signer/gateway_client.go @@ -6,9 +6,9 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-jsonrpc" - "github.com/filecoin-project/venus-auth/jwtclient" + "github.com/ipfs-force-community/sophon-auth/jwtclient" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" vCrypto "github.com/filecoin-project/venus/pkg/crypto" "github.com/filecoin-project/venus/venus-shared/api" diff --git a/api/clients/signer/lotusnode_client.go b/api/clients/signer/lotusnode_client.go index 4e49cb28..d1d1988a 100644 --- a/api/clients/signer/lotusnode_client.go +++ b/api/clients/signer/lotusnode_client.go @@ -6,7 +6,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-jsonrpc" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" vCrypto "github.com/filecoin-project/venus/pkg/crypto" "github.com/filecoin-project/venus/venus-shared/api" diff --git a/api/clients/signer/sign_client.go b/api/clients/signer/sign_client.go index b55aed30..b710519d 100644 --- a/api/clients/signer/sign_client.go +++ b/api/clients/signer/sign_client.go @@ -11,9 +11,9 @@ import ( "github.com/ipfs-force-community/metrics" - "github.com/filecoin-project/venus-auth/jwtclient" + "github.com/ipfs-force-community/sophon-auth/jwtclient" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" vCrypto "github.com/filecoin-project/venus/pkg/crypto" vTypes "github.com/filecoin-project/venus/venus-shared/types" @@ -43,7 +43,7 @@ func NewISignerClient(isServer bool, authClient jwtclient.IAuthClient) func(metr // Signing through venus chain-service case config.SignerTypeGateway: if !isServer { - return nil, fmt.Errorf("signing through the venus-gateway cannot be used for market-client") + return nil, fmt.Errorf("signing through the sophon-gateway cannot be used for droplet-clientt") } signer, closer, err = newGatewayWalletClient(mCtx, signerCfg, authClient) default: diff --git a/api/clients/signer/wallet_client.go b/api/clients/signer/wallet_client.go index fde8406d..74584e63 100644 --- a/api/clients/signer/wallet_client.go +++ b/api/clients/signer/wallet_client.go @@ -6,7 +6,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-jsonrpc" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" vCrypto "github.com/filecoin-project/venus/pkg/crypto" "github.com/filecoin-project/venus/venus-shared/api" diff --git a/api/clients/validator.go b/api/clients/validator.go index 74847d31..d08639f0 100644 --- a/api/clients/validator.go +++ b/api/clients/validator.go @@ -4,7 +4,7 @@ import ( "context" "github.com/filecoin-project/go-address" - "github.com/ipfs-force-community/venus-gateway/validator" + "github.com/ipfs-force-community/sophon-gateway/validator" ) type localMinerValidator struct{} diff --git a/api/clients/venus_message_client.go b/api/clients/venus_message_client.go index 1e7f98c6..b5be432b 100644 --- a/api/clients/venus_message_client.go +++ b/api/clients/venus_message_client.go @@ -5,8 +5,8 @@ import ( "errors" "net/http" - "github.com/filecoin-project/venus-market/v2/config" "github.com/filecoin-project/venus/venus-shared/api/messager" + "github.com/ipfs-force-community/droplet/v2/config" "github.com/ipfs-force-community/metrics" "go.uber.org/fx" ) diff --git a/api/impl/market.go b/api/impl/market.go index a408c1fa..5f34ba91 100644 --- a/api/impl/market.go +++ b/api/impl/market.go @@ -8,8 +8,8 @@ import ( "github.com/filecoin-project/go-address" - "github.com/filecoin-project/venus-market/v2/api/clients" - "github.com/filecoin-project/venus-market/v2/fundmgr" + "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/fundmgr" "github.com/filecoin-project/venus/venus-shared/actors" marketactor "github.com/filecoin-project/venus/venus-shared/actors/builtin/market" diff --git a/api/impl/market_client.go b/api/impl/market_client.go index 727340fe..d9003a1a 100644 --- a/api/impl/market_client.go +++ b/api/impl/market_client.go @@ -5,9 +5,9 @@ import ( "github.com/ipfs/go-cid" - "github.com/filecoin-project/venus-market/v2/api/clients" - "github.com/filecoin-project/venus-market/v2/client" - "github.com/filecoin-project/venus-market/v2/version" + "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/client" + "github.com/ipfs-force-community/droplet/v2/version" "github.com/filecoin-project/venus/pkg/constants" clientapi "github.com/filecoin-project/venus/venus-shared/api/market/client" diff --git a/api/impl/venus_market.go b/api/impl/venus_market.go index 9b0e268b..981b5d44 100644 --- a/api/impl/venus_market.go +++ b/api/impl/venus_market.go @@ -24,18 +24,18 @@ import ( "github.com/libp2p/go-libp2p/core/peer" "github.com/pkg/errors" - "github.com/filecoin-project/venus-auth/jwtclient" - - clients2 "github.com/filecoin-project/venus-market/v2/api/clients" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/minermgr" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-market/v2/network" - "github.com/filecoin-project/venus-market/v2/paychmgr" - "github.com/filecoin-project/venus-market/v2/piecestorage" - "github.com/filecoin-project/venus-market/v2/retrievalprovider" - "github.com/filecoin-project/venus-market/v2/storageprovider" - "github.com/filecoin-project/venus-market/v2/version" + "github.com/ipfs-force-community/sophon-auth/jwtclient" + + clients2 "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/minermgr" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/network" + "github.com/ipfs-force-community/droplet/v2/paychmgr" + "github.com/ipfs-force-community/droplet/v2/piecestorage" + "github.com/ipfs-force-community/droplet/v2/retrievalprovider" + "github.com/ipfs-force-community/droplet/v2/storageprovider" + "github.com/ipfs-force-community/droplet/v2/version" "github.com/filecoin-project/venus/pkg/constants" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" diff --git a/cli/dagstore.go b/cli/dagstore.go index 4ff07da6..ebde1722 100644 --- a/cli/dagstore.go +++ b/cli/dagstore.go @@ -9,7 +9,7 @@ import ( "github.com/fatih/color" "github.com/urfave/cli/v2" - "github.com/filecoin-project/venus-market/v2/cli/tablewriter" + "github.com/ipfs-force-community/droplet/v2/cli/tablewriter" ) var DagstoreCmd = &cli.Command{ @@ -38,7 +38,7 @@ var dagstoreListShardsCmd = &cli.Command{ &cli.StringSliceFlag{ Name: "filter", Usage: `Filter shards in specific states, -eg. ./venus-market dagstore list-shards --filter=ShardStateErrored --filter=ShardStateAvailable, will ignore Errored and Available shards. +eg. ./droplet dagstore list-shards --filter=ShardStateErrored --filter=ShardStateAvailable, will ignore Errored and Available shards. all shard states: ShardStateAvailable ShardStateServing diff --git a/cli/piece-storage.go b/cli/piece-storage.go index 892919a5..2221ba73 100644 --- a/cli/piece-storage.go +++ b/cli/piece-storage.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/filecoin-project/venus-market/v2/cli/tablewriter" + "github.com/ipfs-force-community/droplet/v2/cli/tablewriter" "github.com/urfave/cli/v2" ) diff --git a/cli/pieces.go b/cli/pieces.go index fcf72ef2..d3f418cc 100644 --- a/cli/pieces.go +++ b/cli/pieces.go @@ -8,7 +8,7 @@ import ( "github.com/ipfs/go-cid" "github.com/urfave/cli/v2" - "github.com/filecoin-project/venus-market/v2/cli/tablewriter" + "github.com/ipfs-force-community/droplet/v2/cli/tablewriter" ) var PiecesCmd = &cli.Command{ diff --git a/cli/retrieval-deals.go b/cli/retrieval-deals.go index 5f0821cd..4364a26f 100644 --- a/cli/retrieval-deals.go +++ b/cli/retrieval-deals.go @@ -48,7 +48,7 @@ var retrievalDealsListCmd = &cli.Command{ &cli.Uint64Flag{ Name: "status", Usage: ` -deal status, show all deal status: ./venus-market retrieval deal statuses. +deal status, show all deal status: ./droplet retrieval deal statuses. part statuses: 6 DealStatusAccepted 15 DealStatusCompleted diff --git a/cli/storage-deals.go b/cli/storage-deals.go index 55b50ec1..55ced79a 100644 --- a/cli/storage-deals.go +++ b/cli/storage-deals.go @@ -22,7 +22,7 @@ import ( "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/storagemarket" - "github.com/filecoin-project/venus-market/v2/storageprovider" + "github.com/ipfs-force-community/droplet/v2/storageprovider" "github.com/filecoin-project/venus/venus-shared/types" "github.com/filecoin-project/venus/venus-shared/types/market" @@ -287,7 +287,7 @@ var dealsListCmd = &cli.Command{ &cli.Uint64Flag{ Name: "state", Usage: ` -deal state, show all deal state: ./venus-market storage deal states. +deal state, show all deal state: ./droplet storage deal states. part states: 8 StorageDealExpired 9 StorageDealSlashed diff --git a/cli/util.go b/cli/util.go index 6967fb8e..a01da9d5 100644 --- a/cli/util.go +++ b/cli/util.go @@ -25,8 +25,8 @@ import ( datatransfer "github.com/filecoin-project/go-data-transfer" "github.com/filecoin-project/go-jsonrpc" - "github.com/filecoin-project/venus-market/v2/cli/tablewriter" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/cli/tablewriter" + "github.com/ipfs-force-community/droplet/v2/config" "github.com/filecoin-project/venus/venus-shared/api" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" diff --git a/client/client.go b/client/client.go index 120fb794..be83afee 100644 --- a/client/client.go +++ b/client/client.go @@ -58,16 +58,16 @@ import ( "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/dline" - "github.com/filecoin-project/venus-market/v2/api/clients/signer" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/imports" - "github.com/filecoin-project/venus-market/v2/models/repo" - marketNetwork "github.com/filecoin-project/venus-market/v2/network" - "github.com/filecoin-project/venus-market/v2/retrievalprovider" - "github.com/filecoin-project/venus-market/v2/storageprovider" - "github.com/filecoin-project/venus-market/v2/utils" - - "github.com/filecoin-project/venus-auth/log" + "github.com/ipfs-force-community/droplet/v2/api/clients/signer" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/imports" + "github.com/ipfs-force-community/droplet/v2/models/repo" + marketNetwork "github.com/ipfs-force-community/droplet/v2/network" + "github.com/ipfs-force-community/droplet/v2/retrievalprovider" + "github.com/ipfs-force-community/droplet/v2/storageprovider" + "github.com/ipfs-force-community/droplet/v2/utils" + + "github.com/ipfs-force-community/sophon-auth/log" "github.com/filecoin-project/venus/pkg/constants" "github.com/filecoin-project/venus/venus-shared/actors/builtin/miner" diff --git a/client/client_test.go b/client/client_test.go index c757f428..aa12a2fb 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -23,8 +23,8 @@ import ( carv2 "github.com/ipld/go-car/v2" "github.com/stretchr/testify/require" - "github.com/filecoin-project/venus-market/v2/imports" - "github.com/filecoin-project/venus-market/v2/storageprovider" + "github.com/ipfs-force-community/droplet/v2/imports" + "github.com/ipfs-force-community/droplet/v2/storageprovider" ) //go:embed testdata/* diff --git a/client/dela_tracker.go b/client/dela_tracker.go index 597e18ba..145e351c 100644 --- a/client/dela_tracker.go +++ b/client/dela_tracker.go @@ -10,11 +10,11 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-market/v2/storageprovider" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" shared "github.com/filecoin-project/venus/venus-shared/types" types "github.com/filecoin-project/venus/venus-shared/types/market/client" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/storageprovider" "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" "go.uber.org/fx" diff --git a/client/import_test.go b/client/import_test.go index 1cd675cb..9f41830b 100644 --- a/client/import_test.go +++ b/client/import_test.go @@ -21,7 +21,7 @@ import ( "github.com/filecoin-project/go-fil-markets/stores" - "github.com/filecoin-project/venus-market/v2/imports" + "github.com/ipfs-force-community/droplet/v2/imports" ) // This test uses a full "dense" CARv2, and not a filestore (positional mapping). diff --git a/client/modules.go b/client/modules.go index 7b522ca1..91dcae1d 100644 --- a/client/modules.go +++ b/client/modules.go @@ -8,7 +8,7 @@ import ( "time" "github.com/filecoin-project/go-data-transfer/channelmonitor" - "github.com/filecoin-project/venus-market/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/badger" "github.com/ipfs-force-community/metrics" "github.com/libp2p/go-libp2p/core/host" @@ -26,13 +26,13 @@ import ( storageimpl "github.com/filecoin-project/go-fil-markets/storagemarket/impl" smnet "github.com/filecoin-project/go-fil-markets/storagemarket/network" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/imports" - "github.com/filecoin-project/venus-market/v2/network" - "github.com/filecoin-project/venus-market/v2/paychmgr" - "github.com/filecoin-project/venus-market/v2/retrievalprovider" - "github.com/filecoin-project/venus-market/v2/storageprovider" - marketevents "github.com/filecoin-project/venus-market/v2/utils" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/imports" + "github.com/ipfs-force-community/droplet/v2/network" + "github.com/ipfs-force-community/droplet/v2/paychmgr" + "github.com/ipfs-force-community/droplet/v2/retrievalprovider" + "github.com/ipfs-force-community/droplet/v2/storageprovider" + marketevents "github.com/ipfs-force-community/droplet/v2/utils" "github.com/ipfs-force-community/venus-common-utils/builder" "github.com/ipfs-force-community/venus-common-utils/journal" diff --git a/client/stream.go b/client/stream.go index 46479755..a9ab3059 100644 --- a/client/stream.go +++ b/client/stream.go @@ -9,9 +9,9 @@ import ( cborutil "github.com/filecoin-project/go-cbor-util" "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-fil-markets/storagemarket/network" - "github.com/filecoin-project/venus-market/v2/utils" "github.com/filecoin-project/venus/venus-shared/types" "github.com/filecoin-project/venus/venus-shared/types/market/client" + "github.com/ipfs-force-community/droplet/v2/utils" "github.com/libp2p/go-libp2p/core/host" ) diff --git a/client/types.go b/client/types.go index f9715b84..e4af3cba 100644 --- a/client/types.go +++ b/client/types.go @@ -1,7 +1,7 @@ package client import ( - "github.com/filecoin-project/venus-market/v2/imports" + "github.com/ipfs-force-community/droplet/v2/imports" ) type ClientImportMgr *imports.Manager diff --git a/cmd/market-client/actor-funds.go b/cmd/droplet-client/actor-funds.go similarity index 99% rename from cmd/market-client/actor-funds.go rename to cmd/droplet-client/actor-funds.go index 801245cf..e2584a11 100644 --- a/cmd/market-client/actor-funds.go +++ b/cmd/droplet-client/actor-funds.go @@ -14,7 +14,7 @@ import ( "github.com/filecoin-project/venus/pkg/constants" "github.com/filecoin-project/venus/venus-shared/types" - cli2 "github.com/filecoin-project/venus-market/v2/cli" + cli2 "github.com/ipfs-force-community/droplet/v2/cli" ) var actorFundsCmd = &cli.Command{ diff --git a/cmd/market-client/client_retr.go b/cmd/droplet-client/client_retr.go similarity index 96% rename from cmd/market-client/client_retr.go rename to cmd/droplet-client/client_retr.go index bf197f55..b7c8cb80 100644 --- a/cmd/market-client/client_retr.go +++ b/cmd/droplet-client/client_retr.go @@ -17,10 +17,10 @@ import ( "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-state-types/big" - cli2 "github.com/filecoin-project/venus-market/v2/cli" clientapi "github.com/filecoin-project/venus/venus-shared/api/market/client" "github.com/filecoin-project/venus/venus-shared/types" "github.com/filecoin-project/venus/venus-shared/types/market/client" + cli2 "github.com/ipfs-force-community/droplet/v2/cli" ) const DefaultMaxRetrievePrice = "0" @@ -243,13 +243,13 @@ In case of CAR retrieval, the selector must have one common "sub-root" node. Examples: - Retrieve a file by CID - # market-client retrieval retrieve --maxPrice 0.1fil bafyk... my-file + # droplet-clienttt retrieval retrieve --maxPrice 0.1fil bafyk... my-file - Retrieve a file by CID from f0123 - # market-client retrieval retrieve --maxPrice 0.1fil --miner f0123 bafyk... my-file + # droplet-client retrieval retrieve --maxPrice 0.1fil --miner f0123 bafyk... my-file - Retrieve a first file from a specified directory - $ market-client retrieval retrieve --data-selector /Links/0/Hash bafyk... my-file.txt + $ droplet-client retrieval retrieve --data-selector /Links/0/Hash bafyk... my-file.txt `, Flags: append([]cli.Flag{ &cli.BoolFlag{ diff --git a/cmd/market-client/data.go b/cmd/droplet-client/data.go similarity index 98% rename from cmd/market-client/data.go rename to cmd/droplet-client/data.go index 7e5af595..b7d4b739 100644 --- a/cmd/market-client/data.go +++ b/cmd/droplet-client/data.go @@ -10,9 +10,9 @@ import ( "github.com/ipfs/go-cid" "github.com/urfave/cli/v2" - cli2 "github.com/filecoin-project/venus-market/v2/cli" "github.com/filecoin-project/venus/venus-shared/types" "github.com/filecoin-project/venus/venus-shared/types/market/client" + cli2 "github.com/ipfs-force-community/droplet/v2/cli" ) var dataCmd = &cli.Command{ diff --git a/cmd/market-client/datacap.go b/cmd/droplet-client/datacap.go similarity index 99% rename from cmd/market-client/datacap.go rename to cmd/droplet-client/datacap.go index ed0e2db8..e33940aa 100644 --- a/cmd/market-client/datacap.go +++ b/cmd/droplet-client/datacap.go @@ -13,12 +13,12 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/builtin" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v10/verifreg" - cli2 "github.com/filecoin-project/venus-market/v2/cli" "github.com/filecoin-project/venus/venus-shared/actors" v1 "github.com/filecoin-project/venus/venus-shared/api/chain/v1" "github.com/filecoin-project/venus/venus-shared/types" sharedutils "github.com/filecoin-project/venus/venus-shared/utils" msgparser "github.com/filecoin-project/venus/venus-shared/utils/msg_parser" + cli2 "github.com/ipfs-force-community/droplet/v2/cli" "github.com/urfave/cli/v2" ) diff --git a/cmd/market-client/main.go b/cmd/droplet-client/main.go similarity index 80% rename from cmd/market-client/main.go rename to cmd/droplet-client/main.go index 5c0fa744..872086fd 100644 --- a/cmd/market-client/main.go +++ b/cmd/droplet-client/main.go @@ -13,21 +13,21 @@ import ( "github.com/filecoin-project/go-address" - clients2 "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" - "github.com/filecoin-project/venus-market/v2/client" - "github.com/filecoin-project/venus-market/v2/cmd" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/fundmgr" - "github.com/filecoin-project/venus-market/v2/models" - "github.com/filecoin-project/venus-market/v2/network" - "github.com/filecoin-project/venus-market/v2/paychmgr" - "github.com/filecoin-project/venus-market/v2/rpc" - "github.com/filecoin-project/venus-market/v2/storageprovider" - types2 "github.com/filecoin-project/venus-market/v2/types" - "github.com/filecoin-project/venus-market/v2/utils" - "github.com/filecoin-project/venus-market/v2/version" + clients2 "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/api/impl" + cli2 "github.com/ipfs-force-community/droplet/v2/cli" + "github.com/ipfs-force-community/droplet/v2/client" + "github.com/ipfs-force-community/droplet/v2/cmd" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/fundmgr" + "github.com/ipfs-force-community/droplet/v2/models" + "github.com/ipfs-force-community/droplet/v2/network" + "github.com/ipfs-force-community/droplet/v2/paychmgr" + "github.com/ipfs-force-community/droplet/v2/rpc" + "github.com/ipfs-force-community/droplet/v2/storageprovider" + types2 "github.com/ipfs-force-community/droplet/v2/types" + "github.com/ipfs-force-community/droplet/v2/utils" + "github.com/ipfs-force-community/droplet/v2/version" _ "github.com/filecoin-project/venus/pkg/crypto/bls" _ "github.com/filecoin-project/venus/pkg/crypto/secp" @@ -40,6 +40,11 @@ import ( "github.com/filecoin-project/venus/venus-shared/api/permission" ) +const ( + oldRepoPath = "~/.marketclient" + defRepoPath = "~/.droplet-client" +) + var ( ExtractApiKey = builder.NextInvoke() log = logging.Logger("main") @@ -48,8 +53,8 @@ var ( var ( RepoFlag = &cli.StringFlag{ Name: "repo", - EnvVars: []string{"VENUS_MARKET_CLIENT_PATH"}, - Value: "~/.marketclient", + EnvVars: []string{"DROPLET_CLIENT_PATH", "VENUS_MARKET_CLIENT_PATH"}, + Value: defRepoPath, } APIListenFlag = &cli.StringFlag{ @@ -69,7 +74,7 @@ var ( MessagerUrlFlag = &cli.StringFlag{ Name: "messager-url", - Usage: "url to connect the venus-messager service of the chain service layer", + Usage: "url to connect the sophon-messager service of the chain service layer", } MessagerTokenFlag = &cli.StringFlag{ @@ -79,7 +84,7 @@ var ( AuthTokenFlag = &cli.StringFlag{ Name: "auth-token", - Usage: "token used to connect venus chain service components, eg. venus-meassger, venus", + Usage: "token used to connect venus chain service components, eg. sophon-meassger, venus", } SignerTypeFlag = &cli.StringFlag{ @@ -115,8 +120,8 @@ func main() { } app := &cli.App{ - Name: "market-client", - Usage: "venus stores or retrieves the market client", + Name: "droplet-client", + Usage: "venus stores or retrieves the droplet client", Version: version.UserVersion(), EnableBashCompletion: true, Flags: []cli.Flag{ @@ -126,8 +131,8 @@ func main() { localCommand, &cli.Command{ Name: "run", - Usage: "run market client daemon,(1) connect full node service: ./market-client run --node-url=<...> --node-token=<...> --addr=;" + - "(2) connect venus shared service: ./market-client run --node-url=<...> --messager-url=<...> --auth-token=<...> --signer-url=<...> --signer-token=<...> --addr=.", + Usage: "run droplet client daemon,(1) connect full node service: ./droplet-client run --node-url=<...> --node-token=<...> --addr=;" + + "(2) connect venus shared service: ./droplet-client run --node-url=<...> --messager-url=<...> --auth-token=<...> --signer-url=<...> --signer-token=<...> --addr=.", Flags: []cli.Flag{ APIListenFlag, NodeUrlFlag, @@ -218,8 +223,12 @@ func flagData(cctx *cli.Context, cfg *config.MarketClientConfig) error { } func prepare(cctx *cli.Context) (*config.MarketClientConfig, error) { + var err error cfg := config.DefaultMarketClientConfig - cfg.HomeDir = cctx.String("repo") + cfg.HomeDir, err = cmd.GetRepoPath(cctx, RepoFlag.Name, oldRepoPath) + if err != nil { + return nil, err + } cfgPath, err := cfg.ConfigPath() if err != nil { return nil, err @@ -276,11 +285,11 @@ func marketClient(cctx *cli.Context) error { // defaults builder.Override(new(journal.DisabledEvents), journal.EnvDisabledEvents), builder.Override(new(journal.Journal), func(lc fx.Lifecycle, home config.IHome, disabled journal.DisabledEvents) (journal.Journal, error) { - return journal.OpenFilesystemJournal(lc, home.MustHomePath(), "market-client", disabled) + return journal.OpenFilesystemJournal(lc, home.MustHomePath(), "droplet-client", disabled) }), builder.Override(new(metrics.MetricsCtx), func() context.Context { - return metrics2.CtxScope(context.Background(), "venus-market") + return metrics2.CtxScope(context.Background(), "droplet") }), builder.Override(new(types2.ShutdownChan), shutdownChan), diff --git a/cmd/market-client/paych.go b/cmd/droplet-client/paych.go similarity index 99% rename from cmd/market-client/paych.go rename to cmd/droplet-client/paych.go index 06daff27..16e607aa 100644 --- a/cmd/market-client/paych.go +++ b/cmd/droplet-client/paych.go @@ -12,8 +12,8 @@ import ( "github.com/filecoin-project/go-state-types/builtin/v8/paych" "github.com/urfave/cli/v2" - cli2 "github.com/filecoin-project/venus-market/v2/cli" - "github.com/filecoin-project/venus-market/v2/paychmgr" + cli2 "github.com/ipfs-force-community/droplet/v2/cli" + "github.com/ipfs-force-community/droplet/v2/paychmgr" "github.com/filecoin-project/venus/pkg/constants" lpaych "github.com/filecoin-project/venus/venus-shared/actors/builtin/paych" diff --git a/cmd/market-client/retrieval.go b/cmd/droplet-client/retrieval.go similarity index 98% rename from cmd/market-client/retrieval.go rename to cmd/droplet-client/retrieval.go index a7e0f8ed..7070ed6e 100644 --- a/cmd/market-client/retrieval.go +++ b/cmd/droplet-client/retrieval.go @@ -16,9 +16,9 @@ import ( "github.com/ipfs/go-cid" "github.com/urfave/cli/v2" - cli2 "github.com/filecoin-project/venus-market/v2/cli" - "github.com/filecoin-project/venus-market/v2/cli/tablewriter" "github.com/filecoin-project/venus/venus-shared/types/market/client" + cli2 "github.com/ipfs-force-community/droplet/v2/cli" + "github.com/ipfs-force-community/droplet/v2/cli/tablewriter" ) var retrievalCmd = &cli.Command{ diff --git a/cmd/market-client/storage.go b/cmd/droplet-client/storage.go similarity index 98% rename from cmd/market-client/storage.go rename to cmd/droplet-client/storage.go index 6fdc708b..01b75066 100644 --- a/cmd/market-client/storage.go +++ b/cmd/droplet-client/storage.go @@ -40,9 +40,9 @@ import ( v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" "github.com/filecoin-project/venus/venus-shared/types" - cli2 "github.com/filecoin-project/venus-market/v2/cli" - "github.com/filecoin-project/venus-market/v2/cli/tablewriter" "github.com/filecoin-project/venus/venus-shared/types/market/client" + cli2 "github.com/ipfs-force-community/droplet/v2/cli" + "github.com/ipfs-force-community/droplet/v2/cli/tablewriter" ) var storageCmd = &cli.Command{ @@ -392,11 +392,11 @@ var storageDealsInitCmd = &cli.Command{ Name: "init", Usage: "Initialize storage deal with a miner", Description: `Make a deal with a miner. -dataCid comes from running 'market-client data import'. +dataCid comes from running 'droplet-client data import'. miner is the address of the miner you wish to make a deal with. price is measured in FIL/Epoch. Miners usually don't accept a bid lower than their advertised ask (which is in FIL/GiB/Epoch). You can check a miners listed price -with './market-client storage asks query '. +with './droplet-client storage asks query '. duration is how long the miner should store the data for, in blocks. The minimum value is 518400 (6 months).`, ArgsUsage: "[dataCid miner price duration]", @@ -613,7 +613,7 @@ uiLoop: switch state { case "import": - afmt.Print("Data CID (from " + color.YellowString("market-client data import") + "): ") + afmt.Print("Data CID (from " + color.YellowString("droplet-client data import") + "): ") _cidStr, _, err := rl.ReadLine() cidStr := string(_cidStr) @@ -1404,7 +1404,7 @@ func renderDeal(di *client.DealInfo) { color.Blue("Proposal CID: %s\n\n", di.ProposalCid.String()) if di.DealStages == nil { - color.Yellow("Deal was made with an older version of venus-market and venus-market did not collect detailed information about its stages") + color.Yellow("Deal was made with an older version of droplet did not collect detailed information about its stages") return } @@ -1616,7 +1616,7 @@ var storageDelesBatchCmd = &cli.Command{ Description: `Make deals with miners. price is measured in FIL/Epoch. Miners usually don't accept a bid lower than their advertised ask (which is in FIL/GiB/Epoch). You can check a miners listed price -with './market-client storage asks query '. +with './droplet-clientstorage asks query '. duration is how long the miner should store the data for, in blocks. The minimum value is 518400 (6 months).`, ArgsUsage: "[price duration]", diff --git a/cmd/market-client/transfer.go b/cmd/droplet-client/transfer.go similarity index 99% rename from cmd/market-client/transfer.go rename to cmd/droplet-client/transfer.go index 9dba5e43..bb38a9e6 100644 --- a/cmd/market-client/transfer.go +++ b/cmd/droplet-client/transfer.go @@ -15,7 +15,7 @@ import ( datatransfer "github.com/filecoin-project/go-data-transfer" - cli2 "github.com/filecoin-project/venus-market/v2/cli" + cli2 "github.com/ipfs-force-community/droplet/v2/cli" ) var transferCmd = &cli.Command{ diff --git a/cmd/market-client/util.go b/cmd/droplet-client/util.go similarity index 100% rename from cmd/market-client/util.go rename to cmd/droplet-client/util.go diff --git a/cmd/venus-market/main.go b/cmd/droplet/main.go similarity index 84% rename from cmd/venus-market/main.go rename to cmd/droplet/main.go index 30a6ac48..f64ef006 100644 --- a/cmd/venus-market/main.go +++ b/cmd/droplet/main.go @@ -8,14 +8,19 @@ import ( "github.com/ipfs-force-community/venus-common-utils/builder" - cli2 "github.com/filecoin-project/venus-market/v2/cli" - _ "github.com/filecoin-project/venus-market/v2/network" - "github.com/filecoin-project/venus-market/v2/version" + cli2 "github.com/ipfs-force-community/droplet/v2/cli" + _ "github.com/ipfs-force-community/droplet/v2/network" + "github.com/ipfs-force-community/droplet/v2/version" _ "github.com/filecoin-project/venus/pkg/crypto/bls" _ "github.com/filecoin-project/venus/pkg/crypto/secp" ) +const ( + oldRepoPath = "~/.venusmarket" + defRepoPath = "~/.droplet" +) + var mainLog = logging.Logger("main") // Invokes are called in the order they are defined. @@ -27,8 +32,8 @@ var ( var ( RepoFlag = &cli.StringFlag{ Name: "repo", - EnvVars: []string{"VENUS_MARKET_PATH"}, - Value: "~/.venusmarket", + EnvVars: []string{"DROPLET_PATH", "VENUS_MARKET_PATH"}, + Value: defRepoPath, } APIListenFlag = &cli.StringFlag{ @@ -83,8 +88,8 @@ var ( func main() { app := &cli.App{ - Name: "venus-market", - Usage: "venus-market", + Name: "droplet", + Usage: "droplet", Version: version.UserVersion(), EnableBashCompletion: true, Flags: []cli.Flag{ diff --git a/cmd/venus-market/run.go b/cmd/droplet/run.go similarity index 82% rename from cmd/venus-market/run.go rename to cmd/droplet/run.go index 9fbf75b9..bd05d68b 100644 --- a/cmd/venus-market/run.go +++ b/cmd/droplet/run.go @@ -11,27 +11,27 @@ import ( "github.com/ipfs-force-community/venus-common-utils/builder" "github.com/ipfs-force-community/venus-common-utils/journal" - "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" - "github.com/filecoin-project/venus-market/v2/api/impl/v0api" - cli2 "github.com/filecoin-project/venus-market/v2/cli" - "github.com/filecoin-project/venus-market/v2/cmd" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/dagstore" - "github.com/filecoin-project/venus-market/v2/fundmgr" - "github.com/filecoin-project/venus-market/v2/metrics" - "github.com/filecoin-project/venus-market/v2/minermgr" - "github.com/filecoin-project/venus-market/v2/models" - "github.com/filecoin-project/venus-market/v2/network" - "github.com/filecoin-project/venus-market/v2/paychmgr" - "github.com/filecoin-project/venus-market/v2/piecestorage" - "github.com/filecoin-project/venus-market/v2/retrievalprovider" - "github.com/filecoin-project/venus-market/v2/rpc" - "github.com/filecoin-project/venus-market/v2/storageprovider" - types2 "github.com/filecoin-project/venus-market/v2/types" - "github.com/filecoin-project/venus-market/v2/utils" + "github.com/ipfs-force-community/sophon-auth/jwtclient" + + "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/api/impl" + "github.com/ipfs-force-community/droplet/v2/api/impl/v0api" + cli2 "github.com/ipfs-force-community/droplet/v2/cli" + "github.com/ipfs-force-community/droplet/v2/cmd" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/dagstore" + "github.com/ipfs-force-community/droplet/v2/fundmgr" + "github.com/ipfs-force-community/droplet/v2/metrics" + "github.com/ipfs-force-community/droplet/v2/minermgr" + "github.com/ipfs-force-community/droplet/v2/models" + "github.com/ipfs-force-community/droplet/v2/network" + "github.com/ipfs-force-community/droplet/v2/paychmgr" + "github.com/ipfs-force-community/droplet/v2/piecestorage" + "github.com/ipfs-force-community/droplet/v2/retrievalprovider" + "github.com/ipfs-force-community/droplet/v2/rpc" + "github.com/ipfs-force-community/droplet/v2/storageprovider" + types2 "github.com/ipfs-force-community/droplet/v2/types" + "github.com/ipfs-force-community/droplet/v2/utils" marketapiV1 "github.com/filecoin-project/venus/venus-shared/api/market/v1" "github.com/filecoin-project/venus/venus-shared/api/permission" @@ -127,8 +127,12 @@ func flagData(cctx *cli.Context, cfg *config.MarketConfig) error { } func prepare(cctx *cli.Context) (*config.MarketConfig, error) { + var err error cfg := config.DefaultMarketConfig - cfg.HomeDir = cctx.String(RepoFlag.Name) + cfg.HomeDir, err = cmd.GetRepoPath(cctx, RepoFlag.Name, oldRepoPath) + if err != nil { + return nil, err + } cfgPath, err := cfg.ConfigPath() if err != nil { return nil, err @@ -195,10 +199,10 @@ func runDaemon(cctx *cli.Context) error { builder.Override(new(jwtclient.IAuthClient), authClient), builder.Override(new(journal.DisabledEvents), journal.EnvDisabledEvents), builder.Override(new(journal.Journal), func(lc fx.Lifecycle, home config.IHome, disabled journal.DisabledEvents) (journal.Journal, error) { - return journal.OpenFilesystemJournal(lc, home.MustHomePath(), "venus-market", disabled) + return journal.OpenFilesystemJournal(lc, home.MustHomePath(), "droplet", disabled) }), - metrics.MetricsOpts("venus-market", &cfg.Metrics), + metrics.MetricsOpts("droplet", &cfg.Metrics), // override marketconfig builder.Override(new(config.MarketConfig), cfg), builder.Override(new(types2.ShutdownChan), shutdownChan), diff --git a/cmd/load_builtin_actor.go b/cmd/load_builtin_actor.go deleted file mode 100644 index 7a7a853e..00000000 --- a/cmd/load_builtin_actor.go +++ /dev/null @@ -1,26 +0,0 @@ -package cmd - -import ( - "context" - - "github.com/filecoin-project/venus-market/v2/config" - - "github.com/filecoin-project/venus/venus-shared/api" - v1 "github.com/filecoin-project/venus/venus-shared/api/chain/v1" - "github.com/filecoin-project/venus/venus-shared/utils" -) - -func FetchAndLoadBundles(ctx context.Context, nodeCfg config.Node) error { - apiInfo := api.NewAPIInfo(nodeCfg.Url, nodeCfg.Token) - addr, err := apiInfo.DialArgs("v1") - if err != nil { - return err - } - fullNodeAPI, closer, err := v1.NewFullNodeRPC(ctx, addr, apiInfo.AuthHeader()) - if err != nil { - return err - } - defer closer() - - return utils.LoadBuiltinActors(ctx, fullNodeAPI) -} diff --git a/cmd/util.go b/cmd/util.go new file mode 100644 index 00000000..00eed1ec --- /dev/null +++ b/cmd/util.go @@ -0,0 +1,71 @@ +package cmd + +import ( + "context" + "fmt" + "os" + + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/mitchellh/go-homedir" + "github.com/urfave/cli/v2" + + "github.com/filecoin-project/venus/venus-shared/api" + v1 "github.com/filecoin-project/venus/venus-shared/api/chain/v1" + "github.com/filecoin-project/venus/venus-shared/utils" +) + +func FetchAndLoadBundles(ctx context.Context, nodeCfg config.Node) error { + apiInfo := api.NewAPIInfo(nodeCfg.Url, nodeCfg.Token) + addr, err := apiInfo.DialArgs("v1") + if err != nil { + return err + } + fullNodeAPI, closer, err := v1.NewFullNodeRPC(ctx, addr, apiInfo.AuthHeader()) + if err != nil { + return err + } + defer closer() + + return utils.LoadBuiltinActors(ctx, fullNodeAPI) +} + +func GetRepoPath(cctx *cli.Context, repoFlagName, oldRepoPath string) (string, error) { + repoPath, err := homedir.Expand(cctx.String(repoFlagName)) + if err != nil { + return "", err + } + has, err := exist(repoPath) + if err != nil { + return "", err + } + if !has { + oldRepoPath, err = homedir.Expand(oldRepoPath) + if err != nil { + return "", err + } + has, err = exist(oldRepoPath) + if err != nil { + return "", err + } + if has { + return oldRepoPath, nil + } + } + + return repoPath, nil +} + +func exist(path string) (bool, error) { + f, err := os.Stat(path) + if err != nil { + if os.IsNotExist(err) { + return false, nil + } + return false, err + } + if !f.IsDir() { + return false, fmt.Errorf("%s not a file directory", path) + } + + return true, nil +} diff --git a/config/def_config.go b/config/def_config.go index 53bc1126..be2fca29 100644 --- a/config/def_config.go +++ b/config/def_config.go @@ -11,7 +11,7 @@ import ( const ( DefaultSimultaneousTransfers = uint64(20) - HomePath = "~/.venusmarket" + HomePath = "~/.droplet" ) var DefaultMarketConfig = &MarketConfig{ @@ -75,7 +75,7 @@ var DefaultMarketConfig = &MarketConfig{ } var DefaultMarketClientConfig = &MarketClientConfig{ - Home: Home{"~/.marketclient"}, + Home: Home{"~/.droplet-client"}, Common: Common{ API: API{ ListenAddress: "/ip4/127.0.0.1/tcp/41231/ws", diff --git a/dagstore/market_api.go b/dagstore/market_api.go index 7b588e33..d0330210 100644 --- a/dagstore/market_api.go +++ b/dagstore/market_api.go @@ -17,10 +17,10 @@ import ( "github.com/filecoin-project/go-padreader" gatewayAPIV2 "github.com/filecoin-project/venus/venus-shared/api/gateway/v2" - marketMetrics "github.com/filecoin-project/venus-market/v2/metrics" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-market/v2/piecestorage" - "github.com/filecoin-project/venus-market/v2/utils" + marketMetrics "github.com/ipfs-force-community/droplet/v2/metrics" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/piecestorage" + "github.com/ipfs-force-community/droplet/v2/utils" ) type MarketAPI interface { diff --git a/dagstore/market_api_test.go b/dagstore/market_api_test.go index a76ba3c3..84650d29 100644 --- a/dagstore/market_api_test.go +++ b/dagstore/market_api_test.go @@ -9,11 +9,11 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" acrypto "github.com/filecoin-project/go-state-types/crypto" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/models" - "github.com/filecoin-project/venus-market/v2/piecestorage" "github.com/filecoin-project/venus/venus-shared/types" markettypes "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/models" + "github.com/ipfs-force-community/droplet/v2/piecestorage" "github.com/ipfs/go-cid" "github.com/stretchr/testify/assert" ) diff --git a/dagstore/modules.go b/dagstore/modules.go index de6c1a80..a2ded69a 100644 --- a/dagstore/modules.go +++ b/dagstore/modules.go @@ -17,9 +17,9 @@ import ( gatewayAPIV2 "github.com/filecoin-project/venus/venus-shared/api/gateway/v2" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-market/v2/piecestorage" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/piecestorage" ) var DAGStoreKey = builder.Special{ID: 1} diff --git a/dagstore/mongo_topindex_test.go b/dagstore/mongo_topindex_test.go index f5e9422f..956cb250 100644 --- a/dagstore/mongo_topindex_test.go +++ b/dagstore/mongo_topindex_test.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/dagstore/index" "github.com/filecoin-project/dagstore/shard" - "github.com/filecoin-project/venus-market/v2/dagstore" + "github.com/ipfs-force-community/droplet/v2/dagstore" carindex "github.com/ipld/go-car/v2/index" "github.com/multiformats/go-multihash" "github.com/stretchr/testify/assert" diff --git a/dagstore/mount_test.go b/dagstore/mount_test.go index 03c81ca4..20879f8c 100644 --- a/dagstore/mount_test.go +++ b/dagstore/mount_test.go @@ -7,8 +7,8 @@ import ( "net/url" "testing" - mock_dagstore2 "github.com/filecoin-project/venus-market/v2/dagstore/mocks" - "github.com/filecoin-project/venus-market/v2/utils" + mock_dagstore2 "github.com/ipfs-force-community/droplet/v2/dagstore/mocks" + "github.com/ipfs-force-community/droplet/v2/utils" "github.com/golang/mock/gomock" blocksutil "github.com/ipfs/go-ipfs-blocksutil" diff --git a/dagstore/wrapper.go b/dagstore/wrapper.go index 0b55bb71..f913df4a 100644 --- a/dagstore/wrapper.go +++ b/dagstore/wrapper.go @@ -18,7 +18,7 @@ import ( ldbopts "github.com/syndtr/goleveldb/leveldb/opt" "github.com/filecoin-project/go-statemachine/fsm" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" carindex "github.com/ipld/go-car/v2/index" "github.com/filecoin-project/dagstore" diff --git a/dagstore/wrapper_test.go b/dagstore/wrapper_test.go index 13f64ecf..33aba565 100644 --- a/dagstore/wrapper_test.go +++ b/dagstore/wrapper_test.go @@ -11,8 +11,8 @@ import ( "github.com/golang/mock/gomock" mh "github.com/multiformats/go-multihash" - "github.com/filecoin-project/venus-market/v2/config" - mock_dagstore "github.com/filecoin-project/venus-market/v2/dagstore/mocks" + "github.com/ipfs-force-community/droplet/v2/config" + mock_dagstore "github.com/ipfs-force-community/droplet/v2/dagstore/mocks" carindex "github.com/ipld/go-car/v2/index" "github.com/filecoin-project/dagstore" diff --git a/dealfilter/cli.go b/dealfilter/cli.go index 43692600..3cceddc9 100644 --- a/dealfilter/cli.go +++ b/dealfilter/cli.go @@ -9,9 +9,9 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-fil-markets/storagemarket" - "github.com/filecoin-project/venus-market/v2/config" vsTypes "github.com/filecoin-project/venus/venus-shared/types" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/config" ) func CliStorageDealFilter(cfg *config.MarketConfig) config.StorageDealFilter { @@ -41,7 +41,7 @@ func CliStorageDealFilter(cfg *config.MarketConfig) config.StorageDealFilter { IsOffline: isOffline, ClientDealProposal: deal.ClientDealProposal, DealType: "storage", - Agent: "venus-market", + Agent: "droplet", FormatVersion: "1.0.0", FastRetrieval: deal.FastRetrieval, TransferType: deal.Ref.TransferType, diff --git a/docs/en/market-client-configurations.md b/docs/en/droplet-client-configurations.md similarity index 87% rename from docs/en/market-client-configurations.md rename to docs/en/droplet-client-configurations.md index f952a23a..ed4b8b61 100644 --- a/docs/en/market-client-configurations.md +++ b/docs/en/droplet-client-configurations.md @@ -1,6 +1,6 @@ -# Market Client Configurations +# Droplet Client Configurations -A typical configuration of `market-client` is as follows... +A typical configuration of `droplet-client` is as follows... ``` @@ -40,17 +40,17 @@ Simultaneous Transfers For Storage = 20 Among them, it can be divided into three parts: 1) client network configuration, 2) configuration of Venus chain service components and 3) other configurations -## Market Client network configuration +## DROPLET Client network configuration -This part of the configuration determines the interface between the `market client` and external actors +This part of the configuration determines the interface between the `droplet client` and external actors ### [API] -This section defines the external interface of `market-client` +This section defines the external interface of `droplet-client` ``` [API] -# market-client provides the address where the service listens +# droplet-client provides the address where the service listens # String type, required, default: "/ip4/127.0.0.1/tcp/41235" ListenAddress = "/ip4/127.0.0.1/tcp/41235" @@ -87,10 +87,9 @@ PrivateKey = "08011240ae580daabbe087007d2b4db4e880af10d582215d2272669a94c49c854f ``` - ## Venus Chain Service Configuration -When the `market-client` is connected to the `venus components`, the API of the related component needs to be configured. +When the `droplet-client` is connected to the `venus components`, the API of the related component needs to be configured. ### [Node] @@ -111,7 +110,7 @@ Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsIn ### [Messager] -`venus-messager` service access configuration +`sophon-messager` service access configuration ``` [Messager] @@ -128,7 +127,7 @@ Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsIn ### [Signer] The Venus component that provide signing services -Only signature services of `wallet` type can be used in `market-client` +Only signature services of `wallet` type can be used in `droplet-client` ``` [Signer] @@ -157,7 +156,7 @@ Simultaneous Transfers For Retrieval = 20 # Integer type Default: 20 Simultaneous Transfers For Storage = 20 -# The default address of the current market-client +# The default address of the current droplet-client # String type, optional, can also be configured directly through the --addr flag of the command line DefaultMarketAddress = "t3qkgm5h7nmusacfggd744w7fdj45rn6iyl7n6s6lr34t4qlfebiphmm3vxtwc4a4acqi4nv3pqk6h7ddqqz5q:username" ``` \ No newline at end of file diff --git a/docs/en/market-configurations.md b/docs/en/droplet-configurations.md similarity index 96% rename from docs/en/market-configurations.md rename to docs/en/droplet-configurations.md index a0fbfc41..4d6312fb 100644 --- a/docs/en/market-configurations.md +++ b/docs/en/droplet-configurations.md @@ -1,6 +1,6 @@ -# Configurations of venus-market +# Configurations of droplet -A typical `venus-market` configuration looks like this: +A typical `droplet` configuration looks like this: ``` # ****** Data transfer parameter configuration *********** @@ -71,7 +71,7 @@ Each miner can have independent basic parameters. If there is no configuration, [CommonProvider. RetrievalPricing. External] Path = "" -# ****** venus-market network configuration *********** +# ****** droplet network configuration *********** [API] ListenAddress = "/ip4/127.0.0.1/tcp/41235" RemoteListenAddress = "" @@ -132,7 +132,7 @@ Path = "journal" # ********** DAG Storage Settings ******** [DAGStore] -RootDir = "/root/.venusmarket/dagstore" +RootDir = "/root/.droplet/dagstore" MaxConcurrentIndex = 5 MaxConcurrentReadyFetches = 0 MaxConcurrencyStorageCalls = 100 @@ -247,7 +247,7 @@ Filter = "" RetrievalFilter = "" # Storage location of transferred deal data -# string type, optional, when it is empty, the path of `MARKET_REPO` is used by default +# string type, optional, when it is empty, the path of `DROPLET_REPO` is used by default TransferPath = "" # Maximum fee for sending deal related messages @@ -297,9 +297,9 @@ Addr = "" Account="" ``` -## venus-market Network Configuration +## droplet Network Configuration -This part of the configuration determines the interface between the venus-market and others +This part of the configuration determines the interface between the droplet and others ### [API] The interface that market provides external services @@ -380,7 +380,7 @@ Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsIn ### [Signer] -Accessing Venus signature service, which can be of two types: signature services directly provided by venus-wallet and indirect signature services provided by venus-gateway +Accessing Venus signature service, which can be of two types: signature services directly provided by venus-wallet and indirect signature services provided by sophon-gateway ``` [Signer] @@ -488,7 +488,7 @@ This is not very flexible, and will be considered for optimization in the future ## Database Configuration -The setting of the storage database for the data generated during the operation of the venus-market. +The setting of the storage database for the data generated during the operation of the droplet. BadgerDB and MySQLDB are currently supported, and BadgerDB is used by default. ### [Mysql] @@ -521,13 +521,13 @@ Debug = false ## Sector Storage Configuration -Configure the storage space of imported data from venus-market. +Configure the storage space of imported data from droplet. Two types of data storage are supported: file system storage or object storage. ### [[PieceStorage. Fs]] Configure the local file system as sector storage -For sectors with a large amount of data, it is recommended to mount the file system shared with venus-cluster +For sectors with a large amount of data, it is recommended to mount the file system shared with sophon-cluster ``` [Piece Storage] @@ -565,7 +565,7 @@ EndPoint = "oss-cn-shanghai.aliyuncs.com" # Bucket name of the object storage service # string type, required -Bucket = "venus-market" +Bucket = "droplet" # Specify the subdirectory in the Bucket # string type, optional @@ -587,7 +587,7 @@ Configure the location where the log is stored during the use of the market. [Journal] # The location of the log storage -# String type, The default is: "journal" (that is, the journal folder under the `MARKET_REPO` folder) +# String type, The default is: "journal" (that is, the journal folder under the `DROPLET_REPO` folder) Path = "journal" ``` @@ -601,8 +601,8 @@ Configuration of the DAG datastore. [DAGStore] # The root directory of the DAG data store -# String type, Default: "/dagstore" -RootDir = "/root/.venusmarket/dagstore" +# String type, Default: "/dagstore" +RootDir = "/root/.droplet/dagstore" # The maximum number of index jobs that can be performed at the same time # Integer type, defaults to 5, 0 means unlimited diff --git a/docs/en/getting-started.md b/docs/en/getting-started.md index e3976f63..58aa8fec 100644 --- a/docs/en/getting-started.md +++ b/docs/en/getting-started.md @@ -2,13 +2,13 @@ ## Overview -`venus-market` is the market service component in the `venus` system, which consists of two parts: `venus-market` and `market-client`, commonly understood as market server and client. +`droplet` is the market service component in the `venus` system, which consists of two parts: `droplet` and `droplet-client`, commonly understood as market server and client. -- `venus-market` serves storage providers; +- `droplet` serves storage providers; -- `market-client` serves users who have retrieval or storage demands. +- `droplet-client` serves users who have retrieval or storage demands. -The market service of `venus-market` is divided into storage market and retrieval market, and its general process is as follows: +The market service of `droplet` is divided into storage market and retrieval market, and its general process is as follows: @@ -16,31 +16,31 @@ Storage process: | Stages | Steps | Instructions | |--------------------------------------|-------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------| -| Start `venus-market` and `market-client` | 1. Configure and start [venus-market](#Configure and Start venus-market)
2. Configure and start [market-client](#Configure and Start market -client) | | -| Proxy `libp2p` listener service for `miners` | via `venus-market` [`libp2p` listener service for `miners`](#venus-market proxy libp2p listener) | | -| Post storage ask for `miners` | via `venus-market` [ask](#ask) | | -| Specify `miner` to propose deal | 1. Through `market-client` [import the data to be stored](#import the data to be stored)
2. According to the demand [select the appropriate storage provider](#select the storage provider) < br> 3. [Initiate storage deal](#Initiate storage deal) | After the deal is issued, it takes a certain amount of time to execute the deal transaction process. After the deal is confirmed, the storage provider seal the data in the deal and submits the certificate. `venus-market ` will be responsible for tracking order status. | +| Start `droplet` and `droplet-client` | 1. Configure and start [droplet](#Configure and Start droplet)
2. Configure and start [droplet-client](#Configure and Start droplet-client) | | +| Proxy `libp2p` listener service for `miners` | via `droplet` [`libp2p` listener service for `miners`](#droplet proxy libp2p listener) | | +| Post storage ask for `miners` | via `droplet` [ask](#ask) | | +| Specify `miner` to propose deal | 1. Through `droplet-client` [import the data to be stored](#import the data to be stored)
2. According to the demand [select the appropriate storage provider](#select the storage provider) < br> 3. [Initiate storage deal](#Initiate storage deal) | After the deal is issued, it takes a certain amount of time to execute the deal transaction process. After the deal is confirmed, the storage provider seal the data in the deal and submits the certificate. `droplet ` will be responsible for tracking order status. | Retrieval process: | Stages | Steps | Instructions | | ---- | ---- | ---- | -| Start `venus-market` and `market-client` | 1. Configure and start [venus-market](#Configure and Start venus-market)
2. Configure and start [market-client](#Configure and Start market -client) | | -| Set retrieval price and payment address | Storage provider through `venus-market` [set search pending order] (#retrieve pending order) | | +| Start `droplet` and `droplet-client` | 1. Configure and start [droplet](#Configure and Start droplet)
2. Configure and start [droplet-client](#Configure and Start droplet-client) | | +| Set retrieval price and payment address | Storage provider through `droplet` [set search pending order] (#retrieve pending order) | | | Submit data retrieval request | [Submit data retrieval request] (#submit data retrieval request) | After submitting the data retrieval request, the search communication process will start, and the data will be returned in batches according to the agreement and fees will be transferred to the receiving address. | :tipping_hand_woman: **Whether it is a storage deal or a retrieval request, the execution process of the protocol is automatic, and messages will be sent to the chain during the period, so it is necessary to ensure that the messages of both parties to the transaction can be signed normally. There is a necessary `fil` transfer in the transaction process, and the relevant address needs to have sufficient balance, otherwise the transaction will not be completed.** -## Configure and Start venus-market +## Configure and Start droplet ### Initialization - On-chain mode -As a component of the chain service, it cooperates with `venus-auth`, `venus`, `venus-messager`, `venus-gateway` and other components to provide market services for the `miner` registered to the chain service. +As a component of the chain service, it cooperates with `sophon-auth`, `venus`, `sophon-messager`, `sophon-gateway` and other components to provide market services for the `miner` registered to the chain service. ``` -./venus-market run \ +./droplet run \ --node-url=/ip4//tcp/ \ --auth-url=http://:\ --gateway-url=/ip4//tcp/ \ @@ -49,7 +49,7 @@ As a component of the chain service, it cooperates with `venus-auth`, `venus`, ` --signer-type="gateway" ``` -Generated market service component configuration reference: +Generated droplet service component configuration reference: ```toml [Node] Url = "/ip4/192.168.200.151/tcp/3455" @@ -69,20 +69,20 @@ Generated market service component configuration reference: Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoic2hhcmVkLXRva2VuIiwicGVybSI6ImFkbWluIiwiZXh0IjoiIn0.aARqJ_7FSe1KakkBhWlFvsYm-xBLAXBnl9SvTfqsVe8" ``` -:tipping_hand_woman: **`shared-token` is used to authentication when accessing `API` of other chain service components. `token` is managed by `venus-auth` and requires `admin` permission. For details, please refer to [venus-auth token](https://sophon.venus-fil.io/intro/join-a-cs.html#for-admins-of-shared-modules)* * +:tipping_hand_woman: **`shared-token` is used to authentication when accessing `API` of other chain service components. `token` is managed by `sophon-auth` and requires `admin` permission. For details, please refer to [sophon-auth token](https://sophon.venus-fil.io/intro/join-a-cs.html#for-admins-of-shared-modules)* * - Off-chain mode To start with `lotus fullnode`: ``` -./venus-market run \ +./droplet run \ --node-url=/ip4//tcp/ \ --cs-token= \ --signer-type="lotusnode" ``` -Generated market service component configuration reference: +Generated droplet service component configuration reference: ```toml [Node] Url = "/ip4/127.0.0.1/tcp/1234" @@ -105,7 +105,7 @@ Generated market service component configuration reference: When using chain service **and** `venus-wallet`: ``` -./venus-market run \ +./droplet run \ --auth-url=http://:\ --node-url=/ip4//tcp/ \ --messager-url=/ip4//tcp/ \ @@ -115,7 +115,7 @@ When using chain service **and** `venus-wallet`: --signer-type="wallet" ``` -Generated market service component configuration reference: +Generated droplet service component configuration reference: ```toml [Node] Url = "/ip4/192.168.200.151/tcp/3455" @@ -145,18 +145,18 @@ $ ./venus-wallet auth api-info --perm=sign > eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIl19.Vr-OP7RNOozf6XXZuahpk-ZGA7IDa5NJjmU9L_znJ-0:/ip4/127.0/567/tcp ``` -:tipping_hand_woman: **After the initialization command is successfully executed, `venus-market repo` will be generated, and it needs to be configured according to the actual environment when using it. ** +:tipping_hand_woman: **After the initialization command is successfully executed, `droplet repo` will be generated, and it needs to be configured according to the actual environment when using it. ** -Configuration options will be generated when `venus-market` starts for the first time. The default directory is: `~/.venusmarket/config.toml`. Next, we will introduce common configuration options. +Configuration options will be generated when `droplet` starts for the first time. The default directory is: `~/.droplet/config.toml`. Next, we will introduce common configuration options. ### General Configuration -For the description of configuration items of `venus-wallet`, please refer to [venus-market configuration](https://github.com/filecoin-project/venus-market/blob/master/docs/zh/venus-market%E9%85%8D%E7%BD%AE%E8%A7%A3%E9%87%8A.md), here we explain the more commonly used configuration items. +For the description of configuration items of `venus-wallet`, please refer to [droplet configuration](https://github.com/ipfs-force-community/droplet/blob/master/docs/zh/droplet%E9%85%8D%E7%BD%AE%E8%A7%A3%E9%87%8A.md), here we explain the more commonly used configuration items. -*tips:* After modifying the configuration file, you need to restart the `venus-market` service: +*tips:* After modifying the configuration file, you need to restart the `droplet` service: ```bash -$ nohup ./venus-market run > market.log 2>&1 & +$ nohup ./droplet run > droplet.log 2>&1 & ``` > After the `repo` has been generated, the parameters required for initialization are written into the configuration file, so there is no need to add them for subsequent startups. @@ -182,7 +182,7 @@ $ nohup ./venus-market run > market.log 2>&1 & #### `API` listener configuration -The default listening port of `venus-market` is `127.0.0.1:41235`, in order to support access requests from different networks, the listening address of `API` needs to be modified: +The default listening port of `droplet` is `127.0.0.1:41235`, in order to support access requests from different networks, the listening address of `API` needs to be modified: ```yuml [API] @@ -191,7 +191,7 @@ ListenAddress = "/ip4/0.0.0.0/tcp/41235" #### `PublishMsgPeriod` configuration -When `venus-market` receives a deal from `market-client`, it will not publish the `ClientDealProposal` message immediately, but will wait for a certain period of time, which is controlled by the `PublishMsgPeriod` option in the configuration file, which can be used during testing Setting this to a small value reduces waiting time. The following settings, set the wait time to 10 seconds. +When `droplet` receives a deal from `droplet-client`, it will not publish the `ClientDealProposal` message immediately, but will wait for a certain period of time, which is controlled by the `PublishMsgPeriod` option in the configuration file, which can be used during testing Setting this to a small value reduces waiting time. The following settings, set the wait time to 10 seconds. ```yuml PublishMsgPeriod = "10s" @@ -199,7 +199,7 @@ PublishMsgPeriod = "10s" #### `PieceStorage` Configuration -Currently `venus-market` supports two storage modes for `Piece` data: +Currently `droplet` supports two storage modes for `Piece` data: - File system - Object storage @@ -222,15 +222,15 @@ It can also be configured by command: ```bash # Local file system storage -./venus-market piece-storage add-fs --path="/piece/storage/path" --name="local" +./droplet piece-storage add-fs --path="/piece/storage/path" --name="local" # object storage -./venus-market piece-storage add-s3 --endpoint= --name="oss" +./droplet piece-storage add-s3 --endpoint= --name="oss" ``` #### `Miners` Configuration -The miners of the `venus-market` service and the parameters of each miner are configured as follows: +The miners of the `droplet` service and the parameters of each miner are configured as follows: ``` [[Miners]] @@ -270,34 +270,34 @@ If there are multiple miners, just copy the above configuration. *** If there ar ::: -## venus-market proxy libp2p listener +## droplet proxy libp2p listener -Setting `venus-market` as `miner`'s `libp2p` listener proxy is to set the entrance of a specific `miner` market service to the current running `venus-market` instance. +Setting `droplet` as `miner`'s `libp2p` listener proxy is to set the entrance of a specific `miner` market service to the current running `droplet` instance. -- Query `venus-market` peer node listening address +- Query `droplet` peer node listening address ```bash -./venus-market net listen +./droplet net listen /ip4/127.0.0.1/tcp/58418/p2p/12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK /ip4/192.168.19.67/tcp/58418/p2p/12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK /ip6/::1/tcp/49770/p2p/12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK ``` -- set `Mutiadrs` and `peerid` of `miners` to `Mutiadrs` and `peerid` of `venus-market` +- set `Mutiadrs` and `peerid` of `miners` to `Mutiadrs` and `peerid` of `droplet` ```bash -./venus-market actor set-addrs --miner=t01041 /ip4/192.168.19.67/tcp/58418 +./droplet actor set-addrs --miner=t01041 /ip4/192.168.19.67/tcp/58418 Requested multiaddrs change in message bafy2bzaceceqgxmiledunzjwbajpghzzn4iibvxhoifsrz4q2grzsirgznzdg -./venus-market actor set-peer-id --miner=f01041 12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK +./droplet actor set-peer-id --miner=f01041 12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK Requested peerid change in message bafy2bzacea4ruzf4hvyezzhjkt6hnzz5tpk7ttuw6jmyoadqasqtujypqitp2 ``` - After waiting for the message to be on-chained, check the agent information of `miner` ```bash -./venus-market actor info --miner t01041 +./droplet actor info --miner t01041 peers: 12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK addr: /ip4/192.168.19.67/tcp/58418 ``` @@ -307,12 +307,12 @@ addr: /ip4/192.168.19.67/tcp/58418 ### Storage Deal Ask ```bash -./venus-market storage ask set --price=0.01fil --verified-price=0.02fil --min-piece-size=512b --max-piece-size=512M t01041 +./droplet storage ask set --price=0.01fil --verified-price=0.02fil --min-piece-size=512b --max-piece-size=512M t01041 ``` Pricing information can be checked via the command line tool: ```shell -./venus-market storage ask get t01041 +./droplet storage ask get t01041 Price per GiB/Epoch Verified Min. Piece Size (padded) Max. Piece Size (padded) Expiry (Epoch) Expiry (Appx. Rem. Time) Seq. No. 0.01 FIL 0.02 FIL 512 B 521 MiB 161256 719h59m0s 0 ``` @@ -322,12 +322,12 @@ Price per GiB/Epoch Verified Min. Piece Size (padded) Max. Piece Size (padded) E The storage provider should at least set the payment address ```bash -./venus-market retrieve ask set t3ueb62v5kbyuvwo5tuyzpvds2bfakdjeg2s33p47buvbfiyd7w5fwmeilobt5cqzi673s5z6i267igkgxum6a +./droplet retrieve ask set t3ueb62v5kbyuvwo5tuyzpvds2bfakdjeg2s33p47buvbfiyd7w5fwmeilobt5cqzi673s5z6i267igkgxum6a ``` At the same time, you can also set the price of the data retrieval request, if not set, the default is 0. ```bash -./venus-market retrieve ask set \ +./droplet retrieve ask set \ --price 0.02fil \ --unseal-price 0.01fil \ --payment-interval 1MB \ @@ -335,22 +335,22 @@ t3ueb62v5kbyuvwo5tuyzpvds2bfakdjeg2s33p47buvbfiyd7w5fwmeilobt5cqzi673s5z6i267igk ``` -## Configure and Start market-client +## Configure and Start droplet-client -The normal operation of `market-client` requires synchronization node, signature node (`venus fullnode` and `lotus fullnode` can be used as signature nodes), message nodes (`venus fullnode` and `lotus fullnode` can be used as message nodes) and `venus- market`, which means it can be configured flexibly, as long as the message can be signed properly and snet to the chain. +The normal operation of `droplet-client` requires synchronization node, signature node (`venus fullnode` and `lotus fullnode` can be used as signature nodes), message nodes (`venus fullnode` and `lotus fullnode` can be used as message nodes) and `droplet`, which means it can be configured flexibly, as long as the message can be signed properly and snet to the chain. -`market-client` needs to be configured with `--addr` to bind the client’s wallet address, which is used to pay client collateral and retrieval fees. +`droplet-client` needs to be configured with `--addr` to bind the client’s wallet address, which is used to pay client collateral and retrieval fees. Here are three commonly used startup methods: - Access to the `Venus` chain service -The signature `API` of `venus-gateway` can only be accessed with `admin` permission (for security considerations). It is not recommended to use `venus-gateway` for `market-client`. We use the local `venus-wallet` for sign in this case. +The signature `API` of `sophon-gateway` can only be accessed with `admin` permission (for security considerations). It is not recommended to use `sophon-gateway` for `droplet-client`. We use the local `venus-wallet` for sign in this case. ```shell -./market-client run \ +./droplet-client run \ --node-url=/ip4//tcp/ \ ---messager-url=/ip4//tcp/ \ +--messager-url=/ip4//tcp/ \ --auth-token= \ --signer-type=wallet \ --signer-url=/ip4//tcp/ \ @@ -363,7 +363,7 @@ The signature `API` of `venus-gateway` can only be accessed with `admin` permiss - Connect to `lotus fullnode` and start ```shell -./market-client run \ +./droplet-client run \ --node-url=/ip4//tcp/ \ --node-token= \ --signer-type=lotusnode\ @@ -372,14 +372,14 @@ The signature `API` of `venus-gateway` can only be accessed with `admin` permiss - Connect to `venus fullnode` and start ```shell -./market-client run \ +./droplet-client run \ --node-url=/ip4//tcp/ \ --node-token= \ --signer-type=wallet \ --addr= \ ``` -These configuration items can also be set in configuration files, see [market-client configuration](https://github.com/filecoin-project/venus-market/blob/master/docs/zh/market-client%E9%85%8D%E7%BD%AE%E8%A7%A3%E9%87%8A.md) +These configuration items can also be set in configuration files, see [droplet-client configuration](https://github.com/ipfs-force-community/droplet/blob/master/docs/zh/droplet-client%E9%85%8D%E7%BD%AE%E8%A7%A3%E9%87%8A.md) ## Storage Deal @@ -387,16 +387,16 @@ These configuration items can also be set in configuration files, see [market-cl ### Import the data to be stored ```shell -./market-client data import +./droplet-client data import Import 1642491708527303001, Root bafk2bzacedgv2xqys5ja4gycqipmg543ekxz3tjj6wwfexda352n55ahjldja ``` ### Choose Storage Provider -Use `market-client` to query `miner` storage ask information: +Use `droplet-client` to query `miner` storage ask information: ```bash -./market-client storage asks query f01041 +./droplet-client storage asks query f01041 Ask: t01041 Price per GiB: 0.02 FIL Verified Price per GiB: 0.01 FIL @@ -407,8 +407,8 @@ Min Piece size: 512 B ### Initiate Storage Deal ```shell -/market-client storage deals init -# Enter the cid of the data to be stored, `./market-client data local`command to view +/droplet-client storage deals init +# Enter the cid of the data to be stored, `./droplet-client data local`command to view Data CID (from lotus client import): bafk2bzacedgv2xqys5ja4gycqipmg543ekxz3tjj6wwfexda352n55ahjldja .. calculating data size PieceCid: baga6ea4seaqpz47j4kqdiixpehmzk3uw5c4cmqvs5iyi7xf7rwkepfhdvowdiai PayLoadSize: 809 PieceSize: 1024 @@ -431,9 +431,9 @@ Deal (t01051) CID: bafyreihiln2ha6eaaos7kuhwpnvjvjlxmjnpsklym6hhucu2z776bf2or4 Then wait for the dael message to be sent to the chain and the storage provider to complete the data sealing. -`market-client` view daels: +`droplet-client` view daels: ```shell -./market-client storage deals list +./droplet-client storage deals list DealCid DealId Provider State On Chain? Slashed? PieceCID Size Price Duration Verified ...76bf2or4 0 t01051 StorageDealCheckForAcceptance N N ...dvowdiai 1016 B 0.00992212295525724 FIL 520205 false Message: Provider state: StorageDealPublish @@ -444,20 +444,20 @@ DealCid DealId Provider State On Chain? Slashed? PieceCID Size Price Duration Ve 1. Import storage deal file ```bash -./market-client data import ./README.md +./droplet-client data import ./README.md Import 1642643014364955003, Root bafk2bzaceaf4sallirkt63fqrojz5gaut7akiwxrclcsymqelqad7man3hc2c ``` 2. Convert to CAR file ```bash -./market-client data generate-car ./README.md ./readme.md.car +./droplet-client data generate-car ./README.md ./readme.md.car ``` 3. Calculate the `CID` and `Piece size` of the CAR file ```shell -./market-client data commP ./readme.md.car +./droplet-client data commP ./readme.md.car CID: baga6ea4seaqfewgysi3n3cjylkbfknr56vbemb2gwjfvpctqtjgpdweu7o3d6mq Piece size: 3.969 KiB ``` @@ -465,7 +465,7 @@ Piece size: 3.969 KiB 4. Initiate a deal ```bash -./market-client storage deals init \ +./droplet-client storage deals init \ --manual-piece-cid=baga6ea4seaqfewgysi3n3cjylkbfknr56vbemb2gwjfvpctqtjgpdweu7o3d6mq \ --manual-piece-size=4064 \ bafk2bzaceaf4sallirkt63fqrojz5gaut7akiwxrclcsymqelqad7man3hc2c \ @@ -484,30 +484,30 @@ The next four parameters are: - Contract period, must be greater than or equal to 180 days, this value also needs to be replaced by epoch, each epoch=30 seconds, in the example: 518400 = 180 days. The final output `bafyreidfs2w7lxacq6zpqck7q4zimyitidxyahojf7dbbuz5zr7irdlmqa` is the proposed CID. -Like online deals, you can check the deal information through the market-client at this time, and the final status of the order will stop at `StorageDealWaitingForData` +Like online deals, you can check the deal information through the droplet-client at this time, and the final status of the order will stop at `StorageDealWaitingForData` ```shell -./market-client storage deals list +./droplet-client storage deals list DealCid DealId Provider State On Chain? Slashed? PieceCID Size Price Duration Verified ...s7r6hftm0 t01051 StorageDealCheckForAcceptance N N ... u7o3d6mq 3.969 KiB 5196.63 FIL 519663 false Message: Provider state: StorageDealWaitingForData ``` -:tipping_hand_woman: **If `market-client` shows the following content:** +:tipping_hand_woman: **If `droplet-client` shows the following content:** ```shell 2022-01-20T12:47:27.966+0800 ERROR storagemarket_impl clientstates/client_states.go:324 deal bafyreif2k2e4acraxk33z3llwo5gqmk32tfrdj2kocjanojbfbf6vj72vm failed: adding market funds failed: estimating gas used: message execution failed: exit SysErrInsufficientFunds(6) ``` -It means that the balance in the wallet is insufficient, call the command `./market-client actor-funds add 100fil` and re-execute the command. +It means that the balance in the wallet is insufficient, call the command `./droplet-client actor-funds add 100fil` and re-execute the command. 5. Import data files of offline deal -It is necessary to transfer the `.car` file generated in the previous step 2 to venus-market offline, and import the data through the venus-market command: +It is necessary to transfer the `.car` file generated in the previous step 2 to droplet offline, and import the data through the droplet command: ```shell -./venus-market storage-deals import-data bafyreiecguaxgtmgcanfco6huni4d6h6zs3w3bznermmiurtdos7r6hftm ./readme.md.car +./droplet storage-deals import-data bafyreiecguaxgtmgcanfco6huni4d6h6zs3w3bznermmiurtdos7r6hftm ./readme.md.car ``` Check the status again, the order status is updated to `StorageDealPublishing`: ```shell -./market-client storage deals list +./droplet-client storage deals list DealCid DealId Provider State On Chain? Slashed? PieceCID Size Price Duration Verified ...s7r6hftm 0 t01051 StorageDealCheckForAcceptance N N ...u7o3d6mq 3.969 KiB 5196.63 FIL 519663 false Message: Provider state: StorageDealPublishing @@ -521,7 +521,7 @@ Finally, wait for the deal status to change to `StorageDealAwaitingPreCommit`, t Users can initiate data retrieval request by `minerID` and `Data CID` ```shell -./market-client retrieval retrieve --provider t01020 bafk2bzacearla6en6crpouxo72d5lhr3buajbzjippl63bfsd2m7rsyughu42 test.txt +./droplet-client retrieval retrieve --provider t01020 bafk2bzacearla6en6crpouxo72d5lhr3buajbzjippl63bfsd2m7rsyughu42 test.txt Recv 0 B, Paid 0 FIL, Open (New), 0s Recv 0 B, Paid 0 FIL, DealProposed (WaitForAcceptance), 16ms Recv 0 B, Paid 0 FIL, DealAccepted (Accepted), 26ms diff --git "a/docs/zh/datacap\347\273\255\346\234\237.md" "b/docs/zh/datacap\347\273\255\346\234\237.md" index 60487bb6..e0ad8cf3 100644 --- "a/docs/zh/datacap\347\273\255\346\234\237.md" +++ "b/docs/zh/datacap\347\273\255\346\234\237.md" @@ -7,30 +7,30 @@ datacap 续期目的是调整 datacap 的最大期限时间,但最大期限时 1. 手动指定 claim id,并设置新的最大期限时间和存储提供者(provider) ``` -# --from 需使用 datacap 地址,为空则使用 market client 默认地址 +# --from 需使用 datacap 地址,为空则使用 droplet client 默认地址 # --max-term 新的最大期限时间 -./market-client datacap extend --max-term 1909497 --from
--claimId 1
+./droplet-client datacap extend --max-term 1909497 --from
--claimId 1
eg. -./market-client datacap extend --max-term 1909497 --from t3wp7bkktkeybm42kvxtyuqsmod262fmwn7zuo3nf3xll34xaokhm4n4x5rgivwg6fcu2mnjecourodjmil3fq --claimId 1 --claimId 2 t01000 +./droplet-client datacap extend --max-term 1909497 --from t3wp7bkktkeybm42kvxtyuqsmod262fmwn7zuo3nf3xll34xaokhm4n4x5rgivwg6fcu2mnjecourodjmil3fq --claimId 1 --claimId 2 t01000 ``` 可以通过命令来查看存储提供者的 claim: ``` -./market-client datacap list-claim
+./droplet-client datacap list-claim
eg. -./market-client datacap list-claim t01000 +./droplet-client datacap list-claim t01000 ``` 2. 自动选择符合要求的 datacap ``` -# --from 需使用 datacap 地址,为空则使用 market client 默认地址 +# --from 需使用 datacap 地址,为空则使用 droplet client 默认地址 # --max-term 新的最大期限时间 # --expiration-cutoff 忽略过期时间大于 cutoff 的 datacap,例:如果 cutoff 的值为 2880(一天),则会对过期时间小于一天的 datacap 进行续期 -./market-client datacap extend --max-term 1909697 --from
--auto --expiration-cutoff 2880
+./droplet-client datacap extend --max-term 1909697 --from
--auto --expiration-cutoff 2880
eg. -./market-client datacap extend --max-term 1909597 --from t3wp7bkktkeybm42kvxtyuqsmod262fmwn7zuo3nf3xll34xaokhm4n4x5rgivwg6fcu2mnjecourodjmil3fq --auto --expiration-cutoff 2880 t01000 +./droplet-client datacap extend --max-term 1909597 --from t3wp7bkktkeybm42kvxtyuqsmod262fmwn7zuo3nf3xll34xaokhm4n4x5rgivwg6fcu2mnjecourodjmil3fq --auto --expiration-cutoff 2880 t01000 ``` diff --git "a/docs/zh/market-client\351\205\215\347\275\256\350\247\243\351\207\212.md" "b/docs/zh/droplet-client\351\205\215\347\275\256\350\247\243\351\207\212.md" similarity index 91% rename from "docs/zh/market-client\351\205\215\347\275\256\350\247\243\351\207\212.md" rename to "docs/zh/droplet-client\351\205\215\347\275\256\350\247\243\351\207\212.md" index c29dbc18..58e4b990 100644 --- "a/docs/zh/market-client\351\205\215\347\275\256\350\247\243\351\207\212.md" +++ "b/docs/zh/droplet-client\351\205\215\347\275\256\350\247\243\351\207\212.md" @@ -1,6 +1,6 @@ -# Market Client 配置解释 +# Droplet Client 配置解释 -`market-client` 的一份典型的配置如下 +`droplet-client` 的一份典型的配置如下 ``` @@ -40,16 +40,16 @@ SimultaneousTransfersForStorage = 20 其中,可以分成三个部分: `client` 网络配置,`venus` 服务组件的配置和 其他配置 -## Market Client 网络配置 +## Droplet Client 网络配置 这部分的配置决定了 `venus client` 和外界交互的接口 ### [API] -`market-client` 对外提供服务的接口 +`droplet-client` 对外提供服务的接口 ``` [API] -# market-client 提供服务监听的地址 +# droplet-client 提供服务监听的地址 # 字符串类型,必选项,默认为:"/ip4/127.0.0.1/tcp/41235" ListenAddress = "/ip4/127.0.0.1/tcp/41235" @@ -88,7 +88,7 @@ PrivateKey = "08011240ae580daabbe087007d2b4db4e880af10d582215d2272669a94c49c854f ## venus 组件服务配置 -当 `market-client` 接入 `venus` 组件使用时,需要配置相关组件的 `API`。 +当 `droplet-client` 接入 `venus` 组件使用时,需要配置相关组件的 `API`。 ### [Node] venus链服务接入配置 @@ -124,7 +124,7 @@ Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsIn ### [Signer] `venus` 提供签名服务的组件 -在 `market-client` 只能使用 `wallet` 类型的签名服务 +在 `droplet-client` 只能使用 `wallet` 类型的签名服务 ``` [Signer] @@ -153,7 +153,7 @@ SimultaneousTransfersForRetrieval = 20 # 整数类型,默认:20 SimultaneousTransfersForStorage = 20 -# 当前market-client的默认地址 +# 当前droplet-client的默认地址 # 字符串类型,可选,也可以直接通过命令行的 --addr flag 进行配置 DefaultMarketAddress = "t3qkgm5h7nmusacfggd744w7fdj45rn6iyl7n6s6lr34t4qlfebiphmm3vxtwc4a4acqi4nv3pqk6h7ddqqz5q:username" ``` diff --git "a/docs/zh/venus-market\351\205\215\347\275\256\350\247\243\351\207\212.md" "b/docs/zh/droplet\351\205\215\347\275\256\350\247\243\351\207\212.md" similarity index 92% rename from "docs/zh/venus-market\351\205\215\347\275\256\350\247\243\351\207\212.md" rename to "docs/zh/droplet\351\205\215\347\275\256\350\247\243\351\207\212.md" index 84f24c2b..9418b3a9 100644 --- "a/docs/zh/venus-market\351\205\215\347\275\256\350\247\243\351\207\212.md" +++ "b/docs/zh/droplet\351\205\215\347\275\256\350\247\243\351\207\212.md" @@ -1,6 +1,6 @@ -# venus market 的配置解释 +# droplet 的配置解释 -一份典型的 `venus-market` 的配置是这样的: +一份典型的 `droplet` 的配置是这样的: ``` # ****** 数据传输参数配置 ******** @@ -71,7 +71,7 @@ SimultaneousTransfersForRetrieval = 20 [CommonProvider.RetrievalPricing.External] Path = "" -# ****** venus market 网络配置 ******** +# ****** droplet 网络配置 ******** [API] ListenAddress = "/ip4/127.0.0.1/tcp/41235" RemoteListenAddress = "" @@ -132,7 +132,7 @@ Path = "journal" # ******** DAG存储设置 ******** [DAGStore] -RootDir = "/root/.venusmarket/dagstore" +RootDir = "/root/.droplet/dagstore" MaxConcurrentIndex = 5 MaxConcurrentReadyFetches = 0 MaxConcurrencyStorageCalls = 100 @@ -186,7 +186,7 @@ SimultaneousTransfersForRetrieval = 20 ## 基础参数配置 -这部分的配置主要是决定了了market在进行工作时的偏好,满足定制化的需求,其中各项配置的作用如下: +这部分的配置主要是决定了了 `droplet` 在进行工作时的偏好,满足定制化的需求,其中各项配置的作用如下: ``` # 决定是否接受线上存储订单 @@ -246,7 +246,7 @@ Filter = "" RetrievalFilter = "" # 订单传输数据的存储位置 -# 字符串类型 可选 为空值时默认使用`MARKET_REPO`的路径 +# 字符串类型 可选 为空值时默认使用`DROPLET_REPO`的路径 TransferPath = "" # 发送订单消息的最大费用 @@ -296,16 +296,16 @@ Addr = "" Account ="" ``` -## venus market 网络配置 +## droplet 网络配置 -这部分的配置决定了 venus-market 和外界交互的接口 +这部分的配置决定了 droplet 和外界交互的接口 ### [API] -market 对外提供服务的接口 +droplet 对外提供服务的接口 ``` [API] -# Market 提供服务监听的地址 +# droplet 提供服务监听的地址 # 字符串类型,必选项,默认为:"/ip4/127.0.0.1/tcp/41235" ListenAddress = "/ip4/127.0.0.1/tcp/41235" @@ -322,7 +322,7 @@ Timeout = "30s" ### [Libp2p] -Market 在P2P网络中通信时使用的 通信地址 +Droplet 在P2P网络中通信时使用的 通信地址 ``` [Libp2p] # 监听的网络地址 @@ -342,7 +342,7 @@ PrivateKey = "08011240ae580daabbe087007d2b4db4e880af10d582215d2272669a94c49c854f ## venus 组件服务配置 -当market接入venus组件使用时,需要配置相关组件的API。 +当 `droplet` 接入venus组件使用时,需要配置相关组件的API。 ### [Node] venus链服务接入配置 @@ -377,7 +377,7 @@ Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiZm9yY2VuZXQtbnYxNiIsIn ### [Signer] -venus 提供签名服务的组件,它可以由两种类型:由venus-wallet直接提供的签名服务和由venus-gateway提供的间接签名服务 +venus 提供签名服务的组件,它可以由两种类型:由venus-wallet直接提供的签名服务和由sophon-gateway提供的间接签名服务 ``` [Signer] @@ -484,7 +484,7 @@ Account = "" ## 数据库配置 -Market 运行过程中产生的数据的存储数据库的设置 +Droplet 运行过程中产生的数据的存储数据库的设置 目前支持BadgerDB和MySQLDB,默认使用BadgerDB ### [Mysql] @@ -517,19 +517,19 @@ Debug = false ## 扇区存储配置 -配置 market导入数据后生成的扇区的存储空间 +配置 `droplet` 导入数据后生成的扇区的存储空间 支持使用两种类型的数据存储方式: 文件系统存储和对象存储 ### [[PieceStorage.Fs]] 配置本地文件系统作为扇区存储 -对于大量数据的扇区,建议挂载和`venus-cluster`共用的文件系统进行配置 +对于大量数据的扇区,建议挂载和`sophon-cluster`共用的文件系统进行配置 ``` [PieceStorage] [[PieceStorage.Fs]] -# 存储空间的名称,它在market的所有的存储空间中,必须是唯一的 +# 存储空间的名称,它在 `droplet` 的所有的存储空间中,必须是唯一的 # 字符串类型 必选 Name = "local" @@ -546,7 +546,7 @@ Path = "/piecestorage/" ``` [PieceStorage] [[PieceStorage.S3]] -# 存储空间的名称,它在market的所有的存储空间中,必须是唯一的 +# 存储空间的名称,它在 `droplet` 的所有的存储空间中,必须是唯一的 # 字符串类型 必选 Name = "s3" @@ -561,7 +561,7 @@ EndPoint = "oss-cn-shanghai.aliyuncs.com" # 对象存储服务的Bucket名称 # 字符串类型 必选 -Bucket = "venus-market" +Bucket = "droplet" # 指定在Bucket 中的子目录 # 字符串类型 可选 @@ -577,13 +577,13 @@ Token = "" ## 日志设置 -配置market 使用过程中,产生日志存储的位置 +配置 `droplet` 使用过程中,产生日志存储的位置 ``` [Journal] # 日志存储的位置 -# 字符串类型 默认为:"journal" (即`MARKET_REPO`文件夹下面的journal文件夹) +# 字符串类型 默认为:"journal" (即`DROPLET_REPO`文件夹下面的journal文件夹) Path = "journal" ``` @@ -597,8 +597,8 @@ DAG 数据存储的配置 [DAGStore] # DAG数据存储的根目录 -# 字符串类型 默认为: "/dagstore" -RootDir = "/root/.venusmarket/dagstore" +# 字符串类型 默认为: "/dagstore" +RootDir = "/root/.droplet/dagstore" # 可以同时进行索引作业的最大数量 # 整数类型 默认为5 0表示不限制 diff --git "a/docs/zh/\345\246\202\344\275\225\350\277\201\347\247\273\347\246\273\347\272\277\350\256\242\345\215\225.md" "b/docs/zh/\345\246\202\344\275\225\350\277\201\347\247\273\347\246\273\347\272\277\350\256\242\345\215\225.md" index 397c7d91..242d36aa 100644 --- "a/docs/zh/\345\246\202\344\275\225\350\277\201\347\247\273\347\246\273\347\272\277\350\256\242\345\215\225.md" +++ "b/docs/zh/\345\246\202\344\275\225\350\277\201\347\247\273\347\246\273\347\272\277\350\256\242\345\215\225.md" @@ -29,33 +29,33 @@ curl http://127.0.0.1:2345/rpc/v0 -X POST \ ":"bafkqahhix6m6ngfp46kkrzu5uxtllc7iv6k6pgue42k3bzunvyfa"},"PieceCid":{"/":"baga6ea4seaqcrddjqzqavqipgljq6jn3bmbnhzw5yucdmoqoji3tni6kisjqini"},"PieceSize":127,"RawBlockSize":0},"AvailableForRetrieval":false,"DealID":0,"CreationTime":"2022-08-03T10:35:09.774748628+08:00","TransferChannelId":null,"SectorNumber":0,"InboundCAR":""}],"id":0} ``` -其中,`result`中的每一项都是一个订单的详细信息。每个订单中的`State`字段表征了当前订单的状态,如果`State`=18,表示当前订单处于`StorageDealWaitingForData`的状态,也就是离线订单暂时停留的一个状态,可以手动地将离线订单抽离出来,也可以将所有的订单都保留直接通过`venus-market`导入,它会排除掉非离线订单。
+其中,`result`中的每一项都是一个订单的详细信息。每个订单中的`State`字段表征了当前订单的状态,如果`State`=18,表示当前订单处于`StorageDealWaitingForData`的状态,也就是离线订单暂时停留的一个状态,可以手动地将离线订单抽离出来,也可以将所有的订单都保留直接通过`droplet`导入,它会排除掉非离线订单。
将要导入的订单信息保存到一个json文件中,就算是完成了离线订单导出。 -## 将离线订单导入到`venus-market` +## 将离线订单导入到`droplet` 开始导入离线订单之前,先确认矿工账号是否在`venus`链服务中,如果不在,需要将矿工账号迁入`venus`链服务。 ```bash -./venus-market actor list +./droplet actor list ``` -确定完矿工之后,在`venus-market`中可以直接通过命令导入离线订单: +确定完矿工之后,在`droplet`中可以直接通过命令导入离线订单: ```bash -./venus-market storage-deals import-offlinedeal +./droplet storage-deals import-offlinedeal ``` 可以得到类似以下的结果: - $ ./venus-market storage-deals import-offlinedeal offline-deals.json + $ ./droplet storage-deals import-offlinedeal offline-deals.json import 4 deals, 1 deal success , 3 deal fail . 加上`--verbose`(`-v`)标志,可以获取更加详细的执行信息: - $./venus-market storage-deals import-offlinedeal --verbose + $./droplet storage-deals import-offlinedeal --verbose ( 1 / 4 ) bafyreieb5uzq26rrvpp6cue34tuyz6xfrdgydxsul3u2fyez7wrnohoaye : fail : deal state StorageDealError not match StorageDealWaitingForData ( 2 / 4 ) bafyreiergjl22fk5kfvxd3yopby62veeejhesuxzbmhsnoo7tp3mam6zzu : success ( 3 / 4 ) bafyreig75z2tw2wz5qpign2r4773wugl6gf5fezo32dvucqnz3ftfajilu : fail : deal state StorageDealError not match StorageDealWaitingForData diff --git "a/docs/zh/\345\277\253\351\200\237\345\220\257\347\224\250.md" "b/docs/zh/\345\277\253\351\200\237\345\220\257\347\224\250.md" index 3811aa28..aedf3136 100644 --- "a/docs/zh/\345\277\253\351\200\237\345\220\257\347\224\250.md" +++ "b/docs/zh/\345\277\253\351\200\237\345\220\257\347\224\250.md" @@ -3,13 +3,13 @@ ## 概述 -`venus-market` 是 `venus` 系统中的市场服务组件,由两部分组成:`venus-market` 和 `market-client`,通俗理解为市场服务端和客户端。 +`droplet` 是 `venus` 系统中的市场服务组件,由两部分组成:`droplet` 和 `droplet-client`,通俗理解为市场服务端和客户端。 -- `venus-market` 的服务对象是存储提供商; +- `droplet` 的服务对象是存储提供商; -- `market-client` 的服务对象是有检索需求或存储需求的用户。 +- `droplet-client` 的服务对象是有检索需求或存储需求的用户。 -`venus-market` 的市场服务分为存储市场和检索市场,其一般流程如下: +`droplet` 的市场服务分为存储市场和检索市场,其一般流程如下: @@ -17,31 +17,31 @@ | 阶段 | 步骤 | 说明 | |-------------------------------------|----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------| -| 启动 `venus-market` 和 `market-client` | 1. 配置和启动[venus-market](#配置启动venus-market)
2. 配置和启动[market-client](#配置启动market-client) | | -| 代理 `miners` 的 `libp2p` 监听服务 | 通过 `venus-market` [代理 `miners` 的 `libp2p` 监听服务](#venus-market代理libp2p监听) | | -| 为 `miners` 挂单 | 通过 `venus-market` [挂单](#挂单) | | -| 指定 `miner` 发单 | 1. 通过 `market-client` [导入待存储的数据](#导入待存储的数据)
2. 根据需求[选择合适的挂单](#选择挂单)
3. [发起存储订单](#发起存储订单) | 发单之后,需要一定时间执行订单交易流程,订单被确认后,存储提供商对订单中数据进行封装并提交证明,`venus-market` 负责跟踪订单状态。 | +| 启动 `droplet` 和 `droplet-client` | 1. 配置和启动[droplet](#配置启动droplet)
2. 配置和启动[droplet-client](#配置启动droplet-client) | | +| 代理 `miners` 的 `libp2p` 监听服务 | 通过 `droplet` [代理 `miners` 的 `libp2p` 监听服务](#droplet代理libp2p监听) | | +| 为 `miners` 挂单 | 通过 `droplet` [挂单](#挂单) | | +| 指定 `miner` 发单 | 1. 通过 `droplet-client` [导入待存储的数据](#导入待存储的数据)
2. 根据需求[选择合适的挂单](#选择挂单)
3. [发起存储订单](#发起存储订单) | 发单之后,需要一定时间执行订单交易流程,订单被确认后,存储提供商对订单中数据进行封装并提交证明,`droplet` 负责跟踪订单状态。 | 检索流程: | 阶段 | 步骤 | 说明 | | ---- | ---- | ---- | -| 启动 `venus-market` 和 `market-client` | 1. 配置和启动[venus-market](#配置启动venus-market)
2. 配置和启动[market-client](#配置启动market-client) | | -| 设置检索价格及收款地址 | 存储供应商通过 `venus-market` [设置检索挂单](#检索挂单) | | +| 启动 `droplet` 和 `droplet-client` | 1. 配置和启动[droplet](#配置启动droplet)
2. 配置和启动[droplet-client](#配置启动droplet-client) | | +| 设置检索价格及收款地址 | 存储供应商通过 `droplet` [设置检索挂单](#检索挂单) | | | 提交数据检索订单 | [提交数据检索订单](#提交数据检索订单) | 提交数据检索订单之后,开始执行检索交流流程,会按照协议分批次回传数据并将所需费用转给收款地址。| :tipping_hand_woman: **无论是存储交易还是检索交易,其协议的执行过程都是自动的,期间会发送消息上链,故需保证交易双方的消息都可以正常签名。交易过程存在必要的 `fil` 流转,相关地址需要有足够的余额,否则交易将无法达成。** -## 配置启动venus-market +## 配置启动droplet ### 初始化 - 链上模式 -作为链服务中的一个组件,配合`venus-auth`、`venus`、 `venus-messager`、`venus-gateway`等组件一起为注册到链服务的 `miner` 提供市场服务。 +作为链服务中的一个组件,配合`sophon-auth`、`venus`、 `sophon-messager`、`sophon-gateway`等组件一起为注册到链服务的 `miner` 提供市场服务。 ``` -./venus-market run \ +./droplet run \ --node-url=/ip4//tcp/ \ --auth-url=http://: \ --gateway-url=/ip4//tcp/ \ @@ -70,14 +70,14 @@ Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoic2hhcmVkLXRva2VuIiwicGVybSI6ImFkbWluIiwiZXh0IjoiIn0.aARqJ_7FSe1KakkBhWlFvsYm-xBLAXBnl9SvTfqsVe8" ``` -:tipping_hand_woman: **`shared-token` 是用于访问其他链服务组件 `API` 时的权限验证,由 `venus-auth` 管理,需要 `admin` 权限。具体请参考 [venus-auth token](https://github.com/filecoin-project/venus-docs/blob/master/docs/zh/cs/deploy-a-cs.md#user及token生成)** +:tipping_hand_woman: **`shared-token` 是用于访问其他链服务组件 `API` 时的权限验证,由 `sophon-auth` 管理,需要 `admin` 权限。具体请参考 [sophon-auth token](https://github.com/filecoin-project/venus-docs/blob/master/docs/zh/cs/deploy-a-cs.md#user及token生成)** - 链下模式 配合 `lotus fullnode` 的启动方式: ``` -./venus-market run \ +./droplet run \ --node-url=/ip4//tcp/ \ --cs-token= \ --signer-type="lotusnode" @@ -106,7 +106,7 @@ 使用链服务和 `venus-wallet` 的启动方式: ``` -./venus-market run \ +./droplet run \ --auth-url=http://: \ --node-url=/ip4//tcp/ \ --messager-url=/ip4//tcp/ \ @@ -145,18 +145,18 @@ $ ./venus-wallet auth api-info --perm=sign > eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIl19.Vr-OP7RNOozf6XXZuahpk-ZGA7IDa5NJjmU9L_znJ-0:/ip4/127.0.0.1/tcp/5678/http ``` -:tipping_hand_woman: **初始化命令执行成功后将会生成`venus-market repo`,在使用时需根据实际环境配置。** +:tipping_hand_woman: **初始化命令执行成功后将会生成`droplet repo`,在使用时需根据实际环境配置。** -`venus-market` 首次启动时会生成配置项,默认目录为: `~/.venusmarket/config.toml`,接下来我们将介绍常用配置项。 +`droplet` 首次启动时会生成配置项,默认目录为: `~/.droplet/config.toml`,接下来我们将介绍常用配置项。 ### 通用配置 -`venus-wallet` 的配置项说明参考 [venus-market配置](./venus-market配置解释.md),这里我们对比较常用的配置项进行说明。 +`venus-wallet` 的配置项说明参考 [droplet配置](./droplet配置解释.md),这里我们对比较常用的配置项进行说明。 -*tips:* 修改完配置文件之后需要重启`venus-market`服务: +*tips:* 修改完配置文件之后需要重启`droplet`服务: ```bash -$ nohup ./venus-market run > market.log 2>&1 & +$ nohup ./droplet run > droplet.log 2>&1 & ``` > 已经生成 `repo` 之后,初始化所需的参数被写入配置文件,故后续启动无需再加。 @@ -182,7 +182,7 @@ $ nohup ./venus-market run > market.log 2>&1 & #### `API` 监听配置 -`venus-market` 默认监听端口为 `127.0.0.1:41235`, 为了支持不同网络的访问请求, 需要修改`API`的监听地址: +`droplet` 默认监听端口为 `127.0.0.1:41235`, 为了支持不同网络的访问请求, 需要修改`API`的监听地址: ```yuml [API] @@ -191,7 +191,7 @@ ListenAddress = "/ip4/0.0.0.0/tcp/41235" #### `PublishMsgPeriod` 配置 -`venus-market` 在收到 `market-client` 的订单时, 并不会马上就发布 `ClientDealProposal` 消息,会等待一定的时间, 由配置文件中的 `PublishMsgPeriod` 项来控制,在测试时可以将此项设置为较小值减少等待时间。下面的设置,将等待时间设置为10秒。 +`droplet` 在收到 `droplet-client` 的订单时, 并不会马上就发布 `ClientDealProposal` 消息,会等待一定的时间, 由配置文件中的 `PublishMsgPeriod` 项来控制,在测试时可以将此项设置为较小值减少等待时间。下面的设置,将等待时间设置为10秒。 ```yuml PublishMsgPeriod = "10s" @@ -199,7 +199,7 @@ PublishMsgPeriod = "10s" #### `PieceStorage` 配置 -目前 `venus-market` 支持两种 `Piece` 数据的存储模式: +目前 `droplet` 支持两种 `Piece` 数据的存储模式: - 文件系统 - 对象存储 @@ -222,15 +222,15 @@ PublishMsgPeriod = "10s" ```bash # 本地文件系统存储 -./venus-market piece-storage add-fs --path="/piece/storage/path" --name="local" +./droplet piece-storage add-fs --path="/piece/storage/path" --name="local" # 对象存储 -./venus-market piece-storage add-s3 --endpoint= --name="oss" +./droplet piece-storage add-s3 --endpoint= --name="oss" ``` #### `Miners` 配置 -`venus-market` 服务的矿工及每个矿工的参数,配置如下: +`droplet` 服务的矿工及每个矿工的参数,配置如下: ``` [[Miners]] @@ -270,34 +270,34 @@ PublishMsgPeriod = "10s" ::: -## venus-market代理libp2p监听 +## droplet代理libp2p监听 -将 `venus-market` 设置为 `miner` 的 `libp2p` 监听代理就是将特定 `miner` 的市场服务的入口设置为当前运行的 `venus-market` 实例。 +将 `droplet` 设置为 `miner` 的 `libp2p` 监听代理就是将特定 `miner` 的市场服务的入口设置为当前运行的 `droplet` 实例。 -- 查询 `venus-market` 的对等节点监听地址 +- 查询 `droplet` 的对等节点监听地址 ```bash -./venus-market net listen +./droplet net listen /ip4/127.0.0.1/tcp/58418/p2p/12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK /ip4/192.168.19.67/tcp/58418/p2p/12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK /ip6/::1/tcp/49770/p2p/12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK ``` -- 将 `miners` 的 `Mutiaddrs` 和 `peerid` 设置为 `venus-market` 的 `Mutiaddrs` 和 `peerid` +- 将 `miners` 的 `Mutiaddrs` 和 `peerid` 设置为 `droplet` 的 `Mutiaddrs` 和 `peerid` ```bash -./venus-market actor set-addrs --miner=t01041 /ip4/192.168.19.67/tcp/58418 +./droplet actor set-addrs --miner=t01041 /ip4/192.168.19.67/tcp/58418 Requested multiaddrs change in message bafy2bzaceceqgxmiledunzjwbajpghzzn4iibvxhoifsrz4q2grzsirgznzdg -./venus-market actor set-peer-id --miner=f01041 12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK +./droplet actor set-peer-id --miner=f01041 12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK Requested peerid change in message bafy2bzacea4ruzf4hvyezzhjkt6hnzz5tpk7ttuw6jmyoadqasqtujypqitp2 ``` - 等待消息上链后,查看 `miner` 的代理信息 ```bash -./venus-market actor info --miner t01041 +./droplet actor info --miner t01041 peers: 12D3KooWQftXTGFBKooKuyaNkugapUzi4VmjxEKTgkpsNCQufKBK addr: /ip4/192.168.19.67/tcp/58418 ``` @@ -307,12 +307,12 @@ addr: /ip4/192.168.19.67/tcp/58418 ### 存储挂单 ```bash -./venus-market storage ask set --price=0.01fil --verified-price=0.02fil --min-piece-size=512b --max-piece-size=512M t01041 +./droplet storage ask set --price=0.01fil --verified-price=0.02fil --min-piece-size=512b --max-piece-size=512M t01041 ``` 可以通过命令行工具检查定价信息: ```shell -./venus-market storage ask get t01041 +./droplet storage ask get t01041 Price per GiB/Epoch Verified Min. Piece Size (padded) Max. Piece Size (padded) Expiry (Epoch) Expiry (Appx. Rem. Time) Seq. No. 0.01 FIL 0.02 FIL 512 B 521 MiB 161256 719h59m0s 0 ``` @@ -322,12 +322,12 @@ Price per GiB/Epoch Verified Min. Piece Size (padded) Max. Piece Size (padded 存储服务提供商至少应设置收款地址 ```bash -./venus-market retrieve ask set t3ueb62v5kbyuvwo5tuyzpvds2bfakdjeg2s33p47buvbfiyd7w5fwmeilobt5cqzi673s5z6i267igkgxum6a +./droplet retrieve ask set t3ueb62v5kbyuvwo5tuyzpvds2bfakdjeg2s33p47buvbfiyd7w5fwmeilobt5cqzi673s5z6i267igkgxum6a ``` 同时,也可以设置数据检索订单的价格,不设置时,默认为0. ```bash -./venus-market retrieve ask set \ +./droplet retrieve ask set \ --price 0.02fil \ --unseal-price 0.01fil \ --payment-interval 1MB \ @@ -335,22 +335,22 @@ t3ueb62v5kbyuvwo5tuyzpvds2bfakdjeg2s33p47buvbfiyd7w5fwmeilobt5cqzi673s5z6i267igk ``` -## 配置启动market-client +## 配置启动droplet-client -`market-client` 正常运行需要同步节点、签名节点(`venus fullnode` 和 `lotus fullnode` 可以作为签名节点)、消息节点(`venus fullnode` 和 `lotus fullnode` 可以作为消息节点)及 `venus-market`,故其可以灵活配置,只要保证消息能够正常签名并上链即可。 +`droplet-client` 正常运行需要同步节点、签名节点(`venus fullnode` 和 `lotus fullnode` 可以作为签名节点)、消息节点(`venus fullnode` 和 `lotus fullnode` 可以作为消息节点)及 `droplet`,故其可以灵活配置,只要保证消息能够正常签名并上链即可。 -`market-client` 需要配置 `--addr` 用来绑定客户的钱包地址,用于支付客户端抵押和检索费用。 +`droplet-client` 需要配置 `--addr` 用来绑定客户的钱包地址,用于支付客户端抵押和检索费用。 这里介绍常用的三种启动方式: - 接入 `Venus` 链服务 -`venus-gateway` 的签名 `API` 只有 `admin` 权限才能访问(安全考虑),也就是只有链服务组件才能访问,故 `market-client` 无法使用,所以用本地的 `venus-wallet` 进行签名。 +`sophon-gateway` 的签名 `API` 只有 `admin` 权限才能访问(安全考虑),也就是只有链服务组件才能访问,故 `droplet-client` 无法使用,所以用本地的 `venus-wallet` 进行签名。 ```shell -./market-client run \ +./droplet-client run \ --node-url=/ip4//tcp/ \ ---messager-url=/ip4//tcp/ \ +--messager-url=/ip4//tcp/ \ --auth-token= \ --signer-type=wallet \ --signer-url=/ip4//tcp/ \ @@ -362,7 +362,7 @@ t3ueb62v5kbyuvwo5tuyzpvds2bfakdjeg2s33p47buvbfiyd7w5fwmeilobt5cqzi673s5z6i267igk - 连接 `lotus fullnode` 启动 ```shell -./market-client run \ +./droplet-client run \ --node-url=/ip4//tcp/ \ --node-token= \ --signer-type=lotusnode \ @@ -371,14 +371,14 @@ t3ueb62v5kbyuvwo5tuyzpvds2bfakdjeg2s33p47buvbfiyd7w5fwmeilobt5cqzi673s5z6i267igk - 连接 `venus fullnode` 启动 ```shell -./market-client run \ +./droplet-client run \ --node-url=/ip4//tcp/ \ --node-token= \ --signer-type=wallet \ --addr= \ ``` -这些配置项也可以在配置文件中设置,参见[market-client配置](./market-client配置解释.md) +这些配置项也可以在配置文件中设置,参见[droplet-client配置](./droplet-client配置解释.md) ## 存储订单 @@ -386,16 +386,16 @@ t3ueb62v5kbyuvwo5tuyzpvds2bfakdjeg2s33p47buvbfiyd7w5fwmeilobt5cqzi673s5z6i267igk ### 导入待存储的数据 ```shell -./market-client data import +./droplet-client data import Import 1642491708527303001, Root bafk2bzacedgv2xqys5ja4gycqipmg543ekxz3tjj6wwfexda352n55ahjldja ``` ### 选择挂单 -使用 `market-client` 来查询 `miner` 挂单信息: +使用 `droplet-client` 来查询 `miner` 挂单信息: ```bash -./market-client storage asks query f01041 +./droplet-client storage asks query f01041 Ask: t01041 Price per GiB: 0.02 FIL Verified Price per GiB: 0.01 FIL @@ -406,8 +406,8 @@ Min Piece size: 512 B ### 发起存储订单 ```shell -/market-client storage deals init -# 输入需要存储的数据的cid, `./market-client data local`命令查看 +/droplet-client storage deals init +# 输入需要存储的数据的cid, `./droplet-client data local`命令查看 Data CID (from lotus client import): bafk2bzacedgv2xqys5ja4gycqipmg543ekxz3tjj6wwfexda352n55ahjldja .. calculating data size PieceCid: baga6ea4seaqpz47j4kqdiixpehmzk3uw5c4cmqvs5iyi7xf7rwkepfhdvowdiai PayLoadSize: 809 PieceSize: 1024 @@ -430,9 +430,9 @@ Deal (t01051) CID: bafyreihiln2ha6eaaos7kuhwpnvjvjlxmjnpsklym6hhucu2z776bf2or4 然后等待订单消息上链,以及存储提供商完成数据封装即可。 -`market-client` 查看订单: +`droplet-client` 查看订单: ```shell -./market-client storage deals list +./droplet-client storage deals list DealCid DealId Provider State On Chain? Slashed? PieceCID Size Price Duration Verified ...76bf2or4 0 t01051 StorageDealCheckForAcceptance N N ...dvowdiai 1016 B 0.00992212295525724 FIL 520205 false Message: Provider state: StorageDealPublish @@ -443,20 +443,20 @@ DealCid DealId Provider State On Chain? Slashed 1. 导入订单存储文件 ```bash -./market-client data import ./README.md +./droplet-client data import ./README.md Import 1642643014364955003, Root bafk2bzaceaf4sallirkt63fqrojz5gaut7akiwxrclcsymqelqad7man3hc2c ``` 2.转为CAR文件 ```bash -./market-client data generate-car ./README.md ./readme.md.car +./droplet-client data generate-car ./README.md ./readme.md.car ``` 3.计算CAR文件的`CID`和`Piece size` ```shell -./market-client data commP ./readme.md.car +./droplet-client data commP ./readme.md.car CID: baga6ea4seaqfewgysi3n3cjylkbfknr56vbemb2gwjfvpctqtjgpdweu7o3d6mq Piece size: 3.969 KiB ``` @@ -464,7 +464,7 @@ Piece size: 3.969 KiB 4.发起订单 ```bash -./market-client storage deals init \ +./droplet-client storage deals init \ --manual-piece-cid=baga6ea4seaqfewgysi3n3cjylkbfknr56vbemb2gwjfvpctqtjgpdweu7o3d6mq \ --manual-piece-size=4064 \ bafk2bzaceaf4sallirkt63fqrojz5gaut7akiwxrclcsymqelqad7man3hc2c \ @@ -483,30 +483,30 @@ bafyreiecguaxgtmgcanfco6huni4d6h6zs3w3bznermmiurtdos7r6hftm - 合约周期, 必须大于等于180天, 这个值也需要换成epoch为单位, 每个epoch=30秒, 示例中:518400 = 180天. 最后的输出`bafyreidfs2w7lxacq6zpqck7q4zimyitidxyahojf7dbbuz5zr7irdlmqa`为propose的cid. -线上订单一样, 此时可以通过market-client查看deal信息, 订单的最后状态会停止在`StorageDealWaitingForData` +线上订单一样, 此时可以通过droplet-client查看deal信息, 订单的最后状态会停止在`StorageDealWaitingForData` ```shell -./market-client storage deals list +./droplet-client storage deals list DealCid DealId Provider State On Chain? Slashed? PieceCID Size Price Duration Verified ...s7r6hftm 0 t01051 StorageDealCheckForAcceptance N N ...u7o3d6mq 3.969 KiB 5196.63 FIL 519663 false Message: Provider state: StorageDealWaitingForData ``` -:tipping_hand_woman: **如果 `market-client` 出现下面的内容:** +:tipping_hand_woman: **如果 `droplet-client` 出现下面的内容:** ```shell 2022-01-20T12:47:27.966+0800 ERROR storagemarket_impl clientstates/client_states.go:324 deal bafyreif2k2e4acraxk33z3llwo5gqmk32tfrdj2kocjanojbfbf6vj72vm failed: adding market funds failed: estimating gas used: message execution failed: exit SysErrInsufficientFunds(6) ``` -说明钱包余额不足,调用命令 `./market-client actor-funds add 100fil` 充值后重新执行命令. +说明钱包余额不足,调用命令 `./droplet-client actor-funds add 100fil` 充值后重新执行命令. 5. 导入离线订单的数据文件 -需要将之前第2步生成的`.car`文件线下传输到venus-market, 并通过venus-market命令导入数据: +需要将之前第2步生成的`.car`文件线下传输到droplet, 并通过droplet命令导入数据: ```shell -./venus-market storage-deals import-data bafyreiecguaxgtmgcanfco6huni4d6h6zs3w3bznermmiurtdos7r6hftm ./readme.md.car +./droplet storage-deals import-data bafyreiecguaxgtmgcanfco6huni4d6h6zs3w3bznermmiurtdos7r6hftm ./readme.md.car ``` 再次查看状态, 订单状态更新为`StorageDealPublishing`: ```shell -./market-client storage deals list +./droplet-client storage deals list DealCid DealId Provider State On Chain? Slashed? PieceCID Size Price Duration Verified ...s7r6hftm 0 t01051 StorageDealCheckForAcceptance N N ...u7o3d6mq 3.969 KiB 5196.63 FIL 519663 false Message: Provider state: StorageDealPublishing @@ -520,7 +520,7 @@ Message: Provider state: StorageDealPublishing 用户通过 `minerID` 和 `Data CID` 就可以发起数据检索订单 ```shell -./market-client retrieval retrieve --provider t01020 bafk2bzacearla6en6crpouxo72d5lhr3buajbzjippl63bfsd2m7rsyughu42 test.txt +./droplet-client retrieval retrieve --provider t01020 bafk2bzacearla6en6crpouxo72d5lhr3buajbzjippl63bfsd2m7rsyughu42 test.txt Recv 0 B, Paid 0 FIL, Open (New), 0s Recv 0 B, Paid 0 FIL, DealProposed (WaitForAcceptance), 16ms Recv 0 B, Paid 0 FIL, DealAccepted (Accepted), 26ms diff --git "a/docs/zh/\346\211\271\351\207\217\345\217\221\345\215\225.md" "b/docs/zh/\346\211\271\351\207\217\345\217\221\345\215\225.md" index 76b56bbf..8107d17b 100644 --- "a/docs/zh/\346\211\271\351\207\217\345\217\221\345\215\225.md" +++ "b/docs/zh/\346\211\271\351\207\217\345\217\221\345\215\225.md" @@ -1,8 +1,8 @@ ## 批量发单 -通过 `market-client` 批量发布离线订单。 +通过 `droplet-client` 批量发布离线订单。 -批量发单命令:`market-client storage deals batch [command options] [miners price duration]`,具体使用和发送单个订单类似,新增了一些 Option。 +批量发单命令:`droplet-clientstorage deals batch [command options] [miners price duration]`,具体使用和发送单个订单类似,新增了一些 Option。 部分 Option: @@ -47,7 +47,7 @@ bafybeigq66gjr6c6junro7t4fwcpkhl7vpowi3soadksjvleusq6nlzu6a,test-total-19-part-4 1. 发布普通离线订单 ``` -./market-client storage deals batch --from
--manifest --end-index 10 --start-index 5 --miner=t019150 --miner=t018682 0 518400 +./droplet-clientstorage deals batch --from
--manifest --end-index 10 --start-index 5 --miner=t019150 --miner=t018682 0 518400 # 结果 has 5 deals need to publish, t018682: 3, t019150: 2 @@ -63,7 +63,7 @@ create deal success, proposal cid: bafyreigtemnxftqg65gtwsw3rwfvqaqzbb47d4r75ipk > 请加上 --verified-deal flag ``` -./market-client storage deals batch --from
--manifest --end-index 15 --start-index 10 --verified-deal --miner=t019150 --miner=t018682 0 518400 +./droplet-clientstorage deals batch --from
--manifest --end-index 15 --start-index 10 --verified-deal --miner=t019150 --miner=t018682 0 518400 ``` ### 查询订单 @@ -71,13 +71,13 @@ create deal success, proposal cid: bafyreigtemnxftqg65gtwsw3rwfvqaqzbb47d4r75ipk 1. 查询单个订单 ``` -./market-client storage deals get bafyreify4mm46vfdqsogcfhki44vi3ll5n2h35p5fflcclew53fgm3yieu +./droplet-clientstorage deals get bafyreify4mm46vfdqsogcfhki44vi3ll5n2h35p5fflcclew53fgm3yieu ``` 2. 列出所有离线订单 ``` -./market-client storage deals list --offline +./droplet-clientstorage deals list --offline ``` ### 批量导入订单数据 @@ -89,7 +89,7 @@ create deal success, proposal cid: bafyreigtemnxftqg65gtwsw3rwfvqaqzbb47d4r75ipk 可以导出所有订单状态在 `StorageDealWaitingForData` 的订单,导出数据包括 proposal cid 和 piece cid。 ``` -./market-client storage deals export --output proposal_piece.txt +./droplet-clientstorage deals export --output proposal_piece.txt cat proposal_piece.txt @@ -106,7 +106,7 @@ baga6ea4seaqknn4cstmtmscdhebaxmv5dopnxqthwbdmvuslbuv5dcupzvw46ni ``` # --cardir car 文件的目录,若提前把 car 文件放到 piecestore,则本 flag 可以省略 -./venus-market storage deal batch-import-data --manifest --cardir +./droplet storage deal batch-import-data --manifest --cardir # 结果 import data success: bafyreihwvsr3vfsdbrxagtdjzsemngtc3r3xra2gaunbs6pjb63lyodl6a @@ -121,7 +121,7 @@ import data success: bafyreigtemnxftqg65gtwsw3rwfvqaqzbb47d4r75ipksjlypcs56y7qei 1. 查看存储提供者订单重复情况 ``` -./market-client storage deals verified-deal-stat --provider t019150 +./droplet-clientstorage deals verified-deal-stat --provider t019150 # 结果 Provider Total Uniq DuplicationPercentage @@ -131,7 +131,7 @@ t019150 981467136 612368384 37.61% 2. 查看样本分布情况 ``` -./market-client storage deals verified-deal-stat --client t3wivhkdivcxj5zp2l4wjkzon232s52smnd5m3na66ujl5nel75jggguhgaa3zbhjo3as4epf5ytxl6ly3qoha +./droplet-clientstorage deals verified-deal-stat --client t3wivhkdivcxj5zp2l4wjkzon232s52smnd5m3na66ujl5nel75jggguhgaa3zbhjo3as4epf5ytxl6ly3qoha # 结果 Client: t3wivhkdivcxj5zp2l4wjkzon232s52smnd5m3na66ujl5nel75jggguhgaa3zbhjo3as4epf5ytxl6ly3qoha diff --git "a/docs/zh/\347\255\276\345\220\215\351\207\215\346\236\204.md" "b/docs/zh/\347\255\276\345\220\215\351\207\215\346\236\204.md" index 8a9cf479..a9c013f7 100644 --- "a/docs/zh/\347\255\276\345\220\215\351\207\215\346\236\204.md" +++ "b/docs/zh/\347\255\276\345\220\215\351\207\215\346\236\204.md" @@ -4,49 +4,49 @@ `venus` 的 `account` 体系中,各角色的关系如下: -- `venus-auth` 为指定的用户(`account`)生成所需权限的 `token`, `SP` 用户用此 `token` 访问链服务接口; -- `venus-auth` 保存 `account-minerIDs`,即一个用户可以拥有对个 `minerID`; +- `sophon-auth` 为指定的用户(`account`)生成所需权限的 `token`, `SP` 用户用此 `token` 访问链服务接口; +- `sophon-auth` 保存 `account-minerIDs`,即一个用户可以拥有对个 `minerID`; - 链服务组件之间的接口访问没有用到用户的 `token`, 是系统内置的共享 `token` ### 用户请求的签名机制 -以 `venus-cluster` 推送消息的过程为例: +以 `sophon-cluster` 推送消息的过程为例: -- 以 `token` 请求 `venus-messager` 的接口: +- 以 `token` 请求 `sophon-messager` 的接口: ``` PushMessage(ctx context.Context, msg *shared.Message, meta *types.SendSpec) (string, error) ``` -- `venus-messager` 处理 `rpcapi` 请求,从 `token` 中解析获得在 `venus-auth` 中生成的 `account`, 然后调用 `venus-gateway` 中的签名接口: +- `sophon-messager` 处理 `rpcapi` 请求,从 `token` 中解析获得在 `sophon-auth` 中生成的 `account`, 然后调用 `sophon-gateway` 中的签名接口: ``` WalletSign(ctx context.Context, account string, addr address.Address, toSign []byte, meta venusTypes.MsgMeta) (*crypto.Signature, error) ``` -- `venus-gateway` 根据 `account` 找到对应的 `venus-wallet` 服务进行签名。 +- `sophon-gateway` 根据 `account` 找到对应的 `venus-wallet` 服务进行签名。 ### 链服务内部的签名机制 - 链服务组件之间的接口访问用的是内置的 `share token`,故无法通过 `token` 解析出 `account`, 这样就需要依赖 `venus-auth` 的 保存 `account-minerIDs` 体系。以 `venus-miner` 请求 `venus-gateway` 为例进行说明。 + 链服务组件之间的接口访问用的是内置的 `share token`,故无法通过 `token` 解析出 `account`, 这样就需要依赖 `sophon-auth` 的 保存 `account-minerIDs` 体系。以 `venus-miner` 请求 `sophon-gateway` 为例进行说明。 -- `venus-miner` 从 `venus-auth` 获取 `account-miners` 列表; -- 先从`account-miners` 列表中查找 `minerID` 对应的 `account`, 然后调用 `venus-gateway` 的 `WalletSign` 接口。 +- `venus-miner` 从 `sophon-auth` 获取 `account-miners` 列表; +- 先从`account-miners` 列表中查找 `minerID` 对应的 `account`, 然后调用 `sophon-gateway` 的 `WalletSign` 接口。 ### 问题分析 本问题以接入 `venus` 链服务的场景进行分析 -- 链服务中没有 `signer address` 与 `account` 的关系表,而依赖链服务的签名接口需要 `account` 参数,`venus-market` 需要额外扩展 `signer-account` 关系,如下: +- 链服务中没有 `signer address` 与 `account` 的关系表,而依赖链服务的签名接口需要 `account` 参数,`droplet` 需要额外扩展 `signer-account` 关系,如下: 假设 `f0128788` 的可签名地址有: `f3wylwd6pclppme4qmbgwled5xpsbgwgqbn2alxa7yahg2gnbfkipsdv6m764xm5coizujmwdmkxeugplmorha`, `f3r47fkdzfmtex5ic3jnwlzc7bkpbj7s4d6limyt4f57t3cuqq5nuvhvwv2cu2a6iga2s64vjqcxjqiezyjooq`。 -初始 `miner-account`, `venus-auth` 中实现的关系: +初始 `miner-account`, `sophon-auth` 中实现的关系: ``` f0128788-test ``` -扩展后,`venus-market` 中的扩展: +扩展后,`droplet` 中的扩展: ``` f0128788-test f3wylwd6pclppme4qmbgwled5xpsbgwgqbn2alxa7yahg2gnbfkipsdv6m764xm5coizujmwdmkxeugplmorha-test @@ -75,11 +75,11 @@ func (dealTracker *DealTracker) scanDeal(ctx metrics.MetricsCtx) { ## Specification (feature Spec) -本次重构涉及组件包括:venus-auth,venus-gateway,venus-messager, venus-miner, venus-market等,接下来将一一介绍修改内容。 +本次重构涉及组件包括:sophon-auth,sophon-gateway,sophon-messager, venus-miner, droplet等,接下来将一一介绍修改内容。 -### venus-auth +### sophon-auth -`venus-auth` 提供接口将签名地址和账号进行绑定,并提供查询接口,保障链服务可以安全地支持多用户相互签名,接口如下: +`sophon-auth` 提供接口将签名地址和账号进行绑定,并提供查询接口,保障链服务可以安全地支持多用户相互签名,接口如下: ``` type IAuthClient interface { GetUserBySigner(signer string) (auth.ListUsersResponse, error) @@ -88,7 +88,7 @@ type IAuthClient interface { } ``` -### venus-gateway +### sophon-gateway 签名接口重构: ``` @@ -98,16 +98,16 @@ type IWalletClient interface { } ``` -- `venus-gateway` 签名接口只开放对具有 `admin` 权限的 `token` 访问,也就是只能被链服务内部访问,如:`venus-miner`,`venus-messager`; -- 在调用 `venus-gateway` 的签名接口前需要完成权限的检查,这样做为了避免构造消息,调用别人账号下的私钥签名; -- 在调用 `venus-gateway` 的签名接口时需要带上密钥绑定的账号,这样做是为了多个账号的`venus-wallet`可以相互签名; +- `sophon-gateway` 签名接口只开放对具有 `admin` 权限的 `token` 访问,也就是只能被链服务内部访问,如:`venus-miner`,`sophon-messager`; +- 在调用 `sophon-gateway` 的签名接口前需要完成权限的检查,这样做为了避免构造消息,调用别人账号下的私钥签名; +- 在调用 `sophon-gateway` 的签名接口时需要带上密钥绑定的账号,这样做是为了多个账号的`venus-wallet`可以相互签名; 自动注册/注销签名地址: -- 在`venus-wallet` 建立连接时将其保存的私钥和支持的账号进行校验,通过后调用接口保存到 `venus-auth`。如 某个`venus-wallet`终端管理的私钥有: w1,w2;配置的支持账号有:user01,user02;那么绑定的关系有: user01-w1,user01-w2,user02-w1,user02-w2; +- 在`venus-wallet` 建立连接时将其保存的私钥和支持的账号进行校验,通过后调用接口保存到 `sophon-auth`。如 某个`venus-wallet`终端管理的私钥有: w1,w2;配置的支持账号有:user01,user02;那么绑定的关系有: user01-w1,user01-w2,user02-w1,user02-w2; - 在`venus-wallet` 连接端口或通过接口删除某个地址时自动注销签名地址和账号的绑定关系。 -### venus-messager +### sophon-messager 删除强制推送消息的接口,SP统一消息推送接口。 ``` @@ -118,21 +118,21 @@ type IMessager interface { ``` 推送消息流程修改: -- SP组件调用链服务通常是 [`sign`,`read`,`write`] 权限的 `token`,`venus-messager` 首先要检查接口带的 `token` 权限是否满足: +- SP组件调用链服务通常是 [`sign`,`read`,`write`] 权限的 `token`,`sophon-messager` 首先要检查接口带的 `token` 权限是否满足: - `token` 对应的的账号与消息中的签名地址 `msg.From` 是绑定的; - `token` 具有 `sign` 权限(待定); -- 给签名接口提供签名地址绑定的所有账号,这样只要有一个连接到 `venus-gateway` 的签名终端(`venus-wallet`)支持对此密钥签名则可以签名此条消息,也就是多个账号相互帮助签名; +- 给签名接口提供签名地址绑定的所有账号,这样只要有一个连接到 `sophon-gateway` 的签名终端(`venus-wallet`)支持对此密钥签名则可以签名此条消息,也就是多个账号相互帮助签名; ### venus-miner 无逻辑变化,只需匹配新的接口调用即可。 -### venus-market +### droplet - 取消额外扩展 `signer-account` 关系的逻辑; -- 消息签名前先检查请求 `token` 的权限,通过后调用 `venus-gateway`的签名接口。 +- 消息签名前先检查请求 `token` 的权限,通过后调用 `sophon-gateway`的签名接口。 -这里要注意的是 `market-client` 组件,其实现和 `venus-market` 在同一项目,但是其本质是SP类组件,过程中的签名不能通过`venus-gateway`, 其签名逻辑: +这里要注意的是 `droplet-client` 组件,其实现和 `droplet` 在同一项目,但是其本质是SP类组件,过程中的签名不能通过`sophon-gateway`, 其签名逻辑: - 对于deals的签名需要额外的签名终端(`venus-wallet`或`lotus/venus`); -- 交易过程中的消息推送到 `venus-messager`, 和 `venus-cluster`等推送消息一致; -> 所以 `market-client` 组件代码独立为一个项目比较好?从 `venus-market` 中剥离? +- 交易过程中的消息推送到 `sophon-messager`, 和 `sophon-cluster`等推送消息一致; +> 所以 `droplet-client` 组件代码独立为一个项目比较好?从 `droplet` 中剥离? diff --git "a/docs/zh/\350\256\242\345\215\225\350\277\207\346\273\244\345\231\250.md" "b/docs/zh/\350\256\242\345\215\225\350\277\207\346\273\244\345\231\250.md" index 99517ac1..e0792fe9 100644 --- "a/docs/zh/\350\256\242\345\215\225\350\277\207\346\273\244\345\231\250.md" +++ "b/docs/zh/\350\256\242\345\215\225\350\277\207\346\273\244\345\231\250.md" @@ -43,7 +43,7 @@ }, }, "DealType": "storage", -"Agent": "venus-market" +"Agent": "droplet" } ``` diff --git a/fundmgr/fundmanager.go b/fundmgr/fundmanager.go index c7e43bcd..8c02e3e7 100644 --- a/fundmgr/fundmanager.go +++ b/fundmgr/fundmanager.go @@ -13,8 +13,8 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/builtin" - "github.com/filecoin-project/venus-market/v2/api/clients" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/filecoin-project/venus/pkg/constants" "github.com/filecoin-project/venus/venus-shared/actors" diff --git a/fundmgr/fundmanager_test.go b/fundmgr/fundmanager_test.go index b7206cb6..2e7cea3a 100644 --- a/fundmgr/fundmanager_test.go +++ b/fundmgr/fundmanager_test.go @@ -17,8 +17,8 @@ import ( "github.com/filecoin-project/go-state-types/builtin" tutils "github.com/filecoin-project/specs-actors/v2/support/testing" - "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/filecoin-project/venus/pkg/config" _ "github.com/filecoin-project/venus/pkg/crypto/secp" diff --git a/go.mod b/go.mod index 39dfdc96..8ed3eafd 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/filecoin-project/venus-market/v2 +module github.com/ipfs-force-community/droplet/v2 go 1.18 @@ -30,17 +30,17 @@ require ( github.com/filecoin-project/go-statestore v0.2.0 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.2-0.20230602071244-7b32f3e62010 - github.com/filecoin-project/venus-auth v1.11.1-0.20230511013901-7829b3effbcd - github.com/filecoin-project/venus-messager v1.11.0 + github.com/filecoin-project/venus v1.11.2-0.20230607091503-26f810cf09b9 github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef github.com/ipfs-force-community/metrics v1.0.1-0.20220824061112-ac916bacf2ea + github.com/ipfs-force-community/sophon-auth v1.11.1-0.20230607031351-bc57c2b78f44 + github.com/ipfs-force-community/sophon-gateway v1.11.2-0.20230608082318-868706b16516 + github.com/ipfs-force-community/sophon-messager v1.11.1-0.20230608053028-5901fbdca41e github.com/ipfs-force-community/venus-common-utils v0.0.0-20220217030526-e5e4c6bc14f7 - github.com/ipfs-force-community/venus-gateway v1.11.2-0.20230526091733-452ecda21333 github.com/ipfs/go-blockservice v0.5.0 github.com/ipfs/go-cid v0.3.2 github.com/ipfs/go-cidutil v0.1.0 diff --git a/go.sum b/go.sum index b7abad12..95f31399 100644 --- a/go.sum +++ b/go.sum @@ -468,13 +468,9 @@ github.com/filecoin-project/storetheindex v0.4.30-0.20221114113647-683091f8e893 github.com/filecoin-project/storetheindex v0.4.30-0.20221114113647-683091f8e893/go.mod h1:S7590oDimBvXMUtzWsBXoshu9HtYKwtXl47zAK9rcP8= 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.2-0.20230602071244-7b32f3e62010 h1:rMfjmjOF184lcuS3FNlJ8vbzZiVhKAT4RIig4vr7YB4= -github.com/filecoin-project/venus v1.11.2-0.20230602071244-7b32f3e62010/go.mod h1:9QctTOegFH+hZ5icsuR2BRRnZMhyLDQa5uJAbOog76M= +github.com/filecoin-project/venus v1.11.2-0.20230607091503-26f810cf09b9 h1:Zw0TrPNELEnN+Ylu2R6nv+01RG4Gubn0r+x50qP5Ems= +github.com/filecoin-project/venus v1.11.2-0.20230607091503-26f810cf09b9/go.mod h1:2Q7xc4lWRFxK40NicPERVnZLemUnE8umWVFGotSq50s= 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.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/filecoin-project/venus-messager v1.11.0 h1:OJNSnWqhQl9PLzwRNR3huz49k+SU6pQ4DzEG4TXDqic= -github.com/filecoin-project/venus-messager v1.11.0/go.mod h1:dZlz/xrF2SREfmR3/6xp3AMP9FthCW68N3zEvBOnqM4= 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 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= @@ -834,11 +830,15 @@ github.com/ipfs-force-community/metrics v1.0.0/go.mod h1:mn40SioMuKtjmRumHFy/fJ2 github.com/ipfs-force-community/metrics v1.0.1-0.20211022060227-11142a08b729/go.mod h1:mn40SioMuKtjmRumHFy/fJ26Pn028XuDjUJE9dorjyw= github.com/ipfs-force-community/metrics v1.0.1-0.20220824061112-ac916bacf2ea h1:mtR+uqI444dF1j3IcpDq3MCFBR5B/OQnHFulTuM7a6o= github.com/ipfs-force-community/metrics v1.0.1-0.20220824061112-ac916bacf2ea/go.mod h1:5rXHGpIN2wCkdgDnucJ1rEeKhLzbAur5IO1aWAIwogY= +github.com/ipfs-force-community/sophon-auth v1.11.1-0.20230607031351-bc57c2b78f44 h1:mezDnUywtX74k8onT/8M8FtKw1rEPFHH24DCkK78VeM= +github.com/ipfs-force-community/sophon-auth v1.11.1-0.20230607031351-bc57c2b78f44/go.mod h1:cGYCfjA/BDB/Km9P7Za6t1hmwpFlPKf8ho/CHmLG81Y= +github.com/ipfs-force-community/sophon-gateway v1.11.2-0.20230608082318-868706b16516 h1:HDkuhmWBznxTrPd8ciQgnxLclpmDmwq9380OxOrLph0= +github.com/ipfs-force-community/sophon-gateway v1.11.2-0.20230608082318-868706b16516/go.mod h1:/TyA6WHYhswwTaPai59UTvNuLvpUkAPC2B+t8xMVeVU= +github.com/ipfs-force-community/sophon-messager v1.11.1-0.20230608053028-5901fbdca41e h1:PMlKBfTmAd/xnh78viCjrC7CDjAyAV1u1bPs6tGOxL0= +github.com/ipfs-force-community/sophon-messager v1.11.1-0.20230608053028-5901fbdca41e/go.mod h1:pVJ92QXnlo/aPkMLX76NusKhbNaxea5TLJbnNnTeUwM= 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.11.2-0.20230526091733-452ecda21333 h1:mnqvXRJqKVsCrs6NF8xZFZD01TmI/MInvGzODAYeT50= -github.com/ipfs-force-community/venus-gateway v1.11.2-0.20230526091733-452ecda21333/go.mod h1:fJzlqs3UfzmPXyuIfFc0tuUWJ7L+7hmcBxFl6jsRUWE= 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= diff --git a/imports/manager.go b/imports/manager.go index e3b04cc2..98ce9bb1 100644 --- a/imports/manager.go +++ b/imports/manager.go @@ -9,8 +9,8 @@ import ( "strconv" "github.com/filecoin-project/go-fil-markets/shared" - "github.com/filecoin-project/venus-market/v2/models/badger" types "github.com/filecoin-project/venus/venus-shared/types/market/client" + "github.com/ipfs-force-community/droplet/v2/models/badger" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/query" diff --git a/minermgr/miner_mgr.go b/minermgr/miner_mgr.go index 09d1da6f..4bb1ebfb 100644 --- a/minermgr/miner_mgr.go +++ b/minermgr/miner_mgr.go @@ -8,7 +8,7 @@ import ( "github.com/filecoin-project/go-address" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" "github.com/filecoin-project/venus/venus-shared/types/market" ) diff --git a/models/badger/cid_info.go b/models/badger/cid_info.go index 4fbd4c20..e671473f 100644 --- a/models/badger/cid_info.go +++ b/models/badger/cid_info.go @@ -4,8 +4,8 @@ import ( "context" "github.com/filecoin-project/go-fil-markets/piecestore" - "github.com/filecoin-project/venus-market/v2/models/badger/statestore" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/badger/statestore" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-cid" ) diff --git a/models/badger/cid_info_test.go b/models/badger/cid_info_test.go index 32f02ca0..db4db90c 100644 --- a/models/badger/cid_info_test.go +++ b/models/badger/cid_info_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/filecoin-project/go-fil-markets/piecestore" - "github.com/filecoin-project/venus-market/v2/models/repo" "github.com/filecoin-project/venus/venus-shared/testutil" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-cid" "github.com/stretchr/testify/assert" ) diff --git a/models/badger/client_offline_deal.go b/models/badger/client_offline_deal.go index 0394f2f6..ec720692 100644 --- a/models/badger/client_offline_deal.go +++ b/models/badger/client_offline_deal.go @@ -4,8 +4,8 @@ import ( "context" "encoding/json" - "github.com/filecoin-project/venus-market/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market/client" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/query" diff --git a/models/badger/db.go b/models/badger/db.go index e9edee65..b04c7ef2 100644 --- a/models/badger/db.go +++ b/models/badger/db.go @@ -4,11 +4,11 @@ import ( "context" "path" - "github.com/filecoin-project/venus-market/v2/models/badger/migrate" + "github.com/ipfs-force-community/droplet/v2/models/badger/migrate" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/models/repo" "github.com/filecoin-project/venus/venus-shared/blockstore" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs-force-community/metrics" "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/namespace" diff --git a/models/badger/fund.go b/models/badger/fund.go index a4aa17aa..51153ec5 100644 --- a/models/badger/fund.go +++ b/models/badger/fund.go @@ -6,8 +6,8 @@ import ( "github.com/filecoin-project/go-address" cborrpc "github.com/filecoin-project/go-cbor-util" - "github.com/filecoin-project/venus-market/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-datastore" dsq "github.com/ipfs/go-datastore/query" ) diff --git a/models/badger/fund_test.go b/models/badger/fund_test.go index 42f90690..d4f55df0 100644 --- a/models/badger/fund_test.go +++ b/models/badger/fund_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "github.com/filecoin-project/venus-market/v2/models/repo" "github.com/filecoin-project/venus/venus-shared/testutil" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/stretchr/testify/assert" ) diff --git a/models/badger/migrate/migrate.go b/models/badger/migrate/migrate.go index 97be2091..2aaa8f6e 100644 --- a/models/badger/migrate/migrate.go +++ b/models/badger/migrate/migrate.go @@ -10,8 +10,8 @@ import ( "github.com/filecoin-project/go-ds-versioning/pkg/statestore" "github.com/filecoin-project/go-ds-versioning/pkg/versioned" "github.com/filecoin-project/go-fil-markets/piecestore" - v220 "github.com/filecoin-project/venus-market/v2/models/badger/migrate/v2.2.0" "github.com/filecoin-project/venus/venus-shared/types/market" + v220 "github.com/ipfs-force-community/droplet/v2/models/badger/migrate/v2.2.0" "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/namespace" logging "github.com/ipfs/go-log/v2" diff --git a/models/badger/migrate/v2.2.0/testing/testing.go b/models/badger/migrate/v2.2.0/testing/testing.go index 25f7f079..4461f75c 100644 --- a/models/badger/migrate/v2.2.0/testing/testing.go +++ b/models/badger/migrate/v2.2.0/testing/testing.go @@ -6,12 +6,12 @@ import ( "github.com/libp2p/go-libp2p/core/peer" - "github.com/filecoin-project/venus-market/v2/models/badger/migrate" + "github.com/ipfs-force-community/droplet/v2/models/badger/migrate" "github.com/ipfs/go-cid" - v220 "github.com/filecoin-project/venus-market/v2/models/badger/migrate/v2.2.0" "github.com/filecoin-project/venus/venus-shared/testutil" + v220 "github.com/ipfs-force-community/droplet/v2/models/badger/migrate/v2.2.0" "github.com/ipfs/go-datastore" "github.com/stretchr/testify/assert" cbg "github.com/whyrusleeping/cbor-gen" diff --git a/models/badger/migrate/v2.2.0/types.go b/models/badger/migrate/v2.2.0/types.go index 1b8e6091..910933be 100644 --- a/models/badger/migrate/v2.2.0/types.go +++ b/models/badger/migrate/v2.2.0/types.go @@ -28,8 +28,8 @@ import ( "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin/v8/paych" - "github.com/filecoin-project/venus-market/v2/models/badger/statestore" "github.com/filecoin-project/venus/venus-shared/types" + "github.com/ipfs-force-community/droplet/v2/models/badger/statestore" ) type SignedStorageAsk struct { diff --git a/models/badger/paych.go b/models/badger/paych.go index b03f15fa..52588405 100644 --- a/models/badger/paych.go +++ b/models/badger/paych.go @@ -7,9 +7,9 @@ import ( "github.com/filecoin-project/go-address" cborutil "github.com/filecoin-project/go-cbor-util" fbig "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/venus-market/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" "github.com/google/uuid" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/query" diff --git a/models/badger/paych_test.go b/models/badger/paych_test.go index 542e5cad..6ed72b2f 100644 --- a/models/badger/paych_test.go +++ b/models/badger/paych_test.go @@ -7,9 +7,9 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/big" - mrepo "github.com/filecoin-project/venus-market/v2/models/repo" "github.com/filecoin-project/venus/venus-shared/testutil" types "github.com/filecoin-project/venus/venus-shared/types/market" + mrepo "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-cid" "github.com/stretchr/testify/assert" ) diff --git a/models/badger/retrieval_ask.go b/models/badger/retrieval_ask.go index 41804c65..379ef382 100644 --- a/models/badger/retrieval_ask.go +++ b/models/badger/retrieval_ask.go @@ -7,8 +7,8 @@ import ( "github.com/filecoin-project/go-address" cborrpc "github.com/filecoin-project/go-cbor-util" - "github.com/filecoin-project/venus-market/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" ) type retrievalAskRepo struct { diff --git a/models/badger/retrieval_ask_test.go b/models/badger/retrieval_ask_test.go index 0ac71f86..dfe41d30 100644 --- a/models/badger/retrieval_ask_test.go +++ b/models/badger/retrieval_ask_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "github.com/filecoin-project/venus-market/v2/models/repo" "github.com/filecoin-project/venus/venus-shared/testutil" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/stretchr/testify/assert" ) diff --git a/models/badger/retrieval_deal.go b/models/badger/retrieval_deal.go index c2bdf0ba..f809874e 100644 --- a/models/badger/retrieval_deal.go +++ b/models/badger/retrieval_deal.go @@ -9,8 +9,8 @@ import ( datatransfer "github.com/filecoin-project/go-data-transfer" "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-statestore" - "github.com/filecoin-project/venus-market/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-datastore" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/models/badger/retrieval_deal_test.go b/models/badger/retrieval_deal_test.go index 49ea4920..6ee303f4 100644 --- a/models/badger/retrieval_deal_test.go +++ b/models/badger/retrieval_deal_test.go @@ -6,8 +6,8 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-fil-markets/retrievalmarket" - "github.com/filecoin-project/venus-market/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/libp2p/go-libp2p/core/peer" cbg "github.com/whyrusleeping/cbor-gen" diff --git a/models/badger/storage_ask.go b/models/badger/storage_ask.go index f664475a..9c1a60ae 100644 --- a/models/badger/storage_ask.go +++ b/models/badger/storage_ask.go @@ -9,8 +9,8 @@ import ( "github.com/filecoin-project/go-address" cborrpc "github.com/filecoin-project/go-cbor-util" "github.com/filecoin-project/go-statestore" - "github.com/filecoin-project/venus-market/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-datastore" ) diff --git a/models/badger/storage_ask_test.go b/models/badger/storage_ask_test.go index cbaf76d5..77fe3c51 100644 --- a/models/badger/storage_ask_test.go +++ b/models/badger/storage_ask_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "github.com/filecoin-project/venus-market/v2/models/repo" "github.com/filecoin-project/venus/venus-shared/testutil" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/stretchr/testify/assert" ) diff --git a/models/badger/storage_deal.go b/models/badger/storage_deal.go index 6bb2a11e..2eb7c82c 100644 --- a/models/badger/storage_deal.go +++ b/models/badger/storage_deal.go @@ -10,8 +10,8 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-statestore" - "github.com/filecoin-project/venus-market/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" ) diff --git a/models/badger/storage_deal_test.go b/models/badger/storage_deal_test.go index b32bdcdb..f3f20384 100644 --- a/models/badger/storage_deal_test.go +++ b/models/badger/storage_deal_test.go @@ -12,7 +12,7 @@ import ( "github.com/libp2p/go-libp2p/core/peer" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/stretchr/testify/assert" "github.com/filecoin-project/venus/venus-shared/types" diff --git a/models/badger/testing.go b/models/badger/testing.go index f3ad1123..ab242c95 100644 --- a/models/badger/testing.go +++ b/models/badger/testing.go @@ -5,7 +5,7 @@ import ( "github.com/ipfs/go-datastore" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/repo" badger "github.com/ipfs/go-ds-badger2" "github.com/stretchr/testify/assert" ) diff --git a/models/cid_info_test.go b/models/cid_info_test.go index 60806796..013b74fd 100644 --- a/models/cid_info_test.go +++ b/models/cid_info_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/filecoin-project/go-fil-markets/piecestore" - "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-cid" "github.com/stretchr/testify/require" diff --git a/models/fund_test.go b/models/fund_test.go index c632a636..02d26cb0 100644 --- a/models/fund_test.go +++ b/models/fund_test.go @@ -5,9 +5,9 @@ import ( "testing" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/stretchr/testify/assert" ) diff --git a/models/migrate_test.go b/models/migrate_test.go index 77a6bff3..b89938db 100644 --- a/models/migrate_test.go +++ b/models/migrate_test.go @@ -5,9 +5,9 @@ import ( "math" "testing" - "github.com/filecoin-project/venus-market/v2/models/badger" - t220 "github.com/filecoin-project/venus-market/v2/models/badger/migrate/v2.2.0/testing" "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/badger" + t220 "github.com/ipfs-force-community/droplet/v2/models/badger/migrate/v2.2.0/testing" "github.com/ipfs/go-cid" "github.com/ipfs/go-datastore" diff --git a/models/module.go b/models/module.go index 071fa097..a957303d 100644 --- a/models/module.go +++ b/models/module.go @@ -1,11 +1,11 @@ package models import ( - badger2 "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/models/mysql" - "github.com/filecoin-project/venus-market/v2/models/repo" + badger2 "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/mysql" + "github.com/ipfs-force-community/droplet/v2/models/repo" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" "github.com/ipfs-force-community/venus-common-utils/builder" ) diff --git a/models/mysql/cid_info.go b/models/mysql/cid_info.go index 8424444e..df5ed97d 100644 --- a/models/mysql/cid_info.go +++ b/models/mysql/cid_info.go @@ -7,7 +7,7 @@ import ( "sort" "github.com/filecoin-project/go-fil-markets/piecestore" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-cid" "github.com/pkg/errors" "gorm.io/gorm" diff --git a/models/mysql/cid_info_test.go b/models/mysql/cid_info_test.go index 1dfb1735..435e1d32 100644 --- a/models/mysql/cid_info_test.go +++ b/models/mysql/cid_info_test.go @@ -8,8 +8,8 @@ import ( "github.com/DATA-DOG/go-sqlmock" "github.com/filecoin-project/go-fil-markets/piecestore" - "github.com/filecoin-project/venus-market/v2/models/repo" "github.com/filecoin-project/venus/venus-shared/testutil" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-cid" "github.com/stretchr/testify/assert" ) diff --git a/models/mysql/db.go b/models/mysql/db.go index f0a9961a..17c645e6 100644 --- a/models/mysql/db.go +++ b/models/mysql/db.go @@ -13,8 +13,8 @@ import ( "gorm.io/driver/mysql" "gorm.io/gorm" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" ) diff --git a/models/mysql/fund.go b/models/mysql/fund.go index 891a3b1d..d380c3cb 100644 --- a/models/mysql/fund.go +++ b/models/mysql/fund.go @@ -5,9 +5,9 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-messager/models/mtypes" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/sophon-messager/models/mtypes" "gorm.io/gorm" "gorm.io/gorm/clause" ) diff --git a/models/mysql/fund_test.go b/models/mysql/fund_test.go index dffb3fbf..c04943dc 100644 --- a/models/mysql/fund_test.go +++ b/models/mysql/fund_test.go @@ -9,8 +9,8 @@ import ( "github.com/DATA-DOG/go-sqlmock" "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/venus-market/v2/models/repo" market_types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/stretchr/testify/assert" ) diff --git a/models/mysql/paych.go b/models/mysql/paych.go index 9902aab2..85c76bc4 100644 --- a/models/mysql/paych.go +++ b/models/mysql/paych.go @@ -6,10 +6,10 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-messager/models/mtypes" types "github.com/filecoin-project/venus/venus-shared/types/market" "github.com/google/uuid" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/sophon-messager/models/mtypes" "github.com/ipfs/go-cid" "gorm.io/gorm" "gorm.io/gorm/clause" diff --git a/models/mysql/paych_test.go b/models/mysql/paych_test.go index c132f7eb..3e8f8d06 100644 --- a/models/mysql/paych_test.go +++ b/models/mysql/paych_test.go @@ -10,9 +10,9 @@ import ( "github.com/DATA-DOG/go-sqlmock" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/venus-market/v2/models/repo" "github.com/filecoin-project/venus/venus-shared/testutil" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "gorm.io/gorm/clause" diff --git a/models/mysql/retrieval_ask.go b/models/mysql/retrieval_ask.go index feeb0d94..fac2f54e 100644 --- a/models/mysql/retrieval_ask.go +++ b/models/mysql/retrieval_ask.go @@ -7,8 +7,8 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-messager/models/mtypes" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/sophon-messager/models/mtypes" "gorm.io/gorm" "gorm.io/gorm/clause" ) diff --git a/models/mysql/retrieval_ask_test.go b/models/mysql/retrieval_ask_test.go index fd2678a9..33ae3a76 100644 --- a/models/mysql/retrieval_ask_test.go +++ b/models/mysql/retrieval_ask_test.go @@ -6,10 +6,10 @@ import ( "testing" "github.com/DATA-DOG/go-sqlmock" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-messager/models/mtypes" "github.com/filecoin-project/venus/venus-shared/types" market_types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/sophon-messager/models/mtypes" "github.com/stretchr/testify/assert" ) diff --git a/models/mysql/retrieval_deal.go b/models/mysql/retrieval_deal.go index 9221c6b4..057c9a27 100644 --- a/models/mysql/retrieval_deal.go +++ b/models/mysql/retrieval_deal.go @@ -8,9 +8,9 @@ import ( datatransfer "github.com/filecoin-project/go-data-transfer" rm "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-messager/models/mtypes" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/sophon-messager/models/mtypes" "github.com/libp2p/go-libp2p/core/peer" cbg "github.com/whyrusleeping/cbor-gen" "gorm.io/gorm" diff --git a/models/mysql/retrieval_deal_test.go b/models/mysql/retrieval_deal_test.go index 189628ab..3e9982a2 100644 --- a/models/mysql/retrieval_deal_test.go +++ b/models/mysql/retrieval_deal_test.go @@ -9,10 +9,10 @@ import ( "github.com/DATA-DOG/go-sqlmock" datatransfer "github.com/filecoin-project/go-data-transfer" "github.com/filecoin-project/go-fil-markets/retrievalmarket" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-messager/models/mtypes" "github.com/filecoin-project/venus/venus-shared/testutil" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/sophon-messager/models/mtypes" "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/assert" "gorm.io/gorm/clause" diff --git a/models/mysql/storage_ask.go b/models/mysql/storage_ask.go index 3430ed43..cf2a5c60 100644 --- a/models/mysql/storage_ask.go +++ b/models/mysql/storage_ask.go @@ -8,8 +8,8 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/crypto" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-messager/models/mtypes" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/sophon-messager/models/mtypes" "gorm.io/gorm" "gorm.io/gorm/clause" diff --git a/models/mysql/storage_ask_test.go b/models/mysql/storage_ask_test.go index 227d92eb..68b204f7 100644 --- a/models/mysql/storage_ask_test.go +++ b/models/mysql/storage_ask_test.go @@ -8,8 +8,8 @@ import ( "github.com/DATA-DOG/go-sqlmock" "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/venus-market/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/stretchr/testify/assert" "gorm.io/gorm/clause" ) diff --git a/models/mysql/storage_deal.go b/models/mysql/storage_deal.go index d1e43d66..f9e491ca 100644 --- a/models/mysql/storage_deal.go +++ b/models/mysql/storage_deal.go @@ -15,10 +15,10 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/abi" acrypto "github.com/filecoin-project/go-state-types/crypto" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-messager/models/mtypes" vTypes "github.com/filecoin-project/venus/venus-shared/types" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/sophon-messager/models/mtypes" "github.com/ipfs/go-cid" typegen "github.com/whyrusleeping/cbor-gen" "gorm.io/gorm" diff --git a/models/mysql/storage_deal_test.go b/models/mysql/storage_deal_test.go index 6420ec92..a6ab880f 100644 --- a/models/mysql/storage_deal_test.go +++ b/models/mysql/storage_deal_test.go @@ -11,9 +11,9 @@ import ( "github.com/filecoin-project/go-fil-markets/piecestore" "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/venus-market/v2/models/repo" vTypes "github.com/filecoin-project/venus/venus-shared/types" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-cid" "gorm.io/gorm" "gorm.io/gorm/clause" diff --git a/models/mysql/testing.go b/models/mysql/testing.go index 3115355b..d4c0fe35 100644 --- a/models/mysql/testing.go +++ b/models/mysql/testing.go @@ -10,7 +10,7 @@ import ( "github.com/DATA-DOG/go-sqlmock" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/ipfs/go-cid" "github.com/libp2p/go-libp2p/core/peer" "github.com/multiformats/go-multihash" diff --git a/models/paych_test.go b/models/paych_test.go index 0ccd5826..b87871eb 100644 --- a/models/paych_test.go +++ b/models/paych_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/filecoin-project/go-state-types/big" vTypes "github.com/filecoin-project/venus/venus-shared/types" diff --git a/models/retrieval_ask_test.go b/models/retrieval_ask_test.go index d80d2bf2..2f34fa85 100644 --- a/models/retrieval_ask_test.go +++ b/models/retrieval_ask_test.go @@ -7,8 +7,8 @@ import ( types "github.com/filecoin-project/venus/venus-shared/types/market" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/models/storage_ask_test.go b/models/storage_ask_test.go index 8724c403..c4080eb2 100644 --- a/models/storage_ask_test.go +++ b/models/storage_ask_test.go @@ -10,8 +10,8 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/crypto" - "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/models/storage_deal_test.go b/models/storage_deal_test.go index 3e34df6f..f52be894 100644 --- a/models/storage_deal_test.go +++ b/models/storage_deal_test.go @@ -18,8 +18,8 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/crypto" - "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/stretchr/testify/assert" typegen "github.com/whyrusleeping/cbor-gen" ) diff --git a/models/testhelpers.go b/models/testhelpers.go index 024a9b91..b5600085 100644 --- a/models/testhelpers.go +++ b/models/testhelpers.go @@ -3,8 +3,8 @@ package models import ( "testing" - "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/stretchr/testify/assert" ) diff --git a/models/testing.go b/models/testing.go index 42f79fbd..56ee6114 100644 --- a/models/testing.go +++ b/models/testing.go @@ -8,15 +8,15 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/venus-market/v2/models/mysql" - "github.com/filecoin-project/venus-market/v2/utils/test_helper" "github.com/google/uuid" + "github.com/ipfs-force-community/droplet/v2/models/mysql" + "github.com/ipfs-force-community/droplet/v2/utils/test_helper" "github.com/ipfs/go-cid" badger "github.com/ipfs/go-ds-badger2" "github.com/stretchr/testify/assert" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/models/repo" ) func MysqlDB(t *testing.T) repo.Repo { diff --git a/network/graphsync.go b/network/graphsync.go index 2983c954..2a14c815 100644 --- a/network/graphsync.go +++ b/network/graphsync.go @@ -6,9 +6,9 @@ import ( "strconv" "time" - "github.com/filecoin-project/venus-market/v2/config" - marketMetrics "github.com/filecoin-project/venus-market/v2/metrics" - "github.com/filecoin-project/venus-market/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/config" + marketMetrics "github.com/ipfs-force-community/droplet/v2/metrics" + "github.com/ipfs-force-community/droplet/v2/models/badger" "github.com/ipfs-force-community/metrics" "github.com/ipfs/go-graphsync" graphsyncimpl "github.com/ipfs/go-graphsync/impl" diff --git a/network/host.go b/network/host.go index 9987caa1..0afcd5cf 100644 --- a/network/host.go +++ b/network/host.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/filecoin-project/venus-market/v2/version" + "github.com/ipfs-force-community/droplet/v2/version" "github.com/ipfs-force-community/metrics" "github.com/libp2p/go-libp2p" "github.com/libp2p/go-libp2p/core/host" @@ -34,7 +34,7 @@ func Host(mctx metrics.MetricsCtx, lc fx.Lifecycle, params P2PHostIn) (host.Host libp2p.Peerstore(params.Peerstore), libp2p.NoListenAddrs, libp2p.Ping(true), - libp2p.UserAgent("venus-market" + version.UserVersion()), + libp2p.UserAgent("droplet" + version.UserVersion()), } for _, o := range params.Opts { opts = append(opts, o...) diff --git a/network/network.go b/network/network.go index 68a9ac4e..901e512d 100644 --- a/network/network.go +++ b/network/network.go @@ -5,7 +5,7 @@ import ( "encoding/hex" "fmt" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" logging "github.com/ipfs/go-log/v2" "github.com/libp2p/go-libp2p" "github.com/libp2p/go-libp2p/core/crypto" diff --git a/network/rcmgr.go b/network/rcmgr.go index 96aad551..c545b725 100644 --- a/network/rcmgr.go +++ b/network/rcmgr.go @@ -8,7 +8,7 @@ import ( "os" "path/filepath" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" "go.uber.org/fx" diff --git a/paychmgr/manager.go b/paychmgr/manager.go index 47ac24d9..df268b76 100644 --- a/paychmgr/manager.go +++ b/paychmgr/manager.go @@ -12,9 +12,9 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/venus-market/v2/api/clients" - "github.com/filecoin-project/venus-market/v2/api/clients/signer" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/api/clients/signer" + "github.com/ipfs-force-community/droplet/v2/models/repo" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" types2 "github.com/filecoin-project/venus/venus-shared/types" diff --git a/paychmgr/paych.go b/paychmgr/paych.go index 0d53e4d0..22e68a54 100644 --- a/paychmgr/paych.go +++ b/paychmgr/paych.go @@ -12,7 +12,7 @@ import ( "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/filecoin-project/venus/pkg/crypto" lpaych "github.com/filecoin-project/venus/venus-shared/actors/builtin/paych" diff --git a/paychmgr/settler/settler.go b/paychmgr/settler/settler.go index bf0397f7..7b84e53d 100644 --- a/paychmgr/settler/settler.go +++ b/paychmgr/settler/settler.go @@ -8,7 +8,7 @@ import ( "github.com/filecoin-project/venus/pkg/constants" "github.com/filecoin-project/venus/pkg/events" - "github.com/filecoin-project/venus-market/v2/paychmgr" + "github.com/ipfs-force-community/droplet/v2/paychmgr" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/venus/venus-shared/types" diff --git a/paychmgr/settler/stl.go b/paychmgr/settler/stl.go index 408ea476..62afbfca 100644 --- a/paychmgr/settler/stl.go +++ b/paychmgr/settler/stl.go @@ -5,8 +5,8 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/venus-market/v2/paychmgr" "github.com/filecoin-project/venus/venus-shared/types" + "github.com/ipfs-force-community/droplet/v2/paychmgr" "github.com/ipfs/go-cid" ) diff --git a/paychmgr/simple.go b/paychmgr/simple.go index a4bc66ec..08a9b37d 100644 --- a/paychmgr/simple.go +++ b/paychmgr/simple.go @@ -15,9 +15,9 @@ import ( init_ "github.com/filecoin-project/go-state-types/builtin/v10/init" - "github.com/filecoin-project/venus-market/v2/models/repo" types2 "github.com/filecoin-project/venus/venus-shared/types" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" ) // paychFundsRes is the response to a create channel or add funds request diff --git a/paychmgr/testing.go b/paychmgr/testing.go index 0e90db0c..c6210d6f 100644 --- a/paychmgr/testing.go +++ b/paychmgr/testing.go @@ -1,8 +1,8 @@ package paychmgr import ( - "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/models/repo" ds "github.com/ipfs/go-datastore" ds_sync "github.com/ipfs/go-datastore/sync" ) diff --git a/piecestorage/filestore.go b/piecestorage/filestore.go index b4c83ef7..31916710 100644 --- a/piecestorage/filestore.go +++ b/piecestorage/filestore.go @@ -13,8 +13,8 @@ import ( "github.com/filecoin-project/venus/pkg/util/fsutil" "github.com/filecoin-project/venus/venus-shared/types/market" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/utils" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/utils" ) type fsPieceStorage struct { diff --git a/piecestorage/filestore_test.go b/piecestorage/filestore_test.go index 9af38a07..447dec00 100644 --- a/piecestorage/filestore_test.go +++ b/piecestorage/filestore_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" "github.com/stretchr/testify/require" ) diff --git a/piecestorage/modules.go b/piecestorage/modules.go index 45d9267b..7c48a8d0 100644 --- a/piecestorage/modules.go +++ b/piecestorage/modules.go @@ -3,7 +3,7 @@ package piecestorage import ( "github.com/ipfs-force-community/venus-common-utils/builder" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" ) var SetupPieceStorageMetricsKey = builder.NextInvoke() diff --git a/piecestorage/s3.go b/piecestorage/s3.go index 45feb31e..7b739997 100644 --- a/piecestorage/s3.go +++ b/piecestorage/s3.go @@ -24,8 +24,8 @@ import ( "github.com/filecoin-project/venus/venus-shared/types/market" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/utils" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/utils" ) var log = logging.Logger("piece-storage") diff --git a/piecestorage/s3_test.go b/piecestorage/s3_test.go index 34ca09c3..c9d51ee5 100644 --- a/piecestorage/s3_test.go +++ b/piecestorage/s3_test.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" "github.com/stretchr/testify/assert" ) diff --git a/piecestorage/storagemgr.go b/piecestorage/storagemgr.go index e213f945..78e6621d 100644 --- a/piecestorage/storagemgr.go +++ b/piecestorage/storagemgr.go @@ -6,8 +6,8 @@ import ( "math/rand" "sync" - "github.com/filecoin-project/venus-market/v2/config" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/config" ) var ErrorNotFoundForRead = fmt.Errorf("not found for read") diff --git a/piecestorage/storagemgr_test.go b/piecestorage/storagemgr_test.go index d3787b02..e34cf5b2 100644 --- a/piecestorage/storagemgr_test.go +++ b/piecestorage/storagemgr_test.go @@ -8,7 +8,7 @@ import ( "github.com/filecoin-project/venus/venus-shared/types/market" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" "github.com/stretchr/testify/assert" ) diff --git a/retrievalprovider/client.go b/retrievalprovider/client.go index 30aba053..c7a1f635 100644 --- a/retrievalprovider/client.go +++ b/retrievalprovider/client.go @@ -14,7 +14,7 @@ import ( v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" "github.com/filecoin-project/venus/venus-shared/types" - "github.com/filecoin-project/venus-market/v2/paychmgr" + "github.com/ipfs-force-community/droplet/v2/paychmgr" ) type retrievalClientNode struct { diff --git a/retrievalprovider/datatransfer_handler.go b/retrievalprovider/datatransfer_handler.go index 439a7094..65a061d1 100644 --- a/retrievalprovider/datatransfer_handler.go +++ b/retrievalprovider/datatransfer_handler.go @@ -6,7 +6,7 @@ import ( datatransfer "github.com/filecoin-project/go-data-transfer" rm "github.com/filecoin-project/go-fil-markets/retrievalmarket" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/repo" ) // EventReceiver is any thing that can receive FSM events diff --git a/retrievalprovider/event_stream.go b/retrievalprovider/event_stream.go index e7c0abce..67b0aeea 100644 --- a/retrievalprovider/event_stream.go +++ b/retrievalprovider/event_stream.go @@ -5,11 +5,11 @@ import ( "github.com/ipfs-force-community/metrics" - "github.com/filecoin-project/venus-auth/jwtclient" + "github.com/ipfs-force-community/sophon-auth/jwtclient" - "github.com/ipfs-force-community/venus-gateway/marketevent" - "github.com/ipfs-force-community/venus-gateway/types" - "github.com/ipfs-force-community/venus-gateway/validator" + "github.com/ipfs-force-community/sophon-gateway/marketevent" + "github.com/ipfs-force-community/sophon-gateway/types" + "github.com/ipfs-force-community/sophon-gateway/validator" gatewayAPIV2 "github.com/filecoin-project/venus/venus-shared/api/gateway/v2" ) diff --git a/retrievalprovider/modules.go b/retrievalprovider/modules.go index 202f0c3d..b2ed6514 100644 --- a/retrievalprovider/modules.go +++ b/retrievalprovider/modules.go @@ -13,9 +13,9 @@ import ( "github.com/ipfs-force-community/venus-common-utils/builder" "github.com/ipfs-force-community/venus-common-utils/journal" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/dealfilter" - _ "github.com/filecoin-project/venus-market/v2/network" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/dealfilter" + _ "github.com/ipfs-force-community/droplet/v2/network" gatewayAPIV2 "github.com/filecoin-project/venus/venus-shared/api/gateway/v2" types "github.com/filecoin-project/venus/venus-shared/types/market" diff --git a/retrievalprovider/piecestore.go b/retrievalprovider/piecestore.go index 2e6215f0..89d9e7f1 100644 --- a/retrievalprovider/piecestore.go +++ b/retrievalprovider/piecestore.go @@ -8,9 +8,9 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-fil-markets/stores" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-market/v2/storageprovider" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/storageprovider" "github.com/ipfs/go-cid" ) diff --git a/retrievalprovider/piecestore_test.go b/retrievalprovider/piecestore_test.go index 2e81c1bf..4e60c7bf 100644 --- a/retrievalprovider/piecestore_test.go +++ b/retrievalprovider/piecestore_test.go @@ -11,8 +11,8 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/crypto" - "github.com/filecoin-project/venus-market/v2/models/repo" "github.com/google/uuid" + "github.com/ipfs-force-community/droplet/v2/models/repo" "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/assert" typegen "github.com/whyrusleeping/cbor-gen" @@ -23,9 +23,9 @@ import ( "github.com/ipfs/go-cid" - "github.com/filecoin-project/venus-market/v2/dagstore" + "github.com/ipfs-force-community/droplet/v2/dagstore" - "github.com/filecoin-project/venus-market/v2/models" + "github.com/ipfs-force-community/droplet/v2/models" ) func TestPieceInfo_GetPieceInfoByPieceCid(t *testing.T) { diff --git a/retrievalprovider/provider.go b/retrievalprovider/provider.go index b103f98c..ba683d0a 100644 --- a/retrievalprovider/provider.go +++ b/retrievalprovider/provider.go @@ -12,11 +12,11 @@ import ( rmnet "github.com/filecoin-project/go-fil-markets/retrievalmarket/network" "github.com/filecoin-project/go-fil-markets/stores" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-market/v2/network" - "github.com/filecoin-project/venus-market/v2/paychmgr" - "github.com/filecoin-project/venus-market/v2/piecestorage" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/network" + "github.com/ipfs-force-community/droplet/v2/paychmgr" + "github.com/ipfs-force-community/droplet/v2/piecestorage" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" "github.com/filecoin-project/venus/venus-shared/api/gateway/v2" diff --git a/retrievalprovider/provider_environments.go b/retrievalprovider/provider_environments.go index f488215a..cc94c025 100644 --- a/retrievalprovider/provider_environments.go +++ b/retrievalprovider/provider_environments.go @@ -17,7 +17,7 @@ import ( "github.com/filecoin-project/go-fil-markets/stores" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" ) diff --git a/retrievalprovider/requestvalidation.go b/retrievalprovider/requestvalidation.go index 927d9ad8..a9aff504 100644 --- a/retrievalprovider/requestvalidation.go +++ b/retrievalprovider/requestvalidation.go @@ -18,8 +18,8 @@ import ( selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" peer "github.com/libp2p/go-libp2p/core/peer" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" ) diff --git a/retrievalprovider/retrieval_handler.go b/retrievalprovider/retrieval_handler.go index e0854f09..eb6cc2c5 100644 --- a/retrievalprovider/retrieval_handler.go +++ b/retrievalprovider/retrieval_handler.go @@ -12,9 +12,9 @@ import ( rm "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-statemachine" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-market/v2/piecestorage" "github.com/filecoin-project/venus/venus-shared/api/gateway/v2" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/piecestorage" ) type IRetrievalHandler interface { diff --git a/retrievalprovider/revalidator.go b/retrievalprovider/revalidator.go index ee20d4bf..a8b10276 100644 --- a/retrievalprovider/revalidator.go +++ b/retrievalprovider/revalidator.go @@ -7,10 +7,10 @@ import ( datatransfer "github.com/filecoin-project/go-data-transfer" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-market/v2/paychmgr" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/paychmgr" "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-fil-markets/retrievalmarket/migrations" diff --git a/retrievalprovider/stream_handler.go b/retrievalprovider/stream_handler.go index d2f1d96a..4eec6290 100644 --- a/retrievalprovider/stream_handler.go +++ b/retrievalprovider/stream_handler.go @@ -8,12 +8,12 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/venus/venus-shared/types" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" "github.com/filecoin-project/go-fil-markets/retrievalmarket" rmnet "github.com/filecoin-project/go-fil-markets/retrievalmarket/network" "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/repo" ) var fakePaymentAddress = types.MustParseAddress("t00") diff --git a/rpc/piece_storage_server.go b/rpc/piece_storage_server.go index 6a9eb32c..d142994c 100644 --- a/rpc/piece_storage_server.go +++ b/rpc/piece_storage_server.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "github.com/filecoin-project/venus-market/v2/piecestorage" + "github.com/ipfs-force-community/droplet/v2/piecestorage" logging "github.com/ipfs/go-log/v2" ) diff --git a/rpc/piece_storage_server_test.go b/rpc/piece_storage_server_test.go index a2a2427e..b96e5b9f 100644 --- a/rpc/piece_storage_server_test.go +++ b/rpc/piece_storage_server_test.go @@ -9,8 +9,8 @@ import ( "net/http/httptest" "testing" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/piecestorage" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/piecestorage" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/rpc/rpc.go b/rpc/rpc.go index e21768f6..d113d622 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -15,9 +15,10 @@ import ( "github.com/multiformats/go-multiaddr" manet "github.com/multiformats/go-multiaddr/net" - "github.com/filecoin-project/venus-auth/jwtclient" + authconfig "github.com/ipfs-force-community/sophon-auth/config" + "github.com/ipfs-force-community/sophon-auth/jwtclient" - "github.com/filecoin-project/venus-market/v2/config" + "github.com/ipfs-force-community/droplet/v2/config" ) var log = logging.Logger("modules") @@ -99,7 +100,7 @@ func ServeRPC( func getLocalJwtClient(home config.IHome, apiCfg *config.API) (jwtclient.IJwtAuthClient, error) { if len(apiCfg.PrivateKey) == 0 { - secret, err := jwtclient.RandSecret() + secret, err := authconfig.RandSecret() if err != nil { return nil, err } diff --git a/storageprovider/client.go b/storageprovider/client.go index 4da9fb43..f488a242 100644 --- a/storageprovider/client.go +++ b/storageprovider/client.go @@ -21,11 +21,11 @@ import ( "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/exitcode" - "github.com/filecoin-project/venus-market/v2/api/clients" - "github.com/filecoin-project/venus-market/v2/api/clients/signer" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/fundmgr" - "github.com/filecoin-project/venus-market/v2/utils" + "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/api/clients/signer" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/fundmgr" + "github.com/ipfs-force-community/droplet/v2/utils" "github.com/ipfs-force-community/metrics" diff --git a/storageprovider/client_blockstore.go b/storageprovider/client_blockstore.go index c4405f3c..97bd590c 100644 --- a/storageprovider/client_blockstore.go +++ b/storageprovider/client_blockstore.go @@ -11,7 +11,7 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-fil-markets/stores" - "github.com/filecoin-project/venus-market/v2/imports" + "github.com/ipfs-force-community/droplet/v2/imports" ) // ProxyBlockstoreAccessor is an accessor that returns a fixed blockstore. diff --git a/storageprovider/datatransfer_handler.go b/storageprovider/datatransfer_handler.go index fdba1fb0..57c32d77 100644 --- a/storageprovider/datatransfer_handler.go +++ b/storageprovider/datatransfer_handler.go @@ -9,7 +9,7 @@ import ( "github.com/ipfs/go-cid" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/repo" ) var _ IDatatransferHandler = (*DataTransferHandler)(nil) diff --git a/storageprovider/deal_assigner.go b/storageprovider/deal_assigner.go index bc9cdf69..23f81ce0 100644 --- a/storageprovider/deal_assigner.go +++ b/storageprovider/deal_assigner.go @@ -11,8 +11,8 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/ipfs/go-cid" - "github.com/filecoin-project/venus-market/v2/models/repo" types "github.com/filecoin-project/venus/venus-shared/types/market" + "github.com/ipfs-force-community/droplet/v2/models/repo" ) type DealAssiger interface { diff --git a/storageprovider/deal_handler.go b/storageprovider/deal_handler.go index b4c2140c..d3bbb0be 100644 --- a/storageprovider/deal_handler.go +++ b/storageprovider/deal_handler.go @@ -32,12 +32,12 @@ import ( "github.com/filecoin-project/go-state-types/builtin/v10/miner" "github.com/filecoin-project/go-state-types/exitcode" - "github.com/filecoin-project/venus-market/v2/config" - marketMetrics "github.com/filecoin-project/venus-market/v2/metrics" - "github.com/filecoin-project/venus-market/v2/minermgr" - "github.com/filecoin-project/venus-market/v2/models/repo" - network2 "github.com/filecoin-project/venus-market/v2/network" - "github.com/filecoin-project/venus-market/v2/piecestorage" + "github.com/ipfs-force-community/droplet/v2/config" + marketMetrics "github.com/ipfs-force-community/droplet/v2/metrics" + "github.com/ipfs-force-community/droplet/v2/minermgr" + "github.com/ipfs-force-community/droplet/v2/models/repo" + network2 "github.com/ipfs-force-community/droplet/v2/network" + "github.com/ipfs-force-community/droplet/v2/piecestorage" vTypes "github.com/filecoin-project/venus/venus-shared/types" types "github.com/filecoin-project/venus/venus-shared/types/market" diff --git a/storageprovider/deal_publisher.go b/storageprovider/deal_publisher.go index ed940361..46c88202 100644 --- a/storageprovider/deal_publisher.go +++ b/storageprovider/deal_publisher.go @@ -15,9 +15,9 @@ import ( "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" - "github.com/filecoin-project/venus-market/v2/api/clients" - "github.com/filecoin-project/venus-market/v2/config" - types2 "github.com/filecoin-project/venus-market/v2/types" + "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/config" + types2 "github.com/ipfs-force-community/droplet/v2/types" "github.com/filecoin-project/venus/venus-shared/actors" marketactor "github.com/filecoin-project/venus/venus-shared/actors/builtin/market" diff --git a/storageprovider/deal_tracker.go b/storageprovider/deal_tracker.go index af61e6ca..2b4c5223 100644 --- a/storageprovider/deal_tracker.go +++ b/storageprovider/deal_tracker.go @@ -12,8 +12,8 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-fil-markets/storagemarket" - "github.com/filecoin-project/venus-market/v2/minermgr" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/minermgr" + "github.com/ipfs-force-community/droplet/v2/models/repo" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" vTypes "github.com/filecoin-project/venus/venus-shared/types" diff --git a/storageprovider/modules.go b/storageprovider/modules.go index ec541738..0ca9144f 100644 --- a/storageprovider/modules.go +++ b/storageprovider/modules.go @@ -19,11 +19,11 @@ import ( "github.com/ipfs-force-community/venus-common-utils/builder" "github.com/ipfs-force-community/venus-common-utils/journal" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/dealfilter" - "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/network" - "github.com/filecoin-project/venus-market/v2/utils" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/dealfilter" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/network" + "github.com/ipfs-force-community/droplet/v2/utils" "github.com/filecoin-project/venus/pkg/constants" types "github.com/filecoin-project/venus/venus-shared/types/market" diff --git a/storageprovider/provider.go b/storageprovider/provider.go index 42397eb5..99a62bb8 100644 --- a/storageprovider/provider.go +++ b/storageprovider/provider.go @@ -19,11 +19,11 @@ import ( "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/exitcode" - "github.com/filecoin-project/venus-market/v2/api/clients" - "github.com/filecoin-project/venus-market/v2/api/clients/signer" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/fundmgr" - "github.com/filecoin-project/venus-market/v2/utils" + "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/api/clients/signer" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/fundmgr" + "github.com/ipfs-force-community/droplet/v2/utils" "github.com/filecoin-project/venus/pkg/constants" vCrypto "github.com/filecoin-project/venus/pkg/crypto" diff --git a/storageprovider/storage_ask.go b/storageprovider/storage_ask.go index e1af98ce..826c259e 100644 --- a/storageprovider/storage_ask.go +++ b/storageprovider/storage_ask.go @@ -10,8 +10,8 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket/impl/storedask" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/venus-market/v2/api/clients/signer" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/api/clients/signer" + "github.com/ipfs-force-community/droplet/v2/models/repo" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" "github.com/filecoin-project/venus/venus-shared/types" diff --git a/storageprovider/storage_ask_test.go b/storageprovider/storage_ask_test.go index 6ad0b964..87a49007 100644 --- a/storageprovider/storage_ask_test.go +++ b/storageprovider/storage_ask_test.go @@ -8,9 +8,9 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/venus-market/v2/models" - "github.com/filecoin-project/venus-market/v2/models/badger" - "github.com/filecoin-project/venus-market/v2/utils/test_helper" + "github.com/ipfs-force-community/droplet/v2/models" + "github.com/ipfs-force-community/droplet/v2/models/badger" + "github.com/ipfs-force-community/droplet/v2/utils/test_helper" "github.com/stretchr/testify/require" ) diff --git a/storageprovider/storage_provider.go b/storageprovider/storage_provider.go index 0711110e..73b72e4d 100644 --- a/storageprovider/storage_provider.go +++ b/storageprovider/storage_provider.go @@ -34,13 +34,13 @@ import ( smnet "github.com/filecoin-project/go-fil-markets/storagemarket/network" "github.com/filecoin-project/go-fil-markets/stores" - "github.com/filecoin-project/venus-market/v2/api/clients" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/minermgr" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-market/v2/network" - "github.com/filecoin-project/venus-market/v2/piecestorage" - "github.com/filecoin-project/venus-market/v2/utils" + "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/minermgr" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/network" + "github.com/ipfs-force-community/droplet/v2/piecestorage" + "github.com/ipfs-force-community/droplet/v2/utils" types2 "github.com/filecoin-project/venus/venus-shared/types" types "github.com/filecoin-project/venus/venus-shared/types/market" diff --git a/storageprovider/storageprovider_test.go b/storageprovider/storageprovider_test.go index 22cf15d6..95157295 100644 --- a/storageprovider/storageprovider_test.go +++ b/storageprovider/storageprovider_test.go @@ -21,11 +21,11 @@ import ( "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/exitcode" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/minermgr" - "github.com/filecoin-project/venus-market/v2/models" - network2 "github.com/filecoin-project/venus-market/v2/network" - "github.com/filecoin-project/venus-market/v2/piecestorage" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/minermgr" + "github.com/ipfs-force-community/droplet/v2/models" + network2 "github.com/ipfs-force-community/droplet/v2/network" + "github.com/ipfs-force-community/droplet/v2/piecestorage" vCrypto "github.com/filecoin-project/venus/pkg/crypto" _ "github.com/filecoin-project/venus/pkg/crypto/bls" diff --git a/storageprovider/stream.go b/storageprovider/stream.go index 7ae569ad..b09d7eee 100644 --- a/storageprovider/stream.go +++ b/storageprovider/stream.go @@ -13,10 +13,10 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket/impl/providerutils" "github.com/filecoin-project/go-fil-markets/storagemarket/network" - "github.com/filecoin-project/venus-market/v2/api/clients" - "github.com/filecoin-project/venus-market/v2/config" - "github.com/filecoin-project/venus-market/v2/models/repo" - "github.com/filecoin-project/venus-market/v2/utils" + "github.com/ipfs-force-community/droplet/v2/api/clients" + "github.com/ipfs-force-community/droplet/v2/config" + "github.com/ipfs-force-community/droplet/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/utils" vTypes "github.com/filecoin-project/venus/venus-shared/types" types "github.com/filecoin-project/venus/venus-shared/types/market" diff --git a/storageprovider/transportconfigurer.go b/storageprovider/transportconfigurer.go index fef06f19..a65601b5 100644 --- a/storageprovider/transportconfigurer.go +++ b/storageprovider/transportconfigurer.go @@ -10,7 +10,7 @@ import ( "github.com/filecoin-project/go-fil-markets/storagemarket" "github.com/filecoin-project/go-fil-markets/stores" - "github.com/filecoin-project/venus-market/v2/models/repo" + "github.com/ipfs-force-community/droplet/v2/models/repo" ) type providerStoreGetter struct { diff --git a/tools/import-deal/main.go b/tools/import-deal/main.go index b87a96ac..060928de 100644 --- a/tools/import-deal/main.go +++ b/tools/import-deal/main.go @@ -9,7 +9,7 @@ import ( "gorm.io/driver/mysql" "gorm.io/gorm" - "github.com/filecoin-project/venus-market/v2/tools/import-deal/types" + "github.com/ipfs-force-community/droplet/v2/tools/import-deal/types" ) func ImportDealsToMysql(srcConn, conn string, nums int) error { @@ -43,7 +43,7 @@ func ImportDealsToMysql(srcConn, conn string, nums int) error { return err } - // venus-market deals + // droplet deals dstDb, err := gorm.Open(mysql.Open(conn)) if err != nil { return err diff --git a/tools/import-deal/types/types.go b/tools/import-deal/types/types.go index 41e3a4f8..0ef635ec 100644 --- a/tools/import-deal/types/types.go +++ b/tools/import-deal/types/types.go @@ -9,9 +9,9 @@ import ( "github.com/ipfs/go-cid" - "github.com/filecoin-project/venus-messager/models/mtypes" + "github.com/ipfs-force-community/sophon-messager/models/mtypes" - "github.com/filecoin-project/venus-market/v2/models/mysql" + "github.com/ipfs-force-community/droplet/v2/models/mysql" ) const (