Skip to content

Commit

Permalink
Integrates groovies stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mango-dee committed Nov 25, 2024
2 parents e10e3f4 + 6e97616 commit 214886a
Show file tree
Hide file tree
Showing 22 changed files with 2,608 additions and 194 deletions.
326 changes: 247 additions & 79 deletions Cargo.lock

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ repository = "https://github.com/blockworks-foundation/geyser-grpc-connector"
yellowstone-grpc-client = { version = "2.0.0", git = "https://github.com/rpcpool/yellowstone-grpc.git", tag = "v2.0.0+solana.2.0.16" }
yellowstone-grpc-proto = { version = "2.0.0", git = "https://github.com/rpcpool/yellowstone-grpc.git", tag = "v2.0.0+solana.2.0.16" }


# required for CommitmentConfig
solana-sdk = "2.0.16"

url = "2.5.0"
async-stream = "0.3.5"
tokio = { version = "1.28" , features = ["rt"] }
tokio = { version = "1.28" , features = ["rt", "rt-multi-thread"] }
futures = "0.3.28"
merge-streams = "0.1.2"
anyhow = "1.0.70"
Expand All @@ -32,10 +31,20 @@ bincode = "1.3.3"

csv = "1.3.0"

#[dev-dependencies]
dashmap = "5.5.3"

tonic = { version= "0.12.3", features=["gzip"] }
tonic-health = "0.12.3"
regex = "1.10.4"
clap = { version = "4.2", features = ["derive"] }

lz4_flex = "0.11.3"

[dev-dependencies]
tracing-subscriber = "0.3.16"
solana-logger = "2.0.16"
solana-account-decoder = "2.0.16"

[patch.crates-io.curve25519-dalek]
git = "https://github.com/anza-xyz/curve25519-dalek.git"
rev = "b500cdc2a920cd5bff9e2dd974d7b97349d61464"
rev = "b500cdc2a920cd5bff9e2dd974d7b97349d61464"
Empty file added accounts-testnet.csv
Empty file.
40 changes: 40 additions & 0 deletions examples/accounts_meta_to_csv.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
use itertools::Itertools;
use std::fs::File;
use std::io;
use std::io::BufRead;
use std::path::PathBuf;

pub fn main() {
let accounts_meta_file =
PathBuf::from("/Users/stefan/mango/projects/geyser-misc/ledger-debug-accounts.txt");

let file = File::open(accounts_meta_file).expect("file must exist");
let reader = io::BufReader::new(file);
for blocks in &reader.lines().chunks(9) {
let blocks = blocks.collect_vec();
let account_pk = blocks[0].as_ref().unwrap().replace(":", "");
if account_pk == "" {

Check warning on line 16 in examples/accounts_meta_to_csv.rs

View workflow job for this annotation

GitHub Actions / test

comparison to empty slice
break;
}
let owner_pk = blocks[2].as_ref().unwrap();
let ltick = owner_pk.find("'");
let rtick = owner_pk.rfind("'");
let owner_pk = &owner_pk[ltick.unwrap() + 1..rtick.unwrap()];

let data_len = blocks[6].as_ref().unwrap().replace(" data_len: ", "");

println!("{};{};{}", account_pk, owner_pk, data_len);
}
}

/*
16FMCmgLzCNNz6eTwGanbyN2ZxvTBSLuQ6DZhgeMshg:
balance: 0.00095352 SOL
owner: 'Feature111111111111111111111111111111111111'
executable: false
slot: 0
rent_epoch: 0
data_len: 9
data: 'AQAAAAAAAAAA'
encoding: "base64"
*/
Loading

0 comments on commit 214886a

Please sign in to comment.