Skip to content

feat: Import miner changes from stacks-blockchain/3337 into subnets#203

Merged
gregorycoppola merged 5 commits intomasterfrom
feat/port-l1-miner-changes
Jan 31, 2023
Merged

feat: Import miner changes from stacks-blockchain/3337 into subnets#203
gregorycoppola merged 5 commits intomasterfrom
feat/port-l1-miner-changes

Conversation

@gregorycoppola
Copy link
Copy Markdown
Contributor

Description

This PR imports the main chain miner improvements from stacks-network/stacks-core#3337 into subnets. (See also stacks-network/stacks-core#3313)

The idea is:

  • loop through each transaction in the database
    • known fee rate transactions are iterated in descending order of fee rate
    • unknown fee rate transactions are selected in random order
  • for each check the nonce, potentially hitting a nonce cache
    • if the nonce matches run it
    • if the nonce is in the future cache it
    • if the nonce is in the past, discard it

Applicable issues

Additional info (benefits, drawbacks, caveats)

Was approved in #194

Checklist

  • Test coverage for new or modified code paths
  • Changelog is updated

@gregorycoppola gregorycoppola marked this pull request as ready for review January 19, 2023 18:26
@gregorycoppola gregorycoppola requested a review from kantai January 19, 2023 18:26
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #203 (156a3ba) into master (81f9fe5) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##           master     #203   +/-   ##
=======================================
  Coverage   91.19%   91.19%           
=======================================
  Files           6        6           
  Lines         284      284           
=======================================
  Hits          259      259           
  Misses         25       25           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Copy Markdown
Contributor

@kantai kantai left a comment

Choose a reason for hiding this comment

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

LGTM!

@gregorycoppola gregorycoppola merged commit c33afbf into master Jan 31, 2023
@gregorycoppola
Copy link
Copy Markdown
Contributor Author

Thanks!

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.

3 participants