Giter VIP home page Giter VIP logo

dealbot's Introduction

Dealbot

A tool to test and analyze storage and retrieval deal capability on the Filecoin network.

Getting Started

Clone the repo and build:

git clone [email protected]:filecoin-project/dealbot.git
cd dealbot
go build

Dealbot requires a local synced instance of Lotus to communicate with miners and the chain. This can be a Devnet instance for testing or a node connected to a larger network. The node needs to have wallet address with funds for making deals and a data cap for making verified deals (if verified deals are necessary).

Usage

Dealbot runs on multiple machines with a centralized controller. The controller can be started with:

./dealbot controller --configpath config.toml

See dealbot-example.toml for configuration parameters. Individual Dealbot nodes run with the daemon command:

./dealbot --api [LOTUS_API_URL] daemon --configpath config.toml

The --api parameter points to the Lotus API and can be specified as a URL token pair. Alternatively you can specify --lotus-path either as a parameter or environment variable:

--api [lotus_api_url]:[lotus_api_token]
export FULLNODE_API_INFO=[lotus_api_url]:[lotus_api_token]
--lotus-path ~/.lotus
export LOTUS_PATH=~/.lotus

Dealbot can also run individual storage or retrieval task when invoked from the command-line with:

./dealbot --api [api] storage-deal --data-dir [shared-dir] --miner [miner-address] --size 2GB

or

./dealbot --api [api] retrieval-deal --data-dir [shared-dir] --miner [miner-address] --cid [payload-cid]

To start Lotus locally, or tunnel to a remote Lotus, see devnet/README.md.

Flags

Dealbot Controller

Flag Env Var Function
listen DEALBOT_LISTEN exposed host:port for daemons to contact and for tasking the system
graphql DEALBOT_GRAPHQL_LISTEN exposed host:port for external public graphql queries
metrics DEALBOT_METRICS either prometheus to expose a /metrics api, or log to write metrics to stdout
identity DEALBOT_IDENTITY_KEYPAIR filepath of a libp2p identity to sign public records of dealbot activity
driver DEALBOT_PERSISTENCE_DRIVER postgres
dbloc DEALBOT_PERSISTENCE_CONN db conn string from postgres
gqlAccessToken DEALBOT_GRAPHQL_ACCESS_TOKEN a static key for querying non-public data from the graphql server

Dealbot Daemon

Flag Env Var Function
id DEALBOT_ID The worker name to report to the controller
listen DEALBOT_LISTEN a host:port to bind to when metrics are exposed
stage-timeout STAGE_TIMEOUT a list of stagenames and timeouts (example: DealAccepted=15m)
tags DEALBOT_TAGS tags to use when accepting tasks
workers DEALBOT_WORKERS how many tasks to accept at a time
minfil DEALBOT_MIN_FIL minimum balance lotus must report before the bot will accept tasks
mincap DEALBOT_MIN_CAP minimum dealcap lotus must report before the bot will accept tasks
posthook DEALBOT_POST_HOOK a bash script that will be run as bash $posthook $uuid when a task finishes
endpoint DEALBOT_CONTROLLER_ENDPOINT the host:port of the controller to ask for tasks
data-dir DEALBOT_DATA_DIRECTORY the directory for the bot to make cars in or verify they have shown up in
node-data-dir DEALBOT_NODE_DATA_DIRECTORY the directory for lotus to import the cars from or write them to
wallet DEALBOT_WALLET_ADDRESS an explicit wallet to use with lotus if not the default one

Versioning and Releases

Tagged releases indicate versions run on our local deployment. Semver is used to indicate when data would be lost on downgrading (miner version bumps) and when data becomes incompatible (major version bumps)

Code of Conduct

Dealbot follows the Filecoin Project Code of Conduct. Before contributing, please acquaint yourself with our social courtesies and expectations.

Contributing

We welcome new issues and pull requests.

License

The Filecoin Project and Dealbot is dual-licensed under Apache 2.0 and MIT terms:

dealbot's People

Contributors

acruikshank avatar gammazero avatar hannahhoward avatar mvdan avatar nonsense avatar raulk avatar willscott avatar

Watchers

 avatar

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.