# How to use venus messager
messager is a component used to manage local messages, with the purpose of saving address messages, managing message status, and controlling the frequency of push messages.
# Getting start
# Clone this git repository to your machine
git clone https://github.com/filecoin-project/venus-messager.git
# Install Dependencies and Build
make
# Run messager
./venus-messager --config=xx.toml run [options]
- Specify the directory of the configuration file by
--config=xxx.toml
,default:./messager.toml
- If the specified configuration file does not exist at startup, a configuration file with the corresponding name will be generated and the value of the set parameter will be written to the configuration file
- When the specified configuration file exists at startup, the values of the set parameters will be used, but will not be written to the configuration file. If the parameters are not set, the values of the parameters in the configuration file will be used
options:
--auth-url url for auth server
--auth-token token for auth server
--node-url url for connection lotus/venus
--node-token token auth for lotus/venus
--db-type which db to use. sqlite/mysql
--sqlite-path sqlite db file. eg. ~/sqlite/message.db
--mysql-dsn mysql connection string
--gateway-url url for gateway server
--gateway-token token for gateway server
--rate-limit-redis limit flow using redis
# Commands
# Message commands
- search message
./venus-messager msg search --id=<message id>
- list message
./venus-messager msg list
# list messages with the same address
./venus-messager msg list --from <address>
- update one filled message state
./venus-messager msg update_filled_msg --id=<message id>
- update all filled message state
./venus-messager msg update_all_filled_msg
- wait a message result by id
./venus-messager msg wait <message id>
- republish a message by id
./venus-messager msg republish <message id>
- replace a message
./venus-messager msg replace --gas-feecap=[gas-feecap] --gas-premium=[gas-premium] --gas-limit=[gas-limit] --auto=[auto] --max-fee=[max-fee] <message-id>
# or
./venus-messager msg replace --gas-feecap=[gas-feecap] --gas-premium=[gas-premium] --gas-limit=[gas-limit] --auto=[auto] --max-fee=[max-fee] <from> <nonce>
- list failed messages, maybe signed message failed or gas estimate failed
./venus-messager msg list-fail
- lists message that have not been chained for a period of time
./venus-messager msg list-blocked
- manual mark error messages
./venus-messager msg mark-bad <message id>
# Address commands
- search address
./venus-messager address search <address>
- list address
./venus-messager address list
- reset address
The nonce of the address is set to nonce on the chain, and all unchain messages are marked as failed messages
./venus-messager reset <address>
- forbidden address
./venus-messager address forbidden <address>
- activate a frozen address
./venus-messager address active <address>
- set the number of address selection messages
./venus-messager address set-sel-msg-num --num=5 <address>
- set parameters related to address fee
venus message address set-fee-params [options] address
# options
# --gas-overestimation value Estimate the coefficient of gas (default: 0)
# --max-feecap value Max feecap for a message (burn and pay to miner, attoFIL/GasUnit)
# --max-fee value Spend up to X attoFIL for message
./venus-messager address set-fee-params <address>
# shared params commands
- get shared params
./venus-messager share-params get
- set shared params
./venus-messager share-params set --gas-over-estimation=1.25 --max-feecap="0" --max-fee="7000000000000000" --sel-msg-num=20
- manual refresh shared params from DB
./venus-messager share-params refresh
# node commands
- search node info by name
./venus-messager node search <name>
- add node info
./venus-messager node add --name=<node-name> --url=<node-url> --token=<node-token>
- list node info
./venus-messager node list
- del node info by name
./venus-messager node del <name>
# log
- set log level
# eg. trace,debug,info,warn|warning,error,fatal,panic
./venus-messager log set-level
# send 命令
send message venus-messager send [command options] [targetAddress] [amount]
options:
--from value optionally specify the address to send
--gas-premium value specify gas price to use in AttoFIL (default: "0")
--gas-feecap value specify gas fee cap to use in AttoFIL (default: "0")
--gas-limit value specify gas limit (default: 0)
--method value specify method to invoke (default: 0)
--params-json value specify invocation parameters in json
--params-hex value specify invocation parameters in hex
--account value optionally specify the account to send