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

add(metrics): Track mempool actions and size bucketed by weight (copy of #6972, credit @str4d) #7019

Merged
merged 8 commits into from
Jul 18, 2023

Conversation

mpguerra
Copy link
Contributor

Motivation

This is a copy of #6972 so that tests can be run

Specifications

Complex Code or Requirements

Solution

Review

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
    • Does it change concurrent code, unsafe code, or consensus rules?
  • How do you know it works? Does it have tests?

Follow Up Work

@mpguerra mpguerra requested review from a team as code owners June 20, 2023 10:50
@mpguerra mpguerra requested review from arya2 and removed request for a team June 20, 2023 10:50
@mergify

This comment was marked as resolved.

@mpguerra mpguerra changed the title Credit str4d: metrics mempool composition Copy of add(metrics): Track mempool actions and size bucketed by weight #6972 (Credit @str4d) Jun 20, 2023
@teor2345
Copy link
Contributor

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Jun 20, 2023

refresh

✅ Pull request refreshed

@teor2345
Copy link
Contributor

This seems like a real bug, but I don't know if it is in the generated proptest data, or in the code.

Multiple tests fail on the same Rust code in this PR:

---- components::mempool::storage::tests::prop::reject_lists_are_limited_insert_eviction stdout ----
The application panicked (crashed).
Message: attempt to subtract with overflow
Location: zebrad/src/components/mempool/storage/verified_set.rs:312
312 > paid_actions += entry.conventional_actions - entry.unpaid_actions;

https://github.com/ZcashFoundation/zebra/actions/runs/5321638950/jobs/9636992835?pr=7019#step:10:3627

Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Panic on "attempt to subtract with overflow"

@arya2 arya2 assigned arya2 and unassigned arya2 Jun 21, 2023
@teor2345 teor2345 added do-not-merge Tells Mergify not to merge this PR and removed do-not-merge Tells Mergify not to merge this PR labels Jun 30, 2023
@arya2 arya2 self-assigned this Jul 5, 2023
@github-actions github-actions bot added the C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG label Jul 17, 2023
@oxarbitrage oxarbitrage marked this pull request as draft July 17, 2023 14:24
@oxarbitrage oxarbitrage force-pushed the str4d-metrics-mempool-composition branch from 6aa59e7 to a0aa703 Compare July 17, 2023 19:41
@teor2345
Copy link
Contributor

@oxarbitrage CI won't run on this branch until you fix the merge conflicts

teor2345
teor2345 previously approved these changes Jul 18, 2023
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Thanks for this!

It looks like all the tests are passing, but we're not quite testing the correct ranges.

Also we could make this implementation simpler and easier to use by replacing the derived Arbitrary implementation with a manual one. Did you want me to show you how to do that?

zebra-chain/src/transaction/unmined.rs Outdated Show resolved Hide resolved
zebra-chain/src/transaction/unmined.rs Outdated Show resolved Hide resolved
zebra-chain/src/transaction/unmined.rs Outdated Show resolved Hide resolved
@oxarbitrage oxarbitrage marked this pull request as ready for review July 18, 2023 17:21
@teor2345
Copy link
Contributor

CI hit a GitHub HTTP request rate-limit:

/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=2 origin +1782753784d560a037dd6786bfae6780ba3693a6:refs/remotes/pull/7019/merge
Error: fatal: unable to access 'https://github.com/ZcashFoundation/zebra/': The requested URL returned error: 429

https://github.com/ZcashFoundation/zebra/actions/runs/5590449347/jobs/10221580034?pr=7019#step:2:54

The solution to this is to stop checking out Zebra in jobs and steps that don't need it, or to combine jobs and steps so that we check out Zebra fewer times.

Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this up!

@teor2345 teor2345 assigned oxarbitrage and unassigned arya2 Jul 18, 2023
@teor2345 teor2345 added C-enhancement Category: This is an improvement P-Medium ⚡ A-diagnostics Area: Diagnosing issues or monitoring performance A-mempool Area: Memory pool transactions and removed C-trivial Category: A trivial change that is not worth mentioning in the CHANGELOG labels Jul 18, 2023
@teor2345 teor2345 changed the title Copy of add(metrics): Track mempool actions and size bucketed by weight #6972 (Credit @str4d) add(metrics): Track mempool actions and size bucketed by weight (copy of #6972, credit @str4d) Jul 18, 2023
mergify bot added a commit that referenced this pull request Jul 18, 2023
@mergify mergify bot merged commit 7f64ff3 into main Jul 18, 2023
@mergify mergify bot deleted the str4d-metrics-mempool-composition branch July 18, 2023 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Diagnosing issues or monitoring performance A-mempool Area: Memory pool transactions C-enhancement Category: This is an improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants