Skip to content

Conversation

@tankyleo
Copy link
Contributor

This is a clone of the ldk-server logger

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jan 22, 2026

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tankyleo tankyleo requested a review from tnull January 22, 2026 08:05
@tankyleo
Copy link
Contributor Author

Based on #86 thought you'd want to take a look tnull given your past debugging sessions against VSS.

tokio::spawn(async move {
if let Err(e) = connection.await {
eprintln!("Connection error: {}", e);
warn!("Connection error: {}", e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this recoverable? error then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can recover using fn ensure_connected if this happens on one of our 10 long-lived connections to the database.

Copy link
Contributor Author

@tankyleo tankyleo Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me know if you would rather use error here it is true that if this happens during startup we do not recover.

In case we fail during startup we do have the error!("Failed to start postgres backend"); messages at the error level.

tokio = { version = "1.38.0", default-features = false, features = ["rt", "macros"] }
native-tls = { version = "0.2.14", default-features = false }
postgres-native-tls = { version = "0.5.2", default-features = false, features = ["runtime"] }
log = "0.4.29"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disable default features?

auth
} else {
println!("No authentication method configured, all storage with the same store id will be commingled.");
warn!("No authentication method configured, all storage with the same store id will be commingled.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do start to wonder if we should only expose this behind a testing feature or cfg flag?

Copy link
Contributor Author

@tankyleo tankyleo Jan 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now only available via cargo run --no-default-features --features testing see below

store: Arc<dyn KvStore>, user_token: String, request: GetObjectRequest,
) -> Result<GetObjectResponse, VssError> {
store.get(user_token, request).await
trace!("handling GetObject request with store_id {}", request.store_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth logging truncated key values to give an indication what is being written/read?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to be careful with logging what could be sensitive information. Won't the keys all be obfuscated anyway via SorableBuilder in LDK-Node ? If so an operator of vss-server wouldn't get much visibility into what is getting stored.

@tankyleo tankyleo self-assigned this Jan 22, 2026
@tankyleo tankyleo moved this to Goal: Merge in Weekly Goals Jan 22, 2026
No only accessible via `cargo run --no-default-features --features testing`
@tankyleo tankyleo requested a review from tnull January 22, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Goal: Merge

Development

Successfully merging this pull request may close these issues.

3 participants