【发布时间】:2019-03-23 21:27:04
【问题描述】:
我正在使用 hyperledger Fabric 和 Composer 启动我的区块链,我进行了 17000 多笔交易,但它在对等容器中花费了 1.8GB(~100KB/交易)。我计算了一笔交易的存储,可能只需要 1KB+。所以我的问题是结构如何将数据保存在分类帐中?
我使用了 rest-api 来查找我的记录,例如:
[
{
"$class": "org.chembeango.io.Compound",
"compoundId": "870-77-9",
"name": "3-acetyloxy-4-(trimethylazaniumyl)butanoate",
"smiles": "CC(=O)OC(CC(=O)[O-])C[N+](C)(C)C",
"cas": "870-77-9",
"source": "pubchem",
"location": "http://192.168.11.111:9200/compounds",
"owner": "resource:org.chembeango.io.CompoundParticipant#cp1@email.com"
},
{
"$class": "org.chembeango.io.Compound",
"compoundId": "pubchem-2",
"name": "(2-acetyloxy-3-carboxypropyl)-trimethylazanium",
"smiles": "CC(=O)OC(CC(=O)O)C[N+](C)(C)C",
"cas": "pubchem-2",
"source": "pubchem",
"location": "http://192.168.11.111:9200/compounds",
"owner": "resource:org.chembeango.io.CompoundParticipant#cp1@email.com"
},
...
每个事务可能会创建多个事件,但我认为这不会为每个事务花费如此大的存储空间。
我的频道的块配置是:
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 10
AbsoluteMaxBytes: 99 MB
PreferredMaxBytes: 512 KB
我在每个区块中创建 1 个交易,每个区块都有其最小大小吗?
【问题讨论】:
标签: hyperledger-fabric hyperledger-composer