Contextual task befor transaction
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- java
调研方向
Start by locating ContractInterface.beforeTransaction and SerializerInterface.toBuffer/fromBuffer, then inspect their implementations and tests. Trace how transaction parameters and Context are currently propagated; done means hooks and custom serializers can access the active Context and transaction inputs without ThreadLocal, with compatibility covered by tests.
由索引模型根据 Issue 内容生成。
描述
Current Status
ContractInterface.beforeTransaction receives the active Context, but not the parameters passed to the transaction method. The SerializerInterface methods (toBuffer and fromBuffer) do not receive a Context.
This prevents hooks and custom serializers from directly accessing both the transaction context and its input data. For example, a custom serializer that needs to perform Jakarta Bean Validation during deserialization cannot access the current Context through the API. A workaround is to pass it through a ThreadLocal and a custom Context implementation, relying on the shim's current thread-per-request behavior.
Expected
Contract hooks and custom serializers should be able to access the active transaction Context. The hook should also be able to inspect the parameters intended for the transaction method.
This would allow developers to perform shared parameter validation, make context-dependent decisions, and implement context-aware serialization without relying on ThreadLocal.
Solution
Consider adding the transaction parameters to the hook:
default void beforeTransaction(final Context ctx, final Object... params)
### Please let us know if you plan to work on this.
Yes!
- 主要语言
- Java
- 星标
- 322
- 派生
- 210
- 平均合并
- 15 小时 16 分钟
- 30 天内合并 PR
- 29
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
hyperledger/fabric-chaincode-java 的其他 Issue
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
hyperledger/fabric-chaincode-java#627 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 75/100
hyperledger/fabric-chaincode-java#626 ·
维护者通常 1 天内回复
-
bug
难度 3/5 1-2 天 新手友好度 68/100
hyperledger/fabric-chaincode-java#625 ·
维护者通常 1 天内回复
-
Read/write batching可能重新可做 @jadebluestar 于 119 天前认领,目前没有进行中的 PR。 未关闭enhancement help wanted
难度 4/5 3-5 天 新手友好度 45/100
hyperledger/fabric-chaincode-java#378 · 4 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 52/100
hyperledger/fabric-chaincode-java#372 ·
维护者通常 1 天内回复
查看 hyperledger/fabric-chaincode-java 的全部 Issue
相似的 Issue
-
Shaded google-api-client trust stores still include AAA Certificate Services (eMudhra CA compromise)未关闭
难度 2/5 1-3 小时 新手友好度 72/100
snowflakedb/snowflake-jdbc#2763 ·
-
难度 1/5 1 小时以内 新手友好度 79/100
java-native-access/jna#1746 ·
-
Pooled clients leak a connection per call: pipelines and transactions taken from UnifiedJedis are never closed可能已有人在做 @ali-jawad 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
-
kind:bug state:needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
OpenLineage/OpenLineage#5100 · 1 条评论 ·
维护者通常 4 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
adorsys/keycloak-config-cli#1709 ·
维护者通常 1 天内回复