Skip to content

Commit

Permalink
Release 3.5.0 (#827)
Browse files Browse the repository at this point in the history
* <feat>(rpc): add call with sign interface of rpc. (#771)

* <feat>(rpc): add call with sign interface of rpc.

* <test>(integration): add v3.3.0 node test.

* <fix>(CI): fix integration test of extra data and input. (#796)

* <fix>(codec): fix int type not count bit size bug. (#800)

* upgrade openjdk version

* <fix>(test): remove unnecessary dependency com.google.guava. (#811)

* Add tars sdk impl (#818)

Add tars sdk impl (#818)

* <feat&fix>(transaction): fix call with sign result not handle revert message bug, add system features. (#819)

* Update tars client impl (#821)

* Add TarsClient

* Update bulid.gradle, add tars-sdk

* Update fisco-bcos-tars-sdk package name

* Using google code style

* Merge origin

* Revert changes of xml

* ExtraData use string type

* Update tars client

* Add tars config and impl

* Update loadLibrary

* Use google java format

* Update library path find

* Update tars client

---------

Co-authored-by: More <More@MSI>
Co-authored-by: More <[email protected]>

* <feat>(client): add getNodeListByType interface. (#822)

* Fix tars bug (#823)

* Add TarsClient

* Update bulid.gradle, add tars-sdk

* Update fisco-bcos-tars-sdk package name

* <fix>(client): add default nodeName to send request. (#825)

* Support jni inside jar (#826)

* Update sdk usage

* Support jni inside jar

---------

Co-authored-by: wenlinli <[email protected]>
Co-authored-by: MO NAN <[email protected]>
Co-authored-by: More <More@MSI>
Co-authored-by: More <[email protected]>
  • Loading branch information
5 people authored Oct 12, 2023
1 parent adf1633 commit 289fda7
Show file tree
Hide file tree
Showing 21 changed files with 704 additions and 125 deletions.
8 changes: 7 additions & 1 deletion .ci/ci_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ pwd
ls -la
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
download_tassl

LOG_INFO "------ download_binary: v3.0.0---------"
download_build_chain "v3.0.0"
download_binary "v3.0.0"
Expand All @@ -184,6 +183,13 @@ rm -rf ./bin
LOG_INFO "------ download_build_chain: v3.3.0---------"
download_binary "v3.3.0"
download_build_chain "v3.3.0"
LOG_INFO "------ check_standard_node---------"
check_standard_node "true" "sm" "-s"
rm -rf ./bin

LOG_INFO "------ download_build_chain: v3.4.0---------"
download_binary "v3.4.0"
download_build_chain "v3.4.0"
LOG_INFO "------ check_wasm_node---------"
check_wasm_node "false"
LOG_INFO "------ check_standard_node---------"
Expand Down
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ coverage:
status:
project:
default:
target: "30%"
target: "40%"
threshold: "1%"
if_not_found: success
patch:
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,17 @@ jobs:
if: runner.os == 'macOS'
run: |
brew install [email protected] ccache
- name: Set up JDK 1.8
- name: Set up JDK 1.8.0.345
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8.0.345'
distribution: 'zulu'
java-version: '8.0.345'
- name: run build test
if: runner.os == 'Windows'
run: ./gradlew.bat build
- name: run integration testing
if: runner.os != 'Windows'
# FIXME: macOS WASM integration testing failed
if: runner.os != 'Windows' && runner.os != 'macOS'
run: /bin/bash .ci/ci_check.sh

build-centos:
Expand Down Expand Up @@ -87,6 +88,11 @@ jobs:
java-version: '8.0.345'
- name: install CentOS dependencies
run: yum install -y epel-release centos-release-scl wget which git openssl-devel openssl tree
- name: Set up JDK 1.8.0.345
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8.0.345'
- name: run build test
run: /bin/bash gradlew build --info
- name: run integration testing
Expand Down
18 changes: 7 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ ext {
if (!project.hasProperty("ossrhPassword")) {
ossrhPassword = "xxx"
}
jacksonVersion = '2.14.2'
jacksonVersion = '2.14.3'
commonsIOVersion = '2.11.0'
commonsLang3Version = '3.12.0'
toml4jVersion = "0.7.2"
bcprovJDK15onVersion = '1.69'
webankJavaCryptoVersion = "1.0.3"
junitVersion = '4.13.2'
commonsCollections4Version = "4.4"
guavaVersion = '31.1-jre'
bcosSdkJniVersion = "3.4.0"
slf4jApiVerison = '1.7.36'
mockitoVersion = '4.8.0'
gsonVersion = '2.10.1'
tarsSDKVersion = '3.5.0-SNAPSHOT'
}

// check.dependsOn integrationTest
// integrationTest.mustRunAfter test
allprojects {
group = 'org.fisco-bcos.java-sdk'
version = '3.4.0'
version = '3.5.0-SNAPSHOT'

apply plugin: 'maven-publish'
apply plugin: 'idea'
Expand All @@ -60,15 +60,14 @@ allprojects {
repositories {
mavenCentral()
maven { url "https://maven.aliyun.com/nexus/content/groups/public/" }
maven { url "https://oss.sonatype.org/service/local/staging/deploy/maven2" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://oss.sonatype.org/service/local/staging/deploy/maven2" }
}

dependencies {
api("org.slf4j:slf4j-api:${slf4jApiVerison}")
testImplementation("junit:junit:${junitVersion}")
testImplementation("org.apache.commons:commons-collections4:${commonsCollections4Version}")
testImplementation("com.google.guava:guava:${guavaVersion}")
testImplementation("org.mockito:mockito-core:${mockitoVersion}")
}

Expand Down Expand Up @@ -126,6 +125,7 @@ googleJavaFormat {
}

dependencies {
api("org.fisco-bcos:fisco-bcos-tars-sdk" + ":${tarsSDKVersion}")
api("org.fisco-bcos:bcos-sdk-jni:${bcosSdkJniVersion}") {
exclude group : "org.slf4j"
exclude group : "com.fasterxml.jackson.core"
Expand All @@ -136,14 +136,10 @@ dependencies {
api("org.apache.commons:commons-lang3:${commonsLang3Version}")
api("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}")
api("commons-io:commons-io:${commonsIOVersion}")
// api("com.webank:key-mini-toolkit:${keyMiniToolkit}")
api("com.webank:webank-blockchain-java-crypto:${webankJavaCryptoVersion}")
api("com.moandjiezana.toml:toml4j:${toml4jVersion}") {
exclude group: "com.google.code.gson"
}
// api("org.apache.commons:commons-configuration2:${config2Version}"){
// exclude group: "commons-logging"
// }

integrationTestImplementation project
integrationWasmTestImplementation project
Expand Down Expand Up @@ -183,6 +179,7 @@ javadoc {
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
duplicatesStrategy = 'warn'
}

task javadocJar(type: Jar) {
Expand All @@ -209,7 +206,6 @@ tasks.withType(Test) {
publishing {
publications {
mavenJava(MavenPublication) {

artifactId "fisco-bcos-" + project.name
groupId project.group
version project.version
Expand Down Expand Up @@ -262,7 +258,7 @@ publishing {

jar {
// destinationDir file('dist/apps')
archiveName "fisco-bcos-" + project.name + '-' + project.version + '.jar'
archiveFileName="fisco-bcos-" + project.name + '-' + project.version + '.jar'
exclude '**/*.xml'
exclude '**/*.properties'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,13 @@ public void onError(Response errorResponse) {
BcosTransaction transaction1 = client.getTransaction(txHash, false);
BcosTransactionReceipt transactionReceipt = client.getTransactionReceipt(txHash, false);
if (client.getChainCompatibilityVersion().compareTo(EnumNodeVersion.BCOS_3_2_0.toVersionObj()) >= 0) {
Assert.assertEquals(extraData, receipt.getExtraData());
Assert.assertEquals(extraData, transaction1.getResult().getExtraData());
Assert.assertEquals(extraData, transactionReceipt.getResult().getExtraData());
Assert.assertFalse(receipt.getInput().isEmpty());
}
Assert.assertFalse(transactionReceipt.getResult().getInput().isEmpty());
Assert.assertFalse(transaction1.getResult().getInput().isEmpty());

// get 2nd block
block1 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
package org.fisco.bcos.sdk.v3.test.transaction.decoder;

import com.google.common.collect.Lists;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.fisco.bcos.sdk.v3.BcosSDK;
Expand Down Expand Up @@ -53,7 +53,7 @@ public void testDecode() throws Exception {
client, client.getCryptoSuite().getCryptoKeyPair(), abiFile, binFile);
ContractCodec contractCodec = new ContractCodec(client.getCryptoSuite(), client.isWASM());
// deploy
List<Object> params = Lists.newArrayList();
List<Object> params = new ArrayList<>();
params.add(1);
params.add("test2");
TransactionResponse response = manager.deployByContractLoader("ComplexSol", params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
*/
package org.fisco.bcos.sdk.v3.test.transaction.decoder;

import com.google.common.collect.Lists;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.*;

import org.fisco.bcos.sdk.v3.BcosSDK;
import org.fisco.bcos.sdk.v3.client.Client;
import org.fisco.bcos.sdk.v3.model.ConstantConfig;
Expand Down Expand Up @@ -57,7 +55,7 @@ public void testDecode() throws Exception {
TransactionProcessorFactory.createAssembleTransactionProcessor(
client, client.getCryptoSuite().getCryptoKeyPair(), abiFile, binFile);
// deploy
List<Object> params = Lists.newArrayList();
List<Object> params = new ArrayList<>();
params.add(1);
params.add("test2");
TransactionResponse response = manager.deployByContractLoader(contractName, params);
Expand All @@ -71,9 +69,10 @@ public void testDecode() throws Exception {
contractName,
contractAddress,
"incrementUint256",
Lists.newArrayList(BigInteger.valueOf(1)));
Collections.singletonList(BigInteger.ONE));
TransactionResponse transactionResponseWithoutValues =
decoder.decodeReceiptWithoutValues(abi, transactionReceipt);
Assert.assertEquals(0, transactionResponseWithoutValues.getReturnCode());
TransactionResponse transactionResponseWithValues =
decoder.decodeReceiptWithValues(abi, "incrementUint256", transactionReceipt);
Assert.assertEquals("Success", transactionResponseWithValues.getReceiptMessages());
Expand All @@ -83,8 +82,8 @@ public void testDecode() throws Exception {
}
// setBytesMapping
{
List<Object> s = Lists.newArrayList("2".getBytes());
List<Object> paramsSetBytes = new ArrayList<Object>();
List<Object> s = Collections.singletonList("2".getBytes());
List<Object> paramsSetBytes = new ArrayList<>();
paramsSetBytes.add(s);
TransactionReceipt transactionReceipt2 =
manager.sendTransactionAndGetReceiptByContractLoader(
Expand All @@ -96,7 +95,7 @@ public void testDecode() throws Exception {
Assert.assertEquals(
transactionResponse2.getReceiptMessages(), "Bytes array is less than 2");

List<Object> s2 = Lists.newArrayList("2".getBytes(), "3".getBytes());
List<Object> s2 = Arrays.asList("2".getBytes(), "3".getBytes());
List<Object> paramsSetBytes2 = new ArrayList<>();
paramsSetBytes2.add(s2);
TransactionReceipt transactionReceipt =
Expand Down
Loading

0 comments on commit 289fda7

Please sign in to comment.