Skip to content

Conversation

@marcocastignoli
Copy link
Member

See #2506

This PR:

  • Adds support for similarity verification in monitor as fallback in any case in which the contract cannot be assembled via IPFS (ipfs is disabled, errors while assembling contract or not fully assembled)
  • Adds a test for the new similarity verification functionality
  • I noticed wrong types in the Monitor constructor so I fixed them

@marcocastignoli marcocastignoli moved this from Triage to Sprint - Needs Review in Sourcify Public Dec 10, 2025
@marcocastignoli marcocastignoli self-assigned this Dec 10, 2025
Copy link
Member

@kuzdogan kuzdogan left a comment

Choose a reason for hiding this comment

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

Small comments. Looks good in general. Just, we should check if the monitor is really working on prod now. I checked the logs and there seemed to be a lot of errors and no INFO level logs

Comment on lines 384 to 395
private async triggerSimilarityVerificationFallback(
creatorTxHash: string,
address: string,
) {
if (!this.similarityVerificationClient) {
this.chainLogger.debug("Similarity search disabled, skipping fallback", {
address,
});
return;
}

this.chainLogger.info("Triggering similarity search fallback", {
Copy link
Member

Choose a reason for hiding this comment

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

This whole section seems unnecessary and can be handled inside the SimilarityVerificationClient. Then here we can simple call this.client.trigger()

export default class SimilarityVerificationClient {
private baseUrls: string[];
private clientLogger: Logger;
private enabled: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

What's the use case of having enabled? We always start it with true and don't change at all no?

@manuelwedler
Copy link
Member

One question regarding this. Do I remember correctly that we wanted to have a delay between contract deployment and similarity search submission, such that it is possible for users to verify themselves before monitor does? Is this implemented in any way here?

@marcocastignoli
Copy link
Member Author

One question regarding this. Do I remember correctly that we wanted to have a delay between contract deployment and similarity search submission, such that it is possible for users to verify themselves before monitor does? Is this implemented in any way here?

Right!!! I totally forgot about it while implementing this PR. Do you think is it as straightforward as as adding a delay before triggering each similarity request? That would be easy to implement. IMO it's not worth to implement any other advanced mechanism involving queues.

@manuelwedler
Copy link
Member

yes, simply add a delay, but don't await the call to not block anything. I don't think this needs any fancy mechanism. Also make it configurable through an env variable.

@marcocastignoli
Copy link
Member Author

@manuelwedler I pushed this change. Good catch! thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Sprint - Needs Review

Development

Successfully merging this pull request may close these issues.

4 participants