Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Contextual task befor transaction

オープン
#628 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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 の本文から書いたものです。

説明

enhancement
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分
マージ済み PR(30日)
29

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hyperledger/fabric-chaincode-java のほかの issue

hyperledger/fabric-chaincode-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。