Bundling Node.js chaincode for offline install
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript, node.js
- 领域
- blockchain
调研方向
从 issue 的打包流程开始:npm install、peer 生命周期 package,以及正文中引用的 fabric-chaincode-node start bootstrap。比较两种提议的方法——手动创建 tarball 和使用 esbuild 进行 bundling——并查看 #197 中的讨论。完成标准是为 Node.js chaincode 确定并记录一条简单且受支持的离线安装路径。
由索引模型根据 Issue 内容生成。
描述
Node.js chaincode build containers require access to the npm registry when installing chaincode.
This becomes an issue for peers that are "offline" (e.g. peers from cloud providers) and do not have access to the npm registry. Simply running "npm install" before packaging chaincode with "peer lifecycle package" does not solve the problem alone, since the package command ignores the node_modules directory.
We have identified two possible ways to solve this:
- Creating the tarball package manually without using "peer lifecycle package".
- Bundling the application (e.g. with esbuild) before packaging it with "peer lifecycle package".
While the first option works fine, it does make the process of deploying Node.js chaincode a lot more complex than deploying Go or Java chaincode. We would therefore prefer the second option, however, we are still required to add fabric-shim as a module outside the bundle, so that "fabric-chaincode-node start" is available when bootstrapping the chaincode.
Would it be possible to start the application without requiring "fabric-chaincode-node start" as an external script, e.g. by calling the bootstrap function in the chaincode's index.js instead?
Are there any other simple ways to solve this that I've missed or is manually creating the tarball the suggested approach for now?
This issue was also discussed in #197 but seems unresolved
- 主要语言
- JavaScript
- 星标
- 262
- 派生
- 147
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
hyperledger/fabric-chaincode-node 的其他 Issue
-
Read/write batching可能重新可做 @Vineet1101 于 250 天前认领,目前没有进行中的 PR。 未关闭enhancement help wanted
hyperledger/fabric-chaincode-node#453 · 7 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
hyperledger/fabric-chaincode-node#422 · 4 条评论 ·
查看 hyperledger/fabric-chaincode-node 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 63/100
oskarrough/dodgethis#115 ·
维护者通常 1 天内回复
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefix可能已有人在做 @ItsDeadlyProgrammer 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
appsmithorg/appsmith#42471 · 1 条评论 ·
维护者通常 2 天内回复
-
external-plugin requires-submitter-fixes
难度 2/5 1-3 小时 新手友好度 78/100
github/awesome-copilot#5396 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
chenasraf/nextcloud-forum#348 ·
-
needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
melodic-software/claude-code-plugins#9619 ·
维护者通常 1 天内回复