我是HF的新手,我应该为一个大学项目学习这个平台。分配的第一件事是了解Fabric源,特别是查找块创建的位置,以及可以以何种方式更改用于块创建的默认哈希函数。
我发现了一些可能是感兴趣的部分的文件,但我是新的平台,我真的不知道从哪里可以得到这样的信息。
我找到了这个:
有什么帮助吗?谢谢。
发布于 2018-10-02 08:12:54
我找到了解决办法。
这样做是可能的,可以通过在
protos/common/block.go(如我在帖子中所说的那样,存档;)
发布于 2018-09-06 03:23:28
根据文档,目前SHA256是唯一有效的算法。有些地方被硬编码了。
但是,您可以做一些实验,下面是您可能要研究的一些配置位置-- 同侪和订货人节点的BCCSP配置以及信道配置散列算法部分。
BCCSP配置区块链密码服务提供商。
BCCSP:
# Default specifies the preferred blockchain crypto service provider
# to use. If the preferred provider is not available, the software
# based provider ("SW") will be used.
# Valid providers are:
# - SW: a software based crypto provider
# - PKCS11: a CA hardware security module crypto provider.
Default: SW
# SW configures the software based blockchain crypto provider.
SW:
# TODO: The default Hash and Security level needs refactoring to be
# fully configurable. Changing these defaults requires coordination
# SHA2 is hardcoded in several places, not only BCCSP
Hash: SHA2
Security: 256
# Location of key store. If this is unset, a location will be
# chosen using: 'LocalMSPDir'/keystore
FileKeyStore:
KeyStore:https://stackoverflow.com/questions/52194196
复制相似问题