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

Closed
Open
Opened Jul 05, 2024 by right hou@right_hou1 of 19 tasks completed1/19 tasks

资源权限可以查到但是却无法更新

【问题分类】

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

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

新部署的长安链环境,通过查询长安链的权限列表,可以查看到长安链的对应的权限。但是通过更新权限(permission update)的命令,会报错。

复现过程:

1.首先通过cmc命令查询链上权限。命令如下:

./cmc client chainconfig permission list --sdk-conf-path=./testdata/sdk_config.yml

结果如下图:

image

通过查询,可以从列表中查询到冻结合约的权限。

2.现在执行更新该合约方法的权限。命令如下:

./cmc client chainconfig permission update
--permission-resource-name=CONTRACT_MANAGE-FREEZE_CONTRACT
--permission-resource-policy-rule="FORBIDDEN"
--sdk-conf-path=./testdata/sdk_config.yml
--sync-result=true
--admin-key-file-paths=./testdata/crypto-config/wx-org1.chainmaker.org/user/admin1/admin1.sign.key,./testdata/crypto-config/wx-org2.chainmaker.org/user/admin1/admin1.sign.key,./testdata/crypto-config/wx-org3.chainmaker.org/user/admin1/admin1.sign.key,./testdata/crypto-config/wx-org4.chainmaker.org/user/admin1/admin1.sign.key,./testdata/crypto-config/wx-org5.chainmaker.org/user/admin1/admin1.sign.key,./testdata/crypto-config/wx-org6.chainmaker.org/user/admin1/admin1.sign.key
--admin-crt-file-paths=./testdata/crypto-config/wx-org1.chainmaker.org/user/admin1/admin1.sign.crt,./testdata/crypto-config/wx-org2.chainmaker.org/user/admin1/admin1.sign.crt,./testdata/crypto-config/wx-org3.chainmaker.org/user/admin1/admin1.sign.crt,./testdata/crypto-config/wx-org4.chainmaker.org/user/admin1/admin1.sign.crt,./testdata/crypto-config/wx-org5.chainmaker.org/user/admin1/admin1.sign.crt,./testdata/crypto-config/wx-org6.chainmaker.org/user/admin1/admin1.sign.crt

执行结果如下图:

image

可以查询到资源的权限,但是无法对资源进行修改。比较不合理。

官方文档只有对资源的查询、新增、编辑、删除的描述。无法解释这种情况。

官网对资源操作的介绍文档如下图:

image

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

  • chainmaker-go version * : [v2.3.2]
  • 工具 :cmc命令行工具
  • 部署结构图如下:

image

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#1117

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