Code Monkey home page Code Monkey logo

atlas-txn-sender's Introduction

Atlas Txn Sender

This package uses the min required dependencies to send transactions to Solana leaders.

Note: This service does not handle preflight checks, and also doesn't validate blockhashes before sending to leader

The service has the following envs:

RPC_URL - RPC url used to fetch next leaders with getSlotLeaders

GRPC_URL - Yellowstone GRPC Geyser url used to stream latest slots and blocks. Slots tell us what to call getSlotLeaders with, blocks tell us if the txns we've sent were sent successfully.

X_TOKEN - token used to authenticate with the grpc url

TPU_CONNECTION_POOL_SIZE - Number of leaders to cache connections to, and send transactions to. The default in the solana client is 4.

NUM_LEADERS - Number of leaders to send transactions to

LEADER_OFFSET - Offset of the leader schedule. Default is 0.

IDENTITY_KEYPAIR_FILE - Path to the keypair file. If this is a validator key it will use a staked connection to connect to leaders.

PORT - Port to run the service on. Default is 4040.

Install Dependencies

sudo apt-get install libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang cmake make libprotobuf-dev protobuf-compiler

Running

set the above envs and install dependencies, then run cargo run --release.

Deploying service with ansible

Deploying the service with ansible will setup a systemd service with haproxy so that you can access the service over port 80. It will also install datadog for metrics.

First you need to install the datadog role with the following command

ansible-galaxy install datadog.datadog

Then you need to update the file ansible/inventory/hosts.yml with the name/ip address/user of the server you want to deploy to.

Then you need to set these in the ansible/deploy_atlas_txn_sender.yml file

rpc_url
grpc_url
x_token
datadog_api_key
datadog_site

Then you can run the following command to deploy the service

ansible-playbook -i ansible/inventory/hosts.yml ansible/deploy_atlas_txn_sender.yml

atlas-txn-sender's People

Contributors

vovkman avatar nicolaspennie 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.