Skip to content

Commit

Permalink
<fix>(model): fix receipt status. (#791)
Browse files Browse the repository at this point in the history
* <fix>(model): fix receipt status.

* <doc>(changeLog): update fix receipt status issue doc.
  • Loading branch information
kyonRay authored Jun 14, 2023
1 parent c2a3155 commit 040cd8a
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 10 deletions.
38 changes: 38 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
### 修复

- 修复了开启治理委员会后,发起 `addSealerProposal` 提案时可能出现的观察节点未达到块高差值门限的问题。
- 修复回执中状态数据与节点不匹配的问题。

### 兼容性说明

Expand All @@ -39,7 +40,44 @@

---

## v3.4.0
(2023-06-09)
Please refer to the Java SDK v3.x+ documentation:

- [Chinese User Manual](https://fisco-bcos-doc.readthedocs.io/zh_CN/latest/docs/develop/sdk/java_sdk/index.html)

### Added

- Added the "call with sign" interface, which supports signing the request body (to+data) with a private key when initiating a static call request. The corresponding user address will be associated with the signature on the node side, and the tx.origin and msg.sender at the time of the call request can be obtained in the contract, achieving user identity authentication.
- Added the `isEnableCommittee()` method to the `Client` class, which is used to determine whether the current chain has enabled the governance committee, differentiating it from `isAuthCheck()`.
- Added the `getChainCompatibilityVersion()` method to the `Client` class, which is used to obtain the data compatibility version of the current chain.

### Updated

- Deprecated the `getChainVersion()` method of the `Client` class, and recommend using `getChainCompatibilityVersion()` instead.

### Fixed

- Fixed the issue where when the governance committee is enabled, there might be a problem with the observer nodes not reaching the block height difference threshold when initiating the `addSealerProposal` proposal.
- Fixed the issue where the status data in the receipt does not match the chain node.

### Compatibility Notes

- Not compatible with FISCO BCOS 2.0+ versions.
- Compatible with historical versions of java-sdk v3.0+.
- Supports [FISCO BCOS 3.4.0](https://github.com/FISCO-BCOS/FISCO-BCOS/releases/tag/v3.4.0) version and all versions since the official release of 3.0.0.
- The account permission management interface, list pagination interface, and link interface added by BFS are only supported in FISCO BCOS 3.1.0.
- The newly added CRUD interfaces, such as conditional range traversal query, modification, deletion, etc., are only supported in FISCO BCOS 3.2.0.
- The newly added ShardService is only supported in FISCO BCOS 3.3.0.

### Known Issues

After balancing the workload and benefits, there are still potential issues with the following scenarios in the encoding and decoding process. Community users are welcome to contribute solutions or implementation code :-)
- When using arrays of three dimensions or more as input or output parameters, there may be invocation errors in the method interface after compiling into Java files using `contract2java`.
- When using a dynamic array nested in a static array, such as `bytes[2][]`, and the base type is still a dynamic type, there may be issues with encoding and decoding in the method interface when compiling into Java files using `contract2java`.
- When using the liquid contract, if the aforementioned types are used as input or output parameters, there may be issues with encoding and decoding in the method interface when calling the contract.
- When using the liquid contract, if the u256 and i256 types are used as input or output parameters and the maximum value is input, the bytes generated by BigInteger may exceed the size limit.
- When using the liquid contract, because the event encoding of the liquid contract is different from that of Solidity contract, there may be issues with Java SDK parsing when using the events of the liquid contract.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,19 @@ public class TransactionReceiptStatus {
public static final RetCode WASMUnreachableInstruction =
new RetCode(34, "WASMUnreachableInstruction");
public static final RetCode WASMTrap = new RetCode(35, "WASMTrap");
public static final RetCode NonceCheckFail = new RetCode(1000, "NonceCheckFail");
public static final RetCode BlockLimitCheckFail = new RetCode(1001, "BlockLimitCheckFail");
public static final RetCode TxPoolIsFull = new RetCode(1002, "TxPoolIsFull");
public static final RetCode Malform = new RetCode(1003, "Malform tx");
public static final RetCode AlreadyInTxPool = new RetCode(1004, "AlreadyInTxPool");
public static final RetCode TxAlreadyInChain = new RetCode(1005, "TxAlreadyInChain");
public static final RetCode InvalidChainId = new RetCode(1006, "InvalidChainId");
public static final RetCode InvalidGroupId = new RetCode(1007, "InvalidGroupId");
public static final RetCode InvalidSignature = new RetCode(1008, "InvalidSignature");
public static final RetCode NonceCheckFail = new RetCode(10000, "NonceCheckFail");
public static final RetCode BlockLimitCheckFail = new RetCode(10001, "BlockLimitCheckFail");
public static final RetCode TxPoolIsFull = new RetCode(10002, "TxPoolIsFull");
public static final RetCode Malform = new RetCode(10003, "Malform tx");
public static final RetCode AlreadyInTxPool = new RetCode(10004, "AlreadyInTxPool");
public static final RetCode TxAlreadyInChain = new RetCode(10005, "TxAlreadyInChain");
public static final RetCode InvalidChainId = new RetCode(10006, "InvalidChainId");
public static final RetCode InvalidGroupId = new RetCode(10007, "InvalidGroupId");
public static final RetCode InvalidSignature = new RetCode(10008, "InvalidSignature");
public static final RetCode RequestNotBelongToTheGroup =
new RetCode(1009, "RequestNotBelongToTheGroup");
new RetCode(10009, "RequestNotBelongToTheGroup");
public static final RetCode TransactionPoolTimeout =
new RetCode(10009, "TransactionPoolTimeout");
public static final RetCode TimeOut = new RetCode(50001, "Transaction receipt timeout");

protected static Map<Integer, RetCode> codeToRetCode = new HashMap<>();
Expand Down

0 comments on commit 040cd8a

Please sign in to comment.