Hyperledger Explorer 似乎显示不正确的块哈希
Hyperledger Explorer seems to display incorrect block hash
我正在对 Hyperledger Composer 的结构 (v1.0.4) 使用 Hyperledger Explorer,因此可以查看块数据。但是它们似乎不正确,例如:
#2 hash: 38afae3941a400149c8508f7d8e4a26bf938cf60dd3a6f4be602ec829f7115fd
previous: e4617a6446d30628b723206d3f0a0e61308e08dc5eef502bb4c87d228c1c4d10
#1 hash: 5db250d70a874db0fbe186b8c39f28b41d17cab09d5515284688844b8834ca19
previous: 3f9cb6a6c20d50b0c9908cfc9505832a30a39f253ba70409a7cb1b2b948ffd48
#0 hash: abc8d27b021ae9636ae379926a5a1a14b96fe9f4a04d9653c72a935c43bd087e
previous: (none indeed)
每个块的前一个哈希值与前一个块的哈希值不匹配。你观察到相同吗?这是对 data_hash 的误解吗?
谢谢!
查看块的内部结构,
{
header: {
number: {},
previous_hash: "e4617a6446d30628b723206d3f0a0e61308e08dc5eef502bb4c87d228c1c4d10",
data_hash: "38afae3941a400149c8508f7d8e4a26bf938cf60dd3a6f4be602ec829f7115fd"
},
data: {
data: []
},
metadata: {
metadata: []
}
}
data_hash只计算当前块的数据对象并写入其头部。不得与 currentBlockHash.
混淆
currentBlockHash A block hash is calculated by hashing over the concatenated ASN.1 encoded bytes of: the block number, previous block
hash, and current block data hash. It's the chain of the block hashs
that guarantees the immutability of the ledger
https://fabric-sdk-node.github.io/global.html#BlockchainInfo__anchor
currentBlockHash 将是下一个块的 previousBlockHash。
我正在对 Hyperledger Composer 的结构 (v1.0.4) 使用 Hyperledger Explorer,因此可以查看块数据。但是它们似乎不正确,例如:
#2 hash: 38afae3941a400149c8508f7d8e4a26bf938cf60dd3a6f4be602ec829f7115fd
previous: e4617a6446d30628b723206d3f0a0e61308e08dc5eef502bb4c87d228c1c4d10
#1 hash: 5db250d70a874db0fbe186b8c39f28b41d17cab09d5515284688844b8834ca19
previous: 3f9cb6a6c20d50b0c9908cfc9505832a30a39f253ba70409a7cb1b2b948ffd48
#0 hash: abc8d27b021ae9636ae379926a5a1a14b96fe9f4a04d9653c72a935c43bd087e
previous: (none indeed)
每个块的前一个哈希值与前一个块的哈希值不匹配。你观察到相同吗?这是对 data_hash 的误解吗?
谢谢!
查看块的内部结构,
{
header: {
number: {},
previous_hash: "e4617a6446d30628b723206d3f0a0e61308e08dc5eef502bb4c87d228c1c4d10",
data_hash: "38afae3941a400149c8508f7d8e4a26bf938cf60dd3a6f4be602ec829f7115fd"
},
data: {
data: []
},
metadata: {
metadata: []
}
}
data_hash只计算当前块的数据对象并写入其头部。不得与 currentBlockHash.
混淆currentBlockHash A block hash is calculated by hashing over the concatenated ASN.1 encoded bytes of: the block number, previous block hash, and current block data hash. It's the chain of the block hashs that guarantees the immutability of the ledger
https://fabric-sdk-node.github.io/global.html#BlockchainInfo__anchor
currentBlockHash 将是下一个块的 previousBlockHash。