Skip to content

Commit

Permalink
* add sample of evidenc in FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
junqizhang-dev committed May 22, 2020
1 parent b396c3b commit ea7157d
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
8 changes: 7 additions & 1 deletion readthedocs/zh_CN/docs/faq-java.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,10 @@ Control)。此外,在一个不需要token的区块链世界里,tx.origin

- **同一个节点证书node.crt,是否可以放到不同的节点上?**

不可以。每个节点证书都有一个唯一的node id,作为节点的唯一标识,不同的节点不能用相同的node id,如果把一个node.crt放到多个节点上,由于node id的冲突,会导致链直接起不来。
不可以。每个节点证书都有一个唯一的node id,作为节点的唯一标识,不同的节点不能用相同的node id,如果把一个node.crt放到多个节点上,由于node id的冲突,会导致链直接起不来。


--------------



45 changes: 44 additions & 1 deletion readthedocs/zh_CN/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Credential的重新生成则为重新发行一个Credential ID不相同的全新
- **项目启动报错问题集及解决方法**

**问题一**<br>

报错如下:

Exception in thread "main" java.lang.IncompatibleClassChangeError: class com.github.fge.jackson.JsonNumEquals has interface com.google.common.base.Equivalence as super class
Expand Down Expand Up @@ -257,6 +257,49 @@ Credential的重新生成则为重新发行一个Credential ID不相同的全新
(注:项目为maven才会有pom.xml文件)。

---

- **在 FISCO-BCOS 上部署 WeIdentity,WeIdentity常用接口的性能数据是?**

详见 [WeIdentity 性能数据](./performance.md)

---

- **Evidence 链上结构**

Evidence的key是数据的hash值(通过WeIdentity SDK提供的sha3函数计算得出)。

| 字段 | 类型| 说明|
| ----- | ----- | ----- |
| hash| bytes32[] | 存证数据的 hash,同时也是key |
| signer| address[]| 签名人的地址(WeAddress)
| sigs| string[] | 对应每个签名人的签名值 |
| logs| string[]| 每一个 Evidence 可以附加额外数据,放入 logs 字段 |
| updated| uint256[]| 更新时间 |
| extraKey| string[] | Evidence 的另外一个key,用户可以设置一个额外的key,用于查询这个evidence(效率会低于通过hash查询) |


* 例子

```
"hash": "0x64e604787cbf194841e7b68d7cd28786f6c9a0a3ab9f8b0a0e87cb4387ab0107"
//hash 和extraKey是Evidence的key,Evidence的value在链上的结构类似下面
{
"signer": ["did:weid:1000:0x4d3091830e74235a9c2e2041700c162ff75cc13d"],
"logs": [
"tempLog",
"tempLog",
"tempLog",
"tempLog",
"tempLog",
"tempLog"
],
"signature": ["AELc1QRvC+OEwwIjzZ6KrffiHpTFoxanq29H6KO3juV1NKg5Ip59/c/8pgwISVNEV8mXaqhYVf2o\b0JuyZCc0f5Q="],
"updated": "1590136873"
}
```

---

1 change: 1 addition & 0 deletions readthedocs/zh_CN/docs/weidentity-rest-deploy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Server 的环境要求与 WeIdentity-Java-SDK 的 `环境要求 <./weidentity-in
合约地址修改示例。更新 ``dist/conf/fisco.properties`` 下列属性中cns.contract.follow的值。

.. code-block:: xml
cns.contract.follow=0x161bcbd5afbdd2bb2c7f6cc31ed5897f041271c8c984284239370c1572e8545d
区块链节点信息修改示例:更新 ``dist/conf/weidentity.properties`` 中 ``nodes`` 项的值,注意每一条信息都应包含区块链用户、节点IP、节点channel端口地址;多于一个区块链节点,请用 “,” 半角逗号分隔。
Expand Down
5 changes: 4 additions & 1 deletion readthedocs/zh_CN/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
My Title
*********

##############################################################
WeIdentity文档
##############################################################
Expand All @@ -13,7 +16,7 @@ WeIdentity文档
=======

.. toctree::
:maxdepth: 1
:maxdepth: 2
:hidden:
:caption: Contents:

Expand Down

0 comments on commit ea7157d

Please sign in to comment.