Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 46 additions & 46 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions geyser-plugin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ categories = ["cryptography::cryptocurrencies", "database", "network-programming
crate-type = ["cdylib", "rlib"]

[dependencies]
agave-geyser-plugin-interface = { version = "4.0.0-beta.4" }
agave-logger = { version = "4.0.0-beta.4", features = ["agave-unstable-api"] }
agave-geyser-plugin-interface = { version = "=4.0.0-beta.4" }
agave-logger = { version = "=4.0.0-beta.4", features = ["agave-unstable-api"] }
solana-message = { version = "~3.1" }
solana-account = "~3.4"
solana-commitment-config = "3.1.1"
solana-pubkey = { version = "~4.1" }
solana-rpc-client = { version = "4.0.0-beta.4", default-features = false }
solana-transaction-status = { version = "4.0.0-beta" }
solana-transaction-status-client-types = { version = "4.0.0-beta" }
solana-rpc-client = { version = "=4.0.0-beta.4", default-features = false }
solana-transaction-status = { version = "=4.0.0-beta.4" }
solana-transaction-status-client-types = { version = "=4.0.0-beta.4" }

bytes = "1.11.1"
base64 = "0.22.1"
Expand Down
27 changes: 20 additions & 7 deletions geyser-plugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,46 @@ endif
ifeq ($(UNAME_S),Darwin)
PLUGIN_EXT := dylib
endif
PLUGIN_PATH := target/release/libsolana_accountsdb_plugin_kafka.$(PLUGIN_EXT)
PLUGIN_PATH := ../target/release/libsolana_accountsdb_plugin_kafka.$(PLUGIN_EXT)
VALIDATOR_CONFIG ?= plugin-config.json
PLUGIN_CONFIG ?= plugin-config.toml

help:
@echo "Available targets:"
@echo " make init-config - Create a local plugin config from configs/plugin-config.example.toml"
@echo " make init-config - Create local validator JSON + plugin TOML configs"
@echo " make build-plugin - Compile the plugin (.so/.dylib)"
@echo " make launch - Launch solana-test-validator with the plugin (depends on build-plugin)"
@echo " make clean - Remove compiled artifacts"

init-config:
@echo "Creating $(PLUGIN_CONFIG)..."
@perl -0pe 's|target/release/libsolana_accountsdb_plugin_kafka\.(?:dylib|so)|$(PLUGIN_PATH)|g' configs/plugin-config.example.toml > "$(PLUGIN_CONFIG)"
@perl -0pe 's#(?<!\.\./)target/release/libsolana_accountsdb_plugin_kafka\.(?:dylib|so)#$(PLUGIN_PATH)#g' configs/plugin-config.example.toml > "$(PLUGIN_CONFIG)"
@echo "Creating $(VALIDATOR_CONFIG)..."
@perl -0pe 's#(?<!\.\./)target/release/libsolana_accountsdb_plugin_kafka\.(?:dylib|so)#$(PLUGIN_PATH)#g; s#plugin-config\.toml#$(PLUGIN_CONFIG)#g' configs/plugin-config.example.json > "$(VALIDATOR_CONFIG)"
@echo "✓ Created $(PLUGIN_CONFIG)"
@echo "✓ Created $(VALIDATOR_CONFIG)"

build-plugin:
@echo "Building plugin for $(UNAME_S)..."
cargo build --release

launch: build-plugin
@echo "Launching solana-test-validator with plugin..."
@if [ ! -f "$(PLUGIN_CONFIG)" ]; then \
echo "Error: $(PLUGIN_CONFIG) not found"; \
echo "Please create a plugin config file first"; \
@if [ ! -f "$(VALIDATOR_CONFIG)" ]; then \
echo "Error: $(VALIDATOR_CONFIG) not found"; \
echo "Please create the validator config first"; \
exit 1; \
fi
solana-test-validator --log --reset --geyser-plugin-config "$(PLUGIN_CONFIG)"
@if [ ! -f "$(PLUGIN_CONFIG)" ]; then \
cf=$$(perl -0ne 'print $$1 if /"config_file"\s*:\s*"([^"]+)"/' "$(VALIDATOR_CONFIG)"); \
if [ -z "$$cf" ] || [ ! -f "$$cf" ]; then \
echo "Error: plugin config not found"; \
echo " Tried $(PLUGIN_CONFIG) and config_file from $(VALIDATOR_CONFIG) ($$cf)"; \
echo "Please create a plugin config file first"; \
exit 1; \
fi; \
fi
Comment thread
coderabbitai[bot] marked this conversation as resolved.
solana-test-validator --log --reset --geyser-plugin-config "$(VALIDATOR_CONFIG)"

clean:
cargo clean
Expand Down
Loading