Skip to content

rakurai-io/upload_solana_traces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upload Traces Script

This script monitors Solana leader slots and uploads traces to an AWS S3 bucket. It reads configuration details from a .toml file and uses the provided slots to monitor and upload traces.

Requirements

  • Python3

Setup

  1. Create a virtual environment and activate it:

     python3 -m venv venv  
     source venv/bin/activate  
    
  2. Install dependencies:

     pip3 install -r requirements.txt  
    

Configuration File (config.toml)

Create a file named config.toml with the following content:

[app_config]  
rpc_url = "https://api.mainnet-beta.solana.com"  
logfile = "logfile.log"  
traces_dir_path = "/mnt/ledger/banking_trace"
traces_temp_copy_path = "./traces_copy"  #keep a temporary copy to aviod file rotation
bucket_name = "traces"  
aws_access_key_id = "aws_access_key_id"  
aws_secret_access_key = "aws_secret_access_key"  
slots = [326892300, 326894300, 326896300]  

Usage

Run the script with the following command:

python uploadtraces.py --config config.toml  

Arguments

--config: Path to the configuration file (.toml). Defaults to config.toml if not specified.

Logging

Logs will be saved to the file specified by logfile in the configuration file.

Notes

We have the leader schedule for two epochs, so the config file needs to be changed after every two epochs.

The script copies the file immediately after becoming the leader, having a minimal effect on the validator's performance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages