You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will publish **all** account updates, transactions, and slot status to Kafka. Perfect for testing and development.
32
+
5
33
## Installation
6
34
7
35
### Binary releases
@@ -40,6 +68,10 @@ Config is specified via the plugin's JSON config file.
40
68
41
69
### Example Config
42
70
71
+
**⚠️ WARNING: This example config will NOT publish most data by default!**
72
+
73
+
The following config is a minimal example that demonstrates the structure, but with `publish_all_accounts: false` and no `program_filters`, you'll only see slot status updates. For testing, consider using the scenarios below.
- `queue.buffering.max.kbytes`: Controls producer buffer size in KB
73
124
- `shutdown_timeout_ms`: Time the plugin is given to flush out all messages to Kafka upon exit request.
74
125
- `prometheus`: Optional port to provide metrics in Prometheus format.
75
126
- `filters`: Vec of filters with next fields:
@@ -94,9 +145,57 @@ The message types are keyed as follows:
94
145
95
146
### Filtering
96
147
97
-
If `program_ignores` are specified, then these addresses will be filtered out of the account updates
98
-
and transaction notifications. More specifically, account update messages for these accounts will not be emitted,
99
-
and transaction notifications for any transaction involving these accounts will not be emitted.
148
+
**⚠️ IMPORTANT: Understanding how filtering works is crucial for getting data flowing to Kafka!**
149
+
150
+
The plugin uses a **whitelist approach** for filtering. By default, most events are filtered out unless you explicitly configure what you want to see.
151
+
152
+
#### How Filtering Works
153
+
154
+
1. **Account Updates**: Only published if the account's owner program is in `program_filters` OR the account address is in `account_filters`
155
+
2. **Transactions**: Only published if they involve accounts from programs in `program_filters` OR specific accounts in `account_filters`
156
+
3. **Slot Status**: Always published (not affected by filters)
157
+
4. **Program Ignores**: Blacklist of programs/accounts to exclude (applied after whitelist filtering)
158
+
159
+
#### Common Filtering Scenarios
160
+
161
+
**Scenario 1: See Everything (Recommended for testing)**
162
+
```json
163
+
{
164
+
"publish_all_accounts": true,
165
+
"program_filters": [],
166
+
"account_filters": []
167
+
}
168
+
```
169
+
170
+
**Scenario 2: See Specific Programs Only**
171
+
```json
172
+
{
173
+
"publish_all_accounts": false,
174
+
"program_filters": [
175
+
"11111111111111111111111111111111", // System Program
176
+
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"// Token Program
177
+
]
178
+
}
179
+
```
180
+
181
+
**Scenario 3: See Specific Accounts Only**
182
+
```json
183
+
{
184
+
"publish_all_accounts": false,
185
+
"account_filters": [
186
+
"YourAccountAddressHere111111111111111111111111"
187
+
]
188
+
}
189
+
```
190
+
191
+
#### Troubleshooting: No Data in Kafka?
192
+
193
+
If you're not seeing messages in Kafka despite successful slot processing:
194
+
195
+
1.**Check your filters**: Make sure you have either `publish_all_accounts: true` or specific `program_filters`/`account_filters`
196
+
2.**Verify topics**: Ensure your topic names are correct and Kafka is running
197
+
3.**Check program ignores**: Make sure you're not accidentally filtering out everything with overly restrictive `program_ignores`
198
+
4.**Test with minimal config**: Start with `publish_all_accounts: true` to verify the plugin is working
100
199
101
200
### Message Wrapping
102
201
@@ -109,6 +208,92 @@ Note that if `wrap_messages` is true, in order to avoid key collision, the messa
109
208
which is dependent on the type of the message being wrapped. Account update message keys are prefixed with
110
209
65 (A), slot status keys with 83 (S), and transaction keys with 84 (T).
111
210
211
+
## Enhanced Analytics Support
212
+
213
+
The plugin now provides significantly richer analytics data for blockchain monitoring and analysis, enhancing all supported Solana transaction formats.
214
+
215
+
### Transaction Types
216
+
217
+
The plugin supports multiple Solana transaction formats:
218
+
219
+
-**Legacy Transactions**: Traditional Solana message format
220
+
-**V0 Transactions**: Versioned transactions with address lookup tables (LUTs)
221
+
222
+
All transaction types are enhanced with comprehensive analytics metadata.
223
+
224
+
### Enhanced Analytics Features
225
+
226
+
All transactions provide additional analytics data that can be used for:
227
+
228
+
#### Performance Monitoring
229
+
-**Compute Units**: Actual compute units consumed by transactions
230
+
-**Pricing Information**: Compute unit pricing from ComputeBudget instructions
231
+
-**Cost Analysis**: Transaction fees and compute costs
232
+
233
+
#### Error Analysis & Debugging
234
+
-**Error Detection**: Reliable error status from transaction metadata
235
+
-**Success Tracking**: Transaction success/failure status
236
+
-**Error Details**: Structured error information without log parsing
237
+
238
+
#### Address Intelligence
239
+
-**Address Lookup Tables**: Support for V0 LUT transactions
240
+
-**Loaded Address Details**: Index and writable status for loaded addresses
241
+
-**Account Metadata**: Enhanced account information and versioning
242
+
243
+
#### Slot & Network Analytics
244
+
-**Confirmation Status**: Smart confirmation counting based on slot status
245
+
-**Status Descriptions**: Human-readable slot status descriptions
-**Cost Optimization**: Analyze transaction pricing and efficiency
296
+
112
297
## Buffering
113
298
114
299
The Kafka producer acts strictly non-blocking to allow the Solana validator to sync without much induced lag.
@@ -122,3 +307,61 @@ The buffer size can be controlled using `librdkafka` config options, including:
122
307
123
308
-`queue.buffering.max.messages`: Maximum number of messages allowed on the producer queue.
124
309
-`queue.buffering.max.kbytes`: Maximum total message size sum allowed on the producer queue.
310
+
311
+
## Troubleshooting
312
+
313
+
### Common Issues
314
+
315
+
#### 1. No Data in Kafka Topics
316
+
317
+
**Symptoms**: Solana validator shows slot processing but no messages appear in Kafka topics.
318
+
319
+
**Causes & Solutions**:
320
+
-**Filtering too restrictive**: Set `publish_all_accounts: true` or add specific `program_filters`
321
+
-**Wrong topic names**: Verify your topic names match exactly
322
+
-**Kafka connection issues**: Check if Kafka is running and accessible
323
+
-**Plugin not loaded**: Verify the plugin path in `libpath` is correct
324
+
325
+
**Quick Test**: Use the Quick Start config above to verify the plugin works.
326
+
327
+
#### 2. Only Slot Status Messages Appear
328
+
329
+
**Cause**: This is expected behavior with the default example config! Slot status is always published, but account updates and transactions require explicit filter configuration.
330
+
331
+
**Solution**: Add `publish_all_accounts: true` or configure `program_filters`.
332
+
333
+
#### 3. Plugin Fails to Load
334
+
335
+
**Common Causes**:
336
+
-**Version mismatch**: Ensure Solana and plugin are built with identical Rust/Solana versions
337
+
-**Library path**: Check `libpath` points to the correct `.so` or `.dylib` file
338
+
-**Permissions**: Ensure the plugin file is readable by the Solana process
339
+
340
+
#### 4. High Memory Usage
341
+
342
+
**Cause**: Large Kafka producer buffers can consume significant memory.
343
+
344
+
**Solution**: Adjust buffer settings:
345
+
```json
346
+
{
347
+
"kafka": {
348
+
"queue.buffering.max.messages": "10000",
349
+
"queue.buffering.max.kbytes": "1048576"
350
+
}
351
+
}
352
+
```
353
+
354
+
### Debugging Tips
355
+
356
+
1.**Start Simple**: Begin with `publish_all_accounts: true` to verify basic functionality
357
+
2.**Check Topics**: Use Kafdrop or `kafka-console-consumer` to verify topics exist
358
+
3.**Monitor Metrics**: Enable Prometheus metrics to see message counts and errors
359
+
4.**Verify Filters**: Double-check your filter configuration matches your expectations
360
+
361
+
### Getting Help
362
+
363
+
If you're still having issues:
364
+
1. Check this troubleshooting section
365
+
2. Review the filtering documentation above
366
+
3. Try the Quick Start configuration
367
+
4. Open an issue with your config and error details
0 commit comments