Contextual task befor transaction
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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!
- Ngôn ngữ chính
- Java
- Star
- 322
- Fork
- 210
- Merge trung bình
- 15 giờ 16 phút
- Pull request đã merge (30 ngày)
- 29
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperledger/fabric-chaincode-java
-
Optimize ClassGraph ScanningĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
hyperledger/fabric-chaincode-java#627 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DataType nested classĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
hyperledger/fabric-chaincode-java#626 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
External Chaincode Mutual TLSĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
hyperledger/fabric-chaincode-java#625 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Read/write batchingCó thể làm lại được @jadebluestar đã nhận 118 ngày trước và không có pull request nào đang mở. Đang mởenhancement help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
hyperledger/fabric-chaincode-java#378 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Publish docs on pushĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
hyperledger/fabric-chaincode-java#372 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của hyperledger/fabric-chaincode-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
checkstyle/checkstyle#22145 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
rset command throws NPE in ResultsFormat.guessSyntaxCó thể đã có người làm @Ostrzyciel đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
objectionary/eo#9593 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100