Giter VIP home page Giter VIP logo

droplet's People

Contributors

0x5459 avatar cloudxin avatar denniszou avatar dependabot[bot] avatar diwufeiwen avatar dtynn avatar elvin-du avatar fatman13 avatar hunjixin avatar linzexiao avatar remakezk avatar simlecode avatar ta0li avatar xiaomdong avatar zl03jsj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

droplet's Issues

support setting fastretrieval / 支持设置 fastretrieval

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Description / 描述

If fastretrieval = false, delete the piece file after sealing is completed. When the user retrieves it, it triggers the unsealing process. / 如果 fastretrieval = false,密封完成后删除 piece 文件, 用户检索时,并触发 unseal 流程。

It take a long time to resume / 重启时间较长

Summary

Drople 重启的时候 有一个查询花了比较长的时间

Log

2023-07-04T09:48:55.254+0800	INFO	modules	rpc/rpc.go:99	start rpc listen /ip4/0.0.0.0/tcp/41240

2023/07/04 09:48:59 /root/droplet/models/mysql/storage_deal.go:405 SLOW SQL >= 200ms
[4098.379ms] [rows:34326] SELECT * FROM `storage_deals` WHERE cdp_provider='02002688' AND state in (7)

2023/07/04 09:52:06 /root/droplet/models/mysql/storage_deal.go:478 SLOW SQL >= 200ms
[191476.179ms] [rows:1527454] SELECT * FROM `storage_deals` LIMIT 2147483647

[droplet] 检索时,channel被取消状态没有更新

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Version / 版本

v2.8.1

Describe the Bug / 描述

image 当检索订单任务被取消时,订单检索的状态应该改成DealStatusCancelled

Logging Information / 日志

-

Repo Steps / 重现步骤

No response

get deal by deal id /通过 订单 id 获取订单

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Description / 描述

有时候可能只知道 deal id ,但是不知道 订单id ,这个时候能通过订单 id 获取订单就比较重要

release v2.8.2

计划包含以下功能:

升级文档

目前 droplet dagstore 中 shard 和 topIndex 都保存在 badger 中,如果不同时间向有多个 droplet 检索同一个订单,
就可能会造成重复生成索引的问题,为了解决这个问题,打算把 shard 保存到 MySQL 数据库中,把 topIndex 存储到 MongoDB 中,这样多个 droplet 可以共享。

迁移 shard

需要把存储在 badger 的 shard 迁移到 MySQL,droplet 提供了迁移工具:https://github.com/ipfs-force-community/droplet/tree/master/tools/index#%E8%BF%81%E7%A7%BB%E7%B4%A2%E5%BC%95

生成索引

可能有部分 piece 没有生成索引,就需要为这部分 piece 重新生成索引,droplet 提供了生成索引的工具:https://github.com/ipfs-force-community/droplet/tree/master/tools/index#%E7%94%9F%E6%88%90%E7%B4%A2%E5%BC%95

droplet-client query 网络不通会一直卡住

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Version / 版本

droplet-client version v2.9.0+git.0a23f46

Describe the Bug / 描述

droplet-client query 网络不通会一直卡住,不会返回正确的错误信息

./droplet-client storage asks query t01504

Logging Information / 日志

2023-09-15T14:21:50.251+0800	DEBUG	swarm2	swarm/limiter.go:201	[limiter] clearing all peer dials: 12D3KooWFviV912XCwYoB8BhhZWjooFUmTS1tBXa3aFXfeFNNZSU
2023-09-15T14:22:36.596+0800	WARN	storagemarket_network	network/libp2p_impl.go:92	open stream to 12D3KooWFviV912XCwYoB8BhhZWjooFUmTS1tBXa3aFXfeFNNZSU canceled by context
2023-09-15T14:22:36.596+0800	WARN	rpc	[email protected]/handler.go:456	error in RPC call to 'VENUS_MARKET_CLIENT.ClientQueryAsk': failed to open stream to miner:
    github.com/filecoin-project/go-fil-markets/storagemarket/impl.(*Client).GetAsk
        /root/go/pkg/mod/github.com/ipfs-force-community/[email protected]/storagemarket/impl/client.go:222
  - open stream to 12D3KooWFviV912XCwYoB8BhhZWjooFUmTS1tBXa3aFXfeFNNZSU canceled by context:
    github.com/filecoin-project/go-fil-markets/shared.(*RetryStream).OpenStream
        /root/go/pkg/mod/github.com/ipfs-force-community/[email protected]/shared/retrystream.go:99
2023-09-15T14:22:36.596+0800	ERROR	rpc	[email protected]/websocket.go:127	handle me:websocket: close sent

Repo Steps / 重现步骤

  1. 找一个网络不通的矿工
  2. ./droplet-client storage asks query t01504
  3. 持续卡住不会返回正确的错误信息

[droplet-client] 下单报query ask failed。

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Version / 版本

droplet-client version v2.8.0+git.dacf390

Describe the Bug / 描述

在设置了下单价格且钱包地址注册到gateway的前提下进行下单,报错:Error: failed to query ask: bls signature failed to verify

Logging Information / 日志

./droplet-client data import 9.png
Import 1692865190720248675, Root bafykbzacecnpkfnjutdjthm2yveylbg3xw3exkilzi6w5uuuiearjfrdvobu4
root@calib-venus-132:~/droplet#  ./droplet-client storage deals init
Data CID (from droplet-client data import): bafykbzacecnpkfnjutdjthm2yveylbg3xw3exkilzi6w5uuuiearjfrdvobu4
.. calculating data size
PieceCid:  baga6ea4seaqfwtemwtlpiil73z3fnrelflmldtjwumd7uq52ydoobokt7b2hgaa  PayLoadSize: 40162647 PieceSize: 67108864
Deal duration (days): 380
Miner Addresses (f0.. f0..), none to find: f023456
.. querying miner asks
Error: failed to query ask: bls signature failed to verify

Repo Steps / 重现步骤

./droplet-client data import xxx
./droplet-client storage deals init
Data CID (from droplet-client data import): xxx
PieceCid: baga6ea4seaqfwtemwtlpiil73z3fnrelflmldtjwumd7uq52ydoobokt7b2hgaa PayLoadSize: 40162647 PieceSize: 67108864
Deal duration (days): 380
Miner Addresses (f0.. f0..), none to find: f023456
.. querying miner asks
Error: failed to query ask: bls signature failed to verify

升级 Venus 到最新版本

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Description / 描述

需要把依赖的 Venus 升级到最新版本

  1. 升级 Venus 及相关智子组件
  2. 升级 go-data-transfer 到 v2 版本
  3. 调整 storage 和 retrieval 的处理逻辑
  4. 测试发单和检索

[droplet] storage deal 展示信息调整

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Description / 描述

需要显示出deal_id对应的sector_id、是否为DC订单及将订单生命周期由高度改为天数。
droplet storage deal list

ProposalCid  DealId  State              PieceState  Client                                     Provider  Size   Price  Duration
...rtvij444  89836   StorageDealActive  Proving     t15eda5pnz7q3ycwbbpp5xl43nrzmed3am4gyiedi  t01037    32GiB  0 FIL  864000

droplet storage deal list

ProposalCid  Piece                  State              DealId Sector IsVerified PieceState  Client        Provider  Size   Price  days
...rtvij444  baga6e...vb7ba3apsdoba StorageDealActive  89836  100    true       Proving     ....am4giedi  t01037    32GiB  0 FIL  210

add more metrics / 添加更多metrics

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Description / 描述

为了更好的监控,运维,添加如下metrics:

组件名称 指标 label value name
droplet api接口启动状态 \ 0或1来表示是否正常启动 api/state
droplet 检索计数   检索计数 (0:fail,1:succeed) retrieval/transfer_event
droplet dagstore list-shards中不同状态piece数量 \ piece数量 shard/num

缺乏重新启动出错订单的机制

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Version / 版本

v2.8.1

Describe the Bug / 描述

订单上链之后,如果失败了,修复错误之后,重置订单状态就可以继续进行
但是缺乏一个重新让订单启动的 命令

Logging Information / 日志

Repo Steps / 重现步骤

No response

Check if http retrieval follows the spec / 检查 http 检索是否符合 spec 要求

PL 的 xinan xu 最近在负责 retrieval bot 这一块。retrieval bot 主要用于 f+ 的检索检索检查。如果检查效果不好,有可能被拒绝 ldn 的申请。水滴这边主要以满足 http 检索功能为主。Spec 虽然没有写进 filecoin 的 spec,现阶段可能也没有办法。

Spec

讨论

xinan xu 说有问题的话可以问他。

http检索支持共用rpc端口可能有安全隐患

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Description / 描述

droplet 支持http是一个非常好的idea,但发现这个功能共用了rpc端口,rpc服务功能比较多,而且可以操作钱包签名,一般是内部人员使用,不会把端口直接爆漏在公网, 虽然有鉴权机制,但从安全性角度来说,检索应该独立一个服务实现,检索毕竟属于公开的服务,不需要鉴权,不应该跟内部功能性的rpc共用端口,所以建议把检索服务独立一个http单独去实现。

[droplet-client] 支持 Client 离线计算 commP

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Description / 描述

1、提供离线的droplet-client data commP计算功能;
2、提供离线droplet-client上car文件与piece文件相互转换功能。

[droplet-cllient] 缺少回收Datacap功能

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Description / 描述

缺少RemoveExpiredAllocations方法,用于回收过期的订单的DC配额;

lotus filplus
NAME:
lotus filplus - Interact with the verified registry actor used by Filplus

USAGE:
lotus filplus command [command options] [arguments...]

COMMANDS:
grant-datacap give allowance to the specified verified client address
list-notaries list all notaries
list-clients list all verified clients
check-client-datacap check verified client remaining bytes
check-notary-datacap check a notary's remaining bytes
sign-remove-data-cap-proposal allows a notary to sign a Remove Data Cap Proposal
list-allocations List allocations made by client
remove-expired-allocations remove expired allocations (if no allocations are specified all eligible allocations are removed)
help, h Shows a list of commands or help for one command

OPTIONS:
--help, -h show help (default: false)

[droplet] 通过命令添加完存储,必须重启droplet才能检索到数据

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Version / 版本

droplet version v2.8.1+git.8fb315f

Describe the Bug / 描述

droplet piece-storage add-fs --name test-file --path /opt/test-fil
添加完存储路径,再尝试使用HTTP方式检索无法获取到数据。

curl http://127.0.0.1:41235/piece/baga6ea4seaqxxxxxxf33gkeq --output /tmp/test

Logging Information / 日志

Error: unable to find piece baga6ea4seaqxxxxxxf33gkeq: not found for read

Repo Steps / 重现步骤

No response

support http retrieve / 支持 http 检索

  1. 需要支持 boost 的检索协议 /fil/retrieval/transports/1.0.0,因为 RetrievalBot 会检查是否支持该协议,也是通过该协议返回对应的 URL 相关信息
  2. 支持按 piece cid 来检索

数据库记录查询延迟

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Description / 描述

droplet 市场交易 数据库记录查询延迟过高 需要优化查询sql优化
image

market-client can limit the number of days per order

When the market client places an order, there is no limit on the number of days to place an order; The default real order is stored for a minimum of 180 days and a maximum of 540 days.

market-client deal
/root/.marketclient
Data CID (from lotus client import): bafykbzaceciyctgphnwj6sxashn55puodo62bk4n4kkqhgw4fwkchbvq2qlw
.. calculating data size
PieceCid: baga6ea4seaqhcwxs566wheq7yn5evm22xtpiv6usnqtou44vbz2zsfdmeyiaeq PayLoadSize: 13959883139 PieceSize: 17179869184
Deal duration (days): 999999999999999999
Miner Addresses (f0.. f0..), none to find: f01111
.. querying miner asks
Proposing from f3v5shsytrnz7ycr7ou4yxq2nf2xm34idnvfgnm6wyru7lrmu2ykuvtte2hq6rk2v3qttrsysvssr42cxt6a
Balance: 13762.152500344563313485 FIL

Piece size: 16GiB (Payload size: 13GiB)
Duration: 1942802h0m29.571268608s
Total price: ~1.86508992 FIL (0.000000008 FIL per epoch)
Verified: false

Accept (yes/no): yes
.. executing
Deal (f019411) CID: bafyreihxyph3pqm47teqtzqkdbs6nmpjkuu74jjcb2esidklrmzesw6le

[droplet] 线下模式,不连接sophon-auth会报错

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Version / 版本

droplet version v2.8.1+git.8fb315f

Describe the Bug / 描述

线下模式中,damocles-manager直连droplet日志一直报错

Logging Information / 日志

2023-08-05T19:17:12.996+0800    ERROR   rpc     [email protected]/server.go:99  RPC Error: (error code 0) fatal error calling 'VENUS_MARKET.ListenMarketEvent': panic in rpc method 'VENUS_MARKET.ListenMarketEvent': runtime error: invalid memory address or nil pointer dereference: error code 0
2023-08-05T19:17:12.996+0800    WARN    rpc     [email protected]/server.go:105 rpc error: (error code 0) fatal error calling 'VENUS_MARKET.ListenMarketEvent': panic in rpc method 'VENUS_MARKET.ListenMarketEvent': runtime error: invalid memory address or nil pointer dereference: error code 0
2023-08-05T19:17:13.394+0800    ERROR   rpc     [email protected]/handler.go:306        panic in rpc method 'VENUS_MARKET.ListenMarketEvent': runtime error: invalid memory address or nil pointer dereference
github.com/filecoin-project/go-jsonrpc.doCall.func1
        /root/go/pkg/mod/github.com/ipfs-force-community/[email protected]/handler.go:306
runtime.gopanic
        /usr/local/go/src/runtime/panic.go:890
runtime.panicmem
        /usr/local/go/src/runtime/panic.go:260
runtime.sigpanic
        /usr/local/go/src/runtime/signal_unix.go:839
github.com/ipfs-force-community/sophon-auth/jwtclient.(*AuthClient).MinerExistInUser
        /root/go/pkg/mod/github.com/ipfs-force-community/[email protected]/jwtclient/auth_client.go:377
github.com/ipfs-force-community/sophon-gateway/validator.(*AuthMinerValidator).Validate
        /root/go/pkg/mod/github.com/ipfs-force-community/[email protected]/validator/miner_validator.go:29
github.com/ipfs-force-community/sophon-gateway/marketevent.(*MarketEventStream).ListenMarketEvent
        /root/go/pkg/mod/github.com/ipfs-force-community/[email protected]/marketevent/market_event.go:59
github.com/ipfs-force-community/droplet/v2/api/impl.(*MarketNodeImpl).ListenMarketEvent
        /opt/venus-market/api/impl/venus_market.go:122
reflect.Value.call
        /usr/local/go/src/reflect/value.go:584
reflect.Value.Call
        /usr/local/go/src/reflect/value.go:368
github.com/filecoin-project/venus/venus-shared/api/permission.PermissionProxy.func1
        /root/go/pkg/mod/github.com/filecoin-project/[email protected]/venus-shared/api/permission/permission.go:51
github.com/filecoin-project/venus/venus-shared/api/market/v1.(*IMarketStruct).ListenMarketEvent
        /root/go/pkg/mod/github.com/filecoin-project/[email protected]/venus-shared/api/market/v1/proxy_gen.go:262
reflect.Value.call
        /usr/local/go/src/reflect/value.go:584
reflect.Value.Call
        /usr/local/go/src/reflect/value.go:368
github.com/filecoin-project/go-jsonrpc.doCall
        /root/go/pkg/mod/github.com/ipfs-force-community/[email protected]/handler.go:310
github.com/filecoin-project/go-jsonrpc.(*handler).handle
        /root/go/pkg/mod/github.com/ipfs-force-community/[email protected]/handler.go:435
2023-08-05T19:17:13.395+0800    ERROR   rpc     [email protected]/server.go:99  RPC Error: (error code 0) fatal error calling 'VENUS_MARKET.ListenMarketEvent': panic in rpc method 'VENUS_MARKET.ListenMarketEvent': runtime error: invalid memory address or nil pointer dereference: error code 0

Repo Steps / 重现步骤

No response

index adjustments and fixes / 调整水滴索引生成和使用

问题

  1. 已生成的索引还需检查是否生成 topIndex,若未生成还需生成后写入到 MongoDB
  2. shard 由于本地存储不能共享问题

topIndex 主要是在查某一段数据的时候会用到,使用 MongoDB 存储,方便所有 droplet 共享

解决

对于上面的问题 2,shard 支持存储到 MySQL

dagstore

调整 dagstore 库 管理 shard 的接口

工具

  • 给 piece 生成索引
  • 根据索引生成 shard,shard 支持存储在 badger 或者 MySQL
  • 根据索引生成 topIndex,topIndex 支持写入到 badger 和 MongoDB

market-client usage problems

After the wrong miner number for the first time, enter the correct check failure again

./market-client deal
/root/.marketclient
Data CID (from lotus client import): 540
Error: parsing cid string: selected encoding not supported
Data CID (from lotus client import): bafykbzacebfy3lbvxvgfnzc3fd5wpugtqf4gyb67hywifks3zdtczemzsbfg
.. calculating data size
PieceCid: baga6ea4seaqmobo7ajlhdrwozyrb7fhx6ey7j22yfj5t4uzlbivbz5a5yufiygy PayLoadSize: 13495574905 PieceSize: 17179869184
Deal duration (days): 530
Miner Addresses (f0.. f0..), none to find: f01941
.. querying miner asks
Error: failed to get peerID for miner: failed to load miner actor state: unknown actor code bafkqadlgnfwc6nrpmfrwg33vnz2a
Miner Addresses (f0.. f0..), none to find: f019111

支持 Direct data onboarding

Droplet / 水滴

  • droplet
  • droplet-client
  • 文档 / docs

Description / 描述

Direct data onboarding 一种新的 deal 模式。

droplet client

  1. piece 管理,用来管理切割出来的piece,并存储到数据库,方便 direct deal 发单时使用
    • 导入 piece
    • 列出 piece
  2. 发布 direct deal
    • 支持同时给多个矿工发单
    • 支持根据手动输入的piece信息
    • 支持根据已存储的 piece 信息发单
  3. 查询 direct deal 分配情况

droplet

  1. 导入 direct deal,类似离线订单的导入
    • 支持不计算 commP
    • 支持不把 piece 拷贝到 piece storage,方便孵化器使用
  2. 存储 direct deal,需要更新订单状态?
  3. 为 direct deal 生成索引?
  4. droplet 与 damocles 的交互是否需要调整?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.