Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit plugin improvements #297

Merged
merged 4 commits into from
Nov 5, 2024
Merged

Commit plugin improvements #297

merged 4 commits into from
Nov 5, 2024

Conversation

dimkouv
Copy link
Contributor

@dimkouv dimkouv commented Nov 5, 2024

  • Compute RMN initial request timers expiration according to MaxQueryDuration instead of having it hardcoded.
  • Logging improvements.
  • Minor refactoring.

Copy link
Contributor

@0xnogo 0xnogo left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

github-actions bot commented Nov 5, 2024

Metric dk/commit-testing main
Coverage 73.1% 73.0%

// remaining 5% for other query processing

maxAllowedObservationTimeout = 3 * time.Second
maxAllowedReportTimeout = 2 * time.Second
Copy link
Collaborator

Choose a reason for hiding this comment

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

for my own knowledge, would these values change depending on the chain?

Copy link
Collaborator

Choose a reason for hiding this comment

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

They shouldn't because these are parameters for communication w/ RMN which is purely offchain

queryCapacityForReports := time.Duration(reportDurationPercentage * float64(maxQueryDuration))

// we divide in two parts one for the initial signatures request and one for the retry
queryCapacityForInitialObservations := queryCapacityForReports / 2
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this division something we would want to potentially tune?
for example, 70% for initial signatures, 30% for retry

Copy link
Collaborator

Choose a reason for hiding this comment

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

Good question! I think we'd want to give enough time for the retries, splitting them 70/30 might not be enough for the retries.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, right now it is set to 50% for the initial try and 50% for the retry. We can adjust this if required.

// remaining 5% for other query processing

maxAllowedObservationTimeout = 3 * time.Second
maxAllowedReportTimeout = 2 * time.Second
Copy link
Collaborator

Choose a reason for hiding this comment

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

They shouldn't because these are parameters for communication w/ RMN which is purely offchain

queryCapacityForReports := time.Duration(reportDurationPercentage * float64(maxQueryDuration))

// we divide in two parts one for the initial signatures request and one for the retry
queryCapacityForInitialObservations := queryCapacityForReports / 2
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good question! I think we'd want to give enough time for the retries, splitting them 70/30 might not be enough for the retries.

@dimkouv dimkouv merged commit 760e17a into main Nov 5, 2024
3 of 4 checks passed
@mateusz-sekara mateusz-sekara deleted the dk/commit-testing branch November 8, 2024 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants