我使用hyperledger Fabric和Composer启动我的区块链,我进行17000+事务,但它在对等容器中花费1.8 of (约100KB/事务).I计算了一个事务的存储,这可能只花费1KB+。所以我的问题是fabric如何将数据保存在账本中?
我使用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我在每个块中创建一个事务,每个块都有它的最小大小吗?
发布于 2018-10-23 13:25:50
我发现了我的问题,我在我的logic.js中添加了查询功能,比如
const validateActions = await query('selectAllValidateActions');我跟踪了块文件,发现日志是:
,Asset:org.chembeango.io.ValidateAction96�
3
,Asset:org.chembeango.io.ValidateAction96�
3
,Asset:org.chembeango.io.ValidateAction96�
3
,Asset:org.chembeango.io.ValidateAction96�
3
,Asset:org.chembeango.io.ValidateAction96�
3
,Asset:org.chembeango.io.ValidateAction96�
3
,Asset:org.chembeango.io.ValidateAction96�
3
,Asset:org.chembeango.io.ValidateAction96�
3
,Asset:org.chembeango.io.ValidateAction96�
3
,Asset:org.chembeango.io.ValidateAction96�
...也许事务会将我所有的查询结果都记录到账本中。
所以账本保存了很多无用的信息。
但是为什么composer查询结果可能会保存到账本中呢?
https://stackoverflow.com/questions/52884709
复制相似问题