Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in
issue
issue
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

  • chainmaker
  • issueissue
  • Issues
  • #921

Closed
Open
Opened Dec 04, 2023 by zhang yong@zhangy2 of 19 tasks completed2/19 tasks

liquid网络下启动多条链时,AddCert 失败

【问题分类】

  • bug
  • P2P网络相关(包含libp2p,liquid)
  • 链账户身份与权限相关(证书问题、public、多签投票问题)
  • 核心交易引擎相关(交易池、DAG)
  • 共识相关
  • 智能合约相关
  • 存储相关
  • SDK相关
  • 长安链CMC工具
  • 长安链管理台
  • 长安链浏览器
  • 长安链合约IDE
  • 长安链web签名插件
  • 跨链相关
  • 轻节点相关
  • 隐私计算相关
  • 密码学相关
  • 环境依赖
  • 其他补充:

【问题描述】(请对问题进行描述,方便定位问题)

在证书模式下,当以 liquid 网络启动4节点4条链的网络后,通过查询块高会出现偶发性的证书哈希上链错误:

Error: check user cert on chain failed, check user upload cert on chain failed, try again later, user cert havenot on chain yet, and try again
Usage:
  cmc query block-by-height [height] [flags]

Flags:
      --chain-id string        Chain ID
      --enable-cert-hash       whether enable cert hash (default true)
  -h, --help                   help for block-by-height
      --sdk-conf-path string   specify sdk config path
      --truncate-value         enable truncate value, default true (default true)
      --with-rw-set            whether with RWSet (default true)
  1. 测试网络部署方式

使用 chainmaker-go/scripts 进行网络搭建,具体步骤如下:

  • 修改 config/config_tpl/chainmaker.tpl 中的 LibP2P 为 liquid
  • 执行 ./prepare.sh 4 4
  • 执行 ./build_release.sh
  • 执行 ./cluster_quick_start.sh normal
  1. 测试脚本

通过使用 cmc 查询区块高的方式执行证书哈希上链,具体如下:

#!/bin/bash

chain_ids=(chain1 chain2 chain3 chain4)
sdk_configs=(sdk_config_org1.yml sdk_config_org2.yml sdk_config_org3.yml sdk_config_org4.yml)

for chain_id in "${chain_ids[@]}"
do
	echo $chain_id
	for sdk_config in "${sdk_configs[@]}"
	do
		echo "   $sdk_config"
		sdk_config_path="$sdk_config"
		sed -i -r "s#^\s*chain_id:.*#  chain_id: $chain_id#g" $sdk_config_path
		./cmc query block-by-height --sdk-conf-path $sdk_config_path | grep height
	done
done

其中 sdk_config_org{N}.yml 分别为 wx-org{N}.chainmaker.org 的 SDK 配置。

  1. 测试结论

测试发现,当使用 liquid 网络时会时常出现某个组织失败报以上错误的问题(若仅启动一条链,则没有该问题)。当将网络替换成 libp2p 后还未发现该问题。

【系统信息】(请填写系统信息,方便定位问题)

  • chainmaker-go version * : [v2.3.2]
Edited Dec 04, 2023 by zhang yong
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: chainmaker/issue#921

Copyright © 2021 ChainMaker Org. All Rights Reserved. 长安链 版权所有。