Skip to content

4.Instruction on C2 remote operation

wonderfic edited this page Aug 12, 2021 · 1 revision

1. Compilation method

git clone https://github.com/filecash/lotus_builder  --branche=filecash/v1.5.0  git-filecash-1.5.0
cd git-filecash-1.5.0
bash build.sh -awebapi -y

# The output program is at: ./git-filecash-1.5.0/filecoin-webapi/target/release/filecoin-webapi
# The configuration file at: ./git-filecash-1.5.0/filecoin-webapi/config-example.yaml

2. How to use

2.1 Start the filecoin-webapi, and then start the remote C2 service
2.1.1 Modify the filecoin-webapi configuration file
># vi webapi.yaml
listen_addr: "0.0.0.0:6000"
#private_cert: "/etc/webapi-key.pem"
#cert_chain: "/etc/webapi-cert.pem"
job_limits: {}
auth: false
allow_tokens: []
2.1.2 Start the filecoin-webapi
export FIC_C2_TASK_NUM=2    ## Maximum number of remote C2 execution
export FIL_PROOFS_PARAMETER_CACHE=/var/tmp/filecoin-proof-parameters    ## verification file path
env RUST_LOG=info ./filecoin-webapi --config=./webapi.yaml
2.2 Start the lotus-worker,connect remote C2
export FFI_REMOTE_COMMIT2_BASE_URL=<remotec2-ip>:<remotec2-port>    ## configure remote C2 parameter
lotus-worker run