From a88f5c9fc61bf106c27554ea0c247170edfb5f10 Mon Sep 17 00:00:00 2001 From: "yuxin.zhang" Date: Wed, 29 Dec 2021 18:40:25 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BC=98=E5=8C=96dataset=5Fquery=20?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E8=BD=AC=E6=8D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/welab/wefe/union/service/mapper/DataSetMapper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/union/union-service/src/main/java/com/welab/wefe/union/service/mapper/DataSetMapper.java b/union/union-service/src/main/java/com/welab/wefe/union/service/mapper/DataSetMapper.java index ff9608d95..b7e5c8f63 100644 --- a/union/union-service/src/main/java/com/welab/wefe/union/service/mapper/DataSetMapper.java +++ b/union/union-service/src/main/java/com/welab/wefe/union/service/mapper/DataSetMapper.java @@ -61,6 +61,9 @@ public interface DataSetMapper { */ @Mappings({ @Mapping(source = "dataSetId", target = "id"), + @Mapping(target = "usageCountInJob",expression = "java(com.welab.wefe.common.util.StringUtil.isEmpty(entity.getUsageCountInJob()) ? 0 : Integer.parseInt(entity.getUsageCountInJob()))"), + @Mapping(target = "usageCountInFlow",expression = "java(com.welab.wefe.common.util.StringUtil.isEmpty(entity.getUsageCountInFlow()) ? 0 : Integer.parseInt(entity.getUsageCountInFlow()))"), + @Mapping(target = "usageCountInProject",expression = "java(com.welab.wefe.common.util.StringUtil.isEmpty(entity.getUsageCountInProject()) ? 0 : Integer.parseInt(entity.getUsageCountInProject()))"), @Mapping(source = "createdTime", target = "createdTime", dateFormat = DateUtil.YYYY_MM_DD_HH_MM_SS2), @Mapping(source = "updatedTime", target = "updatedTime", dateFormat = DateUtil.YYYY_MM_DD_HH_MM_SS2), }) -- Gitee From b7a4f1949213781e56d053baef4df82a7b23493e Mon Sep 17 00:00:00 2001 From: "aaron.li" Date: Wed, 5 Jan 2022 17:50:54 +0800 Subject: [PATCH 2/9] =?UTF-8?q?blockchain-data-sync=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E4=BB=A5=E5=90=88=E7=BA=A6=EF=BC=8D=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E8=A1=A8=E7=9A=84=E5=8C=BA=E5=9D=97=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tool/TransactionResponseDetailInfo.java | 83 ++++++++++++ .../BlockSyncContractHeightMongoRepo.java | 9 +- .../repo/BlockSyncDetailInfoMongoRepo.java | 9 +- .../repo/BlockSyncHeightMongoReop.java | 9 +- .../com/welab/wefe/bo/data/BlockInfoBO.java | 16 ++- .../wefe/bo/data/TransactionResponseBO.java | 73 +++++++++++ .../welab/wefe/parser/BlockInfoParser.java | 36 +++++- .../com/welab/wefe/service/BaseService.java | 51 ++++++++ .../BlockSyncContractHeightService.java | 68 ++++++++++ .../service/BlockSyncDetailInfoService.java | 54 ++++++++ .../wefe/service/BlockSyncHeightService.java | 47 +++++++ .../service/TransactionResponseService.java | 121 ++++++++++++++++++ .../com/welab/wefe/task/DataSyncTask.java | 117 ++++------------- 13 files changed, 587 insertions(+), 106 deletions(-) create mode 100644 common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/entity/contract/tool/TransactionResponseDetailInfo.java create mode 100644 union/blockchain-data-sync/src/main/java/com/welab/wefe/bo/data/TransactionResponseBO.java create mode 100644 union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BaseService.java create mode 100644 union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncContractHeightService.java create mode 100644 union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncDetailInfoService.java create mode 100644 union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncHeightService.java create mode 100644 union/blockchain-data-sync/src/main/java/com/welab/wefe/service/TransactionResponseService.java diff --git a/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/entity/contract/tool/TransactionResponseDetailInfo.java b/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/entity/contract/tool/TransactionResponseDetailInfo.java new file mode 100644 index 000000000..6dfd80d1d --- /dev/null +++ b/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/entity/contract/tool/TransactionResponseDetailInfo.java @@ -0,0 +1,83 @@ +/** + * Copyright 2021 Tianmian Tech. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.welab.wefe.common.data.mongodb.entity.contract.tool; + +import com.alibaba.fastjson.JSONObject; +import com.welab.wefe.common.data.mongodb.entity.AbstractNormalMongoModel; + +import java.math.BigInteger; + +/** + * @author aaron.li + * @date 2022/1/5 15:52 + **/ +public class TransactionResponseDetailInfo extends AbstractNormalMongoModel { + private BigInteger blockNumber; + private String transactionHash; + private String contractName; + private String contractAddress; + private String eventName; + private JSONObject data; + + public BigInteger getBlockNumber() { + return blockNumber; + } + + public void setBlockNumber(BigInteger blockNumber) { + this.blockNumber = blockNumber; + } + + public String getContractName() { + return contractName; + } + + public void setContractName(String contractName) { + this.contractName = contractName; + } + + public String getContractAddress() { + return contractAddress; + } + + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + + public String getEventName() { + return eventName; + } + + public void setEventName(String eventName) { + this.eventName = eventName; + } + + public JSONObject getData() { + return data; + } + + public void setData(JSONObject data) { + this.data = data; + } + + public String getTransactionHash() { + return transactionHash; + } + + public void setTransactionHash(String transactionHash) { + this.transactionHash = transactionHash; + } +} diff --git a/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncContractHeightMongoRepo.java b/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncContractHeightMongoRepo.java index 2cfa28984..c1912ba94 100644 --- a/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncContractHeightMongoRepo.java +++ b/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncContractHeightMongoRepo.java @@ -1,12 +1,12 @@ /** * Copyright 2021 Tianmian Tech. All Rights Reserved. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,6 +35,9 @@ public class BlockSyncContractHeightMongoRepo extends AbstractMongoRepo { public void upsertByGroupIdAndContractName(BlockSyncContractHeight blockSyncContractHeight) { BlockSyncContractHeight dbRecord = findByGroupIdAndContractName(blockSyncContractHeight.getGroupId(), blockSyncContractHeight.getContractName()); if (dbRecord != null) { + if (dbRecord.getBlockNumber() >= blockSyncContractHeight.getBlockNumber()) { + return; + } blockSyncContractHeight.setId(dbRecord.getId()); blockSyncContractHeight.setCreateTime(dbRecord.getCreateTime()); } diff --git a/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncDetailInfoMongoRepo.java b/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncDetailInfoMongoRepo.java index f7aa58bd8..bf296d78d 100644 --- a/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncDetailInfoMongoRepo.java +++ b/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncDetailInfoMongoRepo.java @@ -1,12 +1,12 @@ /** * Copyright 2021 Tianmian Tech. All Rights Reserved. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,6 +35,9 @@ public class BlockSyncDetailInfoMongoRepo extends AbstractMongoRepo { public void upsert(BlockSyncDetailInfo blockSyncDetailInfo) { BlockSyncDetailInfo dbRecord = findByGroupIdAndBlockNumber(blockSyncDetailInfo.getGroupId(), blockSyncDetailInfo.getBlockNumber()); if (dbRecord != null) { + if (dbRecord.getBlockNumber() >= blockSyncDetailInfo.getBlockNumber()) { + return; + } blockSyncDetailInfo.setId(dbRecord.getId()); blockSyncDetailInfo.setCreateTime(dbRecord.getCreateTime()); } diff --git a/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncHeightMongoReop.java b/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncHeightMongoReop.java index 74c7552c8..2c777df92 100644 --- a/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncHeightMongoReop.java +++ b/common/java/common-data-mongodb/src/main/java/com/welab/wefe/common/data/mongodb/repo/BlockSyncHeightMongoReop.java @@ -1,12 +1,12 @@ /** * Copyright 2021 Tianmian Tech. All Rights Reserved. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,6 +35,9 @@ public class BlockSyncHeightMongoReop extends AbstractMongoRepo { public void upsert(BlockSyncHeight blockSyncHeight) { BlockSyncHeight dbRecord = findByGroupId(blockSyncHeight.getGroupId()); if (dbRecord != null) { + if (dbRecord.getBlockNumber() >= blockSyncHeight.getBlockNumber()) { + return; + } blockSyncHeight.setId(dbRecord.getId()); blockSyncHeight.setCreateTime(dbRecord.getCreateTime()); } diff --git a/union/blockchain-data-sync/src/main/java/com/welab/wefe/bo/data/BlockInfoBO.java b/union/blockchain-data-sync/src/main/java/com/welab/wefe/bo/data/BlockInfoBO.java index adaf0b14f..5d900b290 100644 --- a/union/blockchain-data-sync/src/main/java/com/welab/wefe/bo/data/BlockInfoBO.java +++ b/union/blockchain-data-sync/src/main/java/com/welab/wefe/bo/data/BlockInfoBO.java @@ -1,12 +1,12 @@ /** * Copyright 2021 Tianmian Tech. All Rights Reserved. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,6 +17,7 @@ package com.welab.wefe.bo.data; import java.math.BigInteger; +import java.util.ArrayList; import java.util.List; /** @@ -27,6 +28,7 @@ public class BlockInfoBO { private BigInteger blockNumber; private List eventBOList; + private List transactionResponseBOList = new ArrayList<>(); @Override public String toString() { @@ -60,4 +62,12 @@ public class BlockInfoBO { public void setBlockNumber(BigInteger blockNumber) { this.blockNumber = blockNumber; } + + public List getTransactionResponseBOList() { + return transactionResponseBOList; + } + + public void setTransactionResponseBOList(List transactionResponseBOList) { + this.transactionResponseBOList = transactionResponseBOList; + } } diff --git a/union/blockchain-data-sync/src/main/java/com/welab/wefe/bo/data/TransactionResponseBO.java b/union/blockchain-data-sync/src/main/java/com/welab/wefe/bo/data/TransactionResponseBO.java new file mode 100644 index 000000000..cd2396e42 --- /dev/null +++ b/union/blockchain-data-sync/src/main/java/com/welab/wefe/bo/data/TransactionResponseBO.java @@ -0,0 +1,73 @@ +/** + * Copyright 2021 Tianmian Tech. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.welab.wefe.bo.data; + +import org.fisco.bcos.sdk.transaction.model.dto.TransactionResponse; + +import java.math.BigInteger; + +/** + * @author aaron.li + * @date 2021/12/30 16:00 + **/ +public class TransactionResponseBO { + private BigInteger blockNumber; + private String contractAddress; + private String contractName; + private String transactionHash; + private TransactionResponse transactionResponse; + + public BigInteger getBlockNumber() { + return blockNumber; + } + + public void setBlockNumber(BigInteger blockNumber) { + this.blockNumber = blockNumber; + } + + public String getContractAddress() { + return contractAddress; + } + + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + + public String getContractName() { + return contractName; + } + + public void setContractName(String contractName) { + this.contractName = contractName; + } + + public TransactionResponse getTransactionResponse() { + return transactionResponse; + } + + public void setTransactionResponse(TransactionResponse transactionResponse) { + this.transactionResponse = transactionResponse; + } + + public String getTransactionHash() { + return transactionHash; + } + + public void setTransactionHash(String transactionHash) { + this.transactionHash = transactionHash; + } +} diff --git a/union/blockchain-data-sync/src/main/java/com/welab/wefe/parser/BlockInfoParser.java b/union/blockchain-data-sync/src/main/java/com/welab/wefe/parser/BlockInfoParser.java index 6fb6a737f..2a6520cb6 100644 --- a/union/blockchain-data-sync/src/main/java/com/welab/wefe/parser/BlockInfoParser.java +++ b/union/blockchain-data-sync/src/main/java/com/welab/wefe/parser/BlockInfoParser.java @@ -1,12 +1,12 @@ /** * Copyright 2021 Tianmian Tech. All Rights Reserved. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,6 +21,7 @@ import com.welab.wefe.bo.contract.EventMetaInfo; import com.welab.wefe.bo.contract.FieldInfo; import com.welab.wefe.bo.data.BlockInfoBO; import com.welab.wefe.bo.data.EventBO; +import com.welab.wefe.bo.data.TransactionResponseBO; import com.welab.wefe.common.util.DateUtil; import com.welab.wefe.common.util.JObject; import com.welab.wefe.common.util.StringUtil; @@ -33,6 +34,8 @@ import org.fisco.bcos.sdk.client.protocol.model.JsonTransactionResponse; import org.fisco.bcos.sdk.client.protocol.response.BcosBlock; import org.fisco.bcos.sdk.client.protocol.response.BcosTransactionReceipt; import org.fisco.bcos.sdk.model.TransactionReceipt; +import org.fisco.bcos.sdk.transaction.codec.decode.TransactionDecoderInterface; +import org.fisco.bcos.sdk.transaction.model.dto.TransactionResponse; import org.fisco.bcos.sdk.transaction.model.exception.ContractException; import org.fisco.bcos.sdk.utils.Numeric; import org.slf4j.Logger; @@ -130,6 +133,7 @@ public class BlockInfoParser { if (!opt.isPresent()) { continue; } + TransactionReceipt tr = opt.get(); ContractInfo contractInfo = TransactionUtil.getContractInfoByTransaction(transaction); if (null == contractInfo) { @@ -143,11 +147,37 @@ public class BlockInfoParser { // Explain the event eventBOList.addAll(parserEvent(tr, contractInfo)); + + // Explain transaction response + parseTransactionResponse(blockInfoBO, contractInfo, tr); } blockInfoBO.setEventBOList(eventBOList); return blockInfoBO; } + /** + * Explain transaction response + */ + private void parseTransactionResponse(BlockInfoBO blockInfoBO, ContractInfo contractInfo, TransactionReceipt transactionReceipt) { + try { + String contractAbi = contractInfo.getAbi(); + TransactionDecoderInterface decoder = SyncConstant.getCurrentContext().getDecoder(); + TransactionResponse transactionResponse = decoder.decodeReceiptWithoutValues(contractAbi, transactionReceipt); + if (null == transactionResponse) { + return; + } + TransactionResponseBO transactionResponseBO = new TransactionResponseBO(); + transactionResponseBO.setTransactionHash(transactionReceipt.getTransactionHash()); + transactionResponseBO.setBlockNumber(blockInfoBO.getBlockNumber()); + transactionResponseBO.setContractAddress(transactionReceipt.getContractAddress()); + transactionResponseBO.setContractName(contractInfo.getContractName()); + transactionResponseBO.setTransactionResponse(transactionResponse); + blockInfoBO.getTransactionResponseBOList().add(transactionResponseBO); + } catch (Exception e) { + LOG.error("Failed to explain transaction receipt: ", e); + } + } + } diff --git a/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BaseService.java b/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BaseService.java new file mode 100644 index 000000000..29376d17b --- /dev/null +++ b/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BaseService.java @@ -0,0 +1,51 @@ +/** + * Copyright 2021 Tianmian Tech. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.welab.wefe.service; + +import com.welab.wefe.common.util.DateUtil; +import com.welab.wefe.exception.BusinessException; +import com.welab.wefe.util.WechatUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; + +import java.util.Date; + +/** + * @author aaron.li + * @date 2021/12/31 11:12 + **/ +public class BaseService { + protected final Logger LOG = LoggerFactory.getLogger(this.getClass()); + + @Value("${wechat.bot-url}") + private String wechatUrl; + + /** + * Send error warning + */ + public void sendErrorMsg(int groupId, long blockNumber, Exception e) { + String errorMsg; + if (e instanceof BusinessException) { + errorMsg = "Warning!!!, Business exception! Business exception! Business exception! Important things are to be repeated for 3 times! Sync group id: " + groupId + ", block number: " + blockNumber + ", data exception: " + e.getMessage(); + } else { + errorMsg = "Sync group id: " + groupId + ", block number " + blockNumber + ", data exception: " + e.getMessage(); + } + errorMsg += "\n\n" + DateUtil.toStringYYYY_MM_DD_HH_MM_SS2(new Date()); + WechatUtil.send(wechatUrl, errorMsg); + } +} diff --git a/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncContractHeightService.java b/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncContractHeightService.java new file mode 100644 index 000000000..ebc5e90c9 --- /dev/null +++ b/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncContractHeightService.java @@ -0,0 +1,68 @@ +/** + * Copyright 2021 Tianmian Tech. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.welab.wefe.service; + +import com.welab.wefe.bo.data.BlockInfoBO; +import com.welab.wefe.bo.data.EventBO; +import com.welab.wefe.common.data.mongodb.entity.contract.tool.BlockSyncContractHeight; +import com.welab.wefe.common.data.mongodb.repo.BlockSyncContractHeightMongoRepo; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * @author aaron.li + * @date 2021/12/31 11:09 + **/ +@Service +public class BlockSyncContractHeightService extends BaseService { + + @Autowired + private BlockSyncContractHeightMongoRepo blockSyncContractHeightMongoRepo; + + /** + * Record the block height contract information that has been successfully synchronized + */ + public void save(BlockInfoBO blockInfoBO) { + List eventBOList = blockInfoBO.getEventBOList(); + if (CollectionUtils.isEmpty(eventBOList)) { + return; + } + Set contractNameList = new HashSet<>(16); + eventBOList.forEach(x -> contractNameList.add(x.getContractName())); + BlockSyncContractHeight blockSyncContractHeight; + for (String contractName : contractNameList) { + blockSyncContractHeight = new BlockSyncContractHeight(); + blockSyncContractHeight.setGroupId(blockInfoBO.getGroupId()); + blockSyncContractHeight.setBlockNumber(blockInfoBO.getBlockNumber().longValue()); + blockSyncContractHeight.setContractName(contractName); + blockSyncContractHeightMongoRepo.upsertByGroupIdAndContractName(blockSyncContractHeight); + } + } + + public BlockSyncContractHeight findByGroupIdAndContractName(Integer groupId, String contractName) { + return blockSyncContractHeightMongoRepo.findByGroupIdAndContractName(groupId, contractName); + } + + public void upsertByGroupIdAndContractName(BlockSyncContractHeight blockSyncContractHeight) { + blockSyncContractHeightMongoRepo.upsertByGroupIdAndContractName(blockSyncContractHeight); + } +} diff --git a/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncDetailInfoService.java b/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncDetailInfoService.java new file mode 100644 index 000000000..52a57cf25 --- /dev/null +++ b/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncDetailInfoService.java @@ -0,0 +1,54 @@ +/** + * Copyright 2021 Tianmian Tech. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.welab.wefe.service; + +import com.welab.wefe.bo.data.BlockInfoBO; +import com.welab.wefe.common.data.mongodb.entity.contract.tool.BlockSyncDetailInfo; +import com.welab.wefe.common.data.mongodb.repo.BlockSyncDetailInfoMongoRepo; +import com.welab.wefe.common.util.JObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @author aaron.li + * @date 2021/12/31 11:11 + **/ +@Service +public class BlockSyncDetailInfoService extends BaseService{ + private final Logger LOG = LoggerFactory.getLogger(BlockSyncDetailInfoService.class); + + @Autowired + private BlockSyncDetailInfoMongoRepo blockSyncDetailInfoMongoRepo; + + /** + * Save block information + */ + public void saveBlockDetailInfo(BlockInfoBO blockInfoBO) { + try { + BlockSyncDetailInfo blockSyncDetailInfo = new BlockSyncDetailInfo(); + blockSyncDetailInfo.setGroupId(blockInfoBO.getGroupId()); + blockSyncDetailInfo.setBlockNumber(blockInfoBO.getBlockNumber().longValue()); + blockSyncDetailInfo.setData(JObject.create(blockInfoBO)); + blockSyncDetailInfoMongoRepo.upsert(blockSyncDetailInfo); + } catch (Exception e) { + LOG.error("Failed to save block detail info with group id:" + blockInfoBO.getGroupId() + ", block: " + blockInfoBO.getBlockNumber() + " , exception info: ", e); + sendErrorMsg(blockInfoBO.getGroupId(), blockInfoBO.getBlockNumber().longValue(), e); + } + } +} diff --git a/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncHeightService.java b/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncHeightService.java new file mode 100644 index 000000000..7d5e97931 --- /dev/null +++ b/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/BlockSyncHeightService.java @@ -0,0 +1,47 @@ +/** + * Copyright 2021 Tianmian Tech. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.welab.wefe.service; + +import com.welab.wefe.bo.data.BlockInfoBO; +import com.welab.wefe.common.data.mongodb.entity.contract.tool.BlockSyncHeight; +import com.welab.wefe.common.data.mongodb.repo.BlockSyncHeightMongoReop; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @author aaron.li + * @date 2021/12/30 18:01 + **/ +@Service +public class BlockSyncHeightService extends BaseService { + @Autowired + private BlockSyncHeightMongoReop blockSyncHeightMongoReop; + + /** + * Record the block height information that has been successfully synchronized + */ + public void save(BlockInfoBO blockInfoBO) { + BlockSyncHeight blockSyncHeight = new BlockSyncHeight(); + blockSyncHeight.setBlockNumber(blockInfoBO.getBlockNumber().longValue()); + blockSyncHeight.setGroupId(blockInfoBO.getGroupId()); + blockSyncHeightMongoReop.upsert(blockSyncHeight); + } + + public BlockSyncHeight findByGroupId(Integer groupId) { + return blockSyncHeightMongoReop.findByGroupId(groupId); + } +} diff --git a/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/TransactionResponseService.java b/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/TransactionResponseService.java new file mode 100644 index 000000000..9c6c8c169 --- /dev/null +++ b/union/blockchain-data-sync/src/main/java/com/welab/wefe/service/TransactionResponseService.java @@ -0,0 +1,121 @@ +/** + * Copyright 2021 Tianmian Tech. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.welab.wefe.service; + +import com.welab.wefe.bo.data.BlockInfoBO; +import com.welab.wefe.bo.data.TransactionResponseBO; +import com.welab.wefe.common.data.mongodb.entity.contract.tool.TransactionResponseDetailInfo; +import com.welab.wefe.common.data.mongodb.util.QueryBuilder; +import com.welab.wefe.common.util.JObject; +import com.welab.wefe.common.util.StringUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.fisco.bcos.sdk.transaction.model.dto.TransactionResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Query; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Set; + +/** + * Transaction response service class + * + * @author aaron.li + * @date 2021/12/31 14:07 + **/ +@Service +public class TransactionResponseService extends BaseService { + private final static String COLLECTION_NAME_PREFIX = "BlockTr_"; + private final static String EMPTY_CONTRACT_NAME = "empty"; + private final static String EMPTY_EVENT_NAME = "empty"; + + @Autowired + protected MongoTemplate mongoTemplate; + + /** + * save + */ + public void save(BlockInfoBO blockInfoBO) { + try { + if (null == blockInfoBO) { + return; + } + List transactionResponseBOList = blockInfoBO.getTransactionResponseBOList(); + if (CollectionUtils.isEmpty(transactionResponseBOList)) { + return; + } + + for (TransactionResponseBO transactionResponseBO : transactionResponseBOList) { + String eventName = getEventName(transactionResponseBO); + String contractName = (StringUtil.isEmpty(transactionResponseBO.getContractName()) ? EMPTY_CONTRACT_NAME : transactionResponseBO.getContractName()); + + TransactionResponseDetailInfo detailInfo = new TransactionResponseDetailInfo(); + detailInfo.setTransactionHash(transactionResponseBO.getTransactionHash()); + detailInfo.setBlockNumber(transactionResponseBO.getBlockNumber()); + detailInfo.setContractAddress(transactionResponseBO.getContractAddress()); + detailInfo.setContractName(contractName); + detailInfo.setEventName(eventName); + detailInfo.setData(JObject.create(JObject.toJSONString(transactionResponseBO.getTransactionResponse()))); + + String collectionName = buildCollectionName(contractName, eventName); + TransactionResponseDetailInfo historyDetailInfo = getByTransactionHash(collectionName, transactionResponseBO.getTransactionHash()); + if (null != historyDetailInfo) { + detailInfo.setId(historyDetailInfo.getId()); + } + mongoTemplate.save(detailInfo, collectionName); + } + } catch (Exception e) { + LOG.error("Failed to save transaction response info with group id:" + blockInfoBO.getGroupId() + ", block: " + blockInfoBO.getBlockNumber() + ", exception info: ", e); + } + } + + + private TransactionResponseDetailInfo getByTransactionHash(String collectionName, String transactionHash) { + if (StringUtil.isEmpty(transactionHash)) { + return null; + } + + Query query = new QueryBuilder().append("transactionHash", transactionHash).build(); + return mongoTemplate.findOne(query, TransactionResponseDetailInfo.class, collectionName); + } + + private String buildCollectionName(String contractName, String eventName) { + return COLLECTION_NAME_PREFIX + contractName + "_" + eventName; + } + + /** + * Extract event name from transaction + */ + private String getEventName(TransactionResponseBO transactionResponseBO) { + JObject dataObj = transactionResponseToJson(transactionResponseBO.getTransactionResponse()); + JObject eventObj = dataObj.getJObject("event_result_map"); + if (null == eventObj || eventObj.isEmpty()) { + return EMPTY_EVENT_NAME; + } + Set keySet = eventObj.getInnerMap().keySet(); + String eventName = keySet.stream().findFirst().get(); + return StringUtil.isEmpty(eventName) ? EMPTY_EVENT_NAME : eventName; + } + + private JObject transactionResponseToJson(TransactionResponse transactionResponse) { + if (null == transactionResponse) { + return JObject.create(); + } + return JObject.create(JObject.toJSONString(transactionResponse)); + } +} diff --git a/union/blockchain-data-sync/src/main/java/com/welab/wefe/task/DataSyncTask.java b/union/blockchain-data-sync/src/main/java/com/welab/wefe/task/DataSyncTask.java index 1a0e225ec..6882a1ee7 100644 --- a/union/blockchain-data-sync/src/main/java/com/welab/wefe/task/DataSyncTask.java +++ b/union/blockchain-data-sync/src/main/java/com/welab/wefe/task/DataSyncTask.java @@ -1,12 +1,12 @@ /** * Copyright 2021 Tianmian Tech. All Rights Reserved. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,23 +19,20 @@ package com.welab.wefe.task; import com.welab.wefe.bo.data.BlockInfoBO; import com.welab.wefe.bo.data.EventBO; import com.welab.wefe.common.data.mongodb.entity.contract.tool.BlockSyncContractHeight; -import com.welab.wefe.common.data.mongodb.entity.contract.tool.BlockSyncDetailInfo; import com.welab.wefe.common.data.mongodb.entity.contract.tool.BlockSyncHeight; -import com.welab.wefe.common.data.mongodb.repo.BlockSyncContractHeightMongoRepo; -import com.welab.wefe.common.data.mongodb.repo.BlockSyncDetailInfoMongoRepo; -import com.welab.wefe.common.data.mongodb.repo.BlockSyncHeightMongoReop; -import com.welab.wefe.common.util.DateUtil; -import com.welab.wefe.common.util.JObject; import com.welab.wefe.common.util.StringUtil; import com.welab.wefe.common.util.ThreadUtil; import com.welab.wefe.constant.BlockConstant; import com.welab.wefe.constant.SyncConstant; import com.welab.wefe.exception.BusinessException; import com.welab.wefe.parser.BlockInfoParser; +import com.welab.wefe.service.BlockSyncContractHeightService; +import com.welab.wefe.service.BlockSyncDetailInfoService; +import com.welab.wefe.service.BlockSyncHeightService; +import com.welab.wefe.service.TransactionResponseService; import com.welab.wefe.tool.DataProcessor; import com.welab.wefe.tool.DataSyncContext; import com.welab.wefe.util.BlockUtil; -import com.welab.wefe.util.WechatUtil; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.math.NumberUtils; import org.fisco.bcos.sdk.BcosSDK; @@ -49,7 +46,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import java.math.BigInteger; -import java.util.*; +import java.util.ArrayList; +import java.util.List; /** * Blockchain data sync @@ -64,13 +62,16 @@ public class DataSyncTask { private BcosSDK bcosSDK; @Autowired - private BlockSyncHeightMongoReop blockSyncHeightMongoReop; + private BlockSyncHeightService blockSyncHeightService; + + @Autowired + private BlockSyncContractHeightService blockSyncContractHeightService; @Autowired - private BlockSyncDetailInfoMongoRepo blockSyncDetailInfoMongoRepo; + private BlockSyncDetailInfoService blockSyncDetailInfoService; @Autowired - private BlockSyncContractHeightMongoRepo blockSyncContractHeightMongoRepo; + private TransactionResponseService transactionResponseService; /** * The group ID of the sync data, separated by commas @@ -78,23 +79,17 @@ public class DataSyncTask { @Value("${contract.data-sync-group-id}") private String dataSyncGroupId; - @Value("${wechat.bot-url}") - private String wechatUrl; - - public void startTask() { if (StringUtil.isEmpty(dataSyncGroupId) || StringUtil.isEmpty(dataSyncGroupId.trim())) { LOG.warn("please config data sync group id."); return; } - String[] groupIds = dataSyncGroupId.trim().split(","); for (String groupId : groupIds) { if (!NumberUtils.isNumber(groupId)) { continue; } - cn.hutool.core.thread.ThreadUtil.execAsync(new CrawlRunner(NumberUtils.toInt(groupId))); } } @@ -115,7 +110,7 @@ public class DataSyncTask { DataSyncContext dataSyncContext = DataSyncContext.create(client); SyncConstant.setCurrentContext(dataSyncContext); //Query part of the data that has been synchronized - BlockSyncHeight blockSyncHeight = blockSyncHeightMongoReop.findByGroupId(dataSyncContext.getGroupId()); + BlockSyncHeight blockSyncHeight = blockSyncHeightService.findByGroupId(dataSyncContext.getGroupId()); long startBlockNumber = (null == blockSyncHeight ? 0 : blockSyncHeight.getBlockNumber() + 1); while (true) { // The length of the synchronized part is greater than the current maximum length, it proves that the synchronization has been completed @@ -137,18 +132,18 @@ public class DataSyncTask { } catch (BusinessException e) { LOG.error("Failed to sync data with group id: " + groupId + ", block: " + startBlockNumber + " , exception info: ", e); // Business error proofs need not be repeated, Manual intervention is required - sendErrorMsg(groupId, startBlockNumber, e); + blockSyncHeightService.sendErrorMsg(groupId, startBlockNumber, e); return; } catch (Exception e) { LOG.error("Failed to sync data with group id:" + groupId + ", block: " + startBlockNumber + " , exception info: ", e); - sendErrorMsg(groupId, startBlockNumber, e); + blockSyncHeightService.sendErrorMsg(groupId, startBlockNumber, e); ThreadUtil.sleepSeconds(5); } } } } catch (Exception e) { LOG.error("Failed to sync data with group id:" + groupId + " exception info: ", e); - sendErrorMsg(groupId, -1, e); + blockSyncHeightService.sendErrorMsg(groupId, -1, e); } } @@ -156,11 +151,11 @@ public class DataSyncTask { * Sync block data */ private void startSync(long blockNumber) throws Exception { + BlockInfoBO blockInfoBO = null; for (int i = 0; i < 6; i++) { // get block by block number BcosBlock.Block block = BlockUtil.getBlock(this.client, new BigInteger(String.valueOf(blockNumber))); - BlockInfoBO blockInfoBO = BlockInfoParser.create(block).parse(); - + blockInfoBO = BlockInfoParser.create(block).parse(); if (CollectionUtils.isEmpty(blockInfoBO.getEventBOList())) { // retry Thread.sleep(500); @@ -171,43 +166,13 @@ public class DataSyncTask { DataProcessor.parseBlockData(filterBlockInfoBO); - saveBlockSyncHeight(blockInfoBO); + blockSyncHeightService.save(blockInfoBO); - saveBlockSyncContractHeight(filterBlockInfoBO); + blockSyncContractHeightService.save(filterBlockInfoBO); - saveBlockDetailInfo(blockInfoBO); - } - } - - /** - * Record the block height information that has been successfully synchronized - */ - private void saveBlockSyncHeight(BlockInfoBO blockInfoBO) { - BlockSyncHeight blockSyncHeight = new BlockSyncHeight(); - blockSyncHeight.setBlockNumber(blockInfoBO.getBlockNumber().longValue()); - blockSyncHeight.setGroupId(blockInfoBO.getGroupId()); - blockSyncHeightMongoReop.upsert(blockSyncHeight); - } - - - /** - * Record the block height contract information that has been successfully synchronized - */ - private void saveBlockSyncContractHeight(BlockInfoBO blockInfoBO) { - List eventBOList = blockInfoBO.getEventBOList(); - if (CollectionUtils.isEmpty(eventBOList)) { - return; - } - Set contractNameList = new HashSet<>(16); - eventBOList.forEach(x -> contractNameList.add(x.getContractName())); - BlockSyncContractHeight blockSyncContractHeight; - for (String contractName : contractNameList) { - blockSyncContractHeight = new BlockSyncContractHeight(); - blockSyncContractHeight.setGroupId(blockInfoBO.getGroupId()); - blockSyncContractHeight.setBlockNumber(blockInfoBO.getBlockNumber().longValue()); - blockSyncContractHeight.setContractName(contractName); - blockSyncContractHeightMongoRepo.upsertByGroupIdAndContractName(blockSyncContractHeight); + blockSyncDetailInfoService.saveBlockDetailInfo(blockInfoBO); } + transactionResponseService.save(blockInfoBO); } @@ -225,7 +190,7 @@ public class DataSyncTask { List filterResultEventBOList = new ArrayList<>(); BlockSyncContractHeight blockSyncContractHeight; for (EventBO eventBO : eventBOList) { - blockSyncContractHeight = blockSyncContractHeightMongoRepo.findByGroupIdAndContractName(blockInfoBO.getGroupId(), eventBO.getContractName()); + blockSyncContractHeight = blockSyncContractHeightService.findByGroupIdAndContractName(blockInfoBO.getGroupId(), eventBO.getContractName()); // Prove that the events of the contract have not been synchronized if (null == blockSyncContractHeight || (eventBO.getBlockNumber().longValue() > blockSyncContractHeight.getBlockNumber())) { filterResultEventBOList.add(eventBO); @@ -236,35 +201,5 @@ public class DataSyncTask { copyBlockInfoBO.setEventBOList(filterResultEventBOList); return copyBlockInfoBO; } - - /** - * Save block information - */ - private void saveBlockDetailInfo(BlockInfoBO blockInfoBO) { - try { - BlockSyncDetailInfo blockSyncDetailInfo = new BlockSyncDetailInfo(); - blockSyncDetailInfo.setGroupId(blockInfoBO.getGroupId()); - blockSyncDetailInfo.setBlockNumber(blockInfoBO.getBlockNumber().longValue()); - blockSyncDetailInfo.setData(JObject.create(blockInfoBO)); - blockSyncDetailInfoMongoRepo.upsert(blockSyncDetailInfo); - } catch (Exception e) { - LOG.error("Failed to save block detail info with group id:" + blockInfoBO.getGroupId() + ", block: " + blockInfoBO.getBlockNumber() + " , exception info: ", e); - sendErrorMsg(blockInfoBO.getGroupId(), blockInfoBO.getBlockNumber().longValue(), e); - } - } - - /** - * Send error warning - */ - private void sendErrorMsg(int groupId, long blockNumber, Exception e) { - String errorMsg; - if (e instanceof BusinessException) { - errorMsg = "Warning!!!, Business exception! Business exception! Business exception! Important things are to be repeated for 3 times! Sync group id: " + groupId + ", block number: " + blockNumber + ", data exception: " + e.getMessage(); - } else { - errorMsg = "Sync group id: " + groupId + ", block number " + blockNumber + ", data exception: " + e.getMessage(); - } - errorMsg += "\n\n" + DateUtil.toStringYYYY_MM_DD_HH_MM_SS2(new Date()); - WechatUtil.send(wechatUrl, errorMsg); - } } } -- Gitee From 2f9fcda8c4eab9f885bdea37791a240475fb3fc9 Mon Sep 17 00:00:00 2001 From: "winter.zou" Date: Thu, 13 Jan 2022 10:12:49 +0800 Subject: [PATCH 3/9] add bin ignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d2918cd9f..c768d1a0e 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,7 @@ jobs/ # 排除build build/ - +**/bin/ # 排除mac本地文件 *.DS_Store *.properties -- Gitee From 3cf142919a8ce4f388e8b18dccfccfefa298971d Mon Sep 17 00:00:00 2001 From: "claude.wu" Date: Thu, 13 Jan 2022 10:26:57 +0800 Subject: [PATCH 4/9] fix: fix_riac --- .../src/views/teamwork/visual/component-list/HorzLR/params.vue | 1 - .../teamwork/visual/component-list/HorzSecureBoost/params.vue | 1 - .../src/views/teamwork/visual/component-list/MixLR/params.vue | 1 - .../teamwork/visual/component-list/MixSecureBoost/params.vue | 1 - .../src/views/teamwork/visual/component-list/VertLR/params.vue | 1 - .../teamwork/visual/component-list/VertSecureBoost/help.vue | 2 +- .../teamwork/visual/component-list/VertSecureBoost/params.vue | 1 - 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/board/board-website/src/views/teamwork/visual/component-list/HorzLR/params.vue b/board/board-website/src/views/teamwork/visual/component-list/HorzLR/params.vue index 7f2dcbe6e..a69ee5206 100644 --- a/board/board-website/src/views/teamwork/visual/component-list/HorzLR/params.vue +++ b/board/board-website/src/views/teamwork/visual/component-list/HorzLR/params.vue @@ -291,7 +291,6 @@ encryptionTypeList: [ { value: '', text: '------' }, { value: 'Paillier', text: 'Paillier' }, - { value: 'IterativeAffine', text: 'IterativeAffine' }, ], // config diff --git a/board/board-website/src/views/teamwork/visual/component-list/HorzSecureBoost/params.vue b/board/board-website/src/views/teamwork/visual/component-list/HorzSecureBoost/params.vue index 263731ed7..90f86d909 100644 --- a/board/board-website/src/views/teamwork/visual/component-list/HorzSecureBoost/params.vue +++ b/board/board-website/src/views/teamwork/visual/component-list/HorzSecureBoost/params.vue @@ -282,7 +282,6 @@ encryptionTypeList: [ { value: '', text: '------' }, { value: 'Paillier', text: 'Paillier' }, - { value: 'IterativeAffine', text: 'IterativeAffine' }, ], originForm: { ...XGBoost }, diff --git a/board/board-website/src/views/teamwork/visual/component-list/MixLR/params.vue b/board/board-website/src/views/teamwork/visual/component-list/MixLR/params.vue index c9d32e796..0e751fa7d 100644 --- a/board/board-website/src/views/teamwork/visual/component-list/MixLR/params.vue +++ b/board/board-website/src/views/teamwork/visual/component-list/MixLR/params.vue @@ -326,7 +326,6 @@ encryptionTypeList: [ { value: '', text: '------' }, { value: 'Paillier', text: 'Paillier' }, - { value: 'IterativeAffine', text: 'IterativeAffine' }, ], // config diff --git a/board/board-website/src/views/teamwork/visual/component-list/MixSecureBoost/params.vue b/board/board-website/src/views/teamwork/visual/component-list/MixSecureBoost/params.vue index b360c2e72..2e126e88a 100644 --- a/board/board-website/src/views/teamwork/visual/component-list/MixSecureBoost/params.vue +++ b/board/board-website/src/views/teamwork/visual/component-list/MixSecureBoost/params.vue @@ -322,7 +322,6 @@ encryptionTypeList: [ { value: '', text: '------' }, { value: 'Paillier', text: 'Paillier' }, - { value: 'IterativeAffine', text: 'IterativeAffine' }, ], originForm: { ...XGBoost }, diff --git a/board/board-website/src/views/teamwork/visual/component-list/VertLR/params.vue b/board/board-website/src/views/teamwork/visual/component-list/VertLR/params.vue index f747bb12e..6012ee4ec 100644 --- a/board/board-website/src/views/teamwork/visual/component-list/VertLR/params.vue +++ b/board/board-website/src/views/teamwork/visual/component-list/VertLR/params.vue @@ -327,7 +327,6 @@ encryptionTypeList: [ { value: '', text: '------' }, { value: 'Paillier', text: 'Paillier' }, - { value: 'IterativeAffine', text: 'IterativeAffine' }, ], // config diff --git a/board/board-website/src/views/teamwork/visual/component-list/VertSecureBoost/help.vue b/board/board-website/src/views/teamwork/visual/component-list/VertSecureBoost/help.vue index acc0cc29c..40a46fc2c 100644 --- a/board/board-website/src/views/teamwork/visual/component-list/VertSecureBoost/help.vue +++ b/board/board-website/src/views/teamwork/visual/component-list/VertSecureBoost/help.vue @@ -5,7 +5,7 @@