Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

支持本地solo模式的market #357

Closed
wants to merge 2 commits into from

Conversation

litai686
Copy link

@litai686 litai686 commented Jul 30, 2022

关联的Issues (Related Issues)

让cluster 支持 solo模式的market
1、由于目前链服务模式的market可能会在外网,当客户端发送deals给miner的时候,需要通过链服务中转传输到cluster,这个过程目前不是很稳定
2、当market在链服务端时,SP是没办法看到订单的状态,这样很不友好,所以market在本地更便于SP查看订单状态

改动 (Proposed Changes)

附注 (Additional Info)

自查清单 (Checklist)

在你认为本 PR 满足被审阅的标准之前,需要确保 / Before you mark the PR ready for review, please make sure that:

  • 具有清晰明确的 commit message / All commits have a clear commit message.
  • 包含必要的测试用例 / This PR has tests for new functionality or change in behaviour
  • 包含必要的指南或文档 / If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included
  • 通过必要的检查项 / All checks are green

@dtynn
Copy link
Contributor

dtynn commented Aug 1, 2022

非常感谢你的pr。提供“例外”部署的能力,是一个非常好的建议。

但是经过评估,我们更倾向于采用类似 lotus#ParseApiInfos 所采用的策略,为所有组件提供独立于“全家桶”之外的、独立部署的可能性。
因此,我们暂定不接受本pr中包含的做法。

我们开启了一个关注这个话题的 issue,并将通过那个 issue 进行任务的跟踪。
如果你感兴趣,非常欢迎在该 issue 中发起讨论,或发起pr

@litai686
Copy link
Author

litai686 commented Aug 1, 2022

好的,另外我没理解为啥需要多抽出一个message组件和gateway组件,正常的逻辑应该是,venus-cluster构造消息,然后通过本地walllet签名,最后把签名好的消息推向全节点,整个业务就完成了,麻烦项目组能解释下目前message组件和gateway组件分离的思路。谢谢

@dtynn
Copy link
Contributor

dtynn commented Aug 1, 2022

好的,另外我没理解为啥需要多抽出一个message组件和gateway组件,正常的逻辑应该是,venus-cluster构造消息,然后通过本地walllet签名,最后把签名好的消息推向全节点,整个业务就完成了,麻烦项目组能解释下目前message组件和gateway组件分离的思路。谢谢

关于 venus-messager

众所周知,如果要确定性地签名一条消息,需要此消息是一个完全体,意味着:

  1. 具备消息必备的基础信息
  2. 已经分配 nonce
  3. 已经完成 gas 相关的字段赋值

之所以不直接在本地构造消息完全体,出于以下几点考虑:

  1. venus-messager 能供提供更丰富、准确的消息字段填充策略,如 Gas 预估和控制、nonce 值分配等。
  2. venus-messager 可以提供更丰富的消息推送机制,如按批次推送/单批限量、异常消息剔除、过期消息剔除等

venus-cluster 很乐于借重 venus-messager 已有的这些能力来优化消息的发送、上链流程。

关于 venus-wallet

除了依赖 venus-messager 的情况下,天然不需要直接与 wallet 打交道之外,venus-cluster 在设计过程中就考虑过一定程度的多租户/托管模式,这意味着生产机器与密钥控制者在物理空间上可能并不处于同一位置,同时:
由于除了签名消息以外, mining、client deals 、storage ask 等常见的形为的存在, 独立的、与venus组件交互的 wallet 几乎必然存在。
因此,venus-clsuter 不考虑与 wallet 组件直接交互。

以上,就是对 venus-cluster 为什么依赖 venus-messager 以及为什么不依赖 wallet 的简单阐述。

关于 gateway

存、算和链的分离是 venus 及相关组件的设计意图之一。
gateway 是用来交换一些需要 SP 响应的链上事件的组件。例如,在获得出块权的情况下,进行 winning post 等。
目前,可以简单认为 venus-cluster 引入gateway 是因为它需要提供 mining 的功能。后续如果再进行功能的细分,独立出专门的 mining / window post 组件,那么完全退化成算力封装调度的 venus-sector-manager 也可以考虑去掉 gateway 的依赖

@dtynn dtynn added this to the v0.5.0 milestone Aug 2, 2022
@dtynn
Copy link
Contributor

dtynn commented Aug 3, 2022

supported in #361
thx for the brilliant idea @litai686

@dtynn dtynn closed this Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants