8000 feat: Instrument VoteExtension status [BLO-792] by nivasan1 · Pull Request #41 · skip-mev/connect · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

feat: Instrument VoteExtension status [BLO-792] #41

Merged
merged 13 commits into from
Jan 26, 2024

Conversation

nivasan1
Copy link
Contributor

No description provided.

@nivasan1 nivasan1 force-pushed the nv/abci-method-status-vote-extensions branch from 59c3678 to b634d12 Compare January 25, 2024 19:56
Copy link
codecov bot commented Jan 25, 2024

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (79c2a2f) 72.92% compared to head (5b98618) 73.41%.

❗ Current head 5b98618 differs from pull request most recent head 288e75b. Consider uploading reports for the commit 288e75b to get more accurate results

Files Patch % Lines
abci/ve/errors.go 50.00% 10 Missing ⚠️
abci/proposals/errors.go 50.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
+ Coverage   72.92%   73.41%   +0.48%     
==========================================
  Files         117      110       -7     
  Lines        6235     5886     -349     
==========================================
- Hits         4547     4321     -226     
+ Misses       1387     1284     -103     
+ Partials      301      281      -20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nivasan1 nivasan1 force-pushed the nv/abci-method-status-vote-extensions branch from b634d12 to de08686 Compare January 25, 2024 22:38
latency := time.Since(start)
h.logger.Info(
"extend vote handler",
"duration (seconds)", latency.Seconds(),
"err", err,
)
h.metrics.ObserveABCIMethodLatency(servicemetrics.ExtendVote, latency)
slinkyabci.RecordLatencyAndStatus(h.metrics, latency, err, servicemetrics.ExtendVote)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason you're introducing returned errors in this function? The SDK catches them and returns nil like we are currently doing.

Seems like this will change the behavior of the oracle from defaulting to an empty vote extension on failure to failing to add a vote extension at all. It looks like it will get swallowed by comet, so maybe it nets out to the same outcome in the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, for each ABCI method, comet's behavior is to eventually panic on errors returned from the app. Hence, the baseapp's implementations in abci.go log and ignore errors from our handlers. Hence, I thought it made sense to keep our logic in line w/ our other handlers. For instance, Prepare / ProcessProposal return errors in execution to the base-app despite ultimately being swallowed

Comment on lines +11 to +13
func RecordLatencyAndStatus(
metrics servicemetrics.Metrics, latency time.Duration, err error, method servicemetrics.ABCIMethod,
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this just be a method on servicemetrics.Metrics ?

@nivasan1 nivasan1 force-pushed the nv/abci-method-status-vote-extensions branch from 5b98618 to fd0ed24 Compare January 26, 2024 22:03
@nivasan1 nivasan1 force-pushed the nv/abci-method-status-vote-extensions branch from fd0ed24 to 288e75b Compare January 26, 2024 22:03
@nivasan1 nivasan1 changed the base branch from nv/abci-method-status to main January 26, 2024 22:04
@nivasan1 nivasan1 merged commit a736dc6 into main Jan 26, 2024
@zrbecker zrb 759B ecker deleted the nv/abci-method-status-vote-extensions branch November 5, 2024 21:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0