From 0c45c488298afaae246f47b059d6929c924225d9 Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Tue, 22 Jun 2021 18:14:28 +0800
Subject: [PATCH 01/26] add trans encode convert api
---
docs/WeBASE-Front/interface.md | 404 ++++++++++++++++++++++++---------
1 file changed, 294 insertions(+), 110 deletions(-)
diff --git a/docs/WeBASE-Front/interface.md b/docs/WeBASE-Front/interface.md
index 6225c52f..96aeecb4 100644
--- a/docs/WeBASE-Front/interface.md
+++ b/docs/WeBASE-Front/interface.md
@@ -3784,20 +3784,36 @@ HTTP POST
```
{
- "groupId" :1,
- "signUserId": "458ecc77a08c486087a3dcbc7ab5a9c3",
- "contractAbi":[{"constant":true,"inputs":[],"name":"getVersion","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getStorageCell","outputs":[{"name":"","type":"string"},{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"n","type":"string"}],"name":"setVersion","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"storageHash","type":"string"},{"name":"storageInfo","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}],
- "contractAddress":"0x14d5af9419bb5f89496678e3e74ce47583f8c166",
- "funcName":"set",
- "funcParam":["test"],
- "useCns":false
+ "groupId": "1",
+ "signUserId": "f4975519b0274e6ca8283650a7e1bc07",
+ "contractName": "HelloWorld",
+ "contractPath": "/",
+ "version": "",
+ "funcName": "set",
+ "funcParam": ["333"],
+ "contractAddress": "0xe10441d9179cf0424aae808b51bc85dcbbfe1447",
+ "contractAbi": [{
+ "inputs": [{
+ "internalType": "string",
+ "name": "n",
+ "type": "string"
+ }],
+ "name": "set",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "funcId": 2
+ }],
+ "useAes": false,
+ "useCns": false,
+ "cnsName": ""
}
```
示例:
```
-curl -X POST "http://localhost:5002/WeBASE-Front/trans/handleWithSign" -H "accept: */*" -H "Content-Type: application/json" -d "{ \"contractAbi\": [ { \"outputs\": [], \"constant\": false, \"payable\": false, \"inputs\": [ { \"name\": \"n\", \"type\": \"string\" } ], \"name\": \"set\", \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"outputs\": [ { \"name\": \"\", \"type\": \"string\" } ], \"constant\": true, \"payable\": false, \"inputs\": [], \"name\": \"get\", \"stateMutability\": \"view\", \"type\": \"function\" }, { \"payable\": false, \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"indexed\": false, \"name\": \"name\", \"type\": \"string\" } ], \"name\": \"nameEvent\", \"anonymous\": false, \"type\": \"event\" } ], \"contractAddress\": \"0x7571ff73f1a37ca07f678aebc4d8213e7ef5c266\", \"funcName\": \"set\", \"funcParam\": [ \"test\" ], \"groupId\": 1, \"signUserId\": "458ecc77a08c486087a3dcbc7ab5a9c3"}"
+curl -X POST "http://localhost:5002/WeBASE-Front/trans/handleWithSign" -H "accept: */*" -H "Content-Type: application/json" -d "{\"groupId\":\"1\",\"signUserId\":\"f4975519b0274e6ca8283650a7e1bc07\",\"contractName\":\"HelloWorld\",\"contractPath\":\"/\",\"version\":\"\",\"funcName\":\"set\",\"funcParam\":[\"333\"],\"contractAddress\":\"0xe10441d9179cf0424aae808b51bc85dcbbfe1447\",\"contractAbi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"n\",\"type\":\"string\"}],\"name\":\"set\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"funcId\":2}],\"useAes\":false,\"useCns\":false,\"cnsName\":\"\"}"
```
#### 响应参数
@@ -3812,42 +3828,25 @@ b、正确发送数据上链返回值信息(交易收据)
```
{
- "transactionHash": "0x0b426a58af8ba449742b937f1e9b2b225335638707b93d6b296dfd8107edddd7",
- "transactionIndex": 0,
- "blockHash": "0xc8eb7a983ecb8c2a0a64450a059d2cf3de8c8d786211dcec48ab9c47219ee8f7",
- "blockNumber": 36985,
- "gasUsed": 35400,
- "contractAddress": "0x0000000000000000000000000000000000000000",
- "root": null,
- "status": "0x0",
- "from": "0xb173ca9a2e07efe6007aee751a013849d53e7c29",
- "to": "0x7571ff73f1a37ca07f678aebc4d8213e7ef5c266",
- "input": "0x4ed3885e000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000047465737400000000000000000000000000000000000000000000000000000000",
- "output": "0x",
- "logs": [
- {
- "removed": false,
- "logIndex": null,
- "transactionIndex": null,
- "transactionHash": null,
- "blockHash": null,
- "blockNumber": null,
- "address": "0x7571ff73f1a37ca07f678aebc4d8213e7ef5c266",
- "data": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000047465737400000000000000000000000000000000000000000000000000000000",
- "type": null,
- "topics": [
- "0x9645e7fb5eec05c0f156d4901a10663561199c6dd0401214a0b833fe0022d899"
- ],
- "logIndexRaw": null,
- "blockNumberRaw": null,
- "transactionIndexRaw": null
- }
- ],
- "logsBloom": "0x00000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000020000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000",
- "gasUsedRaw": "0x8a48",
- "statusOK": true,
- "blockNumberRaw": "0x9079",
- "transactionIndexRaw": "0x0"
+ "transactionHash": "0xd1234cdb673447b654874d05d4ed98be89f3cb7c5a6c12bc51e1274a03af029c",
+ "transactionIndex": "0x0",
+ "root": "0xeecf2b6bbb028e38e704ca88fe1d9f5e3d43197b32c3336d3273d86fb3a135f0",
+ "blockNumber": "0xa9",
+ "blockHash": "0x906bdf0747ba68c03e6cf73463db62fdbd8ab8debc149f890475775d7c6a8af7",
+ "from": "0x7bfa3539c8761978f0a2a1f7f240bde97819fb03",
+ "to": "0xe10441d9179cf0424aae808b51bc85dcbbfe1447",
+ "gasUsed": "0x710b",
+ "contractAddress": "0x0000000000000000000000000000000000000000",
+ "logs": [],
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "status": "0x0",
+ "statusMsg": "None",
+ "input": "0x3590b49f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000033333330000000000000000000000000000000000000000000000000000000000",
+ "output": "0x",
+ "txProof": null,
+ "receiptProof": null,
+ "message": "Success",
+ "statusOK": true
}
```
@@ -3903,22 +3902,36 @@ HTTP POST
示例:
```
-curl -l -H "Content-type: application/json" -X POST -d '{"contractName":
-"HelloWorld", "contractAbi": [{\"constant\":false,\"inputs\":[{\"indexed\":false,\"name\":\"n\",\"type\":\"string\"}],\"name\":\"set\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}], funcName": "set", "funcParam": ["Hi,Welcome!"], "user": "0x2db346f9d24324a4b0eac7fb7f3379a2422704db", "contractAddress":"dasdfav23rf213vbcdvadf3bcdf2fc23rqde","groupId": 1,"useCns": false}' http://10.0.0.1:5002/WeBASE-Front/trans/handle
+curl -l -H "Content-type: application/json" -X POST -d '{\"groupId\":\"1\",\"user\":\"0x7bfa3539c8761978f0a2a1f7f240bde97819fb03\",\"contractName\":\"HelloWorld\",\"contractPath\":\"/\",\"version\":\"\",\"funcName\":\"set\",\"funcParam\":[\"333\"],\"contractAddress\":\"0xe10441d9179cf0424aae808b51bc85dcbbfe1447\",\"contractAbi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"n\",\"type\":\"string\"}],\"name\":\"set\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\",\"funcId\":2}],\"useAes\":false,\"useCns\":false,\"cnsName\":\"\"}' http://10.0.0.1:5002/WeBASE-Front/trans/handle
```
传入合约abi:
```
{
- "user":"0x2db346f9d24324a4b0eac7fb7f3379a2422704db",
- "contractName":"HelloWorld",
- "contractAddress":"dasdfav23rf213vbcdvadf3bcdf2fc23rqde",
- "funcName":"set",
- "contractAbi":[{"constant":true,"inputs":[],"name":"getVersion","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getStorageCell","outputs":[{"name":"","type":"string"},{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"n","type":"string"}],"name":"setVersion","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"storageHash","type":"string"},{"name":"storageInfo","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}],
- "funcParam":["Hi,Welcome!"],
- "groupId" :"1",
- "useCns": false
+ "groupId": "1",
+ "user": "0x7bfa3539c8761978f0a2a1f7f240bde97819fb03",
+ "contractName": "HelloWorld",
+ "contractPath": "/",
+ "version": "",
+ "funcName": "set",
+ "funcParam": ["333"],
+ "contractAddress": "0xe10441d9179cf0424aae808b51bc85dcbbfe1447",
+ "contractAbi": [{
+ "inputs": [{
+ "internalType": "string",
+ "name": "n",
+ "type": "string"
+ }],
+ "name": "set",
+ "outputs": [],
+ "stateMutability": "nonpayable",
+ "type": "function",
+ "funcId": 2
+ }],
+ "useAes": false,
+ "useCns": false,
+ "cnsName": ""
}
```
@@ -3934,23 +3947,25 @@ b、正确发送数据上链返回值信息(交易收据)
```
{
- "code": 0,
- "message": "success",
- "data": {
- "blockHash":
- "0x1d8d8275aa116d65893291c140849be272dac1d4ca0a0a722f44404b2f2356c3",
- "gasUsed": 32798,
- "transactionIndexRaw": "0",
- "blockNumberRaw": "33",
- "blockNumber": 33,
- "contractAddress": "0x0000000000000000000000000000000000000000",
- "cumulativeGasUsed": 32798,
- "transactionIndex": 0,
- "gasUsedRaw": "0x801e",
- "logs": [],
- "cumulativeGasUsedRaw": "0x801e",
- "transactionHash":"0x0653a8e959771955330461456dd094a96d9071bfa31e6f43b68b30f10a85689c"
- }
+ "transactionHash": "0xd1234cdb673447b654874d05d4ed98be89f3cb7c5a6c12bc51e1274a03af029c",
+ "transactionIndex": "0x0",
+ "root": "0xeecf2b6bbb028e38e704ca88fe1d9f5e3d43197b32c3336d3273d86fb3a135f0",
+ "blockNumber": "0xa9",
+ "blockHash": "0x906bdf0747ba68c03e6cf73463db62fdbd8ab8debc149f890475775d7c6a8af7",
+ "from": "0x7bfa3539c8761978f0a2a1f7f240bde97819fb03",
+ "to": "0xe10441d9179cf0424aae808b51bc85dcbbfe1447",
+ "gasUsed": "0x710b",
+ "contractAddress": "0x0000000000000000000000000000000000000000",
+ "logs": [],
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "status": "0x0",
+ "statusMsg": "None",
+ "input": "0x3590b49f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000033333330000000000000000000000000000000000000000000000000000000000",
+ "output": "0x",
+ "txProof": null,
+ "receiptProof": null,
+ "message": "Success",
+ "statusOK": true
}
```
@@ -3982,8 +3997,8 @@ HTTP POST
```
{
- "signedStr": "0xddd",
- "sync": 1,
+ "signedStr": "0xf9012da001071041dddc1b3c553b48c0fbefecc07f3812f5ce4004d47708f1c3342844db018405f5e10082029d94e10441d9179cf0424aae808b51bc85dcbbfe144780b8643590b49f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000033333330000000000000000000000000000000000000000000000000000000000010180b84083bb5313e3dd7825b8b3e32d73aa8aedf9f9a8fcf435e5c37edfe4645c1af4211c12e1368024336a576f26ed624407da0b94e0bc5760514543c0b7a38fa03a7da0972843d0879ffdbdae733e8707896a532e5e1a3c7262cb84db657dd34f09111ba0786106465fe0fd2383588693cafef8934df62b188c6bb5a74eb6b9f23adaba32",
+ "sync": true,
"groupId":1
}
```
@@ -3994,43 +4009,25 @@ HTTP POST
```
{
- "transactionHash": "0xb2c733b742045e61c0fd6e7e2bafece04d56262a4887de9f78dad2c5dd2f944b",
- "transactionIndex": 0,
- "blockHash": "0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7ade",
- "blockNumber": 100,
- "cumulativeGasUsed": 121038,
- "gasUsed": 121038,
- "contractAddress": "0x0000000000000000000000000000000000000000",
- "root": null,
- "from": null,
- "to": null,
- "logs": [
- {
- "removed": false,
- "logIndex": 0,
- "transactionIndex": 0,
- "transactionHash": "0xb2c733b742045e61c0fd6e7e2bafece04d56262a4887de9f78dad2c5dd2f944b",
- "blockHash": "0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7ade",
- "blockNumber": 100,
- "address": "0x986278eb8e8b4ef98bdfc055c02d65865fc87ad2",
- "data": "0x00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000001caf3fbec3675eabb85c0b25e2992d6f0a5e1546dad85c20733fdb27cfa4ca782a5fdfb621b416f3494c7d8ca436c12309884550d402ea79f03ef8ddfdd494f7a40000000000000000000000000000000000000000000000000000000000000040666164363863656230616530316530643731616635356331316561643031613532656638363435343866306134643133633836363164393664326461366239380000000000000000000000000000000000000000000000000000000000000002363000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023630000000000000000000000000000000000000000000000000000000000000",
- "type": "mined",
- "topics": [
- "0xbf474e795141390215f4f179557402a28c562b860f7b74dce4a3c0e0604cd97e"
- ],
- "logIndexRaw": "0",
- "blockNumberRaw": "100",
- "transactionIndexRaw": "0"
- }
- ],
- "logsBloom": null,
- "gasUsedRaw": "0x1d8ce",
- "blockNumberRaw": "100",
- "transactionIndexRaw": "0",
- "cumulativeGasUsedRaw": "0x1d8ce",
- "message": null,
- "txProof": null,
- "receiptProof": null
+ "transactionHash": "0xd1234cdb673447b654874d05d4ed98be89f3cb7c5a6c12bc51e1274a03af029c",
+ "transactionIndex": "0x0",
+ "root": "0xeecf2b6bbb028e38e704ca88fe1d9f5e3d43197b32c3336d3273d86fb3a135f0",
+ "blockNumber": "0xa9",
+ "blockHash": "0x906bdf0747ba68c03e6cf73463db62fdbd8ab8debc149f890475775d7c6a8af7",
+ "from": "0x7bfa3539c8761978f0a2a1f7f240bde97819fb03",
+ "to": "0xe10441d9179cf0424aae808b51bc85dcbbfe1447",
+ "gasUsed": "0x710b",
+ "contractAddress": "0x0000000000000000000000000000000000000000",
+ "logs": [],
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "status": "0x0",
+ "statusMsg": "None",
+ "input": "0x3590b49f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000033333330000000000000000000000000000000000000000000000000000000000",
+ "output": "0x",
+ "txProof": null,
+ "receiptProof": null,
+ "message": "Success",
+ "statusOK": true
}
```
@@ -4128,6 +4125,193 @@ HTTP POST
}
```
+
+### 5.6. 获取签名后的交易体编码值(结合WeBASE-Sign)
+
+#### 接口描述
+
+构造交易体RawTransaction并将交易体编码,通过传入的`signUserId`签名服务的用户ID,使用对应的私钥对交易提进行签名后,返回已签名的交易体编码值(十六进制字符串)
+
+签名后的交易的编码值可以直接通过`/trans/signed-transaction`接口提交到链上
+
+#### 接口URL
+
+**http://localhost:5002/WeBASE-Front/trans/convertRawTxStr/withSign**
+
+#### 调用方法
+
+HTTP POST
+
+#### 请求参数
+
+**1)参数表**
+
+| **序号** | **中文** | **参数名** | **类型** | **最大长度** | **必填** | **说明** |
+| -------- | -------------- | --------------- | -------- | ------------ | -------- | ---------------------------------------------- |
+| 1 | 用户编号 | signUserId | String | 64 | 是 | WeBASE-Sign用户编号,若为空则返回未签名交易提编码值 |
+| 2 | 合约名称 | contractName | String | | 是 | |
+| 3 | 合约地址 | contractAddress | String | | 是 | |
+| 4 | 方法名 | funcName | String | | 是 | |
+| 5 | 合约编译后生成的abi文件内容 | contractAbi | List | | 是 | 合约中单个函数的ABI,若不存在同名函数可以传入整个合约ABI,格式:JSONArray |
+| 6 | 方法参数 | funcParam | List | | 否 | JSON数组,多个参数以逗号分隔(参数为数组时同理),如:["str1",["arr1","arr2"]] |
+| 7 | 群组ID | groupId | int | | 是 | 默认为1 |
+| 8 | 是否使用cns调用 | useCns | bool | | 是 | |
+| 9 | cns名称 | cnsName | String | | 否 | CNS名称,useCns为true时不能为空 |
+| 10 | cns版本 | version | String | | 否 | CNS版本,useCns为true时不能为空 |
+
+
+**2)数据格式**
+
+```
+{
+ "transactionHash": "0x42894f8478bc5cf3417c31a559f22e7d59b049fc3136e223d9ec7003927b16c1",
+ "transactionIndex": "0x0",
+ "root": "0x0000000000000000000000000000000000000000000000000000000000000000",
+ "blockNumber": "369",
+ "blockHash": "0x2462d0e8d7f4ed892a0a18c982c3398dd43250863c6fe5e182df4f7eaab205f7",
+ "from": "0xfc2038f30e82a2c7afbb27da4cd7c44ece8a5c91",
+ "to": "0xe10441d9179cf0424aae808b51bc85dcbbfe1447",
+ "gasUsed": "149305",
+ "contractAddress": "0x0000000000000000000000000000000000000000",
+ "logs": [],
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "status": "0x0",
+ "statusMsg": "None",
+ "input": "0x3590b49f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000033333330000000000000000000000000000000000000000000000000000000000",
+ "output": "0x",
+ "txProof": null,
+ "receiptProof": null,
+ "message": null,
+ "statusOK": true
+}
+```
+
+#### 响应参数
+
+```
+0xf9012da002c1442b6ce974291ec317db9859e8310de46f6636d105f19fee67f10ac60b2f018405f5e10082029e94e10441d9179cf0424aae808b51bc85dcbbfe144780b8643590b49f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000033333330000000000000000000000000000000000000000000000000000000000010180b8407d3efe268051e49350d877eaba7bbe6369a44263aec6e47fcba2ac1aff849261e833361bc67befbf4566894478c011dcae3e06818a381401751d1bf8bceecedaa01605fb8fcb546b0dc79e1da004a8323b151d1f569e10cae85a3f62bad5d7150fa0d77282eb650e0f52956693177717eb31cfddcada0681973a6aed9c46f3d8eb4d
+```
+
+
+### 5.7. 获取签名后的交易体编码值(本地签名)
+
+#### 接口描述
+
+构造交易体RawTransaction并将交易体编码,并通过传入的`user`地址的私钥对交易提进行签名后,返回已签名的交易体编码值(十六进制字符串)
+
+签名后的交易的编码值可以直接通过`/trans/signed-transaction`接口提交到链上
+
+#### 接口URL
+
+**http://localhost:5002/WeBASE-Front/trans/convertRawTxStr/local**
+
+#### 调用方法
+
+HTTP POST
+
+#### 请求参数
+
+**1)参数表**
+
+| **序号** | **中文** | **参数名** | **类型** | **最大长度** | **必填** | **说明** |
+| -------- | --------------------------- | --------------- | -------- | ------------ | -------- | ------------------------------------------------------------ |
+| 1 | 用户地址 | user | String | | 是 | 用户地址,可通过`/privateKey`接口创建。*若user为空,则返回未签名交易编码值* |
+| 2 | 合约名称 | contractName | String | | 是 | |
+| 3 | 合约地址 | contractAddress | String | | 是 | |
+| 4 | 方法名 | funcName | String | | 是 | |
+| 5 | 合约编译后生成的abi文件内容 | contractAbi | List | | 是 | 合约中单个函数的ABI,若不存在同名函数可以传入整个合约ABI,格式:JSONArray |
+| 6 | 方法参数 | funcParam | List | | 否 | JSON数组,多个参数以逗号分隔(参数为数组时同理),如:["str1",["arr1","arr2"]],根据所调用的合约方法判断是否必填 |
+| 7 | 群组ID | groupId | int | | 是 | 默认为1 |
+| 8 | 合约路径 | contractPath | int | | 否 | |
+| 9 | 是否使用cns调用 | useCns | bool | | 是 | |
+| 10 | cns名称 | cnsName | String | | 否 | CNS名称,useCns为true时不能为空 |
+| 11 | cns版本 | version | String | | 否 | CNS版本,useCns为true时不能为空 |
+
+**2)数据格式**
+
+示例:
+
+```
+{
+ "user":"0x2db346f9d24324a4b0eac7fb7f3379a2422704db",
+ "contractName":"HelloWorld",
+ "contractAddress":"dasdfav23rf213vbcdvadf3bcdf2fc23rqde",
+ "funcName":"set",
+ "contractAbi":[{"constant":true,"inputs":[],"name":"getVersion","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getStorageCell","outputs":[{"name":"","type":"string"},{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"n","type":"string"}],"name":"setVersion","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"storageHash","type":"string"},{"name":"storageInfo","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}],
+ "funcParam":["Hi,Welcome!"],
+ "groupId" :"1",
+ "useCns": false
+}
+```
+
+#### 响应参数
+
+**1)数据格式**
+
+```
+0xf9012da001071041dddc1b3c553b48c0fbefecc07f3812f5ce4004d47708f1c3342844db018405f5e10082029d94e10441d9179cf0424aae808b51bc85dcbbfe144780b8643590b49f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000033333330000000000000000000000000000000000000000000000000000000000010180b84083bb5313e3dd7825b8b3e32d73aa8aedf9f9a8fcf435e5c37edfe4645c1af4211c12e1368024336a576f26ed624407da0b94e0bc5760514543c0b7a38fa03a7da0972843d0879ffdbdae733e8707896a532e5e1a3c7262cb84db657dd34f09111ba0786106465fe0fd2383588693cafef8934df62b188c6bb5a74eb6b9f23adaba32
+```
+
+
+### 5.8. 获取合约函数的编码值
+
+#### 接口描述
+
+构造合约函数的编码值,适用于查询交易,合约函数的编码值可以直接通过`/trans/query-transaction`接口提交到链上
+
+#### 接口URL
+
+**http://localhost:5002/WeBASE-Front/trans/encodeFunction**
+
+#### 调用方法
+
+HTTP POST
+
+#### 请求参数
+
+**1)参数表**
+
+| **序号** | **中文** | **参数名** | **类型** | **最大长度** | **必填** | **说明** |
+| -------- | --------------------------- | --------------- | -------- | ------------ | -------- | ------------------------------------------------------------ |
+| 1 | 方法名 | funcName | String | | 是 | |
+| 2 | 合约编译后生成的abi文件内容 | contractAbi | List | | 是 | 合约中单个函数的ABI,若不存在同名函数可以传入整个合约ABI,格式:JSONArray |
+| 3 | 方法参数 | funcParam | List | | 否 | JSON数组,多个参数以逗号分隔(参数为数组时同理),如:["str1",["arr1","arr2"]],根据所调用的合约方法判断是否必填 |
+
+**2)数据格式**
+
+示例:
+
+```
+{
+ "contractAbi": [{
+ "inputs": [],
+ "name": "get",
+ "outputs": [{
+ "internalType": "string",
+ "name": "",
+ "type": "string"
+ }],
+ "stateMutability": "view",
+ "type": "function",
+ "funcId": 1
+ }],
+ "contractAddress": "0xe10441d9179cf0424aae808b51bc85dcbbfe1447",
+ "encodeStr": "0x299f7f9d",
+ "funcName": "get",
+ "groupId": 1,
+ "userAddress": "0x7bfa3539c8761978f0a2a1f7f240bde97819fb03"
+}
+```
+
+#### 响应参数
+
+**1)数据格式**
+
+```
+0x299f7f9d
+```
+
+
## 6. 系统管理接口
使用FISCO BCOS v2.5.0 与 WeBASE-Front v1.4.1 (及)以上版本将使用预编译合约中的ChainGovernance接口(从本章节[接口6.13](#governance)开始),详情可参考[FISCO BCOS基于角色的权限控制](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/manual/permission_control.html#id2)
From 3af437f7009e2c833fa40b9f089ef4b188b02ad6 Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Wed, 30 Jun 2021 16:56:54 +0800
Subject: [PATCH 02/26] merge
---
docs/WeBASE-Training-Plugin-Plan/index.md | 37 ++++++++++++-----------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/docs/WeBASE-Training-Plugin-Plan/index.md b/docs/WeBASE-Training-Plugin-Plan/index.md
index 0eca7817..f7164eec 100644
--- a/docs/WeBASE-Training-Plugin-Plan/index.md
+++ b/docs/WeBASE-Training-Plugin-Plan/index.md
@@ -29,7 +29,24 @@ WeBASE实训插件方案主要的目的是:将WeBASE管理台的部分功能
### 4.2 WeBASE配置
-#### 4.2.1 WeBASE-Node-Manager配置
+#### 4.2.1 WeBASE-Node-Manager数据库中插入参数设置数据,脚本如下:
+
+```plain
+INSERT INTO `tb_config`(`config_name`, `config_type`, `config_value`, `create_time`, `modify_time`) VALUES ('SupportIframe', 2, '1', '2020-09-22 17:14:23', '2020-09-22 17:14:23');
+INSERT INTO `tb_config`(`config_name`, `config_type`, `config_value`, `create_time`, `modify_time`) VALUES ('IframeSupportHostList', 3, 'baidu.com|163.com', '2020-09-22 17:14:23', '2020-09-22 17:14:23');
+```
+
+其中,SupportIframe设置为1,表示开启iframe嵌入支持;IframeSupportHostList为iframe嵌入支持的host白名单列表。
+
+配置访问接口如下:
+
+```
+http://127.0.0.1:5001/WeBASE-Node-Manager/config/list?type=2
+```
+
+
+
+#### 4.2.2 WeBASE-Node-Manager配置
修改webase-node-manager/conf/application.yml。
@@ -37,7 +54,7 @@ WeBASE实训插件方案主要的目的是:将WeBASE管理台的部分功能
```plain
-permitUrlArray: /account/login,/account/pictureCheckCode,/login,/user/privateKey/**,/config/encrypt,/config/version,/front/refresh,/api/*,/config/list
+permitUrlArray:/account/login,/account/pictureCheckCode,/login,/user/privateKey/**,/config/encrypt,/config/version,/front/refresh,/api/*,/config/list
```
- 修改constant.verificationCodeMaxAge,设置为与你的系统的session时间一致。
@@ -51,22 +68,6 @@ permitUrlArray: /account/login,/account/pictureCheckCode,/login,/user/privateKey
2. 固定校验码为了实现单点登录
3. permitUrlArray配置是为了放开接口访问权限
-
-#### 4.2.2 WeBASE-Node-Manager数据库中插入参数设置数据,脚本如下:
-
-```plain
-INSERT INTO `tb_config`(`config_name`, `config_type`, `config_value`, `create_time`, `modify_time`) VALUES ('SupportIframe', 2, '1', '2020-09-22 17:14:23', '2020-09-22 17:14:23');
-INSERT INTO `tb_config`(`config_name`, `config_type`, `config_value`, `create_time`, `modify_time`) VALUES ('IframeSupportHostList', 3, 'baidu.com|163.com', '2020-09-22 17:14:23', '2020-09-22 17:14:23');
-```
-
-其中,SupportIframe设置为1,表示开启iframe嵌入支持;IframeSupportHostList为iframe嵌入支持的host白名单列表。
-
-配置访问接口如下:
-
-```
-http://127.0.0.1:5001/WeBASE-Node-Manager/config/list?type=2
-```
-
## 5 实验台中使用
### 5.1 iframe嵌入
From 06edaf17f3ebf6060e3a4b245f0b25d10bf82f26 Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Wed, 30 Jun 2021 16:57:03 +0800
Subject: [PATCH 03/26] update doc descriptopn
---
docs/WeBASE-Front/install.md | 26 ++++++++++----------------
docs/WeBASE-Node-Manager/install.md | 24 +++++++-----------------
docs/WeBASE-Sign/install.md | 8 ++++----
docs/WeBASE-Web/install.md | 10 +++++++---
4 files changed, 28 insertions(+), 40 deletions(-)
diff --git a/docs/WeBASE-Front/install.md b/docs/WeBASE-Front/install.md
index 2ea9ec5b..a7cd02ff 100644
--- a/docs/WeBASE-Front/install.md
+++ b/docs/WeBASE-Front/install.md
@@ -4,25 +4,18 @@
| 依赖软件 | 支持版本 |
| :-: | :-: |
-| Java | JDK8或以上版本 |
-| FISCO-BCOS | V2.0.x版本 |
+| Java | Java 1.8或以上版本 |
+| FISCO-BCOS | v2.0.0及以上版本 |
**备注:** Java推荐使用[OracleJDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html),可参考[JDK配置指引](./appendix.html#jdk)(CentOS的yum仓库的OpenJDK缺少JCE(Java Cryptography Extension),导致Web3SDK无法正常连接区块链节点)
-### 国密支持
+#### 国密支持
WeBASE-Front v1.2.2+已支持 [国密版FISCO-BCOS](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/manual/guomi_crypto.html)
-
-开启国密国密SSL:
- 在v1.5.0后,sdk将自动根据链的加密类型切换国密或非国密,自动根据链的SSL类型切换国密SSL
-国密编译:
-- 编译国密版智能合约在v1.3.1版本后,通过引入solcJ:0.4.25-rc1.jar,自动切换支持国密版智能合约的编译/部署/调用;(可自行替换jar包版本为solcJ-0.5.2来使用0.5进行后台接口的合约编译)
-- 该部分仅影响后台的`/contract`合约编译接口,不影响前端合约IDE的合约编译
-
-
-### solidity v0.6.10支持
+#### solidity v0.6.10支持
WeBASE-Front v1.4.2已支持solidity `v0.5.1`和`v0.6.10`
@@ -71,7 +64,7 @@ dist目录提供了一份配置模板conf_template:
```
根据配置模板生成一份实际配置conf。初次部署可直接拷贝。
-例如:cp conf_template conf -r
+例如:cp -r conf_template conf
```
(2)进入conf目录:
@@ -87,7 +80,7 @@ cd conf
(3)修改配置(根据实际情况修改):
-*如果在企业部署中使用WeBASE-Front,必须配置下文中的`keyServer`*
+如果在企业部署中使用WeBASE-Front,必须配置下文中的`keyServer`,用于连接WeBASE-Sign服务
```
vi application.yml
@@ -108,11 +101,11 @@ sdk:
certPath: conf // sdk证书的目录,默认为conf
constant:
keyServer: 127.0.0.1:5004 // 密钥服务的IP和端口(WeBASE-Node-Manager服务或者WeBASE-Sign服务,不同服务支持的接口不同),如果作为独立控制台使用可以不配置
+ aesKey: EfdsW23D23d3df43 // aes加密key(16位) 如启用,各互联的子系统的加密key需保持一致
transMaxWait: 30 // 交易最大等待时间
monitorDisk: / // 要监控的磁盘目录,配置节点所在目录(如:/data)
monitorEnabled: true // 是否监控数据,默认true
- aesKey: EfdsW23D23d3df43 // aes加密key(16位) 如启用,各互联的子系统的加密key需保持一致
- nodePath: /fisco/nodes/127.0.0.1/node0 //配置连接节点的绝对路径
+ nodePath: /fisco/nodes/127.0.0.1/node0 //配置所连节点的绝对路径,用于监控节点配置与日志
...
```
@@ -147,6 +140,7 @@ http://{deployIP}:{frontPort}/WeBASE-Front
在dist目录查看:
```
-前置服务日志:tail -f log/WeBASE-Front.log
+前置服务全量日志:tail -f log/WeBASE-Front.log
+前置服务错误日志:tail -f log/WeBASE-Front.log
web3连接日志:tail -f log/web3sdk.log
```
\ No newline at end of file
diff --git a/docs/WeBASE-Node-Manager/install.md b/docs/WeBASE-Node-Manager/install.md
index aec773c1..8535b26e 100644
--- a/docs/WeBASE-Node-Manager/install.md
+++ b/docs/WeBASE-Node-Manager/install.md
@@ -4,8 +4,8 @@
| 序号 | 软件 |
| ---- | --------------------- |
-| 1 | FISCO-BCOS 2.0 |
-| 2 | WeBASE-Front 对应版本 |
+| 1 | FISCO-BCOS 2.0+ |
+| 2 | WeBASE-Front [对应版本](../WeBASE/ChangeLOG.md) |
| 3 | MySQL5.6或以上版本 |
| 4 | Java8或以上版本 |
@@ -13,23 +13,18 @@
## 2. 注意事项
* Java推荐使用[OracleJDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html),[JDK配置指引](./appendix.html#jdk)
* 在服务搭建的过程中,如碰到问题,请查看 [常见问题解答](./install_FAQ.html)
-* 安全温馨提示: 强烈建议设置复杂的数据库登录密码,且严格控制数据操作的权限和网络策略
+* 安全提示: 强烈建议设置复杂的数据库登录密码,且严格控制数据操作的权限和网络策略
**通过WeBASE-Sign私钥管理**
-WeBASE-Node-Manager v1.3.0+将通过WeBASE-Sign进行私钥管理,即使用WeBASE-Node-Manager v1.3.0+的版本需要同步安装WeBASE-Sign v1.3.0,详情可参考[升级文档](upgrade.html)进行阅读
+WeBASE-Node-Manager v1.3.0及以上版本将通过WeBASE-Sign进行私钥管理,即使用WeBASE-Node-Manager v1.3.0+的版本需要同步安装WeBASE-Sign v1.3.0,详情可参考[升级文档](upgrade.html)进行阅读
**国密支持:**
WeBASE-Node-Manager v1.2.2+已支持 [国密版FISCO-BCOS](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/manual/guomi_crypto.html),与[WeBASE-Front v1.2.2+](../WeBASE-Front/index.html)配合使用
-```eval_rst
-.. important::
- 使用国密版WeBASE-Node-Manager需要开启java-sdk的国密开关和script/gm中的webase-gm.sh脚本进行数据库初始化
-```
-
-开启java-sdk的国密开关:
-- 将配置文件`application.yml/applicationContext.xml`中sdk配置的`encryptType`从`0`修改为`1`;
+开启WeBASE-Node-Manager的国密开关:
+- 将配置文件`application.yml`中的`sdk.encryptType`从`0`修改为`1`;
## 3. 拉取代码
@@ -79,11 +74,6 @@ CREATE DATABASE IF NOT EXISTS {your_db_name} DEFAULT CHARSET utf8 COLLATE utf8_g
cd dist/script
```
-```eval_rst
-.. important::
- 如果使用国密版,应进入dist/script/gm目录,对/gm目录下的webase-gm.sh进行下文的操作(即`sed`操作`/gm/webase-gm.sh`),并在最后运行webase-gm.sh
-```
-
修改数据库连接信息:
```shell
修改数据库名称:sed -i "s/webasenodemanager/${your_db_name}/g" webase.sh
@@ -123,7 +113,7 @@ bash webase.sh 127.0.0.1 3306
```
**备注**:
-- 如果使用国密版本,则将application.yml中`sdk-encryptType`由`0`改为`1`
+- 如果使用国密版本,则将application.yml中`sdk.encryptType`由`0`改为`1`
- 如果使用可视化部署,则将application.yml中`constant-deployType`由`0`改为`1`,并设置`constant-webaseSignAddress`为当前的webase-sign路径。具体使用方法可以参考[可视化部署-手动部署](../WeBASE-Install/visual_deploy.html#visual-deploy-manual)
diff --git a/docs/WeBASE-Sign/install.md b/docs/WeBASE-Sign/install.md
index 08eab647..b978b398 100644
--- a/docs/WeBASE-Sign/install.md
+++ b/docs/WeBASE-Sign/install.md
@@ -4,7 +4,7 @@
| 环境 | 版本 |
| ------ | ------------------- |
-| Java | jdk1.8或以上版本 |
+| Java | Java1.8或以上版本 |
| 数据库 | MySQL-5.6或以上版本 |
备注:安装说明请参看 [附录-1](./appendix.html#id2)。
@@ -121,8 +121,8 @@ constant:
## 6. 查看日志
-在dist目录下查看:
-
+在dist目录查看:
```shell
-tail -f log/WeBASE-Sign.log
+全量日志:tail -f log/WeBASE-Sign.log
+错误日志:tail -f log/WeBASE-Sign-error.log
```
\ No newline at end of file
diff --git a/docs/WeBASE-Web/install.md b/docs/WeBASE-Web/install.md
index a8dcdc1c..8bb27673 100644
--- a/docs/WeBASE-Web/install.md
+++ b/docs/WeBASE-Web/install.md
@@ -5,6 +5,7 @@
| 环境 | 版本 |
| ------ | --------------- |
| nginx | nginx1.6或以上版本,安装请参考[附录](appendix.html) |
+| WeBASE-Node-Manager | WeBASE-Node-Manager[对应版本](../WeBASE/ChangeLOG.md) |
### 2. 拉取代码
@@ -48,8 +49,8 @@ cd WeBASE-Web
执行完后检查dist/static/js是否下载完这些js文件。
### 3. 拉取移动端代码
-WeBASE新增了h5的移动端页面,支持手机浏览器访问
-代码和WeBASE-Web放在同一个目录
+WeBASE新增了h5的移动端页面,支持手机浏览器访问。代码和WeBASE-Web放在同一个目录
+
拉取代码
```shell
git clone https://github.com/WeBankFinTech/WeBASE-Web-Mobile.git
@@ -62,6 +63,7 @@ git clone https://gitee.com/WeBank/WeBASE-Web-Mobile.git
在docs目录下有配置文件nginx.conf,修改完后替换安装的nginx的配置文件nginx.conf(这里nginx安装配置文件在/usr/local/nginx/conf下面,如果这里没找到,可以到/etc下寻找,如有权限问题,请加上sudo)。
+
- 修改配置:
```
@@ -78,7 +80,8 @@ sed -i "s%/data/WeBASE-Web/dist%${your_file_dir}%g" docs/nginx.conf
sed -i "s%10.0.0.1:5001%${your_node_manager}%g" docs/nginx.conf
```
-- 复制配置文件nginx.conf
+- 复制配置文件nginx.conf到默认配置目录中
+- 也可以直接通过`nginx -c docs/nginx.conf`命令加载docs/nginx.conf配置
```
cp -rf docs/nginx.conf /usr/local/nginx/conf
@@ -126,6 +129,7 @@ cp -rf docs/nginx.conf /usr/local/nginx/conf
```
ps -ef | grep nginx
```
+
### 6. 访问页面
```
From 15f0be03b1635ec2a31a1c17829ba8b962fb4db5 Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Thu, 1 Jul 2021 10:54:26 +0800
Subject: [PATCH 04/26] add ledger in index
---
index.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.rst b/index.rst
index a7f51ca3..e7f2846e 100644
--- a/index.rst
+++ b/index.rst
@@ -95,7 +95,7 @@ WeBASE(WeBank Blockchain Application Software Extension) 是在区块链应
- SmartDev-Contract 智能合约库组件:`[GitHub] `_ `[Gitee] `_ `[文档] `_
- SmartDev-SCGP 合约编译插件:`[GitHub] `_ `[Gitee] `_ `[文档] `_
- SmartDev-Scaffold 应用开发脚手架:`[GitHub] `_ `[Gitee] `_ `[文档] `_
-
+ - **WeBankBlockchain-OpenLedger 分布式账本解决方案**:`[GitHub] `_ `[Gitee] `_ `[文档] `_
.. toctree::
From ea4a648ea197101b05fc8debece6618dd280ef1b Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Tue, 6 Jul 2021 17:01:39 +0800
Subject: [PATCH 05/26] update check nginx command
---
docs/WeBASE/install.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/WeBASE/install.md b/docs/WeBASE/install.md
index 7d8e2b8d..ca735462 100644
--- a/docs/WeBASE/install.md
+++ b/docs/WeBASE/install.md
@@ -306,9 +306,9 @@ $ ps -ef | grep webase.node.mgr
root 4696 1 0 17:26 pts/2 00:00:40 /usr/local/jdk/bin/java -Djdk.tls.namedGroups=secp256k1 ... conf/:apps/*:lib/* com.webank.webase.node.mgr.Application
```
-- 检查webase-web的nginx进程
+- 检查webase-web的nginx进程(运行路径为webase-deploy目录)
```
-$ ps -ef | grep webase |grep nginx
+$ ps -ef | grep nginx
```
输出如下
From a702e03707f3fedaba235f21cc516cd1883c9597 Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Tue, 6 Jul 2021 17:11:25 +0800
Subject: [PATCH 06/26] update version 1.5.2
---
conf.py | 2 +-
docs/WeBASE-Install/developer.md | 2 +-
docs/WeBASE/install.md | 8 ++++----
docs_en/conf.py | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/conf.py b/conf.py
index 6aa218d8..05d18ed2 100644
--- a/conf.py
+++ b/conf.py
@@ -110,7 +110,7 @@
# The short X.Y version.
version = '1.5'
# The full version, including alpha/beta/rc tags.
-release = 'v1.5.1'
+release = 'v1.5.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/docs/WeBASE-Install/developer.md b/docs/WeBASE-Install/developer.md
index 3c1a60a6..fa008a52 100644
--- a/docs/WeBASE-Install/developer.md
+++ b/docs/WeBASE-Install/developer.md
@@ -18,7 +18,7 @@
1. 下载安装包
```shell
- wget https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/releases/download/v1.5.1/webase-front.zip
+ wget https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/releases/download/v1.5.2/webase-front.zip
```
diff --git a/docs/WeBASE/install.md b/docs/WeBASE/install.md
index ca735462..56d5ead7 100644
--- a/docs/WeBASE/install.md
+++ b/docs/WeBASE/install.md
@@ -96,7 +96,7 @@ Python3.6及以上版本,需安装`PyMySQL`依赖包
获取部署安装包:
```shell
-wget https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/releases/download/v1.5.1/webase-deploy.zip
+wget https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/releases/download/v1.5.2/webase-deploy.zip
```
解压安装包:
```shell
@@ -130,10 +130,10 @@ cd webase-deploy
```shell
# WeBASE子系统的最新版本(v1.1.0或以上版本)
-webase.web.version=v1.5.1
-webase.mgr.version=v1.5.1
+webase.web.version=v1.5.2
+webase.mgr.version=v1.5.2
webase.sign.version=v1.5.0
-webase.front.version=v1.5.1
+webase.front.version=v1.5.2
# 节点管理子系统mysql数据库配置
mysql.ip=127.0.0.1
diff --git a/docs_en/conf.py b/docs_en/conf.py
index 40a7ba2c..37d047a2 100644
--- a/docs_en/conf.py
+++ b/docs_en/conf.py
@@ -110,7 +110,7 @@
# The short X.Y version.
version = '1.5'
# The full version, including alpha/beta/rc tags.
-release = 'v1.5.1'
+release = 'v1.5.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
From 9a7155304b17a14358aa3e8a4949f6452049819e Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Thu, 8 Jul 2021 15:45:59 +0800
Subject: [PATCH 07/26] update 1.5.0 upgrade doc
---
docs/WeBASE-Front/upgrade.md | 3 +--
docs/WeBASE-Node-Manager/upgrade.md | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/WeBASE-Front/upgrade.md b/docs/WeBASE-Front/upgrade.md
index f64d501b..4032e84c 100644
--- a/docs/WeBASE-Front/upgrade.md
+++ b/docs/WeBASE-Front/upgrade.md
@@ -18,8 +18,7 @@ WeBASE-Front升级的必须步骤:
- 修复合约IDE中合约调用参数为字符串时不能输入空格
#### v1.5.0
-
-##### 支持导出证书与私钥
+- Web3SDK切换到JavaSDK
- 支持导出前置的SDK证书与私钥、支持导出Pem/P12/WeID私钥
#### v1.4.3
diff --git a/docs/WeBASE-Node-Manager/upgrade.md b/docs/WeBASE-Node-Manager/upgrade.md
index 1d31a558..30ec2e8c 100644
--- a/docs/WeBASE-Node-Manager/upgrade.md
+++ b/docs/WeBASE-Node-Manager/upgrade.md
@@ -40,6 +40,7 @@ WeBASE-Node-Manager升级的必须步骤:
- 新增节点监控的链上TPS、出块周期、块大小的统计
- 新增合约列表中的已登记合约与链上全量合约视图、新增私钥用户列表中的已登记私钥与链上全量私钥视图
- 支持导出Txt/Pem/P12/WeID私钥文件、支持导出前置的SDK证书
+- Web3SDK切换到JavaSDK
##### 数据表更新
From d1389b5b2520b963c88781620820b6d109587d64 Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Thu, 8 Jul 2021 16:08:08 +0800
Subject: [PATCH 08/26] update web3 api of java sdk
---
docs/WeBASE-Front/interface.md | 937 +++++++++++++++++++--------------
1 file changed, 532 insertions(+), 405 deletions(-)
diff --git a/docs/WeBASE-Front/interface.md b/docs/WeBASE-Front/interface.md
index 96aeecb4..f49fa1fc 100644
--- a/docs/WeBASE-Front/interface.md
+++ b/docs/WeBASE-Front/interface.md
@@ -1663,9 +1663,7 @@ http://localhost:5002/WeBASE-Front/1/web3/blockNumber
#### 响应参数
**1)数据格式**
```
-{
- 8346
-}
+232
```
@@ -1696,7 +1694,7 @@ HTTP GET
**2)数据格式**
```
-http://localhost:5002/WeBASE-Front/1/web3/blockByNumber/100
+http://localhost:5002/WeBASE-Front/1/web3/blockByNumber/2
```
#### 响应参数
@@ -1704,66 +1702,64 @@ http://localhost:5002/WeBASE-Front/1/web3/blockByNumber/100
**1)数据格式**
```
{
- "code": 0,
- "message": "success",
- "data": {
- "number": 100,
- "hash": "0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7ade",
- "parentHash": "0xc784a2af86e6726fcdc63b57ed1b91a40efc7d8b1b7285154d399ea78bd18754",
- "nonce": 0,
- "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000040000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000800000000000000000000000000",
- "transactionsRoot": "0x27055bac669a67e8aaa1455ad9fd70b75dd86dc905c6bd0d111ed67ab182d1dc",
- "stateRoot": "0xa05ad5db11b8be6aed3b591f2f64fdbb241506cbe9ef591f3a4b946ca777f838",
- "receiptsRoot": "0xc1d4b43ed68d7263ddf50861feec26440e933a0b152917e938194f5079b48ce4",
- "author": "0x0000000000000000000000000000000000000000",
- "miner": "0x0000000000000000000000000000000000000000",
- "mixHash": null,
- "difficulty": 1,
- "totalDifficulty": 101,
- "extraData": "0xd98097312e332e302b2b302d524c696e75782f672b2b2f496e74",
- "size": 71,
- "gasLimit": 2000000000,
- "gasUsed": 121038,
- "timestamp": 1526437108478,
- "transactions": [
- {
- "hash": "0xb2c733b742045e61c0fd6e7e2bafece04d56262a4887de9f78dad2c5dd2f944b",
- "nonce": 9.1623055443573E+74,
- "blockHash": "0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7ade",
- "blockNumber": 100,
- "transactionIndex": 0,
- "from": "0x59bd3815f73b197d6ef327f2a45089f50aba942a",
- "to": "0x986278eb8e8b4ef98bdfc055c02d65865fc87ad2",
- "value": 0,
- "gasPrice": 30000000,
- "gas": 30000000,
- "input": "0x48f85bce000000000000000000000000000000000000000000000000000000000000001caf3fbec3675eabb85c0b25e2992d6f0a5e1546dad85c20733fdb27cfa4ca782a5fdfb621b416f3494c7d8ca436c12309884550d402ea79f03ef8ddfdd494f7a4",
- "creates": null,
- "publicKey": null,
- "raw": null,
- "r": null,
- "s": null,
- "v": 0,
- "valueRaw": "0x0",
- "gasPriceRaw": "0x1c9c380",
- "gasRaw": "0x1c9c380",
- "blockNumberRaw": "0x64",
- "transactionIndexRaw": "0x0",
- "nonceRaw": "0x2069170146129593df177e2c37f1b7fe74e2d0fda53dcbbca34a243d46e367a"
- }
- ],
- "uncles": [],
- "sealFields": null,
- "gasUsedRaw": "0x1d8ce",
- "totalDifficultyRaw": "0x65",
- "numberRaw": "0x64",
- "nonceRaw": null,
- "sizeRaw": "0x47",
- "gasLimitRaw": "0x77359400",
- "timestampRaw": "0x16366bddafe",
- "difficultyRaw": "0x1"
+ "number": 2,
+ "hash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "parentHash": "0x489ee0c00527879f7e2470bde7b62e9ea30fadb242bcbd9ba582d0dee4958e2f",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "transactionsRoot": "0xade02313d3200f38dfc18cdc368241cf4c1cb7e72011edf847ec216efa43a99e",
+ "receiptsRoot": "0xb7c4b856c9335bd345c0b022057567a2223218e7a7dab822981467b29ac1e326",
+ "dbHash": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "stateRoot": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "sealer": "0x2",
+ "sealerList": [
+ "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ ],
+ "extraData": [],
+ "gasLimit": "0",
+ "gasUsed": "0",
+ "timestamp": "1619424150450",
+ "signatureList": [
+ {
+ "index": "0x1",
+ "signature": "0xa05b5d220e41051fa80f212884d9cdda3a8973a4ac2d2dc74e42db32b459e5f595a61e30266f0e8bf7edb065ff107c6af5e6349f9ae518146dc686406ebbade165bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7"
+ },
+ {
+ "index": "0x3",
+ "signature": "0x48bb622e24b18f4eb601137d44b5d86e2c287be3aa849dce1768e87e75308ba69391e62f90d76bf84b9b6eb1509d11409f9b784bc7b052458a4596b81961fac8fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ },
+ {
+ "index": "0x2",
+ "signature": "0x3a3cc8c20c5cdbb6431ec1f749d94662670e87442debef119a4e6469ccb16a60a152d32754ab833efa513839b076c2aa1ceb7e536db3734b740e9192b10ee38695efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39"
+ }
+ ],
+ "transactions": [
+ {
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "blockNumber": 2,
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "gas": "0x419ce0",
+ "hash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
+ "nonce": "0x3460c30bd3e4e88a31d6d033b3a172859bf003258e9606fd63fb0d91f91f4e6",
+ "to": "0x0000000000000000000000000000000000000000",
+ "transactionIndex": "0x0",
+ "value": "0x0",
+ "gasPrice": "0x51f4d5c00",
+ "blockLimit": "0x1f5",
+ "chainId": "0x1",
+ "groupId": "0x1",
+ "extraData": "0x",
+ "signature": {
+ "r": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462b",
+ "s": "0xd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124",
+ "v": "0xc7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7",
+ "signature": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462bd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124c7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7"
+ }
}
+ ]
}
```
### 3.3. 根据块hash获取块信息接口
@@ -1793,74 +1789,72 @@ HTTP GET
**2)数据格式**
```
-http://localhost:5002/WeBASE-Front/1/web3/blockByHash/0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7ade
+http://localhost:5002/WeBASE-Front/1/web3/blockByHash/0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625
```
#### 响应参数
**1)数据格式**
```
-{
- "code": 0,
- "message": "success",
- "data": {
- "number": 100,
- "hash": "0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7ade",
- "parentHash": "0xc784a2af86e6726fcdc63b57ed1b91a40efc7d8b1b7285154d399ea78bd18754",
- "nonce": 0,
- "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000040000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000800000000000000000000000000",
- "transactionsRoot": "0x27055bac669a67e8aaa1455ad9fd70b75dd86dc905c6bd0d111ed67ab182d1dc",
- "stateRoot": "0xa05ad5db11b8be6aed3b591f2f64fdbb241506cbe9ef591f3a4b946ca777f838",
- "receiptsRoot": "0xc1d4b43ed68d7263ddf50861feec26440e933a0b152917e938194f5079b48ce4",
- "author": "0x0000000000000000000000000000000000000000",
- "miner": "0x0000000000000000000000000000000000000000",
- "mixHash": null,
- "difficulty": 1,
- "totalDifficulty": 101,
- "extraData": "0xd98097312e332e302b2b302d524c696e75782f672b2b2f496e74",
- "size": 71,
- "gasLimit": 2000000000,
- "gasUsed": 121038,
- "timestamp": 1526437108478,
- "transactions": [
- {
- "hash": "0xb2c733b742045e61c0fd6e7e2bafece04d56262a4887de9f78dad2c5dd2f944b",
- "nonce": 9.1623055443573E+74,
- "blockHash": "0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7ade",
- "blockNumber": 100,
- "transactionIndex": 0,
- "from": "0x59bd3815f73b197d6ef327f2a45089f50aba942a",
- "to": "0x986278eb8e8b4ef98bdfc055c02d65865fc87ad2",
- "value": 0,
- "gasPrice": 30000000,
- "gas": 30000000,
- "input": "0x48f85bce000000000000000000000000000000000000000000000000000000000000001caf3fbec3675eabb85c0b25e2992d6f0a5e1546dad85c20733fdb27cfa4ca782a5fdfb621b416f3494c7d8ca436c12309884550d402ea79f03ef8ddfdd494f7a4",
- "creates": null,
- "publicKey": null,
- "raw": null,
- "r": null,
- "s": null,
- "v": 0,
- "valueRaw": "0x0",
- "gasPriceRaw": "0x1c9c380",
- "gasRaw": "0x1c9c380",
- "blockNumberRaw": "0x64",
- "transactionIndexRaw": "0x0",
- "nonceRaw": "0x2069170146129593df177e2c37f1b7fe74e2d0fda53dcbbca34a243d46e367a"
- }
- ],
- "uncles": [],
- "sealFields": null,
- "gasUsedRaw": "0x1d8ce",
- "totalDifficultyRaw": "0x65",
- "numberRaw": "0x64",
- "nonceRaw": null,
- "sizeRaw": "0x47",
- "gasLimitRaw": "0x77359400",
- "timestampRaw": "0x16366bddafe",
- "difficultyRaw": "0x1"
+{{
+ "number": 2,
+ "hash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "parentHash": "0x489ee0c00527879f7e2470bde7b62e9ea30fadb242bcbd9ba582d0dee4958e2f",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "transactionsRoot": "0xade02313d3200f38dfc18cdc368241cf4c1cb7e72011edf847ec216efa43a99e",
+ "receiptsRoot": "0xb7c4b856c9335bd345c0b022057567a2223218e7a7dab822981467b29ac1e326",
+ "dbHash": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "stateRoot": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "sealer": "0x2",
+ "sealerList": [
+ "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ ],
+ "extraData": [],
+ "gasLimit": "0",
+ "gasUsed": "0",
+ "timestamp": "1619424150450",
+ "signatureList": [
+ {
+ "index": "0x1",
+ "signature": "0xa05b5d220e41051fa80f212884d9cdda3a8973a4ac2d2dc74e42db32b459e5f595a61e30266f0e8bf7edb065ff107c6af5e6349f9ae518146dc686406ebbade165bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7"
+ },
+ {
+ "index": "0x3",
+ "signature": "0x48bb622e24b18f4eb601137d44b5d86e2c287be3aa849dce1768e87e75308ba69391e62f90d76bf84b9b6eb1509d11409f9b784bc7b052458a4596b81961fac8fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ },
+ {
+ "index": "0x2",
+ "signature": "0x3a3cc8c20c5cdbb6431ec1f749d94662670e87442debef119a4e6469ccb16a60a152d32754ab833efa513839b076c2aa1ceb7e536db3734b740e9192b10ee38695efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39"
+ }
+ ],
+ "transactions": [
+ {
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "blockNumber": 2,
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "gas": "0x419ce0",
+ "hash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
+ "nonce": "0x3460c30bd3e4e88a31d6d033b3a172859bf003258e9606fd63fb0d91f91f4e6",
+ "to": "0x0000000000000000000000000000000000000000",
+ "transactionIndex": "0x0",
+ "value": "0x0",
+ "gasPrice": "0x51f4d5c00",
+ "blockLimit": "0x1f5",
+ "chainId": "0x1",
+ "groupId": "0x1",
+ "extraData": "0x",
+ "signature": {
+ "r": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462b",
+ "s": "0xd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124",
+ "v": "0xc7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7",
+ "signature": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462bd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124c7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7"
+ }
}
+ ]
}
```
@@ -1898,9 +1892,7 @@ http://localhost:5002/WeBASE-Front/1/web3/blockTransCnt/100
**1)数据格式**
```
-{
- 1
-}
+2
```
### 3.5. 获取PbftView接口
@@ -1969,7 +1961,7 @@ HTTP GET
**2)数据格式**
```
-http://localhost:5002/WeBASE-Front/1/web3/transactionReceipt/0xb2c733b742045e61c0fd6e7e2bafece04d56262a4887de9f78dad2c5dd2f944b
+http://localhost:5002/WeBASE-Front/1/web3/transactionReceipt/0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429
```
#### 响应参数
@@ -1978,43 +1970,25 @@ http://localhost:5002/WeBASE-Front/1/web3/transactionReceipt/0xb2c733b742045e61c
```
{
- "transactionHash": "0xb2c733b742045e61c0fd6e7e2bafece04d56262a4887de9f78dad2c5dd2f944b",
- "transactionIndex": 0,
- "blockHash": "0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7ade",
- "blockNumber": 100,
- "cumulativeGasUsed": 121038,
- "gasUsed": 121038,
- "contractAddress": "0x0000000000000000000000000000000000000000",
- "root": null,
- "from": null,
- "to": null,
- "logs": [
- {
- "removed": false,
- "logIndex": 0,
- "transactionIndex": 0,
- "transactionHash": "0xb2c733b742045e61c0fd6e7e2bafece04d56262a4887de9f78dad2c5dd2f944b",
- "blockHash": "0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7ade",
- "blockNumber": 100,
- "address": "0x986278eb8e8b4ef98bdfc055c02d65865fc87ad2",
- "data": "0x00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000001caf3fbec3675eabb85c0b25e2992d6f0a5e1546dad85c20733fdb27cfa4ca782a5fdfb621b416f3494c7d8ca436c12309884550d402ea79f03ef8ddfdd494f7a40000000000000000000000000000000000000000000000000000000000000040666164363863656230616530316530643731616635356331316561643031613532656638363435343866306134643133633836363164393664326461366239380000000000000000000000000000000000000000000000000000000000000002363000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023630000000000000000000000000000000000000000000000000000000000000",
- "type": "mined",
- "topics": [
- "0xbf474e795141390215f4f179557402a28c562b860f7b74dce4a3c0e0604cd97e"
- ],
- "logIndexRaw": "0",
- "blockNumberRaw": "100",
- "transactionIndexRaw": "0"
- }
- ],
- "logsBloom": null,
- "gasUsedRaw": "0x1d8ce",
- "blockNumberRaw": "100",
- "transactionIndexRaw": "0",
- "cumulativeGasUsedRaw": "0x1d8ce",
- "message": null,
- "txProof": null,
- "receiptProof": null
+ "transactionHash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "transactionIndex": "0x0",
+ "root": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "blockNumber": "2",
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "to": "0x0000000000000000000000000000000000000000",
+ "gasUsed": "316449",
+ "contractAddress": "0xa8af0ee580d8af674a60341030ddbc45431bc235",
+ "logs": [],
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "status": "0x0",
+ "statusMsg": "None",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
+ "output": "0x",
+ "txProof": null,
+ "receiptProof": null,
+ "message": null,
+ "statusOK": true
}
```
@@ -2045,7 +2019,7 @@ HTTP GET
**2)数据格式**
```
-http://localhost:5002/WeBASE-Front/1/web3/transaction/0xa6750b812b1a7e36313879b09f0c41fc583b463c15e57608416f3a32688b432b
+http://localhost:5002/WeBASE-Front/1/web3/transaction/0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429
```
#### 响应参数
@@ -2054,29 +2028,27 @@ http://localhost:5002/WeBASE-Front/1/web3/transaction/0xa6750b812b1a7e36313879b0
**1)数据格式**
```
{
- "hash": "0xb2c733b742045e61c0fd6e7e2bafece04d56262a4887de9f78dad2c5dd2f944b",
- "nonce": 9.1623055443573E+74,
- "blockHash": "0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7ade",
- "blockNumber": 100,
- "transactionIndex": 0,
- "from": "0x59bd3815f73b197d6ef327f2a45089f50aba942a",
- "to": "0x986278eb8e8b4ef98bdfc055c02d65865fc87ad2",
- "value": 0,
- "gasPrice": 30000000,
- "gas": 30000000,
- "input": "0x48f85bce000000000000000000000000000000000000000000000000000000000000001caf3fbec3675eabb85c0b25e2992d6f0a5e1546dad85c20733fdb27cfa4ca782a5fdfb621b416f3494c7d8ca436c12309884550d402ea79f03ef8ddfdd494f7a4",
- "creates": null,
- "publicKey": null,
- "raw": null,
- "r": null,
- "s": null,
- "v": 0,
- "nonceRaw": "0x2069170146129593df177e2c37f1b7fe74e2d0fda53dcbbca34a243d46e367a",
- "blockNumberRaw": "0x64",
- "transactionIndexRaw": "0x0",
- "valueRaw": "0x0",
- "gasPriceRaw": "0x1c9c380",
- "gasRaw": "0x1c9c380"
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "blockNumber": 2,
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "gas": "4300000",
+ "hash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
+ "nonce": "0x3460c30bd3e4e88a31d6d033b3a172859bf003258e9606fd63fb0d91f91f4e6",
+ "to": "0x0000000000000000000000000000000000000000",
+ "transactionIndex": "0x0",
+ "value": "0x0",
+ "gasPrice": "22000000000",
+ "blockLimit": "0x1f5",
+ "chainId": "0x1",
+ "groupId": "1",
+ "extraData": "0x",
+ "signature": {
+ "r": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462b",
+ "s": "0xd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124",
+ "v": "0xc7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7",
+ "signature": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462bd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124c7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7"
+ }
}
```
@@ -2118,11 +2090,13 @@ http://localhost:5002/WeBASE-Front/1/web3/clientVersion
**2)数据格式**
```
{
- "Build Time": "20190318 10:56:37",
- "Build Type": "Linux/g++/RelWithDebInfo",
- "FISCO-BCOS Version": "2.0.0-rc1",
- "Git Branch": "master",
- "Git Commit Hash": "2467ddf73b091bc8e0ee611ccee85db7989ad389"
+ "FISCO-BCOS Version": "2.7.2 gm",
+ "Supported Version": "2.7.2",
+ "Chain Id": "1",
+ "Build Time": "20210201 10:03:03",
+ "Build Type": "Linux/clang/Release",
+ "Git Branch": "HEAD",
+ "Git Commit Hash": "4c8a5bbe44c19db8a002017ff9dbb16d3d28e9da"
}
```
@@ -2245,7 +2219,7 @@ HTTP GET
**2)数据格式**
```
-http://localhost:5002/WeBASE-Front/1/web3/transByBlockHashAndIndex/0xf27ff42d4be65329a1e7b11365e190086d92f9836168d0379e92642786db7ade/0
+http://localhost:5002/WeBASE-Front/1/web3/transByBlockHashAndIndex/0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429/0
```
#### 响应参数
@@ -2254,29 +2228,27 @@ http://localhost:5002/WeBASE-Front/1/web3/transByBlockHashAndIndex/0xf27ff42d4be
```
{
- "hash": "0x7c503f202a5e275d8792dd2419ac48418dbec602038fb2a85c899403471f065d",
- "nonce": 1.26575985412899E+75,
- "blockHash": "0x0d9ed7b20645d5b8200347a72e7fb15347b83d74c6e1b6c3995cdb7a849f95d9",
- "blockNumber": 100,
- "transactionIndex": 0,
- "from": "0x6f00a620a61fd6b33e6076880fecc49959eaa4ea",
- "to": "0x9cb5641d991df690ed905c34f9aaf22370034220",
- "value": 0,
- "gasPrice": 1,
- "gas": 100000000,
- "input": "0x4ed3885e000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000016100000000000000000000000000000000000000000000000000000000000000",
- "creates": null,
- "publicKey": null,
- "raw": null,
- "r": null,
- "s": null,
- "v": 0,
- "blockNumberRaw": "0x64",
- "nonceRaw": "0x2cc650a5cbeb268577ac15c7dd2afee0680901de94f8543e86e906247e7edbf",
- "valueRaw": "0x0",
- "gasPriceRaw": "0x1",
- "gasRaw": "0x5f5e100",
- "transactionIndexRaw": "0x0"
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "blockNumber": 2,
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "gas": "4300000",
+ "hash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
+ "nonce": "0x3460c30bd3e4e88a31d6d033b3a172859bf003258e9606fd63fb0d91f91f4e6",
+ "to": "0x0000000000000000000000000000000000000000",
+ "transactionIndex": "0x0",
+ "value": "0x0",
+ "gasPrice": "22000000000",
+ "blockLimit": "0x1f5",
+ "chainId": "0x1",
+ "groupId": "1",
+ "extraData": "0x",
+ "signature": {
+ "r": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462b",
+ "s": "0xd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124",
+ "v": "0xc7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7",
+ "signature": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462bd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124c7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7"
+ }
}
```
@@ -2308,7 +2280,7 @@ HTTP GET
**2)数据格式**
```
-http://localhost:5002/WeBASE-Front/1/web3/transByBlockNumberAndIndex/100/0
+http://localhost:5002/WeBASE-Front/1/web3/transByBlockNumberAndIndex/2/0
```
#### 响应参数
@@ -2316,29 +2288,27 @@ http://localhost:5002/WeBASE-Front/1/web3/transByBlockNumberAndIndex/100/0
**1)数据格式**
```
{
- "hash": "0x7c503f202a5e275d8792dd2419ac48418dbec602038fb2a85c899403471f065d",
- "nonce": 1.26575985412899E+75,
- "blockHash": "0x0d9ed7b20645d5b8200347a72e7fb15347b83d74c6e1b6c3995cdb7a849f95d9",
- "blockNumber": 100,
- "transactionIndex": 0,
- "from": "0x6f00a620a61fd6b33e6076880fecc49959eaa4ea",
- "to": "0x9cb5641d991df690ed905c34f9aaf22370034220",
- "value": 0,
- "gasPrice": 1,
- "gas": 100000000,
- "input": "0x4ed3885e000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000016100000000000000000000000000000000000000000000000000000000000000",
- "creates": null,
- "publicKey": null,
- "raw": null,
- "r": null,
- "s": null,
- "v": 0,
- "blockNumberRaw": "0x64",
- "nonceRaw": "0x2cc650a5cbeb268577ac15c7dd2afee0680901de94f8543e86e906247e7edbf",
- "valueRaw": "0x0",
- "gasPriceRaw": "0x1",
- "gasRaw": "0x5f5e100",
- "transactionIndexRaw": "0x0"
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "blockNumber": 2,
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "gas": "4300000",
+ "hash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
+ "nonce": "0x3460c30bd3e4e88a31d6d033b3a172859bf003258e9606fd63fb0d91f91f4e6",
+ "to": "0x0000000000000000000000000000000000000000",
+ "transactionIndex": "0x0",
+ "value": "0x0",
+ "gasPrice": "22000000000",
+ "blockLimit": "0x1f5",
+ "chainId": "0x1",
+ "groupId": "1",
+ "extraData": "0x",
+ "signature": {
+ "r": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462b",
+ "s": "0xd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124",
+ "v": "0xc7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7",
+ "signature": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462bd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124c7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7"
+ }
}
```
@@ -2375,49 +2345,54 @@ http://localhost:5002/WeBASE-Front/1/web3/consensusStatus
**1)数据格式**
```
-[
+{
+ "baseConsensusInfo": {
+ "nodeNum": "4",
+ "consensusedBlockNumber": "233",
+ "highestblockNumber": "232",
+ "groupId": "1",
+ "protocolId": "65544",
+ "accountType": "1",
+ "cfgErr": "false",
+ "omitEmptyBlock": "true",
+ "nodeId": "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d",
+ "allowFutureBlocks": "true",
+ "connectedNodes": "3",
+ "currentView": "102303",
+ "toView": "102303",
+ "leaderFailed": "false",
+ "highestblockHash": "0x7f0885a7188bd5c1b3f8c182e00be0e63a3b1653b12752cf8501ddac995e6efc",
+ "leaderId": null,
+ "leaderIdx": null,
+ "node_index": "3",
+ "node index": null,
+ "max_faulty_leader": "1",
+ "sealer.": [
+ "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ ]
+ },
+ "viewInfos": [
{
- "accountType": 1,
- "allowFutureBlocks": true,
- "cfgErr": false,
- "connectedNodes": 3,
- "consensusedBlockNumber": 126,
- "currentView": 499824,
- "groupId": 1,
- "highestblockHash": "0x563d4ec57b597d5d81f0c1b0045c04e57ffebe3a02ff3fef402be56742dc8fd1",
- "highestblockNumber": 125,
- "leaderFailed": false,
- "max_faulty_leader": 1,
- "node index": 2,
- "nodeId": "d822165959a0ed217df6541f1a7dd38b79336ff571dd5f8f85ad76f3e7ec097e1eabd8b03e4a757fd5a9fb0eea905aded56aaf44df83c34b73acb9ab7ac65010",
- "nodeNum": 4,
- "omitEmptyBlock": true,
- "protocolId": 264,
- "sealer.0": "552398be0eef124c000e632b0b76a48c52b6cfbd547d92c15527c2d1df15fab2bcded48353db22526c3540e4ab2027630722889f20a4a614bb11a7887a85941b",
- "sealer.1": "adfa2f9116d7ff68e0deb75307fa1595d636bf097ad1de4fb55cff00e4fef40b453abb30388aa2112bf5cd4c987afe2e047250f7049791aa1ee7091c9e2ab7bb",
- "sealer.2": "d822165959a0ed217df6541f1a7dd38b79336ff571dd5f8f85ad76f3e7ec097e1eabd8b03e4a757fd5a9fb0eea905aded56aaf44df83c34b73acb9ab7ac65010",
- "sealer.3": "dde0bbf5eb3a731e6da861586e98e088e16e6fdd9afae2f2c213cead20a4f5eaa3910042b70d62266d2350d98a43c1f235c8e0da384448384893857873abdb75",
- "toView": 499824
+ "nodeId": "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "view": "102300"
},
- [
- {
- "nodeId": "552398be0eef124c000e632b0b76a48c52b6cfbd547d92c15527c2d1df15fab2bcded48353db22526c3540e4ab2027630722889f20a4a614bb11a7887a85941b",
- "view": 499823
- },
- {
- "nodeId": "adfa2f9116d7ff68e0deb75307fa1595d636bf097ad1de4fb55cff00e4fef40b453abb30388aa2112bf5cd4c987afe2e047250f7049791aa1ee7091c9e2ab7bb",
- "view": 499820
- },
- {
- "nodeId": "d822165959a0ed217df6541f1a7dd38b79336ff571dd5f8f85ad76f3e7ec097e1eabd8b03e4a757fd5a9fb0eea905aded56aaf44df83c34b73acb9ab7ac65010",
- "view": 499824
- },
- {
- "nodeId": "dde0bbf5eb3a731e6da861586e98e088e16e6fdd9afae2f2c213cead20a4f5eaa3910042b70d62266d2350d98a43c1f235c8e0da384448384893857873abdb75",
- "view": 499822
- }
- ]
-]
+ {
+ "nodeId": "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "view": "102301"
+ },
+ {
+ "nodeId": "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "view": "102302"
+ },
+ {
+ "nodeId": "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d",
+ "view": "102303"
+ }
+ ]
+}
```
### 3.14. 获取节点状态列表接口
@@ -2466,18 +2441,32 @@ http://localhost:5002/WeBASE-Front/1/web3/getNodeStatusList
```
[
{
- "nodeId": "2917803543bcb58ad91cdf67e7b576a5b0440b4f76e6f5440edb8b09dadee297174d25133e841a17e4f89aa59bbaf4c80896af9d6a978aae04b3d0b9cd9d5b84",
- "blockNumber": 3,
- "pbftView": 146093,
+ "nodeId": "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "blockNumber": 232,
+ "pbftView": 101224,
"status": 1,
- "latestStatusUpdateTime": "2019-07-25 10:07:07"
+ "latestStatusUpdateTime": "2021-07-08 15:42:01"
},
{
- "nodeId": "8722cc018a79bc48b7408649fac4a45bd336a88959570ebba15eefb48fdc23b8a96f328d46852f3d12c4dde7346c573585386fadb5568ce1820144c106af1f72",
- "blockNumber": 3,
- "pbftView": 146095,
+ "nodeId": "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "blockNumber": 232,
+ "pbftView": 101221,
"status": 1,
- "latestStatusUpdateTime": "2019-07-25 10:07:07"
+ "latestStatusUpdateTime": "2021-07-08 15:42:01"
+ },
+ {
+ "nodeId": "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "blockNumber": 232,
+ "pbftView": 101222,
+ "status": 1,
+ "latestStatusUpdateTime": "2021-07-08 15:42:01"
+ },
+ {
+ "nodeId": "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d",
+ "blockNumber": 232,
+ "pbftView": 101225,
+ "status": 1,
+ "latestStatusUpdateTime": "2021-07-08 15:42:01"
}
]
```
@@ -2635,36 +2624,31 @@ http://localhost:5002/WeBASE-Front/1/web3/peers
**1)数据格式**
```
[
- {
- "ipandPort": "127.0.0.1:30301",
- "IPAndPort": "127.0.0.1:30301",
- "NodeID": "adfa2f9116d7ff68e0deb75307fa1595d636bf097ad1de4fb55cff00e4fef40b453abb30388aa2112bf5cd4c987afe2e047250f7049791aa1ee7091c9e2ab7bb",
- "Topic": []
- },
- {
- "ipandPort": "127.0.0.1:57678",
- "IPAndPort": "127.0.0.1:57678",
- "NodeID": "e28f3d7f5b82e21918a15639eac342dcf678ebb0efe7c65c76514b0ba6b28ace8e47b4a25c9b3f9763b79db847e250a19f827b132f230298980f3ca9779c2564",
- "Topic": []
- },
- {
- "ipandPort": "127.0.0.1:57608",
- "IPAndPort": "127.0.0.1:57608",
- "NodeID": "dde0bbf5eb3a731e6da861586e98e088e16e6fdd9afae2f2c213cead20a4f5eaa3910042b70d62266d2350d98a43c1f235c8e0da384448384893857873abdb75",
- "Topic": []
- },
- {
- "ipandPort": "127.0.0.1:57616",
- "IPAndPort": "127.0.0.1:57616",
- "NodeID": "552398be0eef124c000e632b0b76a48c52b6cfbd547d92c15527c2d1df15fab2bcded48353db22526c3540e4ab2027630722889f20a4a614bb11a7887a85941b",
- "Topic": []
- },
- {
- "ipandPort": "127.0.0.1:57670",
- "IPAndPort": "127.0.0.1:57670",
- "NodeID": "56edfaf60bcb09b9814ad31dcd959eb388f0314445db3deb92cedde97c0ecec210f713591a15f3a7168ba023290cfbe78656b57c37157e6ec74a85182630bd61",
- "Topic": []
- }
+ {
+ "NodeID": "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "IPAndPort": "127.0.0.1:65030",
+ "Agency": "agencyA_son",
+ "Topic": [],
+ "Node": "node2"
+ },
+ {
+ "NodeID": "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "IPAndPort": "127.0.0.1:65014",
+ "Agency": "agencyA_son",
+ "Topic": [],
+ "Node": "node3"
+ },
+ {
+ "NodeID": "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "IPAndPort": "127.0.0.1:65022",
+ "Agency": "agencyA_son",
+ "Topic": [
+ "_block_notify_1",
+ "_block_notify_2",
+ "_block_notify_2147483647"
+ ],
+ "Node": "node1"
+ }
]
```
@@ -2774,7 +2758,7 @@ HTTP GET
**2)数据格式**
```
-http://localhost:5002/WeBASE-Front/1/web3/search?input=1
+http://localhost:5002/WeBASE-Front/1/web3/search?input=123
```
#### 响应参数
@@ -2782,62 +2766,64 @@ http://localhost:5002/WeBASE-Front/1/web3/search?input=1
**1)数据格式**
```
{
- "number": 1,
- "hash": "0x3875dbec6e0ad0790dc0a0e8535b7c286ef7cee4149e5b1494f5c65631a9e321",
- "parentHash": "0xed3350d191d23cbc609c98e920baa583403b9a02fa934df868e7f425cd72f5c3",
- "nonce": 0,
- "sha3Uncles": null,
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "transactionsRoot": "0xa3db8478e08931f8967023a60d260b182d828aad959433e0b77f097d7650b742",
- "stateRoot": "0xf32d3e504fc8813c139d1f6f61ae1c8e355502e10b9ea24e5ad5d3ada01ea400",
- "receiptsRoot": null,
- "author": null,
- "sealer": "0x0",
- "mixHash": null,
- "difficulty": 0,
- "totalDifficulty": 0,
- "extraData": [],
- "size": 0,
- "gasLimit": 0,
- "gasUsed": 0,
- "timestamp": 1557304350431,
- "transactions": [
- {
- "hash": "0x4145b921309fcaa92b05b782e0181d671b8e68fc6d61d939358ed558fa3489c9",
- "nonce": 1.47418536037145E+75,
- "blockHash": "0x3875dbec6e0ad0790dc0a0e8535b7c286ef7cee4149e5b1494f5c65631a9e321",
- "blockNumber": 1,
- "transactionIndex": 0,
- "from": "0x33a41878e78fb26735bf425f9328990e3a1a89df",
- "to": null,
- "value": 0,
- "gasPrice": 1,
- "gas": 100000000,
- "input": "0x6080604052348015600f57600080fd5b5060868061001e6000396000f300608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806335b09a6e146044575b600080fd5b348015604f57600080fd5b5060566058565b005b5600a165627a7a723058204aacdb57d6f2ae0f7f6c89c28236bba0205631183fd99785de220481566e683f0029",
- "creates": null,
- "publicKey": null,
- "raw": null,
- "r": null,
- "s": null,
- "v": 0,
- "nonceRaw": "0x3425bfe0f36e343686ccbe34a4fe8b05e0e0257ea7ee87417a6d898f0eb43ec",
- "transactionIndexRaw": "0x0",
- "blockNumberRaw": "0x1",
- "valueRaw": "0x0",
- "gasPriceRaw": "0x1",
- "gasRaw": "0x5f5e100"
- }
- ],
- "uncles": null,
- "sealFields": null,
- "nonceRaw": null,
- "numberRaw": "0x1",
- "difficultyRaw": null,
- "totalDifficultyRaw": null,
- "sizeRaw": null,
- "gasLimitRaw": "0x0",
- "gasUsedRaw": "0x0",
- "timestampRaw": "0x16a969296df"
+ "number": 123,
+ "hash": "0xa12a4a8d26a15fcff6f67acf94a3fb2c08d4476806009be40fe4026fd622419d",
+ "parentHash": "0x898c6b1657d4eb26307b39f248e471498975eb820671c7540fa516e6c7b411e8",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "transactionsRoot": "0xa94acacd692cf3b23e19b429ce89c2016020b2264854fd609ba2b16f0c7d5f73",
+ "receiptsRoot": "0x9529b51c1f7ddd178ffd4a65d146b50cfc0beb405a808677dfddd694cf555a09",
+ "dbHash": "0x3047354b6776fd1f02911f2c4fc4aa1b215b3df53cc7504a71b5f3bfe12eca3a",
+ "stateRoot": "0x3047354b6776fd1f02911f2c4fc4aa1b215b3df53cc7504a71b5f3bfe12eca3a",
+ "sealer": "0x1",
+ "sealerList": [
+ "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ ],
+ "extraData": [],
+ "gasLimit": "0",
+ "gasUsed": "0",
+ "timestamp": "1621928850887",
+ "signatureList": [
+ {
+ "index": "0x3",
+ "signature": "0x8549a8adddb9ff2d8d472b7a65ca414a7f10519f59e11244b9e92fed2e30f29cc272938a695ebb1ead579bdaed401b6aa31395890139abe406518471efa55d6afe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ },
+ {
+ "index": "0x1",
+ "signature": "0x0ff480d6c3fe5908c554653376492cba23cfc938bc0847298c9c8b4c140b417be1990d25c0239f9b18e24276e864e1f2ac4beab47ddf5277a767bb7c93e143ed65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7"
+ },
+ {
+ "index": "0x2",
+ "signature": "0x50aa1513c390e5e61221418aa46f8dd45e3ce6e8c0a6fa5aa75650517560589590172b1e6cc64e9ba7ab45c964ff925524cecf6c2be0a28ea11426febb69305195efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39"
+ }
+ ],
+ "transactions": [
+ {
+ "blockHash": "0xa12a4a8d26a15fcff6f67acf94a3fb2c08d4476806009be40fe4026fd622419d",
+ "blockNumber": 123,
+ "from": "0x1cd8126354aa951dc8ed083ed91fd31fad1f50d8",
+ "gas": "0x5f5e100",
+ "hash": "0xbe858390cf0bd94f9d17c6ab5e04a7d354f9482f2568f067bdc2529a0af324db",
+ "input": "0x25e85d16000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000803935656661666135313937373936653765646636343731393164653833663432353964376362623036306634626163353836386265343734303337663439313434643538316331356438616566396230376437386631383034316135663433633363323633353265626266353538336364323330373033353863386662613339",
+ "nonce": "0x1479caf2ff5f1a6121beac93c85b59c36280ffe6a7f124cbc3d232021fa3307",
+ "to": "0x0000000000000000000000000000000000001003",
+ "transactionIndex": "0x0",
+ "value": "0x0",
+ "gasPrice": "0x1",
+ "blockLimit": "0x26e",
+ "chainId": "0x1",
+ "groupId": "0x1",
+ "extraData": "0x",
+ "signature": {
+ "r": "0x36edc104cc5c2c5c992f9804bd3415378f93c18ebc9cdeb7794c08b1c95fd7ad",
+ "s": "0xed555fe3a192acc5ea01951f7286f93cff3471e84731a2942968a2fd9a9a14bc",
+ "v": "0xd3a0fac51c66adf23bfccc6bb3aaa3d3623040912963ceb818ca2d8b1fb649c64bce64d99a8d9a39158b2c713101dbca10a478131dcae7e42d156e0e69455652",
+ "signature": "0x36edc104cc5c2c5c992f9804bd3415378f93c18ebc9cdeb7794c08b1c95fd7aded555fe3a192acc5ea01951f7286f93cff3471e84731a2942968a2fd9a9a14bcd3a0fac51c66adf23bfccc6bb3aaa3d3623040912963ceb818ca2d8b1fb649c64bce64d99a8d9a39158b2c713101dbca10a478131dcae7e42d156e0e69455652"
+ }
+ }
+ ]
}
```
@@ -2875,33 +2861,35 @@ http://localhost:5002/WeBASE-Front/1/web3/syncStatus
**1)数据格式**
```
{
- "blockNumber": 126,
- "genesisHash": "0xed3350d191d23cbc609c98e920baa583403b9a02fa934df868e7f425cd72f5c3",
- "isSyncing": false,
- "latestHash": "0x49ca6eb004f372c71ed900ec6992582cd107e4f3ea36aaa5a0a78829ebef1f14",
- "nodeId": "d822165959a0ed217df6541f1a7dd38b79336ff571dd5f8f85ad76f3e7ec097e1eabd8b03e4a757fd5a9fb0eea905aded56aaf44df83c34b73acb9ab7ac65010",
- "peers": [
- {
- "blockNumber": 126,
- "genesisHash": "0xed3350d191d23cbc609c98e920baa583403b9a02fa934df868e7f425cd72f5c3",
- "latestHash": "0x49ca6eb004f372c71ed900ec6992582cd107e4f3ea36aaa5a0a78829ebef1f14",
- "nodeId": "552398be0eef124c000e632b0b76a48c52b6cfbd547d92c15527c2d1df15fab2bcded48353db22526c3540e4ab2027630722889f20a4a614bb11a7887a85941b"
- },
- {
- "blockNumber": 126,
- "genesisHash": "0xed3350d191d23cbc609c98e920baa583403b9a02fa934df868e7f425cd72f5c3",
- "latestHash": "0x49ca6eb004f372c71ed900ec6992582cd107e4f3ea36aaa5a0a78829ebef1f14",
- "nodeId": "adfa2f9116d7ff68e0deb75307fa1595d636bf097ad1de4fb55cff00e4fef40b453abb30388aa2112bf5cd4c987afe2e047250f7049791aa1ee7091c9e2ab7bb"
- },
- {
- "blockNumber": 126,
- "genesisHash": "0xed3350d191d23cbc609c98e920baa583403b9a02fa934df868e7f425cd72f5c3",
- "latestHash": "0x49ca6eb004f372c71ed900ec6992582cd107e4f3ea36aaa5a0a78829ebef1f14",
- "nodeId": "dde0bbf5eb3a731e6da861586e98e088e16e6fdd9afae2f2c213cead20a4f5eaa3910042b70d62266d2350d98a43c1f235c8e0da384448384893857873abdb75"
- }
- ],
- "protocolId": 265,
- "txPoolSize": "0"
+ "isSyncing": "false",
+ "protocolId": "65545",
+ "genesisHash": "1caec77e0ff42af4f045af2ba5503c775c33430085b246374cdd23d1c9191173",
+ "nodeId": "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d",
+ "blockNumber": "232",
+ "latestHash": "7f0885a7188bd5c1b3f8c182e00be0e63a3b1653b12752cf8501ddac995e6efc",
+ "knownHighestNumber": "232",
+ "txPoolSize": "0",
+ "peers": [
+ {
+ "nodeId": "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "genesisHash": "1caec77e0ff42af4f045af2ba5503c775c33430085b246374cdd23d1c9191173",
+ "blockNumber": "232",
+ "latestHash": "7f0885a7188bd5c1b3f8c182e00be0e63a3b1653b12752cf8501ddac995e6efc"
+ },
+ {
+ "nodeId": "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "genesisHash": "1caec77e0ff42af4f045af2ba5503c775c33430085b246374cdd23d1c9191173",
+ "blockNumber": "232",
+ "latestHash": "7f0885a7188bd5c1b3f8c182e00be0e63a3b1653b12752cf8501ddac995e6efc"
+ },
+ {
+ "nodeId": "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "genesisHash": "1caec77e0ff42af4f045af2ba5503c775c33430085b246374cdd23d1c9191173",
+ "blockNumber": "232",
+ "latestHash": "7f0885a7188bd5c1b3f8c182e00be0e63a3b1653b12752cf8501ddac995e6efc"
+ }
+ ],
+ "knownLatestHash": "7f0885a7188bd5c1b3f8c182e00be0e63a3b1653b12752cf8501ddac995e6efc"
}
```
@@ -3310,6 +3298,145 @@ http://localhost:5002/WeBASE-Front/1/web3/nodeInfo
```
+### 3.30. 根据块高获取区块头
+
+
+#### 接口描述
+
+> 返回
+
+#### 接口URL
+
+**http://localhost:5002/WeBASE-Front/{groupId}/web3/blockHeaderByNumber/{blockNumber}**
+
+#### 调用方法
+
+HTTP GET
+
+#### 请求参数
+
+**1)参数表**
+
+| **序号** | **中文** | **参数名** | **类型** | **最大长度** | **必填** | **说明** |
+| -------- | -------- | ---------------- | ---------- | ------------ | -------- | -------- |
+| 1 | 群组编号 | groupId | int | | 是 | |
+
+**2)数据格式**
+
+```
+http://localhost:5002/WeBASE-Front/1/web3/blockHeaderByNumber/2
+```
+
+#### 响应参数
+**1)数据格式**
+
+```
+{
+ "number": 2,
+ "hash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "parentHash": "0x489ee0c00527879f7e2470bde7b62e9ea30fadb242bcbd9ba582d0dee4958e2f",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "transactionsRoot": "0xade02313d3200f38dfc18cdc368241cf4c1cb7e72011edf847ec216efa43a99e",
+ "receiptsRoot": "0xb7c4b856c9335bd345c0b022057567a2223218e7a7dab822981467b29ac1e326",
+ "dbHash": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "stateRoot": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "sealer": "0x2",
+ "sealerList": [
+ "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ ],
+ "extraData": [],
+ "gasLimit": "0",
+ "gasUsed": "0",
+ "timestamp": "1619424150450",
+ "signatureList": [
+ {
+ "index": "0x1",
+ "signature": "0xa05b5d220e41051fa80f212884d9cdda3a8973a4ac2d2dc74e42db32b459e5f595a61e30266f0e8bf7edb065ff107c6af5e6349f9ae518146dc686406ebbade165bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7"
+ },
+ {
+ "index": "0x3",
+ "signature": "0x48bb622e24b18f4eb601137d44b5d86e2c287be3aa849dce1768e87e75308ba69391e62f90d76bf84b9b6eb1509d11409f9b784bc7b052458a4596b81961fac8fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ },
+ {
+ "index": "0x2",
+ "signature": "0x3a3cc8c20c5cdbb6431ec1f749d94662670e87442debef119a4e6469ccb16a60a152d32754ab833efa513839b076c2aa1ceb7e536db3734b740e9192b10ee38695efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39"
+ }
+ ]
+}
+```
+
+### 3.31. 根据区块哈希获取区块头
+
+
+#### 接口描述
+
+> 返回
+
+#### 接口URL
+
+**http://localhost:5002/WeBASE-Front/{groupId}/web3/blockHeaderByHash/{blockHash}**
+
+#### 调用方法
+
+HTTP GET
+
+#### 请求参数
+
+**1)参数表**
+
+| **序号** | **中文** | **参数名** | **类型** | **最大长度** | **必填** | **说明** |
+| -------- | -------- | ---------------- | ---------- | ------------ | -------- | -------- |
+| 1 | 群组编号 | groupId | int | | 是 | |
+
+**2)数据格式**
+
+```
+http://localhost:5002/WeBASE-Front/1/web3/blockHeaderByHash/0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625
+```
+
+#### 响应参数
+**1)数据格式**
+
+```
+{
+ "number": 2,
+ "hash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "parentHash": "0x489ee0c00527879f7e2470bde7b62e9ea30fadb242bcbd9ba582d0dee4958e2f",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "transactionsRoot": "0xade02313d3200f38dfc18cdc368241cf4c1cb7e72011edf847ec216efa43a99e",
+ "receiptsRoot": "0xb7c4b856c9335bd345c0b022057567a2223218e7a7dab822981467b29ac1e326",
+ "dbHash": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "stateRoot": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "sealer": "0x2",
+ "sealerList": [
+ "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ ],
+ "extraData": [],
+ "gasLimit": "0",
+ "gasUsed": "0",
+ "timestamp": "1619424150450",
+ "signatureList": [
+ {
+ "index": "0x1",
+ "signature": "0xa05b5d220e41051fa80f212884d9cdda3a8973a4ac2d2dc74e42db32b459e5f595a61e30266f0e8bf7edb065ff107c6af5e6349f9ae518146dc686406ebbade165bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7"
+ },
+ {
+ "index": "0x3",
+ "signature": "0x48bb622e24b18f4eb601137d44b5d86e2c287be3aa849dce1768e87e75308ba69391e62f90d76bf84b9b6eb1509d11409f9b784bc7b052458a4596b81961fac8fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ },
+ {
+ "index": "0x2",
+ "signature": "0x3a3cc8c20c5cdbb6431ec1f749d94662670e87442debef119a4e6469ccb16a60a152d32754ab833efa513839b076c2aa1ceb7e536db3734b740e9192b10ee38695efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39"
+ }
+ ]
+}
+```
## 4. 性能检测接口
From df21cea2dd9f7948a740ad85449b2980d66c927b Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Thu, 8 Jul 2021 16:11:31 +0800
Subject: [PATCH 09/26] update api trans receipt
---
docs/WeBASE-Front/interface.md | 76 +++++++++++++++++-----------------
1 file changed, 38 insertions(+), 38 deletions(-)
diff --git a/docs/WeBASE-Front/interface.md b/docs/WeBASE-Front/interface.md
index f49fa1fc..8e0439a4 100644
--- a/docs/WeBASE-Front/interface.md
+++ b/docs/WeBASE-Front/interface.md
@@ -3955,25 +3955,25 @@ b、正确发送数据上链返回值信息(交易收据)
```
{
- "transactionHash": "0xd1234cdb673447b654874d05d4ed98be89f3cb7c5a6c12bc51e1274a03af029c",
- "transactionIndex": "0x0",
- "root": "0xeecf2b6bbb028e38e704ca88fe1d9f5e3d43197b32c3336d3273d86fb3a135f0",
- "blockNumber": "0xa9",
- "blockHash": "0x906bdf0747ba68c03e6cf73463db62fdbd8ab8debc149f890475775d7c6a8af7",
- "from": "0x7bfa3539c8761978f0a2a1f7f240bde97819fb03",
- "to": "0xe10441d9179cf0424aae808b51bc85dcbbfe1447",
- "gasUsed": "0x710b",
- "contractAddress": "0x0000000000000000000000000000000000000000",
- "logs": [],
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "status": "0x0",
- "statusMsg": "None",
- "input": "0x3590b49f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000033333330000000000000000000000000000000000000000000000000000000000",
- "output": "0x",
- "txProof": null,
- "receiptProof": null,
- "message": "Success",
- "statusOK": true
+ "transactionHash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "transactionIndex": "0x0",
+ "root": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "blockNumber": "2",
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "to": "0x0000000000000000000000000000000000000000",
+ "gasUsed": "316449",
+ "contractAddress": "0xa8af0ee580d8af674a60341030ddbc45431bc235",
+ "logs": [],
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "status": "0x0",
+ "statusMsg": "None",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
+ "output": "0x",
+ "txProof": null,
+ "receiptProof": null,
+ "message": null,
+ "statusOK": true
}
```
@@ -4074,25 +4074,25 @@ b、正确发送数据上链返回值信息(交易收据)
```
{
- "transactionHash": "0xd1234cdb673447b654874d05d4ed98be89f3cb7c5a6c12bc51e1274a03af029c",
- "transactionIndex": "0x0",
- "root": "0xeecf2b6bbb028e38e704ca88fe1d9f5e3d43197b32c3336d3273d86fb3a135f0",
- "blockNumber": "0xa9",
- "blockHash": "0x906bdf0747ba68c03e6cf73463db62fdbd8ab8debc149f890475775d7c6a8af7",
- "from": "0x7bfa3539c8761978f0a2a1f7f240bde97819fb03",
- "to": "0xe10441d9179cf0424aae808b51bc85dcbbfe1447",
- "gasUsed": "0x710b",
- "contractAddress": "0x0000000000000000000000000000000000000000",
- "logs": [],
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "status": "0x0",
- "statusMsg": "None",
- "input": "0x3590b49f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000033333330000000000000000000000000000000000000000000000000000000000",
- "output": "0x",
- "txProof": null,
- "receiptProof": null,
- "message": "Success",
- "statusOK": true
+ "transactionHash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "transactionIndex": "0x0",
+ "root": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "blockNumber": "2",
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "to": "0x0000000000000000000000000000000000000000",
+ "gasUsed": "316449",
+ "contractAddress": "0xa8af0ee580d8af674a60341030ddbc45431bc235",
+ "logs": [],
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "status": "0x0",
+ "statusMsg": "None",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
+ "output": "0x",
+ "txProof": null,
+ "receiptProof": null,
+ "message": null,
+ "statusOK": true
}
```
From f089471ac2871962584bf63d7951a11122eed9dd Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Thu, 8 Jul 2021 16:17:23 +0800
Subject: [PATCH 10/26] update encode function api
---
docs/WeBASE-Front/interface.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/WeBASE-Front/interface.md b/docs/WeBASE-Front/interface.md
index 8e0439a4..92f2565f 100644
--- a/docs/WeBASE-Front/interface.md
+++ b/docs/WeBASE-Front/interface.md
@@ -4402,7 +4402,7 @@ HTTP POST
| -------- | --------------------------- | --------------- | -------- | ------------ | -------- | ------------------------------------------------------------ |
| 1 | 方法名 | funcName | String | | 是 | |
| 2 | 合约编译后生成的abi文件内容 | contractAbi | List | | 是 | 合约中单个函数的ABI,若不存在同名函数可以传入整个合约ABI,格式:JSONArray |
-| 3 | 方法参数 | funcParam | List | | 否 | JSON数组,多个参数以逗号分隔(参数为数组时同理),如:["str1",["arr1","arr2"]],根据所调用的合约方法判断是否必填 |
+| 3 | 方法参数 | funcParam | List | | 是 | JSON数组,多个参数以逗号分隔(参数为数组时同理),如:["str1",["arr1","arr2"]],根据所调用的合约方法判断是否必填,为空则使用`[]`空数组代替 |
**2)数据格式**
From d466dbb4f1ec2e16d866b4f1a973c465fed63334 Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Thu, 8 Jul 2021 16:55:28 +0800
Subject: [PATCH 11/26] update java sdk nodemgr api doc
---
docs/WeBASE-Node-Manager/interface.md | 370 ++++++++++++++++++++------
1 file changed, 282 insertions(+), 88 deletions(-)
diff --git a/docs/WeBASE-Node-Manager/interface.md b/docs/WeBASE-Node-Manager/interface.md
index 879f9c9b..c9e5b8bb 100644
--- a/docs/WeBASE-Node-Manager/interface.md
+++ b/docs/WeBASE-Node-Manager/interface.md
@@ -488,13 +488,13 @@ http://127.0.0.1:5001/WeBASE-Node-Manager/transaction/transList/300001/1/10?tran
| 序号 | 输入参数 | 类型 | 可为空 | 备注 |
|------|-------------|---------------|--------|-------------------------------|
| 1 | groupId | int | 否 | 所属群组编号 |
-| 2 | transHash | String | 是 | 交易hash |
+| 2 | transHash | String | 否 | 交易hash |
***2)入参示例***
```
-http://127.0.0.1:5001/WeBASE-Node-Manager/transaction/transactionReceipt/1/0xda879949df6b5d75d2d807f036b461e0cebcc1abaccac119c9a282d3941a4818
+http://127.0.0.1:5001/WeBASE-Node-Manager/transaction/transactionReceipt/1/0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429
```
@@ -529,23 +529,25 @@ http://127.0.0.1:5001/WeBASE-Node-Manager/transaction/transactionReceipt/1/0xda8
"code": 0,
"message": "success",
"data": {
- "transactionHash": "0xda879949df6b5d75d2d807f036b461e0cebcc1abaccac119c9a282d3941a4818",
- "transactionIndex": 0,
- "blockHash": "0x739853061c6c87ed691c0ee6f938589f7e2e442d42b16f582b353a475359b91d",
- "blockNumber": 4311,
- "cumulativeGasUsed": 0,
- "gasUsed": 32940,
- "contractAddress": "0x0000000000000000000000000000000000000000",
+ "transactionHash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "transactionIndex": "0x0",
+ "root": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "blockNumber": "2",
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "to": "0x0000000000000000000000000000000000000000",
+ "gasUsed": "316449",
+ "contractAddress": "0xa8af0ee580d8af674a60341030ddbc45431bc235",
+ "logs": [],
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x0",
- "from": "0xe4bc056009daed8253008e03db6f62d93ccfacea",
- "to": "0x522eda3fbe88c07025f1db3f7dc7d9836af95b3f",
+ "statusMsg": "None",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
"output": "0x",
- "logs": [],
- "logsBloom": "0x000000000000000000000000000000000000000",
- "blockNumberRaw": "0x10d7",
- "transactionIndexRaw": "0x0",
- "statusOK": true,
- "gasUsedRaw": "0x80ac"
+ "txProof": null,
+ "receiptProof": null,
+ "message": null,
+ "statusOK": true
}
}
```
@@ -583,7 +585,7 @@ http://127.0.0.1:5001/WeBASE-Node-Manager/transaction/transactionReceipt/1/0xda8
***2)入参示例***
```
-http://127.0.0.1:5001/WeBASE-Node-Manager/transaction/transInfo/1/0xda879949df6b5d75d2d807f036b461e0cebcc1abaccac119c9a282d3941a4818
+http://127.0.0.1:5001/WeBASE-Node-Manager/transaction/transInfo/1/0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429
```
@@ -628,23 +630,27 @@ http://127.0.0.1:5001/WeBASE-Node-Manager/transaction/transInfo/1/0xda879949df6b
"code": 0,
"message": "success",
"data": {
- "hash": "0xda879949df6b5d75d2d807f036b461e0cebcc1abaccac119c9a282d3941a4818",
- "nonce": "600264747827990445399299219738839026203774909117379671331964756256186263529",
- "blockHash": "0x739853061c6c87ed691c0ee6f938589f7e2e442d42b16f582b353a475359b91d",
- "blockNumber": 4311,
- "transactionIndex": 0,
- "from": "0xe4bc056009daed8253008e03db6f62d93ccfacea",
- "to": "0x522eda3fbe88c07025f1db3f7dc7d9836af95b3f",
- "value": 0,
- "gasPrice": 100000000,
- "gas": 100000000,
- "input": "0x4ed3885e000000000000000",
- "v": 0,
- "nonceRaw": "0x153bce0f26461030fe5189385b9c3e84336b007769a3849524ca3f4af7d67e9",
- "blockNumberRaw": "0x10d7",
- "transactionIndexRaw": "0x0",
- "gasPriceRaw": "0x5f5e100",
- "gasRaw": "0x5f5e100"
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "blockNumber": 2,
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "gas": "4300000",
+ "hash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
+ "nonce": "0x3460c30bd3e4e88a31d6d033b3a172859bf003258e9606fd63fb0d91f91f4e6",
+ "to": "0x0000000000000000000000000000000000000000",
+ "transactionIndex": "0x0",
+ "value": "0x0",
+ "gasPrice": "22000000000",
+ "blockLimit": "0x1f5",
+ "chainId": "0x1",
+ "groupId": "1",
+ "extraData": "0x",
+ "signature": {
+ "r": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462b",
+ "s": "0xd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124",
+ "v": "0xc7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7",
+ "signature": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462bd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124c7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7"
+ }
}
}
```
@@ -1178,13 +1184,13 @@ http://127.0.0.1:5001/WeBASE-Node-Manager/account/login?checkCode=aege
### 4.1 查询区块列表
-#### 4.1.1 传输协议规范
+#### 传输协议规范
* 网络传输协议:使用HTTP协议
* 请求地址:**/block/blockList/{groupId}/{pageNumber}/{pageSize}}?pkHash={pkHash}&blockNumber={blockNumber}**
* 请求方式:GET
* 返回格式:JSON
-#### 4.1.2 请求参数
+#### 请求参数
***1)入参表***
@@ -1204,7 +1210,7 @@ http://127.0.0.1:5001/WeBASE-Node-Manager/account/login?checkCode=aege
http://127.0.0.1:5001/WeBASE-Node-Manager/block/blockList/300001/1/10?pkHash=
```
-#### 4.1.3 返回参数
+#### 返回参数
***1)出参表***
@@ -1260,13 +1266,13 @@ http://127.0.0.1:5001/WeBASE-Node-Manager/block/blockList/300001/1/10?pkHash=
### 4.2 根据块高或hash查询区块信息
-#### 4.2.1 传输协议规范
+#### 传输协议规范
* 网络传输协议:使用HTTP协议
-* 请求地址:**/block/blockList/{groupId}/{pageNumber}/{pageSize}}?pkHash={pkHash}&blockNumber={blockNumber}**
+* 请求地址:**/block/blockByNumber/{groupId}/{blockNumber}**
* 请求方式:GET
* 返回格式:JSON
-#### 4.2.2 请求参数
+#### 请求参数
***1)入参表***
@@ -1281,11 +1287,11 @@ http://127.0.0.1:5001/WeBASE-Node-Manager/block/blockList/300001/1/10?pkHash=
***2)入参示例***
```
-http://127.0.0.1:5001/WeBASE-Node-Manager/block/blockByNumber/1/11
+http://127.0.0.1:5001/WeBASE-Node-Manager/block/blockByNumber/1/2
```
-#### 4.2.3 返回参数
+#### 返回参数
***1)出参表***
@@ -1344,50 +1350,70 @@ http://127.0.0.1:5001/WeBASE-Node-Manager/block/blockByNumber/1/11
* 成功:
```
{
- "code": 0,
- "message": "success",
- "data": {
- "number": 11,
- "hash": "0xeef574a136f1d5031ce7f5d4bbc19fa1a1b5736f38ec5687d43405a572219405",
- "parentHash": "0xca84147e343acb972dc9247727b920b5c081320bbe940f4e2b24363836dca4a1",
- "nonce": "0",
- "sealer": "0x0",
- "logsBloom": "0x000000000000000000000000000000000000",
- "transactionsRoot": "0x68510be0e37b993874c6cb59170b87f01fc9672a162b30df7ea96cb026f3ab27",
- "stateRoot": "0xa6e930f100c2f4a13816e57aede9b63f3b7d51d64148f4412d8a6efcb0fa9c79",
- "difficulty": 0,
- "totalDifficulty": 0,
- "extraData": [],
- "size": 0,
- "gasLimit": 0,
- "gasUsed": 0,
- "timestamp": "1551667286153",
- "gasLimitRaw": "0x0",
- "timestampRaw": "0x1694693d089",
- "gasUsedRaw": "0x0",
- "numberRaw": "0xb",
- "transactions": [
- {
- "hash": "0x30ab22a942a6545cfe46fd725e53311fbcfea655f9c0d1e198b83749f5d7bf9b",
- "nonce": "1224685724047484442779169279180691132123728860283320089873703663086305160417",
- "blockHash": "0xeef574a136f1d5031ce7f5d4bbc19fa1a1b5736f38ec5687d43405a572219405",
- "blockNumber": 11,
- "transactionIndex": 0,
- "from": "0x148947262ec5e21739fe3a931c29e8b84ee34a0f",
- "to": "0xdfb1684019f7f6ea2c41590ac55d29961de5deba",
- "value": 0,
- "gasPrice": 300000000,
- "gas": 300000000,
- "input": "0x66c991390000000000000000000000000000000000000000000000000000000000000004",
- "v": 0,
- "nonceRaw": "0x2b525c633f530fdd935428a58afcfbb533e4dd16f24eda6b6a860b63e6a2ce1",
- "blockNumberRaw": "0xb",
- "transactionIndexRaw": "0x0",
- "gasPriceRaw": "0x11e1a300",
- "gasRaw": "0x11e1a300"
- }
- ]
- }
+ "code": 0,
+ "message": "success",
+ "data": {
+ "number": 2,
+ "hash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "parentHash": "0x489ee0c00527879f7e2470bde7b62e9ea30fadb242bcbd9ba582d0dee4958e2f",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "transactionsRoot": "0xade02313d3200f38dfc18cdc368241cf4c1cb7e72011edf847ec216efa43a99e",
+ "receiptsRoot": "0xb7c4b856c9335bd345c0b022057567a2223218e7a7dab822981467b29ac1e326",
+ "dbHash": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "stateRoot": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "sealer": "0x2",
+ "sealerList": [
+ "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ ],
+ "extraData": [],
+ "gasLimit": "0",
+ "gasUsed": "0",
+ "timestamp": "1619424150450",
+ "signatureList": [
+ {
+ "index": "0x1",
+ "signature": "0xa05b5d220e41051fa80f212884d9cdda3a8973a4ac2d2dc74e42db32b459e5f595a61e30266f0e8bf7edb065ff107c6af5e6349f9ae518146dc686406ebbade165bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7"
+ },
+ {
+ "index": "0x3",
+ "signature": "0x48bb622e24b18f4eb601137d44b5d86e2c287be3aa849dce1768e87e75308ba69391e62f90d76bf84b9b6eb1509d11409f9b784bc7b052458a4596b81961fac8fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ },
+ {
+ "index": "0x2",
+ "signature": "0x3a3cc8c20c5cdbb6431ec1f749d94662670e87442debef119a4e6469ccb16a60a152d32754ab833efa513839b076c2aa1ceb7e536db3734b740e9192b10ee38695efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39"
+ }
+ ],
+ "transactions": [
+ {
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "blockNumber": 2,
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "gas": "0x419ce0",
+ "hash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
+ "nonce": "0x3460c30bd3e4e88a31d6d033b3a172859bf003258e9606fd63fb0d91f91f4e6",
+ "to": "0x0000000000000000000000000000000000000000",
+ "transactionIndex": "0x0",
+ "value": "0x0",
+ "gasPrice": "0x51f4d5c00",
+ "blockLimit": "0x1f5",
+ "chainId": "0x1",
+ "groupId": "0x1",
+ "extraData": "0x",
+ "signature": {
+ "r": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462b",
+ "s": "0xd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124",
+ "v": "0xc7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7",
+ "signature": "0x3416723318505669cca91689b213ff08ffb96d538210a0f691cfcfa9d529462bd3642f19c228e2e86689de9efc19ecbb68378a6bb7c219984431e93d60c89124c7935c199b680452eb37911856282b9c820322fd5fdec8a06b48cc3df4e8ed7d3d66a5adcc134cca609146ec0aed12827c35df07eed96042763c0926cf4223b7"
+ }
+ }
+ ]
+ },
+ "attachment": null
+}
```
* 失败:
@@ -1400,6 +1426,154 @@ http://127.0.0.1:5001/WeBASE-Node-Manager/block/blockByNumber/1/11
```
+### 4.5 根据块高获取区块头
+
+
+#### 接口描述
+
+> 返回
+
+#### 接口URL
+
+**http://localhost:5001/WeBASE-Node-Manager/block/blockHeaderByNumber/{blockNumber}**
+
+#### 调用方法
+
+HTTP GET
+
+#### 请求参数
+
+**1)参数表**
+
+| **序号** | **中文** | **参数名** | **类型** | **最大长度** | **必填** | **说明** |
+| -------- | -------- | ---------------- | ---------- | ------------ | -------- | -------- |
+| 1 | 群组编号 | groupId | int | | 是 | |
+
+**2)数据格式**
+
+```
+http://localhost:5001/WeBASE-Node-Manager/block/blockHeaderByNumber/2
+```
+
+#### 响应参数
+**1)数据格式**
+
+```
+{
+ "code": 0,
+ "message": "success",
+ "data": {
+ "number": 2,
+ "hash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "parentHash": "0x489ee0c00527879f7e2470bde7b62e9ea30fadb242bcbd9ba582d0dee4958e2f",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "transactionsRoot": "0xade02313d3200f38dfc18cdc368241cf4c1cb7e72011edf847ec216efa43a99e",
+ "receiptsRoot": "0xb7c4b856c9335bd345c0b022057567a2223218e7a7dab822981467b29ac1e326",
+ "dbHash": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "stateRoot": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "sealer": "0x2",
+ "sealerList": [
+ "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ ],
+ "extraData": [],
+ "gasLimit": "0",
+ "gasUsed": "0",
+ "timestamp": "1619424150450",
+ "signatureList": [
+ {
+ "index": "0x1",
+ "signature": "0xa05b5d220e41051fa80f212884d9cdda3a8973a4ac2d2dc74e42db32b459e5f595a61e30266f0e8bf7edb065ff107c6af5e6349f9ae518146dc686406ebbade165bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7"
+ },
+ {
+ "index": "0x3",
+ "signature": "0x48bb622e24b18f4eb601137d44b5d86e2c287be3aa849dce1768e87e75308ba69391e62f90d76bf84b9b6eb1509d11409f9b784bc7b052458a4596b81961fac8fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ },
+ {
+ "index": "0x2",
+ "signature": "0x3a3cc8c20c5cdbb6431ec1f749d94662670e87442debef119a4e6469ccb16a60a152d32754ab833efa513839b076c2aa1ceb7e536db3734b740e9192b10ee38695efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39"
+ }
+ ]
+ }
+}
+```
+
+### 4.4. 根据区块哈希获取区块头
+
+
+#### 接口描述
+
+> 返回
+
+#### 接口URL
+
+**http://localhost:5001/WeBASE-Node-Manager/block/blockHeaderByHash/{blockHash}**
+
+#### 调用方法
+
+HTTP GET
+
+#### 请求参数
+
+**1)参数表**
+
+| **序号** | **中文** | **参数名** | **类型** | **最大长度** | **必填** | **说明** |
+| -------- | -------- | ---------------- | ---------- | ------------ | -------- | -------- |
+| 1 | 群组编号 | groupId | int | | 是 | |
+
+**2)数据格式**
+
+```
+http://localhost:5001/WeBASE-Front/block/blockHeaderByHash/0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625
+```
+
+#### 响应参数
+**1)数据格式**
+
+```
+{
+ "code": 0,
+ "message": "success",
+ "data": {
+ "number": 2,
+ "hash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "parentHash": "0x489ee0c00527879f7e2470bde7b62e9ea30fadb242bcbd9ba582d0dee4958e2f",
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "transactionsRoot": "0xade02313d3200f38dfc18cdc368241cf4c1cb7e72011edf847ec216efa43a99e",
+ "receiptsRoot": "0xb7c4b856c9335bd345c0b022057567a2223218e7a7dab822981467b29ac1e326",
+ "dbHash": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "stateRoot": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "sealer": "0x2",
+ "sealerList": [
+ "06269e130f8220ebaa78e67832df0de6b4c5ee3f1b14e64ab2bae26510a4bcf997454b35067c1685d4343e6ad84b45c3b8690a858f2831a9247a97a27166ce1f",
+ "65bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7",
+ "95efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39",
+ "fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ ],
+ "extraData": [],
+ "gasLimit": "0",
+ "gasUsed": "0",
+ "timestamp": "1619424150450",
+ "signatureList": [
+ {
+ "index": "0x1",
+ "signature": "0xa05b5d220e41051fa80f212884d9cdda3a8973a4ac2d2dc74e42db32b459e5f595a61e30266f0e8bf7edb065ff107c6af5e6349f9ae518146dc686406ebbade165bc44d398d99d95a9d404aa16e4bfbc2f9ebb40f20439ddef8575a139dc3a80310cfc98a035bd59a67cc5f659f519e3e99b855f3d27f21a889c23a14036d0c7"
+ },
+ {
+ "index": "0x3",
+ "signature": "0x48bb622e24b18f4eb601137d44b5d86e2c287be3aa849dce1768e87e75308ba69391e62f90d76bf84b9b6eb1509d11409f9b784bc7b052458a4596b81961fac8fe57d7b39ed104b4fb2770ae5aad7946bfd377d0eb91ab92a383447e834c3257dec56686551d08178f2d5f40d9fad615293e46c9f5fc23cf187258e121213b1d"
+ },
+ {
+ "index": "0x2",
+ "signature": "0x3a3cc8c20c5cdbb6431ec1f749d94662670e87442debef119a4e6469ccb16a60a152d32754ab833efa513839b076c2aa1ceb7e536db3734b740e9192b10ee38695efafa5197796e7edf647191de83f4259d7cbb060f4bac5868be474037f49144d581c15d8aef9b07d78f18041a5f43c3c26352ebbf5583cd23070358c8fba39"
+ }
+ ]
+ }
+}
+```
+
## 5 合约管理模块
### 5.1 查询合约列表
@@ -1810,7 +1984,27 @@ http://127.0.0.1:5001/WeBASE-Node-Manager/contract/transaction
{
"code": 0,
"message": "success",
- "data": {}
+ "data": {
+ "transactionHash": "0x69ced0162a0c3892e4eaa3091b831ac3aaeb772c062746b20891ceaf8a4fb429",
+ "transactionIndex": "0x0",
+ "root": "0x8cbc3f2c0e35a71738909e3b388efa6697084b05badd3a3bd3c64f0575c78c15",
+ "blockNumber": "2",
+ "blockHash": "0xf58f4f43b3761f4863ad366c4a7e2a812ed68df9f7bcad6b502fd544665e7625",
+ "from": "0x9d75e0ee66cfef16897b601624b60413d988ae7d",
+ "to": "0x0000000000000000000000000000000000000000",
+ "gasUsed": "316449",
+ "contractAddress": "0xa8af0ee580d8af674a60341030ddbc45431bc235",
+ "logs": [],
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "status": "0x0",
+ "statusMsg": "None",
+ "input": "0x608060405234801561001057600080fd5b506103e3806100206000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063299f7f9d1461005c5780633590b49f146100ec57806362e8d6ce14610155575b600080fd5b34801561006857600080fd5b5061007161016c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100b1578082015181840152602081019050610096565b50505050905090810190601f1680156100de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156100f857600080fd5b50610153600480360381019080803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061020e565b005b34801561016157600080fd5b5061016a6102c4565b005b606060008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102045780601f106101d957610100808354040283529160200191610204565b820191906000526020600020905b8154815290600101906020018083116101e757829003601f168201915b5050505050905090565b7f5715c9562eaf8d524d564edb392acddefc81d8133e2fc3b8125a260b1b413fda816040518080602001828103825283818151815260200191508051906020019080838360005b83811015610270578082015181840152602081019050610255565b50505050905090810190601f16801561029d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a180600090805190602001906102c0929190610312565b5050565b6040805190810160405280600d81526020017f48656c6c6f2c20576f726c6421000000000000000000000000000000000000008152506000908051906020019061030f929190610312565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061035357805160ff1916838001178555610381565b82800160010185558215610381579182015b82811115610380578251825591602001919060010190610365565b5b50905061038e9190610392565b5090565b6103b491905b808211156103b0576000816000905550600101610398565b5090565b905600a165627a7a72305820f3088deb3d14c6893440e4769f2389e9335e04faa10e6de5b4c93af15d1a34e80029",
+ "output": "0x",
+ "txProof": null,
+ "receiptProof": null,
+ "message": null,
+ "statusOK": true
+ }
}
```
From 7b054f9268167a1db2988025b4447059a7b46cb4 Mon Sep 17 00:00:00 2001
From: CodingCattwo <847701726@qq.com>
Date: Mon, 12 Jul 2021 11:11:29 +0800
Subject: [PATCH 12/26] add disabled auth doc
---
docs/WeBASE-Node-Manager/appendix.md | 15 +++++++++++++--
images/WeBASE/mgr/api_with_header_account.png | Bin 0 -> 12961 bytes
images/WeBASE/mgr/disable_auth.png | Bin 0 -> 13846 bytes
3 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 images/WeBASE/mgr/api_with_header_account.png
create mode 100644 images/WeBASE/mgr/disable_auth.png
diff --git a/docs/WeBASE-Node-Manager/appendix.md b/docs/WeBASE-Node-Manager/appendix.md
index d41c40c7..16296f10 100644
--- a/docs/WeBASE-Node-Manager/appendix.md
+++ b/docs/WeBASE-Node-Manager/appendix.md
@@ -131,13 +131,24 @@ Could not find method compileOnly() for arguments [[org.projectlombok:lombok:1.1
INSERT INTO tb_account_info (account,account_pwd,role_id,create_time,modify_time)values('test', '$2a$10$F/aEB1iEx/FvVh0fMn6L/uyy.PkpTy8Kd9EdbqLGo7Bw7eCivpq.m',100000,now(),now());
```
+##### 免鉴权调用
+
+在`application.yml`中配置`constant.isUseSecurity`为`false`即可禁用WeBASE-Node-Manager的登录鉴权。
+
+![](../../images/WeBASE/mgr/disable_auth.png)
+
+- 免鉴权后,默认使用的是管理员用户admin(管理员用户可以看到所有用户的数据),可以调过登陆直接访问WeBASE-Web节点管理台的主页,如`http://localhost:5000/#/home`。
+- 若需要指定用户进行接口调用,可以在请求的`headers`中增加`Account`字段,其值设置为节点管理服务的用户名,如获取开发者用户`developer1`对应数据(开发者用户只能看到自己所创建的数据)。
+
+![](../../images/WeBASE/mgr/api_with_header_account.png)
+
### 3. 配置文件解析
| 参数 | 默认值 | 描述 |
|------|-------------|-----------|
| server.port | 5001 | 当前服务端口 |
-| server.servlet.context-path | /WeBASE-Node-Manager | 当前服务访问目录 |
+| server.servlet.context-path | /WeBASE-Node-Manager | 当前服务访问路径 |
| mybatis.typeAliasesPackage | com.webank.webase.node.mgr | mapper类扫描路径 |
| mybatis.mapperLocations | classpath:mapper/*.xml | mybatis的xml路径 |
| spring.datasource.driver-class-name | com.mysql.cj.jdbc.Driver | mysql驱动 |
@@ -160,7 +171,7 @@ INSERT INTO tb_account_info (account,account_pwd,role_id,create_time,modify_time
| constant.blockRetainMax | 10000 | 表中区块保留的条数(开启constant.isDeleteInfo时有效) |
| constant.verificationCodeMaxAge | 300 | y验证码有效时长(秒) |
| constant.authTokenMaxAge | 1800 | 登录token有效时长(秒) |
-| constant.isUseSecurity | true | 是否启用登录鉴权 |
+| constant.isUseSecurity | true | 是否启用登录鉴权,若false则默认使用admin权限免登陆鉴权 |
| constant.aesKey | ERTadb83f9ege39k | aes加密key(16位),建议更改 |
| constant.jwtSecret | S3g4HtJyg7G6Hg0Ln3g4H5Jyg7H6f9dL | jwt生成时用到的key,建议更改 |
| constant.frontUrl | http://%1s:%2d/WeBASE-Front/%3s | 前置服务的请求路径 |
diff --git a/images/WeBASE/mgr/api_with_header_account.png b/images/WeBASE/mgr/api_with_header_account.png
new file mode 100644
index 0000000000000000000000000000000000000000..736c090ed9f5f7c15d7b187c7693781ae7ffe049
GIT binary patch
literal 12961
zcmXAQcTf|~^ESOGRX_xR(3>I%0-_K=n)EJ3nt=4)Tj)xcE>eR?5d}g=TB7vcCDIal
zC!q%jN#4)*_x^Kpv-jLS_w3y4%+2m48R%)y-eJE(L_|cZ`C8S8h=?5X-~5t_^uJNZ
zLiZyP5pjTlj)@w9KsY=+yt%pA-`^*2G2n1G>hPnvxj765v$(jpxw(lzAPfu)&}j79
z+FDanld!Nb3WY)QG(TmSz3J1Hq?a&mHSZ!b7F_~_^e1Oio8SI^GQMn^~U7ikO)4YjtmmX(#2
zmX?0}__4mezP7eDEiKL6-JNi-+1=gU-rnBZ+w1M^os*N};^K00azf>|oS&c1&d$EG
zvvc(`-OS7k+uwM7OYryi9~l`r|7cS>e!aW9yK`}%uC5;6eR+}NW7QH=QBkpVf`9kp
zTv}SXWAO&}cc=~7`=-hF?Ci{|`-7L4mywatS%~)0CI0N@0)KvzHBmmgd0RVstyXx-
z5`&uDho4*#@&>QEy1FFF3}<(5hqk9XR{Jl~oX?_61DY?MW*m2RcB=h!Kpf%N<57gv
z50`~u1V2}Tk>