Skip to content

Commit

Permalink
Merge pull request #280 from WeBankFinTech/release/1.7.0
Browse files Browse the repository at this point in the history
Release/1.7.0
  • Loading branch information
junqizhang-dev authored Nov 20, 2020
2 parents e889995 + f71f9c0 commit 05ff6c9
Show file tree
Hide file tree
Showing 75 changed files with 1,983 additions and 4,151 deletions.
2 changes: 1 addition & 1 deletion .ci/script/build-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function deploy_contract()
echo "contract deployment done."
}

function install_font()
function install_font()
{
# download NotoSansCJKtc-Regular.ttf
if [ ! -f NotoSansCJKtc-Regular.ttf ]; then
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.7
1.7.0
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ dependencies {
localDeps 'org.projectlombok:lombok:1.18.10'
if (!gradle.startParameter.isOffline()) {
compile logger, lombok, apache_commons, json, mysql_driver, redisson, zxing, rpc, pdfbox, protobuf, caffeine, oval
compile("com.webank:weid-contract-java:1.2.26") {
compile("com.webank:weid-contract-java:1.2.27") {
exclude group: "org.slf4j", module: "slf4j-log4j12"
}
compile fileTree(dir: 'lib', include: '*.jar')
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/webank/weid/constant/CnsType.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ public enum CnsType {
/**
* 默认的cns定义,此cns用于weid主合约存储.
*/
DEFAULT("allOrg", "v2.1"),
DEFAULT("allOrg", "v3.1"),

/**
* 共享cns定义,此cns可作为机构共享数据存储.
*/
SHARE("share", "v2.1"),
SHARE("share", "v3.1"),

/**
* 机构配置CNS定义.
*/
ORG_CONFING("orgConfig", "v2.1");
ORG_CONFING("orgConfig", "v3.1");

private static final String SPLIT_CHAR = "/";

Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/webank/weid/constant/ErrorCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,15 @@ public enum ErrorCode {
CREDENTIAL_EVIDENCE_HASH_MISMATCH(100501, "evidence hash mismatch"),

/**
* The credential evidence hash mismatch.
* The credential evidence does not exist on chain.
*/
CREDENTIAL_EVIDENCE_NOT_EXIST(100502, "evidence does not exist on chain"),

/**
* The credential evidence already exists on chain.
*/
CREDENTIAL_EVIDENCE_ALREADY_EXISTS(100503, "evidence already exists on chain"),

/**
* The credential evidence interface does not support fisco bcos 1.3.
*/
Expand Down
15 changes: 14 additions & 1 deletion src/main/java/com/webank/weid/constant/WeIdConstant.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,17 @@ public final class WeIdConstant {
* Removed WeID authentication specified tag.
*/
public static final String REMOVED_AUTHENTICATION_TAG = "OBSOLETEAUTH";


/**
* Evidence Revoke attribute key.
*/
public static final String EVIDENCE_REVOKE_KEY = "revoke";

/**
* Evidence Un-Revoke attribute key.
*/
public static final String EVIDENCE_UNREVOKE_KEY = "unrevoke";

/**
* the address key in bucket.
*/
Expand All @@ -258,6 +268,9 @@ public final class WeIdConstant {

public static final Integer ADD_PUBKEY_FAILURE_CODE = -1;

public static final Integer CPT_DATA_INDEX = 0;
public static final Integer POLICY_DATA_INDEX = 1;

public static final Long RECOGNIZED_AUTHORITY_ISSUER_FLAG = 1L;

public static enum PublicKeyType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import com.webank.weid.config.FiscoConfig;
import com.webank.weid.constant.ErrorCode;
import com.webank.weid.constant.WeIdConstant;
import com.webank.weid.contract.deploy.v1.DeployContractV1;
import com.webank.weid.contract.deploy.v2.DeployContractV2;
import com.webank.weid.exception.WeIdBaseException;

Expand Down Expand Up @@ -86,7 +85,7 @@ public static void main(String[] args) {

public static void deployContract(String privateKey, boolean instantEnable) {
if (fiscoConfig.getVersion().startsWith(WeIdConstant.FISCO_BCOS_1_X_VERSION_PREFIX)) {
DeployContractV1.deployContract(privateKey);
throw new WeIdBaseException(ErrorCode.THIS_IS_UNSUPPORTED);
} else {
DeployContractV2.deployContract(privateKey, fiscoConfig, instantEnable);
}
Expand Down
Loading

0 comments on commit 05ff6c9

Please sign in to comment.