Skip to content

Commit

Permalink
Merge pull request #798 from kyonRay/master
Browse files Browse the repository at this point in the history
Release 3.5.0
  • Loading branch information
kyonRay authored Oct 12, 2023
2 parents aaf85d1 + 0733035 commit 2e7d7f3
Show file tree
Hide file tree
Showing 24 changed files with 201 additions and 93 deletions.
16 changes: 12 additions & 4 deletions .ci/ci_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,28 @@ bash gradlew test
bash gradlew integrationTest --info
}

LOG_INFO "------ check_java_version---------"
LOG_INFO "------ check java version --------"
java -version
#cp src/integration-test/resources/config-example.toml src/integration-test/resources/config.toml
download_tassl
LOG_INFO "------ download_binary: v3.3.0---------"
download_binary "v3.3.0"
download_build_chain "v3.3.0"

LOG_INFO "------ download_binary: v3.4.0---------"
download_binary "v3.4.0"
download_build_chain "v3.4.0"
LOG_INFO "------ check_standard_node---------"
check_standard_node false
LOG_INFO "------ check_sm_node---------"
check_sm_node true
LOG_INFO "------ check_basic---------"
check_basic

LOG_INFO "------ download_binary: v3.3.0---------"
download_binary "v3.3.0"
download_build_chain "v3.3.0"
LOG_INFO "------ check_standard_node---------"
check_standard_node
rm -rf ./bin

LOG_INFO "------ download_binary: v3.2.0---------"
download_binary "v3.2.0"
download_build_chain "v3.2.0"
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ jobs:
with:
fetch-depth: 5
- name: install CentOS dependencies
run: yum install -y epel-release centos-release-scl which git openssl-devel openssl java java-devel wget
run: yum install -y epel-release centos-release-scl which git openssl-devel openssl wget
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8.0.345'
- name: run integration testing
run: /bin/bash -x .ci/ci_check.sh
- name: upload coverage
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies {
//compile 'org.fisco-bcos:solcJ:0.5.2.1'
compile 'org.fisco-bcos:solcJ:0.8.11.1'

compile('org.fisco-bcos.java-sdk:fisco-bcos-java-sdk:3.4.0') {
compile('org.fisco-bcos.java-sdk:fisco-bcos-java-sdk:3.5.0-SNAPSHOT') {
exclude group: "org.slf4j"
}

Expand All @@ -55,7 +55,7 @@ dependencies {
exclude group: "org.fisco-bcos.java-sdk"
exclude group: "org.slf4j"
}
compile ('com.fasterxml.jackson.core:jackson-databind:2.14.2'){
compile ('com.fasterxml.jackson.core:jackson-databind:2.14.3'){
force true
}
testCompile('com.github.stefanbirkner:system-rules:1.19.0')
Expand Down
2 changes: 1 addition & 1 deletion release_note.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.4.0
v3.5.0
2 changes: 1 addition & 1 deletion src/integration-test/java/console/ConsoleClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void clientNotParamsTest() throws IOException {
consoleClientFace.getGroupInfoList(emptyParams);
assertTrue(log.getLog().startsWith("["));
log.clearLog();
consoleClientFace.getNodeName();
consoleClientFace.getNodeName(consoleInitializer);
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion src/integration-test/java/console/TestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static void setUpBeforeClass() throws Exception {
consoleInitializer = new ConsoleInitializer();
consoleInitializer.init(new String[0]);
isWasm = consoleInitializer.getClient().isWASM();
isAuthCheck = consoleInitializer.getClient().isAuthCheck();
isAuthCheck = consoleInitializer.getClient().isEnableCommittee();
authFace = consoleInitializer.getAuthFace();
consoleClientFace = consoleInitializer.getConsoleClientFace();
precompiledFace = consoleInitializer.getPrecompiledFace();
Expand Down
2 changes: 1 addition & 1 deletion src/integration-test/resources/clog.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
; network statistics interval, unit is second, default is 60s
stat_flush_interval=60
; info debug trace
level=DEBUG
level=debug
; MB
max_log_file_size=200
6 changes: 3 additions & 3 deletions src/main/java/console/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static void main(String[] args) {
WelcomeInfo.welcome();
String pwd = consoleInitializer.getPrecompiledFace().getPwd();
SupportedCommand.setIsAuthOpen(
consoleInitializer.getClient().isAuthCheck()
consoleInitializer.getClient().isEnableCommittee()
&& !consoleInitializer.getClient().isWASM());
SupportedCommand.setIsWasm(consoleInitializer.getClient().isWASM());

Expand Down Expand Up @@ -105,7 +105,7 @@ public static void main(String[] args) {
SupportedCommand.getCommandInfo(
params[0],
consoleInitializer.getClient().isWASM(),
consoleInitializer.getClient().isAuthCheck());
consoleInitializer.getClient().isEnableCommittee());
if (commandInfo != null) {
if (CrudCommand.CRUD_COMMANDS.contains(params[0])) {
String[] inputParamString = new String[1];
Expand Down Expand Up @@ -137,7 +137,7 @@ public static void main(String[] args) {
// update the client when switch group
JlineUtils.switchGroup(consoleInitializer.getClient());
SupportedCommand.setIsAuthOpen(
consoleInitializer.getClient().isAuthCheck()
consoleInitializer.getClient().isEnableCommittee()
&& !consoleInitializer.getClient().isWASM());
SupportedCommand.setIsWasm(consoleInitializer.getClient().isWASM());
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/console/ConsoleInitializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import console.client.ConsoleClientImpl;
import console.collaboration.CollaborationFace;
import console.collaboration.CollaborationImpl;
import console.command.JlineUtils;
import console.common.ConsoleUtils;
import console.contract.ConsoleContractFace;
import console.contract.ConsoleContractImpl;
Expand Down Expand Up @@ -273,6 +274,8 @@ public void switchGroup(String[] params) {
this.consoleContractFace = new ConsoleContractImpl(client);
this.collaborationFace = new CollaborationImpl(client);
this.authFace = new AuthImpl(client);
JlineUtils.switchGroup(client);
this.lineReader = JlineUtils.getLineReader();
System.out.println("Switched to group " + group + ".");
System.out.println();
} catch (Exception e) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/console/NonInteractiveConsole.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void main(String[] args) {
}

SupportedCommand.isWasm = consoleInitializer.getClient().isWASM();
SupportedCommand.isAuthOpen = consoleInitializer.getClient().isAuthCheck();
SupportedCommand.isAuthOpen = consoleInitializer.getClient().isEnableCommittee();
try {
String[] command = params[0].split(" ");
CommandInfo commandInfo = null;
Expand All @@ -50,13 +50,13 @@ public static void main(String[] args) {
SupportedCommand.getCommandInfo(
command[0],
consoleInitializer.getClient().isWASM(),
consoleInitializer.getClient().isAuthCheck());
consoleInitializer.getClient().isEnableCommittee());
} else {
commandInfo =
SupportedCommand.getCommandInfo(
params[0],
consoleInitializer.getClient().isWASM(),
consoleInitializer.getClient().isAuthCheck());
consoleInitializer.getClient().isEnableCommittee());
}
if (commandInfo != null) {
if (CrudCommand.CRUD_COMMANDS.contains(command[0])) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/console/auth/AuthImpl.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package console.auth;

import static console.common.Common.COMPATIBILITY_VERSION;

import console.ConsoleInitializer;
import console.common.ConsoleUtils;
import java.math.BigInteger;
Expand All @@ -16,6 +14,7 @@
import org.fisco.bcos.sdk.v3.contract.auth.po.CommitteeInfo;
import org.fisco.bcos.sdk.v3.contract.auth.po.GovernorInfo;
import org.fisco.bcos.sdk.v3.contract.auth.po.ProposalInfo;
import org.fisco.bcos.sdk.v3.contract.precompiled.sysconfig.SystemConfigService;
import org.fisco.bcos.sdk.v3.crypto.keypair.CryptoKeyPair;
import org.fisco.bcos.sdk.v3.model.PrecompiledRetCode;
import org.fisco.bcos.sdk.v3.model.RetCode;
Expand All @@ -36,7 +35,7 @@ public class AuthImpl implements AuthFace {

public AuthImpl(Client client) {
CryptoKeyPair cryptoKeyPair = client.getCryptoSuite().getCryptoKeyPair();
boolean authAvailable = client.isAuthCheck() && !client.isWASM();
boolean authAvailable = client.isEnableCommittee() && !client.isWASM();
if (authAvailable) {
this.authManager = new AuthManager(client, cryptoKeyPair);
} else {
Expand Down Expand Up @@ -227,7 +226,8 @@ public void createSetSysConfigProposal(ConsoleInitializer consoleInitializer, St
BigInteger proposalId = authManager.createSetSysConfigProposal(key, value);
System.out.println("Set system config proposal created, ID is: " + proposalId);
showProposalInfo(proposalId);
if (key.equals(COMPATIBILITY_VERSION) && proposalId.compareTo(BigInteger.ZERO) > 0) {
if (key.equals(SystemConfigService.COMPATIBILITY_VERSION)
&& proposalId.compareTo(BigInteger.ZERO) > 0) {
String[] param = new String[2];
param[1] = consoleInitializer.getGroupID();
consoleInitializer.switchGroup(param);
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/console/client/ConsoleClientFace.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package console.client;

import com.fasterxml.jackson.core.JsonProcessingException;
import console.ConsoleInitializer;
import java.io.IOException;
import org.fisco.bcos.sdk.v3.client.Client;

Expand All @@ -15,6 +16,8 @@ public interface ConsoleClientFace {

void getSealerList(String[] params) throws IOException;

void getCandidateSealerList(String[] params) throws IOException;

void getSyncStatus(String[] params) throws IOException;

void getConsensusStatus(String[] params) throws IOException;
Expand Down Expand Up @@ -61,9 +64,9 @@ public interface ConsoleClientFace {

void getGroupNodeInfo(String[] params) throws JsonProcessingException;

void setNodeName(String[] params) throws IOException;
void setNodeName(ConsoleInitializer consoleInitializer, String[] params) throws IOException;

void clearNodeName();
void clearNodeName(ConsoleInitializer consoleInitializer);

void getNodeName();
void getNodeName(ConsoleInitializer consoleInitializer);
}
Loading

0 comments on commit 2e7d7f3

Please sign in to comment.