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
  • #1062

Closed
Open
Opened Apr 29, 2024 by 云 李@xuanfeng2 of 19 tasks completed2/19 tasks

更新链配置异常,多签超过1000报出

【问题分类】

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

【问题描述】

环境:
底链版本2.2.0 , 使用java的SDK2.3.1; 
底链运行的机器是: 内存30G 
inux aeochain 5.4.0-108-generic #122-Ubuntu SMP Tue Mar 29 07:34:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
运行JAVA的SDK电脑是 windows 11 内存32G 。

问题:
组织信任证书链上签名不成功有一段时间了,现在想通过修改链配置的rule规则来减少签名数量,执行时报出异常。

诉求:
协助解决恢复长安链的正常使用,提出方案或者指导纠正问题。

具体的现象,操作步骤

  1. 调用SDK链配置权限更新方法, 代码:
   public void modifyOfChainConfigPermissionUpdate(ChainClient caLient){
   ResultOuterClass.TxResponse responseInfo = null;
   Request.Payload payload = null;
   try {
       Iterable<String> iterable=new ArrayList<>();
       PolicyOuterClass.Policy defaultInstance = PolicyOuterClass.Policy.newBuilder()
       .addAllOrgList(iterable)
       .setRule("4")
       .addRoleList("admin")
       .buildPartial();
       payload = caLient.createPayload OfChainConfigPermissionUpdate("CHAIN_CONFIG-TRUST_ROOT_ADD",
       defaultInstance, 10000);
       //2. create payloads with endorsement
       Request.EndorsementEntry[] endorsementEntries = SdkUtils
       .getEndorsers(payload, majorityUserArray());
    
                // 3. send request
                responseInfo = caLient.updateChainConfig(payload, endorsementEntries, 20000, 20000);
    
                ChainConfigOuterClass.ChainConfig chainConfig = ChainConfigOuterClass.ChainConfig.parseFrom(responseInfo.getContractResult().getResult().toByteArray());
                chainConfig.getResourcePoliciesList().forEach(c->log.info(c.toString()));
    
        } catch (SdkException e) {
            e.printStackTrace();
        } catch (InvalidProtocolBufferException e) {
            throw new RuntimeException(e);
        }

   }

其中 majorityUserArray() 方法逻辑为从数据库提取组织中管理员。

截图: image image image image

以上截图内容是,从数据库里查询出了1426个管理员,每个管理员都是不同组织下面的。

执行updateChainConfig方法后返回:

   tx verify failed, verify tx authentation failed, authentication error for CHAIN_CONFIG-PERMISSION_UPDATE: authentication fail: not enough participants support this action: 1001 valid endorsements required, 1000 valid endorsements received, txId:17ca9f0b827f9689cad6a8372c1036595f2b264052f641a58e73ae42d33732d4

【相关日志文件】

chainmaker-go 的 brief.log 和 system.log

brief.log.2024042910 image

system.log.2024042910 image

【系统信息】

  • chainmaker-go version * :
    • v2.2.0
  • OS & version * :
    • 底链服务器:Linux aeochain 5.4.0-108-generic #122 (closed)-Ubuntu SMP Tue Mar 29 07:34:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
    • JAVA的sdk使用系统是普通 window 11 内存32G ,SDK版本是2.3.1
  • docker镜像 version:
    • 没有使用
  • 管理台 version:
    • 忽略。
  • 区块浏览器 version:
    • 忽略。
  • 合约IDE version:
    • 忽略。
  • web签名插件 version:
    • 忽略。
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#1062

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