GithubHelp home page GithubHelp logo

fisco-bcos / generator Goto Github PK

View Code? Open in Web Editor NEW
55.0 13.0 39.0 412 KB

FISCO BCOS generator(企业级区块链部署工具)

License: Apache License 2.0

Python 52.10% Shell 46.49% Awk 1.41%
generator enterprise build-tools

generator's Issues

agency生成cert的步骤拆分

./generator --generate_agency_certificate ./dir_agency_ca ./dir_chain_ca agencyA
这这个方法将agencyA生成签名的过程耦合在一起,对于实际生产极为不便。
现在贡献一个分支,将这个方法分三步:1.agency A端生成私钥:./generator --generate_agency_key agency_dir;2.agency A端生成签名请求文件:./generator --generate_agency_csr agency_dir agency_name;3.证书授权机构端./generator --generate_agency_cert_by_csr agency_dir chain_dir。
git分支为:dev_feature_131

使用scripts目录 install.sh 脚本,出现 python 版本不对应错误情况

直接使用安装脚本

root@tmd:/# cd generator/ && bash ./scripts/install.sh
 Debian*|Ubuntu Platform
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成                 
curl 已经是最新版 (7.81.0-1ubuntu1.10)。
openssl 已经是最新版 (3.0.2-0ubuntu1.10)。
下列软件包是自动安装的并且现在不需要了:
  javascript-common libjs-jquery libjs-sphinxdoc libjs-underscore libpython3-dev libpython3.10-dev
  python3-dev python3-wheel python3.10-dev zlib1g-dev
使用'sudo apt autoremove'来卸载它(它们)。
推荐安装:
  python2-dev
下列软件包将被【卸载】:
  python3-pip
下列【新】软件包将被安装:
  python-pip
升级了 0 个软件包,新安装了 1 个软件包,要卸载 1 个软件包,有 16 个软件包未被升级。
需要下载 0 B/1,021 kB 的归档。
解压缩后将会空出 2,151 kB 的空间。
(正在读取数据库 ... 系统当前共安装有 222161 个文件和目录。)
正在卸载 python3-pip (22.0.2+dfsg-1ubuntu0.3) ...
正在选中未选择的软件包 python-pip。
(正在读取数据库 ... 系统当前共安装有 221477 个文件和目录。)
准备解压 .../python-pip_20.3.4+dfsg-4_all.deb  ...
正在解压 python-pip (20.3.4+dfsg-4) ...
正在设置 python-pip (20.3.4+dfsg-4) ...
正在处理用于 man-db (2.10.2-1) 的触发器 ...
./scripts/install.sh: 行 129: pip: 未找到命令
./scripts/install.sh: line 130: pip: command not found
python and pip is not same version
python -V, get version => 2
Python 2.7.18
pip -V, get version => not
./scripts/install.sh: line 147: not: command not found

解决方案:#184

再次尝试安装出现:

root@tmd:/generator# bash ./scripts/install.sh
Debian*|Ubuntu Platform
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成                 
curl 已经是最新版 (7.81.0-1ubuntu1.10)。
openssl 已经是最新版 (3.0.2-0ubuntu1.10)。
下列软件包是自动安装的并且现在不需要了:
 python-pkg-resources python-setuptools
使用'sudo apt autoremove'来卸载它(它们)。
下列软件包将被【卸载】:
 python-pip
下列【新】软件包将被安装:
 python3-pip
升级了 0 个软件包,新安装了 1 个软件包,要卸载 1 个软件包,有 16 个软件包未被升级。
需要下载 1,305 kB 的归档。
解压缩后会消耗 2,151 kB 的额外空间。
获取:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/universe amd64 python3-pip all 22.0.2+dfsg-1ubuntu0.3 [1,305 kB]
已下载 1,305 kB,耗时 1秒 (2,523 kB/s)
(正在读取数据库 ... 系统当前共安装有 221978 个文件和目录。)
正在卸载 python-pip (20.3.4+dfsg-4) ...
正在选中未选择的软件包 python3-pip。
(正在读取数据库 ... 系统当前共安装有 221477 个文件和目录。)
准备解压 .../python3-pip_22.0.2+dfsg-1ubuntu0.3_all.deb  ...
正在解压 python3-pip (22.0.2+dfsg-1ubuntu0.3) ...
正在设置 python3-pip (22.0.2+dfsg-1ubuntu0.3) ...
正在处理用于 man-db (2.10.2-1) 的触发器 ...
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting toml
 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/44/6f/7120676b6d73228c96e17f1f794d8ab046fc910d781c8d151120c3f1569e/toml-0.10.2-py2.py3-none-any.whl (16 kB)
Installing collected packages: toml
Successfully installed toml-0.10.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from -r requirements.txt (line 1)) (1.16.0)
Collecting configparser
 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e0/7a/9d0f52bf4923b2e410c7d6fda472c32d9b728284e89ec99074820226102f/configparser-5.3.0-py3-none-any.whl (19 kB)
Requirement already satisfied: toml in /root/.local/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (0.10.2)
Installing collected packages: configparser
Successfully installed configparser-5.3.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
python and pip is not same version
python -V, get version => 2
Python 2.7.18
pip -V, get version => 3
./scripts/install.sh: line 147: 3: command not found

错误主要内容:

python and pip is not same version
python -V, get version => 2
Python 2.7.18
pip -V, get version => 3

解释: 这是版本不对应的问题.

解决方案

1.which python3 ,记录下python3的路径
image
2.这里我们不再使用python,使用的是python3
所以对 python3进行软链接
image

再执行安装脚本

root@tmd:/generator# bash ./scripts/install.sh
 Debian*|Ubuntu Platform
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成                 
curl 已经是最新版 (7.81.0-1ubuntu1.10)。
openssl 已经是最新版 (3.0.2-0ubuntu1.10)。
python3-pip 已经是最新版 (22.0.2+dfsg-1ubuntu0.3)。
下列软件包是自动安装的并且现在不需要了:
  python-pkg-resources python-setuptools
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 16 个软件包未被升级。
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: toml in /root/.local/lib/python3.10/site-packages (0.10.2)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from -r requirements.txt (line 1)) (1.16.0)
Requirement already satisfied: configparser in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 2)) (5.3.0)
Requirement already satisfied: toml in /root/.local/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (0.10.2)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
try to use python3
 install generator successful!

调用 sendRawTransaction 报错误编码-32603

执行:
{"method":"sendRawTransaction","id":1,"jsonrpc":"2.0","params":[1,"f8ef9f65f0d06e39dc3c08e32ac10a5070858962bc6c0f5760baca823f2d5582d03f85174876e7ff8609184e729fff82020394d6f1a71052366dbae2f7ab2d5d5845e77965cf0d80b86448f85bce000000000000000000000000000000000000000000000000000000000000001bf5bd8a9e7ba8b936ea704292ff4aaa5797bf671fdc8526dcd159f23c1f5a05f44e9fa862834dc7cb4541558f2b4961dc39eaaf0af7f7395028658d0e01b86a371ca00b2b3fabd8598fefdda4efdb54f626367fc68e1735a8047f0f1c4f840255ca1ea0512500bc29f4cfe18ee1c88683006d73e56c934100b8abf4d2334560e1d2f75e"]}

报以下错误:

{"code":-32603,"data":null,"message":"INTERNAL_ERROR: : INTERNAL_ERROR: : /FISCO-BCOS/libdevcore/RLP.h(382): Throw in function _T dev::RLP::toInt(int) const [_T = boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>, boost::multiprecision::et_off>]\nDynamic exception type: boost::exception_detail::clone_impldev::BadCast\nstd::exception::what: std::exception\n[dev::eth::tag_field*] = invalid rc2 transaction format: [ 0x1, 0x0, 0x419CE0, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 0x0, 0x0, 0x1B, 0xF643ACC5126E966BD90E79A5E8266CF7EFDF18CFB332ADCDF9051719D119F6B5, 0x419A975EC37FAD0BE4BB0F42965D662262F89F1A0888C4E5B6E565DB38C39CC8 ] RLP: f860018083419ce094000000000000000000000000000000000000000080801ba0f643acc5126e966bd90e79a5e8266cf7efdf18cfb332adcdf9051719d119f6b5a0419a975ec37fad0be4bb0f42965d662262f89f1a0888c4e5b6e565db38c39cc8\n"}

另外,在官方例子 .transTest.sh 脚本中的第39行,有:
txBytes="f8eca003eb675ec791c2d19858c91d0046821c27d815e2e9c15${random_id}0a8402faf08082${limit}948c17cf316c1063ab6c89df875e96c9f0f5b2f74480b8644ed3885e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a464953434f2042434f53000000000000000000000000000000000000000000000101801ba09edf7c0cb63645442aff11323916d51ec5440de979950747c0189f338afdcefda02f3473184513c6a3516e066ea98b7cfb55a79481c9db98e658dd016c37f03dcf"

这是sendRawTransaction的params字段的第2个参数。请问:
1、f8eca003eb675ec791c2d19858c91d0046821c27d815e2e9c15 这段值是什么?
2、0a8402faf08082 这段值是什么?
3、948c17cf316c1063ab6c89df875e96c9f0f5b2f74480b8644ed3885e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a464953434f2042434f53000000000000000000000000000000000000000000000101801ba09edf7c0cb63645442aff11323916d51ec5440de979950747c0189f338afdcefda02f3473184513c6a3516e066ea98b7cfb55a79481c9db98e658dd016c37f03dcf 这段值是要发送交易的数据么?

ERROR | /root/generator-C/meta/group.1.genesis not exist!

./generator --build_install_package ./meta/peersA.txt ./nodeC
INFO | Build operation begin.
INFO | Checking fisco-bcos binary...
INFO | Binary check passed.
ERROR | /root/generator-C/meta/group.1.genesis not exist!

自动创建时还在找group.1.genesis,实际上应该找group.2.genesis

生成国密SDK证书的时候报错

如题,报错内容如下:
`ERROR | Generate sdk cert failed! Result is /home/lilw/generator/dir_agency_ca/agencyB/agency.key file does not exist, please check!

ERROR | [Errno 2] No such file or directory: '/home/lilw/generator/dir_sdk_ca/sdk/node.nodeid' `

但是国密证书文件名应该有前缀gm啊!!!!!!!!!!!!!!!

--get_sdk_file生成国密配置文件不正确

./generator --get_sdk_file ./sdk -g -G
欲使用该指令生成国密版本的sdk配置文件和证书目录,但是sdk目录中配置文件的encryptType仍然是0(非国密版本),且证书路径为非国密路径。
希望改善。

试了3个环境,都报这个错,电脑上python2和3都安装了

No match for argument: python-pip
Package openssl-1:1.1.1k-5.el8_5.x86_64 is already installed.
Package curl-7.61.1-22.el8.x86_64 is already installed.
Package which-2.21-16.el8.x86_64 is already installed.
Error: Unable to find a match: python-pip
./install.sh: line 129: pip: command not found
./install.sh: line 130: pip: command not found
/usr/bin/which: no python in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
python and pip is not same version
python -V, get version => line
./install.sh: line 145: -V: command not found
pip -V, get version => not
./install.sh: line 147: not: command not found

monitor.sh error

master主分支
执行./monitor.sh -h显示如下错误
./monitor.sh: line 15: syntax error near unexpected token (' ./monitor.sh: line 15: export alert_title="fisco-bcos-2.0-monitor:"(date)'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.