Release v3.4.0
v3.4.0
(2023-06-09)
请阅读Java SDK v3.x+文档:
新增
- 新增call with sign接口,支持在发起static call请求时使用私钥对请求体(to+data)进行签名,在节点侧将会对应恢复出签名对应的用户地址,合约中可以取到call请求时的tx.origin和msg.sender,达到用户身份认证的目的。
Client
类新增isEnableCommittee()
方法,与isAuthCheck()
进行区分,用于判断当前链是否启用了治理委员会。Client
类新增getChainCompatibilityVersion()
,用于获取当前链的数据兼容版本号。
更新
- 将
Client
类的getChainVersion()
设置为@deprecated,建议使用getChainCompatibilityVersion()
。 - 将BFSService的
getCurrentVersion()
接口返回同步改成EnumNodeVersion.Version
。
修复
- 修复了开启治理委员会后,发起
addSealerProposal
提案时可能出现的观察节点未达到块高差值门限的问题。 - 修复回执中状态数据与节点不匹配的问题。
兼容性说明
- 不兼容 FISCO BCOS 2.0+ 版本
- 兼容java-sdk v3.0+的历史版本
- 支持FISCO BCOS 3.4.0版本,以及3.0.0正式版以来的所有版本。
- 账户权限管理接口、BFS新增的list分页接口与link接口只在 FISCO BCOS 3.1.0支持使用。
- 新增的CRUD接口,如条件范围遍历查询、修改、删除等接口,只在FISCO BCOS 3.2.0支持使用。
- 新增的ShardService, 只在FISCO BCOS 3.3.0支持使用。
遗留问题说明
在工作量与收益之间做平衡之后,目前还遗留以下几种场景的编解码仍然可能会有问题,欢迎社区用户贡献解决方案或实现代码 :-)
- 三维及以上的数组作为输入输出参数时,使用
contract2java
编译成Java文件后,方法接口可能会出现调用错误。 - 在使用类似
bytes[2][]
这样的动态数组套静态数组,且基础类型仍然是动态类型的类型时,使用contract2java
编译成Java文件后,方法接口调用时编解码可能会出现问题。 - 在使用liquid合约时,如果使用上一条所述的类型作为输入输出参数,在合约方法接口调用时编解码可能会出现问题。
- 在使用liquid合约时,将u256与i256类型的输入输出参数,如果输入最大值,BigInteger生成的bytes会超过大小限制。
- 在使用liquid合约时,因为liquid合约的事件编码与Solidity合约的事件编码不同,所以在使用liquid合约的事件时,会出现Java sdk解析失败的问题。
v3.4.0
(2023-06-09)
Please refer to the Java SDK v3.x+ documentation:
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 recovered 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 theClient
class, which is used to determine whether the current chain has enabled the governance committee, differentiating it fromisAuthCheck()
. - Added the
getChainCompatibilityVersion()
method to theClient
class, which is used to obtain the data compatibility version of the current chain.
Updated
- Deprecated the
getChainVersion()
method of theClient
class, and recommend usinggetChainCompatibilityVersion()
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 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 usingcontract2java
. - 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.
What's Changed
- (CI): fix CI check auth mode. by @kyonRay in #775
- (rpc): add call with sign interface of rpc. by @kyonRay in #771
- (test): add call with sign abi and bin. by @kyonRay in #773
- (transaction): fix gm bug in call with sign, because sign to string not with pub. by @kyonRay in #777
- (transaction): fix wasm call bug. by @kyonRay in #780
- (transaction): fix gm bug when call with sign with to with prefix. by @kyonRay in #781
- update jni version to 3.4.0-SNAPSHOT by @LucasLi1024 in #782
- (client,version): fix sdk version not fits with new node version. by @kyonRay in #783
- (client): rollback client getChainVersion modified, make it deprecated. @kyonRay in #787
- (CI): add integration CI coverage. by @kyonRay in #788
- Release-3.4.0 by @kyonRay in #789
- (changeLog): update 3.4.0 change log. by @kyonRay in #790
- (model): fix receipt status. by @kyonRay in #791
- (project): version to 3.4.0. by @kyonRay in #792
Full Changelog: v3.3.0...v3.4.0