hyperledger / hyperledger/fabric

Block Header Metadata Modification, Changing the Transaction Flow

Open
#4,218 14 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
16.7k
Forks
9.1k
Avg merge
5h 38m
Merged PRs (30d)
26

Description

Hello,

Apologies if this issue seems out of place, but I am seeking guidance from anyone actively involved in maintaining the Hyperledger Fabric project or well-versed in its codebase. I have previously addressed several questions on Discord and received responses to few of them.

I am using the Hyperledger Fabric v2.2 branch.

I am currently looking to implement an additional structure within each block's header. This would facilitate efficient querying of the transaction history by checking each block's header before executing the `getHistoryForKey()` function. This process would verify if the key being searched for exists within the specified block, potentially minimizing the time required for queries.

Thus far, I have modified `common.pb.go` to include a new field added to the Block's Header. Following that, I have updated `orderer/common/multichannel/blockwriter.go` to incorporate the logic necessary to create a bloom-filter like structure with each new block, through modifications to the `func (bw *BlockWriter) CreateNextBlock(messages []*cb.Envelope) *cb.Block {}` function.

However, I'm at an impasse when it comes to modifying how queries are processed. My initial plan was to design a new method based on `.getHistoryForKey` and incorporate a check within this method. Unfortunately, I have been unable to locate where `.getHistoryForKey()` is defined.

Could you provide guidance on the most efficient approach to implementing what I have outlined above? Your expertise and input would be greatly appreciated.

Thank you,

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.