From 0b12e8f42419c40614bd39bb42835f5392b99464 Mon Sep 17 00:00:00 2001 From: zhaoguangwei Date: Mon, 9 Dec 2019 17:27:55 +0800 Subject: [PATCH 1/7] modify transaction state, PARTICIPANT_DOES_NOT_EXIST -> 06 --- .../blockchain/ledger/TransactionState.java | 258 +++++++++--------- 1 file changed, 129 insertions(+), 129 deletions(-) diff --git a/source/ledger/ledger-model/src/main/java/com/jd/blockchain/ledger/TransactionState.java b/source/ledger/ledger-model/src/main/java/com/jd/blockchain/ledger/TransactionState.java index f7ef4a4e..57ddde05 100644 --- a/source/ledger/ledger-model/src/main/java/com/jd/blockchain/ledger/TransactionState.java +++ b/source/ledger/ledger-model/src/main/java/com/jd/blockchain/ledger/TransactionState.java @@ -1,129 +1,129 @@ -package com.jd.blockchain.ledger; - -import com.jd.blockchain.binaryproto.PrimitiveType; -import com.jd.blockchain.binaryproto.EnumContract; -import com.jd.blockchain.binaryproto.EnumField; -import com.jd.blockchain.consts.DataCodes; - -/** - * 交易(事务)执行状态; - * - * @author huanghaiquan - * - */ -@EnumContract(code = DataCodes.ENUM_TYPE_TRANSACTION_STATE) -public enum TransactionState { - - /** - * 成功; - */ - SUCCESS((byte) 0), - - /** - * 账本错误; - */ - LEDGER_ERROR((byte) 0x01), - - /** - * 数据账户不存在; - */ - DATA_ACCOUNT_DOES_NOT_EXIST((byte) 0x02), - - /** - * 用户不存在; - */ - USER_DOES_NOT_EXIST((byte) 0x03), - - /** - * 合约不存在; - */ - CONTRACT_DOES_NOT_EXIST((byte) 0x04), - - /** - * 数据写入时版本冲突; - */ - DATA_VERSION_CONFLICT((byte) 0x05), - - /** - * 参与方不存在; - */ - PARTICIPANT_DOES_NOT_EXIST((byte) 0x05), - - /** - * 被安全策略拒绝; - */ - REJECTED_BY_SECURITY_POLICY((byte) 0x10), - - /** - * 由于在错误的账本上执行交易而被丢弃; - */ - IGNORED_BY_WRONG_LEDGER((byte) 0x40), - - /** - * 由于交易内容的验签失败而丢弃; - */ - IGNORED_BY_WRONG_CONTENT_SIGNATURE((byte) 0x41), - - /** - * 由于交易内容的验签失败而丢弃; - */ - IGNORED_BY_CONFLICTING_STATE((byte) 0x42), - - /** - * 由于交易的整体回滚而丢弃; - *

- * - * 注: “整体回滚”是指把交易引入的数据更改以及交易记录本身全部都回滚;
- * “部分回滚”是指把交易引入的数据更改回滚了,但是交易记录本身以及相应的“交易结果({@link TransactionState})”都会提交;
- */ - IGNORED_BY_TX_FULL_ROLLBACK((byte) 0x43), - - /** - * 由于区块的整体回滚而丢弃; - *

- * - * 注: “整体回滚”是指把交易引入的数据更改以及交易记录本身全部都回滚;
- * - * “部分回滚”是指把交易引入的数据更改回滚了,但是交易记录本身以及相应的“交易结果({@link TransactionState})”都会提交;
- */ - IGNORED_BY_BLOCK_FULL_ROLLBACK((byte) 0x44), - - /** - * - * 共识阶段加入新区块哈希预计算功能, 如果来自其他Peer的新区块哈希值不一致,本批次整体回滚 - * - */ - IGNORED_BY_CONSENSUS_PHASE_PRECOMPUTE_ROLLBACK((byte) 0x45), - - /** - * 系统错误; - */ - SYSTEM_ERROR((byte) 0x80), - - /** - * 超时; - */ - TIMEOUT((byte) 0x81), - - /** - * 共识错误; - */ - CONSENSUS_ERROR((byte) 0x82); - - @EnumField(type = PrimitiveType.INT8) - public final byte CODE; - - private TransactionState(byte code) { - this.CODE = code; - } - - public static TransactionState valueOf(byte code) { - for (TransactionState tr : values()) { - if (tr.CODE == code) { - return tr; - } - } - throw new IllegalArgumentException("Unsupported transaction result code!"); - } - -} +package com.jd.blockchain.ledger; + +import com.jd.blockchain.binaryproto.PrimitiveType; +import com.jd.blockchain.binaryproto.EnumContract; +import com.jd.blockchain.binaryproto.EnumField; +import com.jd.blockchain.consts.DataCodes; + +/** + * 交易(事务)执行状态; + * + * @author huanghaiquan + * + */ +@EnumContract(code = DataCodes.ENUM_TYPE_TRANSACTION_STATE) +public enum TransactionState { + + /** + * 成功; + */ + SUCCESS((byte) 0), + + /** + * 账本错误; + */ + LEDGER_ERROR((byte) 0x01), + + /** + * 数据账户不存在; + */ + DATA_ACCOUNT_DOES_NOT_EXIST((byte) 0x02), + + /** + * 用户不存在; + */ + USER_DOES_NOT_EXIST((byte) 0x03), + + /** + * 合约不存在; + */ + CONTRACT_DOES_NOT_EXIST((byte) 0x04), + + /** + * 数据写入时版本冲突; + */ + DATA_VERSION_CONFLICT((byte) 0x05), + + /** + * 参与方不存在; + */ + PARTICIPANT_DOES_NOT_EXIST((byte) 0x06), + + /** + * 被安全策略拒绝; + */ + REJECTED_BY_SECURITY_POLICY((byte) 0x10), + + /** + * 由于在错误的账本上执行交易而被丢弃; + */ + IGNORED_BY_WRONG_LEDGER((byte) 0x40), + + /** + * 由于交易内容的验签失败而丢弃; + */ + IGNORED_BY_WRONG_CONTENT_SIGNATURE((byte) 0x41), + + /** + * 由于交易内容的验签失败而丢弃; + */ + IGNORED_BY_CONFLICTING_STATE((byte) 0x42), + + /** + * 由于交易的整体回滚而丢弃; + *

+ * + * 注: “整体回滚”是指把交易引入的数据更改以及交易记录本身全部都回滚;
+ * “部分回滚”是指把交易引入的数据更改回滚了,但是交易记录本身以及相应的“交易结果({@link TransactionState})”都会提交;
+ */ + IGNORED_BY_TX_FULL_ROLLBACK((byte) 0x43), + + /** + * 由于区块的整体回滚而丢弃; + *

+ * + * 注: “整体回滚”是指把交易引入的数据更改以及交易记录本身全部都回滚;
+ * + * “部分回滚”是指把交易引入的数据更改回滚了,但是交易记录本身以及相应的“交易结果({@link TransactionState})”都会提交;
+ */ + IGNORED_BY_BLOCK_FULL_ROLLBACK((byte) 0x44), + + /** + * + * 共识阶段加入新区块哈希预计算功能, 如果来自其他Peer的新区块哈希值不一致,本批次整体回滚 + * + */ + IGNORED_BY_CONSENSUS_PHASE_PRECOMPUTE_ROLLBACK((byte) 0x45), + + /** + * 系统错误; + */ + SYSTEM_ERROR((byte) 0x80), + + /** + * 超时; + */ + TIMEOUT((byte) 0x81), + + /** + * 共识错误; + */ + CONSENSUS_ERROR((byte) 0x82); + + @EnumField(type = PrimitiveType.INT8) + public final byte CODE; + + private TransactionState(byte code) { + this.CODE = code; + } + + public static TransactionState valueOf(byte code) { + for (TransactionState tr : values()) { + if (tr.CODE == code) { + return tr; + } + } + throw new IllegalArgumentException("Unsupported transaction result code!"); + } + +} From 8062f79401cc00f39b951e8261cdcb7e80322b37 Mon Sep 17 00:00:00 2001 From: huanghaiquan Date: Mon, 9 Dec 2019 17:32:34 +0800 Subject: [PATCH 2/7] Added comment; --- .../sdk/client/GatewayServiceFactory.java | 43 ++++++++++++++++--- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/source/sdk/sdk-client/src/main/java/com/jd/blockchain/sdk/client/GatewayServiceFactory.java b/source/sdk/sdk-client/src/main/java/com/jd/blockchain/sdk/client/GatewayServiceFactory.java index 79a329af..1d50d1d7 100644 --- a/source/sdk/sdk-client/src/main/java/com/jd/blockchain/sdk/client/GatewayServiceFactory.java +++ b/source/sdk/sdk-client/src/main/java/com/jd/blockchain/sdk/client/GatewayServiceFactory.java @@ -71,7 +71,6 @@ public class GatewayServiceFactory implements BlockchainServiceFactory, Closeabl ByteArrayObjectUtil.init(); } - protected GatewayServiceFactory(ServiceEndpoint gatewayEndpoint, BlockchainKeypair userKey) { httpConnectionManager = new ServiceConnectionManager(); this.userKey = userKey; @@ -80,7 +79,7 @@ public class GatewayServiceFactory implements BlockchainServiceFactory, Closeabl TransactionService txProcSrv = createConsensusService(gatewayEndpoint); this.blockchainService = new GatewayBlockchainServiceProxy(txProcSrv, queryService); } - + @Override public BlockchainService getBlockchainService() { return blockchainService; @@ -107,19 +106,49 @@ public class GatewayServiceFactory implements BlockchainServiceFactory, Closeabl // factory.setMaxConnections(100); // return factory; // } - + + /** + * 连接网关节点; + * + * @param gatewayAddress 网关节点的网络地址; + * @return 网关服务工厂的实例; + */ public static GatewayServiceFactory connect(NetworkAddress gatewayAddress) { return connect(gatewayAddress.getHost(), gatewayAddress.getPort(), gatewayAddress.isSecure(), null); } + /** + * 网关服务工厂的实例; + * + * @param gatewayAddress 网关节点的网络地址; + * @param userKey 自动交易签名的用户密钥;可选参数,如果不为 null,则在提交交易时,自动以参数指定的密钥签署交易; + * @return 网关服务工厂的实例; + */ public static GatewayServiceFactory connect(NetworkAddress gatewayAddress, BlockchainKeypair userKey) { return connect(gatewayAddress.getHost(), gatewayAddress.getPort(), gatewayAddress.isSecure(), userKey); } - + + /** + * 连接网关节点; + * + * @param gatewayHost 网关节点的地址; + * @param gatewayPort 网关节点的端口; + * @param secure 是否采用安全的通讯协议(HTTPS); + * @return 网关服务工厂的实例; + */ public static GatewayServiceFactory connect(String gatewayHost, int gatewayPort, boolean secure) { return connect(gatewayHost, gatewayPort, secure, null); } + /** + * 连接网关节点; + * + * @param gatewayHost 网关节点的地址; + * @param gatewayPort 网关节点的端口; + * @param secure 是否采用安全的通讯协议(HTTPS); + * @param userKey 自动交易签名的用户密钥;可选参数,如果不为 null,则在提交交易时,自动以参数指定的密钥签署交易; + * @return 网关服务工厂的实例; + */ public static GatewayServiceFactory connect(String gatewayHost, int gatewayPort, boolean secure, BlockchainKeypair userKey) { // if (userKey == null) { @@ -128,8 +157,8 @@ public class GatewayServiceFactory implements BlockchainServiceFactory, Closeabl ServiceEndpoint gatewayEndpoint = new ServiceEndpoint(gatewayHost, gatewayPort, secure); GatewayServiceFactory factory = new GatewayServiceFactory(gatewayEndpoint, userKey); factory.setMaxConnections(100); - //TODO: 未实现网关对用户的认证; - //TODO: 未实现加载不同账本的密码算法配置; + // TODO: 未实现网关对用户的认证; + // TODO: 未实现加载不同账本的密码算法配置; return factory; } @@ -171,7 +200,7 @@ public class GatewayServiceFactory implements BlockchainServiceFactory, Closeabl @Override public TransactionResponse process(TransactionRequest txRequest) { TxRequestMessage reqMsg = (TxRequestMessage) txRequest; - //TODO: 未实现按不同的账本的密码参数配置,采用不同的哈希算法和签名算法; + // TODO: 未实现按不同的账本的密码参数配置,采用不同的哈希算法和签名算法; if (!reqMsg.containsEndpointSignature(userKey.getAddress())) { // TODO: 优化上下文对此 TransactionContent 的多次序列化带来的额外性能开销; DigitalSignature signature = SignatureUtils.sign(txRequest.getTransactionContent(), userKey); From dbf3f05c3786b6030e2acec97d68989714175978 Mon Sep 17 00:00:00 2001 From: huanghaiquan Date: Mon, 9 Dec 2019 17:53:19 +0800 Subject: [PATCH 3/7] Upgraded version to 1.1.1-PACK20191209 --- source/base/pom.xml | 2 +- source/binary-proto/pom.xml | 2 +- source/consensus/consensus-bftsmart/pom.xml | 2 +- source/consensus/consensus-framework/pom.xml | 2 +- source/consensus/consensus-mq/pom.xml | 2 +- source/consensus/pom.xml | 2 +- source/contract/contract-framework/pom.xml | 2 +- source/contract/contract-jvm/pom.xml | 2 +- source/contract/contract-maven-plugin/pom.xml | 2 +- source/contract/contract-samples/pom.xml | 2 +- source/contract/pom.xml | 2 +- source/crypto/crypto-adv/pom.xml | 2 +- source/crypto/crypto-classic/pom.xml | 2 +- source/crypto/crypto-framework/pom.xml | 2 +- source/crypto/crypto-pki/pom.xml | 2 +- source/crypto/crypto-sm/pom.xml | 2 +- source/crypto/pom.xml | 2 +- source/deployment/deployment-gateway/pom.xml | 2 +- source/deployment/deployment-peer/pom.xml | 2 +- source/deployment/pom.xml | 2 +- source/gateway/pom.xml | 2 +- source/ledger/ledger-core/pom.xml | 2 +- source/ledger/ledger-model/pom.xml | 2 +- source/ledger/ledger-rpc/pom.xml | 2 +- source/ledger/pom.xml | 2 +- source/manager/manager-booter/pom.xml | 2 +- source/manager/manager-model/pom.xml | 2 +- source/manager/manager-service/pom.xml | 2 +- source/manager/manager-web/pom.xml | 2 +- source/manager/pom.xml | 2 +- source/peer/pom.xml | 2 +- source/pom.xml | 2 +- source/runtime/pom.xml | 2 +- source/runtime/runtime-context/pom.xml | 2 +- source/runtime/runtime-modular-booter/pom.xml | 2 +- source/runtime/runtime-modular/pom.xml | 2 +- source/sdk/pom.xml | 2 +- source/sdk/sdk-base/pom.xml | 2 +- source/sdk/sdk-client/pom.xml | 2 +- source/sdk/sdk-samples/pom.xml | 2 +- source/storage/pom.xml | 2 +- source/storage/storage-composite/pom.xml | 2 +- source/storage/storage-redis/pom.xml | 2 +- source/storage/storage-rocksdb/pom.xml | 2 +- source/storage/storage-service/pom.xml | 2 +- source/test/pom.xml | 2 +- source/test/test-consensus-client/pom.xml | 2 +- source/test/test-consensus-node/pom.xml | 4 ++-- source/test/test-integration/pom.xml | 2 +- source/test/test-ledger/pom.xml | 2 +- source/tools/pom.xml | 2 +- source/tools/tools-initializer-booter/pom.xml | 2 +- source/tools/tools-initializer/pom.xml | 2 +- source/tools/tools-keygen-booter/pom.xml | 2 +- source/tools/tools-keygen/pom.xml | 2 +- source/utils/pom.xml | 2 +- source/utils/utils-common/pom.xml | 2 +- source/utils/utils-http/pom.xml | 2 +- source/utils/utils-serialize/pom.xml | 2 +- source/utils/utils-test/pom.xml | 2 +- source/utils/utils-web-server/pom.xml | 2 +- source/utils/utils-web/pom.xml | 2 +- 62 files changed, 63 insertions(+), 63 deletions(-) diff --git a/source/base/pom.xml b/source/base/pom.xml index ab04450b..f1daa601 100644 --- a/source/base/pom.xml +++ b/source/base/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 base diff --git a/source/binary-proto/pom.xml b/source/binary-proto/pom.xml index 916dffce..08f1a013 100644 --- a/source/binary-proto/pom.xml +++ b/source/binary-proto/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 binary-proto diff --git a/source/consensus/consensus-bftsmart/pom.xml b/source/consensus/consensus-bftsmart/pom.xml index 7c28ce70..88f22e5f 100644 --- a/source/consensus/consensus-bftsmart/pom.xml +++ b/source/consensus/consensus-bftsmart/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain consensus - 1.1.1.RELEASE + 1.1.1-PACK20191209 consensus-bftsmart diff --git a/source/consensus/consensus-framework/pom.xml b/source/consensus/consensus-framework/pom.xml index fe2c09d3..b2ee168a 100644 --- a/source/consensus/consensus-framework/pom.xml +++ b/source/consensus/consensus-framework/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain consensus - 1.1.1.RELEASE + 1.1.1-PACK20191209 consensus-framework diff --git a/source/consensus/consensus-mq/pom.xml b/source/consensus/consensus-mq/pom.xml index 1018a069..0479b332 100644 --- a/source/consensus/consensus-mq/pom.xml +++ b/source/consensus/consensus-mq/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain consensus - 1.1.1.RELEASE + 1.1.1-PACK20191209 consensus-mq diff --git a/source/consensus/pom.xml b/source/consensus/pom.xml index 31d76545..2d335393 100644 --- a/source/consensus/pom.xml +++ b/source/consensus/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 consensus pom diff --git a/source/contract/contract-framework/pom.xml b/source/contract/contract-framework/pom.xml index 48104b73..82cabef7 100644 --- a/source/contract/contract-framework/pom.xml +++ b/source/contract/contract-framework/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain contract - 1.1.1.RELEASE + 1.1.1-PACK20191209 contract-framework diff --git a/source/contract/contract-jvm/pom.xml b/source/contract/contract-jvm/pom.xml index b7650d54..aeedac36 100644 --- a/source/contract/contract-jvm/pom.xml +++ b/source/contract/contract-jvm/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain contract - 1.1.1.RELEASE + 1.1.1-PACK20191209 contract-jvm diff --git a/source/contract/contract-maven-plugin/pom.xml b/source/contract/contract-maven-plugin/pom.xml index 88bf84bf..62a40ec5 100644 --- a/source/contract/contract-maven-plugin/pom.xml +++ b/source/contract/contract-maven-plugin/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain contract - 1.1.1.RELEASE + 1.1.1-PACK20191209 contract-maven-plugin maven-plugin diff --git a/source/contract/contract-samples/pom.xml b/source/contract/contract-samples/pom.xml index b3faf4db..68b351fe 100644 --- a/source/contract/contract-samples/pom.xml +++ b/source/contract/contract-samples/pom.xml @@ -5,7 +5,7 @@ contract com.jd.blockchain - 1.1.1.RELEASE + 1.1.1-PACK20191209 4.0.0 diff --git a/source/contract/pom.xml b/source/contract/pom.xml index 37ad3cd4..a05f4661 100644 --- a/source/contract/pom.xml +++ b/source/contract/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 contract pom diff --git a/source/crypto/crypto-adv/pom.xml b/source/crypto/crypto-adv/pom.xml index ec205688..6c6a9536 100644 --- a/source/crypto/crypto-adv/pom.xml +++ b/source/crypto/crypto-adv/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain crypto - 1.1.1.RELEASE + 1.1.1-PACK20191209 crypto-adv diff --git a/source/crypto/crypto-classic/pom.xml b/source/crypto/crypto-classic/pom.xml index ade4aba4..bba14fc0 100644 --- a/source/crypto/crypto-classic/pom.xml +++ b/source/crypto/crypto-classic/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain crypto - 1.1.1.RELEASE + 1.1.1-PACK20191209 crypto-classic diff --git a/source/crypto/crypto-framework/pom.xml b/source/crypto/crypto-framework/pom.xml index 62d89e52..8b3fe207 100644 --- a/source/crypto/crypto-framework/pom.xml +++ b/source/crypto/crypto-framework/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain crypto - 1.1.1.RELEASE + 1.1.1-PACK20191209 crypto-framework diff --git a/source/crypto/crypto-pki/pom.xml b/source/crypto/crypto-pki/pom.xml index 9c4921f1..0b5b3b94 100644 --- a/source/crypto/crypto-pki/pom.xml +++ b/source/crypto/crypto-pki/pom.xml @@ -5,7 +5,7 @@ crypto com.jd.blockchain - 1.1.1.RELEASE + 1.1.1-PACK20191209 4.0.0 diff --git a/source/crypto/crypto-sm/pom.xml b/source/crypto/crypto-sm/pom.xml index e2d3d58e..f0dd548f 100644 --- a/source/crypto/crypto-sm/pom.xml +++ b/source/crypto/crypto-sm/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain crypto - 1.1.1.RELEASE + 1.1.1-PACK20191209 crypto-sm diff --git a/source/crypto/pom.xml b/source/crypto/pom.xml index 0cda5a25..ac3ef3ca 100644 --- a/source/crypto/pom.xml +++ b/source/crypto/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 crypto pom diff --git a/source/deployment/deployment-gateway/pom.xml b/source/deployment/deployment-gateway/pom.xml index 6ed57e19..029c2fd1 100644 --- a/source/deployment/deployment-gateway/pom.xml +++ b/source/deployment/deployment-gateway/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain deployment - 1.1.1.RELEASE + 1.1.1-PACK20191209 deployment-gateway diff --git a/source/deployment/deployment-peer/pom.xml b/source/deployment/deployment-peer/pom.xml index 4ac9f092..25c9879c 100644 --- a/source/deployment/deployment-peer/pom.xml +++ b/source/deployment/deployment-peer/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain deployment - 1.1.1.RELEASE + 1.1.1-PACK20191209 deployment-peer diff --git a/source/deployment/pom.xml b/source/deployment/pom.xml index 1f673989..e67a8ef0 100644 --- a/source/deployment/pom.xml +++ b/source/deployment/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 deployment pom diff --git a/source/gateway/pom.xml b/source/gateway/pom.xml index f1fb16b3..875cd46b 100644 --- a/source/gateway/pom.xml +++ b/source/gateway/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 gateway diff --git a/source/ledger/ledger-core/pom.xml b/source/ledger/ledger-core/pom.xml index e6ad7aed..57983885 100644 --- a/source/ledger/ledger-core/pom.xml +++ b/source/ledger/ledger-core/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain ledger - 1.1.1.RELEASE + 1.1.1-PACK20191209 ledger-core diff --git a/source/ledger/ledger-model/pom.xml b/source/ledger/ledger-model/pom.xml index b0ea6b32..c23fd17e 100644 --- a/source/ledger/ledger-model/pom.xml +++ b/source/ledger/ledger-model/pom.xml @@ -6,7 +6,7 @@ com.jd.blockchain ledger - 1.1.1.RELEASE + 1.1.1-PACK20191209 ledger-model diff --git a/source/ledger/ledger-rpc/pom.xml b/source/ledger/ledger-rpc/pom.xml index 4cfed7d1..34a7aae5 100644 --- a/source/ledger/ledger-rpc/pom.xml +++ b/source/ledger/ledger-rpc/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain ledger - 1.1.1.RELEASE + 1.1.1-PACK20191209 ledger-rpc diff --git a/source/ledger/pom.xml b/source/ledger/pom.xml index 89802d22..89a6c6db 100644 --- a/source/ledger/pom.xml +++ b/source/ledger/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 ledger pom diff --git a/source/manager/manager-booter/pom.xml b/source/manager/manager-booter/pom.xml index 885e16d9..ea1e7729 100644 --- a/source/manager/manager-booter/pom.xml +++ b/source/manager/manager-booter/pom.xml @@ -5,7 +5,7 @@ manager com.jd.blockchain - 1.1.1.RELEASE + 1.1.1-PACK20191209 4.0.0 diff --git a/source/manager/manager-model/pom.xml b/source/manager/manager-model/pom.xml index 314477d3..0b7f63b0 100644 --- a/source/manager/manager-model/pom.xml +++ b/source/manager/manager-model/pom.xml @@ -5,7 +5,7 @@ manager com.jd.blockchain - 1.1.1.RELEASE + 1.1.1-PACK20191209 4.0.0 diff --git a/source/manager/manager-service/pom.xml b/source/manager/manager-service/pom.xml index fef1aed0..357b6b41 100644 --- a/source/manager/manager-service/pom.xml +++ b/source/manager/manager-service/pom.xml @@ -5,7 +5,7 @@ manager com.jd.blockchain - 1.1.1.RELEASE + 1.1.1-PACK20191209 4.0.0 diff --git a/source/manager/manager-web/pom.xml b/source/manager/manager-web/pom.xml index 0daaf057..e646bbfb 100644 --- a/source/manager/manager-web/pom.xml +++ b/source/manager/manager-web/pom.xml @@ -5,7 +5,7 @@ manager com.jd.blockchain - 1.1.1.RELEASE + 1.1.1-PACK20191209 4.0.0 diff --git a/source/manager/pom.xml b/source/manager/pom.xml index 2972bff7..587d5b41 100644 --- a/source/manager/pom.xml +++ b/source/manager/pom.xml @@ -11,7 +11,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 manager pom diff --git a/source/peer/pom.xml b/source/peer/pom.xml index 9029deaa..bbc7a063 100644 --- a/source/peer/pom.xml +++ b/source/peer/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 peer diff --git a/source/pom.xml b/source/pom.xml index 777775fc..8ef54310 100644 --- a/source/pom.xml +++ b/source/pom.xml @@ -11,7 +11,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 pom jdchain diff --git a/source/runtime/pom.xml b/source/runtime/pom.xml index ec80c4b7..e777b18a 100644 --- a/source/runtime/pom.xml +++ b/source/runtime/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 runtime pom diff --git a/source/runtime/runtime-context/pom.xml b/source/runtime/runtime-context/pom.xml index ade4b9c4..ce2465c5 100644 --- a/source/runtime/runtime-context/pom.xml +++ b/source/runtime/runtime-context/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain runtime - 1.1.1.RELEASE + 1.1.1-PACK20191209 runtime-context diff --git a/source/runtime/runtime-modular-booter/pom.xml b/source/runtime/runtime-modular-booter/pom.xml index e39129c4..38fc0a24 100644 --- a/source/runtime/runtime-modular-booter/pom.xml +++ b/source/runtime/runtime-modular-booter/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain runtime - 1.1.1.RELEASE + 1.1.1-PACK20191209 runtime-modular-booter \ No newline at end of file diff --git a/source/runtime/runtime-modular/pom.xml b/source/runtime/runtime-modular/pom.xml index 0bbb87d4..7c3a9ac0 100644 --- a/source/runtime/runtime-modular/pom.xml +++ b/source/runtime/runtime-modular/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain runtime - 1.1.1.RELEASE + 1.1.1-PACK20191209 runtime-modular diff --git a/source/sdk/pom.xml b/source/sdk/pom.xml index 56757bbe..137a8696 100644 --- a/source/sdk/pom.xml +++ b/source/sdk/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 sdk pom diff --git a/source/sdk/sdk-base/pom.xml b/source/sdk/sdk-base/pom.xml index 7c49f607..bb4ec273 100644 --- a/source/sdk/sdk-base/pom.xml +++ b/source/sdk/sdk-base/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain sdk - 1.1.1.RELEASE + 1.1.1-PACK20191209 sdk-base diff --git a/source/sdk/sdk-client/pom.xml b/source/sdk/sdk-client/pom.xml index c8f7b0cd..f92d6a67 100644 --- a/source/sdk/sdk-client/pom.xml +++ b/source/sdk/sdk-client/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain sdk - 1.1.1.RELEASE + 1.1.1-PACK20191209 sdk-client diff --git a/source/sdk/sdk-samples/pom.xml b/source/sdk/sdk-samples/pom.xml index ba4e9909..5bbecd22 100644 --- a/source/sdk/sdk-samples/pom.xml +++ b/source/sdk/sdk-samples/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain sdk - 1.1.1.RELEASE + 1.1.1-PACK20191209 sdk-samples diff --git a/source/storage/pom.xml b/source/storage/pom.xml index 7bd095b7..14576a85 100644 --- a/source/storage/pom.xml +++ b/source/storage/pom.xml @@ -3,7 +3,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 storage pom diff --git a/source/storage/storage-composite/pom.xml b/source/storage/storage-composite/pom.xml index 499c1c0b..e46b466c 100644 --- a/source/storage/storage-composite/pom.xml +++ b/source/storage/storage-composite/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain storage - 1.1.1.RELEASE + 1.1.1-PACK20191209 storage-composite diff --git a/source/storage/storage-redis/pom.xml b/source/storage/storage-redis/pom.xml index 29613bbb..7cb0f5b7 100644 --- a/source/storage/storage-redis/pom.xml +++ b/source/storage/storage-redis/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain storage - 1.1.1.RELEASE + 1.1.1-PACK20191209 storage-redis diff --git a/source/storage/storage-rocksdb/pom.xml b/source/storage/storage-rocksdb/pom.xml index 4af83bb2..32e5754c 100644 --- a/source/storage/storage-rocksdb/pom.xml +++ b/source/storage/storage-rocksdb/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain storage - 1.1.1.RELEASE + 1.1.1-PACK20191209 storage-rocksdb diff --git a/source/storage/storage-service/pom.xml b/source/storage/storage-service/pom.xml index f21649fb..cf17ec5d 100644 --- a/source/storage/storage-service/pom.xml +++ b/source/storage/storage-service/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain storage - 1.1.1.RELEASE + 1.1.1-PACK20191209 storage-service diff --git a/source/test/pom.xml b/source/test/pom.xml index dac1a969..f8fa928a 100644 --- a/source/test/pom.xml +++ b/source/test/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 test pom diff --git a/source/test/test-consensus-client/pom.xml b/source/test/test-consensus-client/pom.xml index 73394904..0b2e086e 100644 --- a/source/test/test-consensus-client/pom.xml +++ b/source/test/test-consensus-client/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain test - 1.1.1.RELEASE + 1.1.1-PACK20191209 test-consensus-client diff --git a/source/test/test-consensus-node/pom.xml b/source/test/test-consensus-node/pom.xml index ecc6532f..a5ee769f 100644 --- a/source/test/test-consensus-node/pom.xml +++ b/source/test/test-consensus-node/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain test - 1.1.1.RELEASE + 1.1.1-PACK20191209 test-consensus-node @@ -38,7 +38,7 @@ com.jd.blockchain consensus-bftsmart - 1.1.1.RELEASE + 1.1.1-PACK20191209 org.springframework.boot diff --git a/source/test/test-integration/pom.xml b/source/test/test-integration/pom.xml index fcd52e7e..8a1fde17 100644 --- a/source/test/test-integration/pom.xml +++ b/source/test/test-integration/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain test - 1.1.1.RELEASE + 1.1.1-PACK20191209 test-integration diff --git a/source/test/test-ledger/pom.xml b/source/test/test-ledger/pom.xml index 884c2eb8..57061dfc 100644 --- a/source/test/test-ledger/pom.xml +++ b/source/test/test-ledger/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain test - 1.1.1.RELEASE + 1.1.1-PACK20191209 test-ledger diff --git a/source/tools/pom.xml b/source/tools/pom.xml index 75a03f8b..cd499634 100644 --- a/source/tools/pom.xml +++ b/source/tools/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 tools pom diff --git a/source/tools/tools-initializer-booter/pom.xml b/source/tools/tools-initializer-booter/pom.xml index cb1603fa..0c5e8764 100644 --- a/source/tools/tools-initializer-booter/pom.xml +++ b/source/tools/tools-initializer-booter/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain tools - 1.1.1.RELEASE + 1.1.1-PACK20191209 tools-initializer-booter diff --git a/source/tools/tools-initializer/pom.xml b/source/tools/tools-initializer/pom.xml index 4a627f71..ca737d61 100644 --- a/source/tools/tools-initializer/pom.xml +++ b/source/tools/tools-initializer/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain tools - 1.1.1.RELEASE + 1.1.1-PACK20191209 tools-initializer diff --git a/source/tools/tools-keygen-booter/pom.xml b/source/tools/tools-keygen-booter/pom.xml index 3a859eec..7c967b10 100644 --- a/source/tools/tools-keygen-booter/pom.xml +++ b/source/tools/tools-keygen-booter/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain tools - 1.1.1.RELEASE + 1.1.1-PACK20191209 tools-keygen-booter diff --git a/source/tools/tools-keygen/pom.xml b/source/tools/tools-keygen/pom.xml index f18d5d50..a4d0efbd 100644 --- a/source/tools/tools-keygen/pom.xml +++ b/source/tools/tools-keygen/pom.xml @@ -5,7 +5,7 @@ com.jd.blockchain tools - 1.1.1.RELEASE + 1.1.1-PACK20191209 tools-keygen diff --git a/source/utils/pom.xml b/source/utils/pom.xml index cda7fe58..3952a27b 100644 --- a/source/utils/pom.xml +++ b/source/utils/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain jdchain-root - 1.1.1.RELEASE + 1.1.1-PACK20191209 utils pom diff --git a/source/utils/utils-common/pom.xml b/source/utils/utils-common/pom.xml index 6109546c..2957e06f 100644 --- a/source/utils/utils-common/pom.xml +++ b/source/utils/utils-common/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain utils - 1.1.1.RELEASE + 1.1.1-PACK20191209 utils-common diff --git a/source/utils/utils-http/pom.xml b/source/utils/utils-http/pom.xml index 36a8e328..61871c46 100644 --- a/source/utils/utils-http/pom.xml +++ b/source/utils/utils-http/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain utils - 1.1.1.RELEASE + 1.1.1-PACK20191209 diff --git a/source/utils/utils-serialize/pom.xml b/source/utils/utils-serialize/pom.xml index 75d17956..5e514438 100644 --- a/source/utils/utils-serialize/pom.xml +++ b/source/utils/utils-serialize/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain utils - 1.1.1.RELEASE + 1.1.1-PACK20191209 utils-serialize diff --git a/source/utils/utils-test/pom.xml b/source/utils/utils-test/pom.xml index 2541556f..39d93ed6 100644 --- a/source/utils/utils-test/pom.xml +++ b/source/utils/utils-test/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain utils - 1.1.1.RELEASE + 1.1.1-PACK20191209 utils-test diff --git a/source/utils/utils-web-server/pom.xml b/source/utils/utils-web-server/pom.xml index b06fcbf6..7120f2ea 100644 --- a/source/utils/utils-web-server/pom.xml +++ b/source/utils/utils-web-server/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain utils - 1.1.1.RELEASE + 1.1.1-PACK20191209 utils-web-server diff --git a/source/utils/utils-web/pom.xml b/source/utils/utils-web/pom.xml index 4c8dccf3..23e0fac4 100644 --- a/source/utils/utils-web/pom.xml +++ b/source/utils/utils-web/pom.xml @@ -4,7 +4,7 @@ com.jd.blockchain utils - 1.1.1.RELEASE + 1.1.1-PACK20191209 utils-web From e6604b489f5b64801f8bf3f1699340ebd2d6de98 Mon Sep 17 00:00:00 2001 From: zhaoguangwei Date: Wed, 11 Dec 2019 10:54:59 +0800 Subject: [PATCH 4/7] add lineEnding:unix --- .../deployment-gateway/src/main/resources/assembly.xml | 3 +++ .../deployment/deployment-peer/src/main/resources/assembly.xml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/source/deployment/deployment-gateway/src/main/resources/assembly.xml b/source/deployment/deployment-gateway/src/main/resources/assembly.xml index 39811c14..861990d0 100644 --- a/source/deployment/deployment-gateway/src/main/resources/assembly.xml +++ b/source/deployment/deployment-gateway/src/main/resources/assembly.xml @@ -12,14 +12,17 @@ src/main/resources/scripts bin + unix src/main/resources/config config + unix src/main/resources/docs docs + unix diff --git a/source/deployment/deployment-peer/src/main/resources/assembly.xml b/source/deployment/deployment-peer/src/main/resources/assembly.xml index 881c0aef..37aa494c 100644 --- a/source/deployment/deployment-peer/src/main/resources/assembly.xml +++ b/source/deployment/deployment-peer/src/main/resources/assembly.xml @@ -12,14 +12,17 @@ src/main/resources/scripts bin + unix src/main/resources/config config + unix src/main/resources/docs docs + unix From 46c63a021fd867a4d349680e18e4b57e000eabe0 Mon Sep 17 00:00:00 2001 From: zhaoguangwei Date: Thu, 12 Dec 2019 10:58:33 +0800 Subject: [PATCH 5/7] not use the oss-parent node in the central library publishing. fill some info related in the proifle and distributionManagement node; --- source/pom.xml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/source/pom.xml b/source/pom.xml index 5b9d0c10..259eb4dc 100644 --- a/source/pom.xml +++ b/source/pom.xml @@ -515,7 +515,63 @@ -Xdoclint:none + + + + sonatype-oss-release + + + + org.apache.maven.plugins + maven-source-plugin + 2.1.2 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.7 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + sonatype-nexus-staging + Nexus Release Repository + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + From 00a02efc95c8c67e7c11264f5eb2d0f28159c39c Mon Sep 17 00:00:00 2001 From: zhaoguangwei Date: Thu, 12 Dec 2019 18:36:08 +0800 Subject: [PATCH 6/7] add the param: jdchain.log --- .../blockchain/intgr/initializer/LedgerInitializeWeb4Nodes.java | 1 + 1 file changed, 1 insertion(+) diff --git a/source/test/test-integration/src/test/java/test/com/jd/blockchain/intgr/initializer/LedgerInitializeWeb4Nodes.java b/source/test/test-integration/src/test/java/test/com/jd/blockchain/intgr/initializer/LedgerInitializeWeb4Nodes.java index ec77fbee..1ccf994c 100644 --- a/source/test/test-integration/src/test/java/test/com/jd/blockchain/intgr/initializer/LedgerInitializeWeb4Nodes.java +++ b/source/test/test-integration/src/test/java/test/com/jd/blockchain/intgr/initializer/LedgerInitializeWeb4Nodes.java @@ -53,6 +53,7 @@ public class LedgerInitializeWeb4Nodes { System.setProperty("peer.log", path); System.setProperty("init.log", path); System.setProperty("gateway.log", path); + System.setProperty("jdchain.log", path); } catch (Exception e) { e.printStackTrace(); } From 2d16188e443eb27549e2657c293228f2ffb55bcd Mon Sep 17 00:00:00 2001 From: zhaoguangwei Date: Thu, 12 Dec 2019 19:17:09 +0800 Subject: [PATCH 7/7] add the interface: 6.9 /ledgers/{ledger}/accounts/address/{address}/keys/count/search?keyword={keyword} 6.10 /ledgers/{ledger}/accounts/address/{address}/keys/search?keyword={keyword}&fromIndex={start_index}&count={count} --- .../src/main/resources/docs/api_doc_cn_1.4.MD | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/source/deployment/deployment-gateway/src/main/resources/docs/api_doc_cn_1.4.MD b/source/deployment/deployment-gateway/src/main/resources/docs/api_doc_cn_1.4.MD index 7ff79c96..3a02ce4c 100644 --- a/source/deployment/deployment-gateway/src/main/resources/docs/api_doc_cn_1.4.MD +++ b/source/deployment/deployment-gateway/src/main/resources/docs/api_doc_cn_1.4.MD @@ -1808,6 +1808,57 @@ http://localhost/ledgers/657TQAw6ssVoeKniWGwbovk7njvCTvikPambM9eBv6ezs/accounts/ |type|value类型| |value|值| +### 6.9 查询某数据账户键数量 +``` +GET /ledgers/{ledger}/accounts/address/{address}/keys/count/search?keyword={keyword} +``` +#### 参数 +请求类型 | 名称 | 是否必需 | 说明 | 数据类型 +--- | --- | --- | --- | --- +path | ledger | 是 | 所要搜索的账本,需要完整的账本哈希 | string +path | address | 是 | 所要搜索的数据账户地址,需要完整的数据账户地址 | string +query | keyword | 否 | 键的部分字符,空表示全部 | string + +#### 请求实例 +``` +http://localhost/ledgers/657TQAw6ssVoeKniWGwbovk7njvCTvikPambM9eBv6ezs/accounts/address/5Sm4gWXrNpDWW9Boi4xZCzZMHboRvEDm29Fa/keys/count/search?keyword=j +``` +#### 返回实例 +``` +{ "data": 66, "success": true } +``` +说明 + +名称 | 说明 +--- | --- +data | 条件查询键总数 + +### 6.10 查询某数据账户键 +``` +GET /ledgers/{ledger}/accounts/address/{address}/keys/search?keyword={keyword}&fromIndex={start_index}&count={count} +``` +#### 参数 +请求类型 | 名称 | 是否必需 | 说明 | 数据类型 +--- | --- | --- | --- | --- +path | ledger | 是 | 所要搜索的账本,需要完整的账本哈希 | string +path | address | 是 | 所要搜索的数据账户地址,需要完整的数据账户地址 | string +query | keyword | 否 | 键的部分字符,空表示全部 | string +query | start_index | 否 | 查询数据账户对应Key的起始序号,默认为0 | 数字 +query | count | 否 | 查询返回数据账户对应Key的数量,默认最大返回值为100,小于0或大于100均返回最大可返回结果集 | 数字 + +#### 请求实例 +``` +http://localhost/ledgers/657TQAw6ssVoeKniWGwbovk7njvCTvikPambM9eBv6ezs/accounts/address/5Sm4gWXrNpDWW9Boi4xZCzZMHboRvEDm29Fa/keys/search?keyword=j&fromIndex=0&count=-1 +``` +#### 返回实例 +``` +{ "data": [ { "key": "jd" }, { "key": "jdchain" }], "success": true } +``` +说明 + +名称 | 说明 +--- | --- +key | 键 ## 7 搜索