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

[venus-shared] 针对api,有必要引入 版本、命名空间相关的预设内容 #4781

Closed
4 of 16 tasks
dtynn opened this issue Feb 17, 2022 · 0 comments
Closed
4 of 16 tasks
Labels
V-venus-shared infrastructure for venus modules
Milestone

Comments

@dtynn
Copy link
Contributor

dtynn commented Feb 17, 2022

Checklist

  • This is not a new feature or an enhancement to the Filecoin protocol. If it is, please open an FIP issue.
  • This is not brainstorming ideas. If you have an idea you'd like to discuss, please open a new discussion on the venus forum and select the category as Ideas.
  • I have a specific, actionable, and well motivated feature request to propose.

Venus component

  • venus daemon - [chain service] chain sync
  • venus auth - [chain service] authentication
  • venus messager - [chain service] message management (mpool)
  • venus gateway - [chain service] gateway
  • venus miner - [chain service] mining and block production
  • venus sealer/worker - sealing
  • venus sealer - proving (WindowPoSt)
  • venus market - storage deal
  • venus market - retrieval deal
  • venus market - data transfer
  • venus light-weight client
  • venus JSON-RPC API
  • Other

What is the motivation behind this feature request? Is your feature request related to a problem? Please describe.

希望达成的目标:

  1. 对于 venus-shared 中包含的接口相关代码,可以简洁地完成版本隔离
  2. 构造客户端、注册服务端时,不再需要手写类似 /rpc/v0Filecoin 这样的具体内容
  3. 对于使用者来说,使用 venus-shared 中提供的、具备版本信息的客户端构造方法,不会出现版本不匹配的情况,具体表现为:
    使用 gateway/v1 的客户端构造函数,但传入的 addrs 为 http://host:port/rpc/v0, 将有可能发生实际调用 v0 版本接口的情况
  4. 其他有助于简化配置、避免误用的场景

Describe the solution you'd like

  1. 提供版本、命名空间相关的常量
  2. 服务端、客户端构造过程中使用相同的常量和组合格式
  3. 构造客户端时使用的 addr 参数统一为 (http|https|ws|wss)://{host}:{port} 格式,由构造函数自行补充版本信息

Describe alternatives you've considered

No response

Additional context

No response

@Fatman13 Fatman13 added the V-venus-shared infrastructure for venus modules label Feb 18, 2022
@Fatman13 Fatman13 added this to the Sprint 34 milestone Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V-venus-shared infrastructure for venus modules
Projects
None yet
Development

No branches or pull requests

2 participants