Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sidecar-client-chain33
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
sidecar-client-chain33
Commits
c03a49ba
Commit
c03a49ba
authored
Apr 20, 2022
by
suyanlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add deploy doc and update config info
parent
9efa6753
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
132 additions
and
9 deletions
+132
-9
Makefile
Makefile
+1
-1
readme.md
build/readme.md
+96
-0
sidecar.service
build/sidecar.service
+15
-0
evmxgo.toml
evmxgo/evmxgo.toml
+8
-3
paracross.toml
paracross/paracross.toml
+12
-5
No files found.
Makefile
View file @
c03a49ba
...
...
@@ -12,7 +12,7 @@ default:
$(GO)
build
-o
build/chain33-client-paracross ./cmd/paracross/
*
.go
mkdir
-p
build/plugins/evmxgo
mkdir
-p
build/plugins/paracross
cp
build/chain33-client-
*
build/plugins/
mv
build/chain33-client-
*
build/plugins/
cp
paracross/paracross.toml build/plugins/paracross/
cp
evmxgo/evmxgo.toml build/plugins/evmxgo/
cp
config/sidecar.toml build/
...
...
build/readme.md
0 → 100644
View file @
c03a49ba
# 安装使用说明
## 准备工作
例如:
*
地址(A):1DXXnGX9w1QG9S2iNTGne1CjPfaiieiHH
*
私钥(PK):0xb9135831281bb9a09e2610680258270faecbeb4a73e0cec261ef0970c32cca5a
### 授权
*
使用manage合约通过Modify命令,授权给A,使其能够执行evmxgo合约。
```
json
{
"jsonrpc"
:
"2.0"
,
"id"
:
2
,
"method"
:
"Chain33.CreateTransaction"
,
"params"
:
[
{
"execer"
:
"manage"
,
"actionName"
:
"Modify"
,
"payload"
:
{
"key"
:
"evmxgo-mint-BTY"
,
"value"
:
"{
\"
address
\"
:
\"
1DXXnGX9w1QG9S2iNTGne1CjPfaiieiHH
\"
,
\"
precision
\"
: 8,
\"
introduction
\"
:
\"
介绍
\"
}"
,
"op"
:
"add"
,
"addr"
:
"1DXXnGX9w1QG9S2iNTGne1CjPfaiieiHH"
}
}
]
}
```
*
创建平行链Title="user.p.cross.",管理员为PK,或其它。
具体如何创建平行链,可以咨询马老师,或者熟悉之人。
## 初始化`sidecar`环境
/home/root/sidecar/sidecar --repo /home/root/sidecar/ init
## 修改`sidecar`运行配置文件
删除所有
[
[appchains
]
]信息,再追加以下信息:
```
toml
[[appchains]]
enable
=
true
type
=
"appchain"
did
=
"paracross"
config
=
"paracross/paracross.toml"
plugin
=
"chain33-client-paracross"
plugin_id
=
"paracross"
[[appchains]]
enable
=
true
type
=
"appchain"
did
=
"evmxgo"
config
=
"evmxgo/evmxgo.toml"
plugin
=
"chain33-client-evmxgo"
plugin_id
=
"evmxgo"
```
## 修改`paracross`插件配置文件
修改plugins/paracross/paracross.toml文件信息,具体见文件。
## 修改`evmxgo` 插件配置文件
修改plugins/evmxgo/evmxgo.toml文件信息,具体见文件。
## 运行程序
/home/root/sidecar/sidecar --repo /home/root/sidecar/ start
## 系统守护模式运行
```
shell
cat
/lib/systemd/system/sidecar.service
```
```
shell
[
Unit]
Description
=
sidecar Service
After
=
network.target
[
Service]
Type
=
simple
User
=
nobody
Restart
=
on-failure
RestartSec
=
5s
ExecStart
=
/home/root/sidecar/sidecar
--repo
/home/root/sidecar/ start
ExecReload
=
/home/root/sidecar/sidecar
--repo
/home/root/sidecar/ start
LimitNOFILE
=
1048576
[
Install]
WantedBy
=
multi-user.target
```
### 启动服务
```
shell
systemctl
enable
sidecar
systemctl restart sidecar
systemctl status sidecar
```
## 备注:
build/sidecar.service
0 → 100644
View file @
c03a49ba
[Unit]
Description=sidecar Service
After=network.target
[Service]
Type=simple
User=nobody
Restart=on-failure
RestartSec=5s
ExecStart=/home/root/sidecar/sidecar --repo /home/root/sidecar/ start
ExecReload=/home/root/sidecar/sidecar --repo /home/root/sidecar/ start
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target
evmxgo/evmxgo.toml
View file @
c03a49ba
[chain33]
#用于跨链交易签名的私钥,此私钥对应的地址需要管理员授权
private_key
=
"0xb9135831281bb9a09e2610680258270faecbeb4a73e0cec261ef0970c32cca5a"
#chain33的json rpc 服务地址
addr
=
"http://192.168.0.254:8801"
#用于跨链交易签名的私钥
private_key
=
"0xb9135831281bb9a09e2610680258270faecbeb4a73e0cec261ef0970c32cca5a"
chain_id
=
0
#起始高度
start_height
=
161
#高度差
height_diff
=
0
#单笔交易手续费
fee
=
100000
#被监听链ID
chain_id
=
0
[log]
#日志级别
level
=
"trace"
[db]
...
...
paracross/paracross.toml
View file @
c03a49ba
[chain33]
Title
=
"user.p.test."
#平行链title需要保持唯一,并被注册
Title
=
"user.p.cross."
#用于跨链交易签名的私钥,此私钥对应的地址需要管理员授权
private_key
=
"0xb9135831281bb9a09e2610680258270faecbeb4a73e0cec261ef0970c32cca5a"
#chain33的 grpc 服务地址
addr
=
"192.168.0.254:8802"
#用于跨链交易签名的私钥
private_key
=
"0xb9135831281bb9a09e2610680258270faecbeb4a73e0cec261ef0970c32cca5a"
chain_id
=
0
#起始高度
start_height
=
161
height_diff
=
0
#高度差
height_diff
=
6
#单笔交易手续费
fee
=
100000
#是否是测试环境
is_test
=
true
#被监听链ID
chain_id
=
0
[log]
#日志级别
level
=
"trace"
[db]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment