Skip to content

Commit 3ccb40e

Browse files
authored
Merge pull request #235 from youwenbusi/develop
develop
2 parents 9034c9e + 7c65b49 commit 3ccb40e

23 files changed

+97
-42
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
### V3.1.0 (2023-4-28)
2+
* 优化功能:
3+
1. 修复创建并启用新的应用后配置文件没有更新chain.id导致registerAuthorityIssuer失败
4+
2. 生成的WeIdentity配置文件支持本地数据库部署
5+
3. 集成weid-java-sdk 3.1.0和weid-kit 3.1.0
6+
4. 更新多个已知漏洞的组件
7+
18
### V3.0.0 (2022-12-15)
29
* 优化功能:
310
1. 修复registerPolicy失败和部署Evidence合约失败

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ WeIdentity JAVA SDK安装部署工具
1111

1212
| weid-build-tools 版本 | weid-java-sdk 版本 | weid-contract-java 版本 | 备注 |
1313
| :---- | :---- | :---- | :---- |
14+
| v3.1.0 | v3.1.0 | v1.3.2 | 适配weid-java-sdk数据库部署方式 |
15+
| v3.0.0 | v3.0.0 | v1.3.1 | 适配重构weid-java-sdk |
1416
| v1.3.1 | v1.8.6 | v1.3.1 | 替换合约,改变获取所有weid的方式 |
1517
| v1.3.0 | v1.8.5 | v1.3.0 | 替换web3sdk、支持国密和FISCO BCOS 3.0 |
1618
| v1.0.28 | v1.8.3 | v1.2.30 | 升级log4j |

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.0-rc.1
1+
3.1.0-rc.1

build.gradle

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ List jcommander = [
6666
"com.beust:jcommander:1.72"
6767
]
6868

69-
def log4j_version="2.18.0"
69+
def log4j_version="2.20.0"
7070
List log4j = [
7171
"org.apache.logging.log4j:log4j-api:$log4j_version",
7272
"org.apache.logging.log4j:log4j-web:$log4j_version",
@@ -77,7 +77,7 @@ List log4j = [
7777
"org.slf4j:slf4j-api:1.7.30"
7878
]
7979

80-
def jackson_version="2.13.3"
80+
def jackson_version="2.14.2"
8181
List json = [
8282
"com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jackson_version",
8383
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version",
@@ -97,10 +97,10 @@ List http_proxy = [
9797
]
9898

9999
List redis_driver = [
100-
"org.redisson:redisson:3.15.6"
100+
"org.redisson:redisson:3.20.0"
101101
]
102102

103-
def spring_version = "5.3.18"
103+
def spring_version = "5.3.25"
104104
List spring = [
105105
"org.springframework:spring-aop:$spring_version",
106106
"org.springframework:spring-beans:$spring_version",
@@ -115,16 +115,33 @@ List spring = [
115115
"org.springframework:spring-web:$spring_version"
116116
]
117117

118-
def gson_version = "2.8.9"
118+
def gson_version = "2.10.1"
119119
List gson = [
120120
"com.google.code.gson:gson:$gson_version"
121121
]
122122

123+
def netty_version = "4.1.89.Final";
124+
List netty = [
125+
"io.netty:netty-common:$netty_version",
126+
"io.netty:netty-codec:$netty_version",
127+
"io.netty:netty-buffer:$netty_version",
128+
"io.netty:netty-transport:$netty_version",
129+
"io.netty:netty-resolver:$netty_version",
130+
"io.netty:netty-resolver-dns:$netty_version",
131+
"io.netty:netty-handler:$netty_version",
132+
"io.netty:netty-handler-proxy:$netty_version",
133+
"io.netty:netty-all:$netty_version",
134+
"io.netty:netty-codec-dns:$netty_version",
135+
"io.netty:netty-resolver-dns-native-macos:$netty_version",
136+
"io.netty:netty-transport-native-kqueue:$netty_version",
137+
]
138+
123139
configurations {
124140
localDeps
125141
all*.exclude group: "org.slf4j", module: "slf4j-log4j12"
126142
all*.exclude group: "ch.qos.logback"
127143
all*.exclude group: "org.apache.logging.log4j", module: "log4j-to-slf4j"
144+
all*.exclude group: "io.netty", module: "netty-tcnative"
128145
}
129146

130147
configurations.all {
@@ -137,29 +154,29 @@ dependencies {
137154
compile('org.springframework.boot:spring-boot-starter-web')
138155
compile("org.springframework.boot:spring-boot-starter-websocket")
139156
// cover old version
140-
compile 'io.netty:netty-all:4.1.68.Final'
157+
//compile 'io.netty:netty-all:4.1.86.Final'
141158
if (gradleVer.startsWith("4")) {
142159
if (!gradle.startParameter.isOffline()) {
143-
compile lombok, jcommander, log4j, spring, gson, json, mysql_driver, redis_driver, http_proxy
160+
compile lombok, jcommander, log4j, spring, gson, json, mysql_driver, redis_driver, http_proxy, netty
144161
compile("com.webank:weid-java-sdk:${weidSdkVersion}") {
145162
exclude group: "org.springframework", module: "*"
146163
exclude group: "javax.validation", module: "validation-api"
147164
exclude group: "org.codehaus.jackson", module: "jackson-mapper-asl"
148165
}
149-
compile("com.webank:weid-kit:3.0.0-rc.1")
166+
compile("com.webank:weid-kit:3.1.0-rc.1")
150167
}
151168
}
152169
if (gradleVer.startsWith("5")) {
153170
if (!gradle.startParameter.isOffline()) {
154171
compileOnly 'org.projectlombok:lombok:1.18.12'
155172
annotationProcessor 'org.projectlombok:lombok:1.18.12'
156-
compile lombok, jcommander, log4j, spring, gson, json, mysql_driver, redis_driver, http_proxy
173+
compile lombok, jcommander, log4j, spring, gson, json, mysql_driver, redis_driver, http_proxy, netty
157174
compile("com.webank:weid-java-sdk:${weidSdkVersion}") {
158175
exclude group: "org.springframework", module: "*"
159176
exclude group: "javax.validation", module: "validation-api"
160177
exclude group: "org.codehaus.jackson", module: "jackson-mapper-asl"
161178
}
162-
compile("com.webank:weid-kit:3.0.0-rc.1")
179+
compile("com.webank:weid-kit:3.1.0-rc.1")
163180
} else {
164181
compileOnly files('dist/lib/lombok-1.18.12.jar')
165182
annotationProcessor files('dist/lib/lombok-1.18.12.jar')

common/script/tpl/weidentity.properties.tpl

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,17 @@
33
# application config #
44
# #
55
#######################################################################################################
6+
# Deploy WeIdentity with blockchain or only database
7+
deploy.style=${DEPLOY_STYLE}
8+
# Crypto type, only use for deploy with database, 0 for ECDSA, 1 for SM
9+
crypto.type=${CRYPTO_TYPE}
10+
611
# The organization ID for AMOP communication.
712
blockchain.orgid=${ORG_ID}
813

14+
# The Blockchain Type
15+
blockchain.type=${CHAIN_TYPE}
16+
917
# The Chain Id
1018
chain.id=${CHAIN_ID}
1119

@@ -65,7 +73,7 @@ redis_cluster.master_connection_pool_size=64
6573
# persistence domain config #
6674
# #
6775
#######################################################################################################
68-
# Domain configuration, which divides colons into two segments, the first segment is the name of the data source,
76+
# Domain configuration, which divides colons into two segments, the first segment is the name of the data source,
6977
# the second segment is the name of the table, and if not, the default is the first data source and the default table `sdk_all_data`,
7078
# Multiple domains can be configured at the same time.
7179
# example:
@@ -99,6 +107,16 @@ domain.weIdAuth=datasource1:weid_auth
99107
domain.resourceInfo=datasource1:resource_info
100108
domain.resourceInfo.timeout=31556908799941
101109

110+
# tables for running locally
111+
local.weIdDocument=datasource1:table_weid_document
112+
local.cpt=datasource1:table_cpt
113+
local.policy=datasource1:table_policy
114+
local.presentation=datasource1:table_presentation
115+
local.role=datasource1:table_role
116+
local.authorityIssuer=datasource1:table_authority_issuer
117+
local.specificIssuer=datasource1:table_specific_issuer
118+
local.evidence=datasource1:table_evidence
119+
102120

103121
#######################################################################################################
104122
# #

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
2-
weidSdkVersion=3.0.0-rc.1
2+
weidSdkVersion=3.1.0-rc.1
33
repoType=zn
44
jdkTlsNamedGroups=secp256r1,secp256k1
55
signing.keyId=

run.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#fill with your node ip and channel_listen_port, example: 0.0.0.0:20200
66
#if you have more than one node ,you can put them with separator","
77
#for example: 0.0.0.0:20200,0:0:0:1:20200
8-
blockchain_address=127.0.0.1:25200
8+
blockchain_address=127.0.0.1:29200
99

1010
#this build tool supports FISCO BCOS 2.0 and FISCO BCOS 3.0
1111
#if you want to build on FISCO BCOS 2.0, please fill with "2".
@@ -20,7 +20,7 @@ org_id=webank
2020
amop_id=11
2121

2222
#chain id
23-
chain_id=1
23+
chain_id=112
2424

2525
#group id
2626
group_id=group0
@@ -41,4 +41,4 @@ redis_password=
4141
#"stg" to set the test environment, "prd" to set the production environment.
4242
#If you do not set it, the system will use allOrg as the environment by default.
4343
#It is not recommended. Production use default configuration
44-
cns_profile_active=prdabf
44+
cns_profile_active=prdabd

src/main/java/com/webank/weid/command/CreateWeId.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
import com.webank.weid.config.StaticConfig;
1010
import com.webank.weid.constant.DataFrom;
11-
import com.webank.weid.constant.ErrorCode;
12-
import com.webank.weid.protocol.response.ResponseData;
11+
import com.webank.weid.blockchain.constant.ErrorCode;
12+
import com.webank.weid.blockchain.protocol.response.ResponseData;
1313
import com.webank.weid.service.WeIdSdkService;
1414
import com.webank.weid.util.FileUtils;
1515
import com.webank.weid.util.WeIdUtils;

src/main/java/com/webank/weid/command/EnableShareCns.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import com.beust.jcommander.JCommander;
88
import com.webank.weid.config.StaticConfig;
9-
import com.webank.weid.constant.ErrorCode;
10-
import com.webank.weid.protocol.response.ResponseData;
9+
import com.webank.weid.blockchain.constant.ErrorCode;
10+
import com.webank.weid.blockchain.protocol.response.ResponseData;
1111
import com.webank.weid.service.ContractService;
1212

1313
public class EnableShareCns extends StaticConfig {

src/main/java/com/webank/weid/command/RegistAuthorityIssuer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
import com.beust.jcommander.JCommander;
99
import com.webank.weid.config.StaticConfig;
10-
import com.webank.weid.constant.ErrorCode;
11-
import com.webank.weid.protocol.response.ResponseData;
10+
import com.webank.weid.blockchain.constant.ErrorCode;
11+
import com.webank.weid.blockchain.protocol.response.ResponseData;
1212
import com.webank.weid.service.WeIdSdkService;
1313

1414
/**

0 commit comments

Comments
 (0)