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

Closed
Open
Opened May 07, 2023 by 丽芬 韦@150780762721 of 4 tasks completed1/4 tasks

SDK部署示例合约时提示添加交易失败

【问题分类】

  • bug
  • 核心交易引擎相关(交易池、DAG)
  • 共识相关
  • [ x] 智能合约相关
  • SDK相关

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

具体的现象: add_tx_failed 操作步骤:

  1. 在chainamker-go同级目录下下载sdk-go源码

$ git clone -b v2.3.2 --depth=1 https://git.chainmaker.org.cn/chainmaker/sdk-go.git

  1. 关联证书

`$ cd sdk-go/testdata

先将testdata已有的crypto-config移除

$ /bin/rm -rf crypto-config

软连接使用prepare.sh脚本生成的证书目录

$ ln -s ../../chainmaker-go/build/crypto-config/ `

  1. 修改sdk-go/testdata/sdk_config.yml 配置文件中节点的地址和信任证书池路径

nodes: - # 节点地址,格式为:IP:端口:连接数 node_addr: "192.168.1.254:12301" # 节点连接数 conn_cnt: 10 # RPC连接是否启用双向TLS认证 enable_tls: true # 信任证书池路径 trust_root_paths: - "crypto-config/wx-org1.chainmaker.org/ca" # TLS hostname tls_host_name: "chainmaker.org"

  1. 修改证书路径配置

    客户端用户私钥路径

    user_key_file_path: "crypto-config/wx-org1.chainmaker.org/user/client1/client1.tls.key

    客户端用户证书路径

    user_crt_file_path: "crypto-config/wx-org1.chainmaker.org/user/client1/client1.tls.crt"

    客户端用户交易签名私钥路径(若未设置,将使用user_key_file_path)

    user_sign_key_file_path: "crypto-config/wx-org1.chainmaker.org/user/client1/client1.sign.key"

    客户端用户交易签名证书路径(若未设置,将使用user_crt_file_path)

    user_sign_crt_file_path: "crypto-config/wx-org1.chainmaker.org/user/client1/client1.sign.crt"

5 . 执行存证合约example

`$ cd sdk-go/examples/user_contract_claim

$ go run main.go`

报错:add tx failed... add_tx_failed

【相关日志文件】(如果有报错日志请贴图,或者上传附件)

system.log system.log2023050709

bin/panic.log file * panic.log

SDK 的 sdk.log file sdk.log.2023050709

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

  • chainmaker-go version * : [v2.3.1]
  • OS & version * : ubuntu18.04.6
  • docker镜像 version: chainmakerofficial/chainmaker-vm-engine:v2.3.1
Edited May 07, 2023 by 丽芬 韦
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#673

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