venus-messager

command module
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 31 Imported by: 0

README

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.

Use Venus Issues for reporting issues about this repository.

Work

  • ✅ Remote wallet support: One messenger support multiple wallets to manage their keys separately
  • ✅ Message pool for multiple miners: As a service, Messenger provides API for miners to put messages on chain
  • ✅ Supports sqlite local storage and mysql remote storage for more secure and stable storage
  • ✅ Scan the address of the miner's wallet, monitor the actor status of address on the chain, maintain the address's nonce information,
  • ✅ Fill on fly: gas related parameters and nonce are to be filled out when sending a message on chain according to gas policy, to make sure the gas-estimation and other seeting are valid
  • ✅ Maintain message status, including whether the message is chained and replaced. Save the results of the execution.
  • ✅ Global Gas estimate paraters, address push quantity configuration.
  • ✅ Message-delivery assuring: Auto replace parameters and resend messages whenever there is a failure
  • ✅ Multi-point message delivery through daemon program
  • ✅ broadcast message through libp2p
  • ✅ Enhanced API Security
  • 🔲 Rich and flexible message sorting options

Getting Start

build binary

git clone https://github.com/filecoin-project/venus-messager.git
make

Set repo path

The default path is ~/.venus-messager.

./venus-messager --repo=path_to_repo run 

Run

./venus-messager run \
--node-url=/ip4/127.0.0.1/tcp/3453 \
--gateway-url=/ip4/127.0.0.1/tcp/45132 \
--auth-url=http://127.0.0.1:8989 \
--auth-token=<auth-token> \
--db-type=sqlite

We will find three files in ~/.venus-messager

  • message.db
  • message.db-shm
  • message.db-wal

db use mysql

./venus-messager run \
--node-url=/ip4/127.0.0.1/tcp/3453 \
--gateway-url=/ip4/127.0.0.1/tcp/45132 \
--auth-url=http://127.0.0.1:8989 \
--auth-token=<auth-token> \
--db-type=mysql \
--mysql-dsn="user:password@(127.0.0.1:3306)/messager?parseTime=true&loc=Local"

Config

The configuration file is saved in ~/.venus-messager/config.toml

[api]
  Address = "/ip4/0.0.0.0/tcp/39812"

[db]
  # support sqlite and mysql
  type = "sqlite"

  [db.mysql]
    connMaxLifeTime = "1m0s"
    connectionString = ""
    debug = false
    maxIdleConn = 10
    maxOpenConn = 10

  [db.sqlite]
    debug = false
    file = ""

[gateway]
  # gateway token, generate by auth server
  token = ""
  # gateway url
  url = "/ip4/127.0.0.1/tcp/45132"

  [gateway.cfg]
    RequestQueueSize = 30
    RequestTimeout = "5m0s"

[jwt]
  # auth server url, not connect when empty
  authURL = "http://127.0.0.1:8989"

  [jwt.local]
    # JWT token, generate by secret
    secret = ""
    # hex JWT secret, randam generate first init
    token = ""

[log]
  # default log level
  level = "info"
  # log output file
  path = "messager.log"

[messageService]
  # skip process head
  skipProcessHead = false
  # skip push message
  skipPushMessage = false
  # file used to store tipset
  tipsetFilePath = "./tipset.json"

[messageState]
  CleanupInterval = 86400
  DefaultExpiration = 259200
  backTime = 86400

[node]
  # node token, generate by auth server
  token = ""
  # node url
  url = "/ip4/127.0.0.1/tcp/3453"

[rateLimit]
  redis = "" # eg. 127.0.0.1:6379

[tracing]
  JaegerEndpoint = "" # eg. 1270.0.0.1:6831
  # enable trace
  JaegerTracingEnabled = false
  ProbabilitySampler = 1.0
  ServerName = "venus-messenger"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cli
cmds
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL