Skip to content

Commit

Permalink
add bubblegum and ops-cli changes
Browse files Browse the repository at this point in the history
Co-authored-by: Nagaprasadvr <[email protected]>
  • Loading branch information
kespinola authored and Nagaprasadvr committed Feb 14, 2025
1 parent a3a0545 commit b4ed1f3
Show file tree
Hide file tree
Showing 38 changed files with 1,890 additions and 904 deletions.
92 changes: 65 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
members = [
"blockbuster",
"bubblegum",
"core",
"das_api",
"digital_asset_types",
Expand Down Expand Up @@ -28,16 +29,16 @@ version = "0.7.2"

[workspace.dependencies]

backon = "0.4.1"
heck = "0.5.0"
anchor-client = "0.29.0"
anchor-lang = "0.29.0"
anyhow = "1.0.75"
async-std = "1.0.0"
async-stream = "0.3.5"
async-trait = "0.1.60"
blockbuster = { path = "blockbuster" }
atty = "0.2.14"
backon = "0.4.1"
blockbuster = { path = "blockbuster" }
borsh = "~0.10.3"
borsh-derive = "~0.10.3"
bs58 = "0.4.0"
Expand All @@ -48,6 +49,7 @@ cargo-lock = "9.0.0"
chrono = "0.4.19"
clap = "4.2.2"
das-core = { path = "core" }
das-bubblegum = { path = "bubblegum" }
das_api = { path = "das_api" }
derive_more = { version = "0.99.17" }
digital_asset_types = { path = "digital_asset_types" }
Expand Down
41 changes: 41 additions & 0 deletions bubblegum/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[package]
name = "das-bubblegum"
version = { workspace = true }
edition = { workspace = true }
repository = { workspace = true }
publish = { workspace = true }

[dependencies]
anyhow = { workspace = true }
blockbuster = { workspace = true }
bs58 = { workspace = true }
das-core = { workspace = true }
solana-client = { workspace = true }
borsh = { workspace = true }
digital_asset_types = { workspace = true, features = [
"json_types",
"sql_types",
] }
anchor-client = { workspace = true }
futures = { workspace = true }
clap = { workspace = true }
log = { workspace = true }
solana-program = { workspace = true }
program_transformers = { workspace = true }
heck = { workspace = true }
mpl-bubblegum = { workspace = true }
num-traits = { workspace = true }
sea-orm = { workspace = true }
serde_json = { workspace = true }
solana-sdk = { workspace = true }
sha3 = { workspace = true }
solana-transaction-status = { workspace = true }
spl-account-compression = { workspace = true, features = ["no-entrypoint"] }
spl-token = { workspace = true, features = ["no-entrypoint"] }
sqlx = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["time"] }
tracing = { workspace = true }

[lints]
workspace = true
24 changes: 24 additions & 0 deletions bubblegum/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## DAS Backfill

The DAS Backfill library facilitates the initial setup and data backfilling for DAS, focusing on the bubblegum program. This program's indexing heavily relies on transaction data. While the library supports parallel backfilling across different trees, it ensures that transactions within each tree are processed sequentially. This approach guarantees accurate representation of every modification in the merkle tree within DAS.

## Usage

```rust
use das_backfill::{
BubblegumBackfillArgs,
BubblegumBackfillContext,
start_bubblegum_backfill
};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
let database_pool = sqlx::PgPool::connect("your_database_url").await?;
let solana_rpc = Rpc::new("your_solana_rpc_url");

let context = BubblegumBackfillContext::new(database_pool, solana_rpc);
let args = BubblegumBackfillArgs::parse(); // Parses args from CLI

start_bubblegum_backfill(context, args).await
}
```
Loading

0 comments on commit b4ed1f3

Please sign in to comment.