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

remove the block fill rate limit of 70% when farming a block #19005

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Dec 9, 2024

Purpose:

to increase transaction rate

Current Behavior:

Farmers only fill blocks to 70% full

New Behavior:

Farmers fill blocks all the way. But blocks are compressed and have potential to fit more transactions.

Testing Notes:

@arvidn arvidn requested a review from AmineKhaldi December 9, 2024 15:51
@arvidn arvidn added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Dec 9, 2024
@arvidn arvidn marked this pull request as ready for review December 9, 2024 16:45
@arvidn arvidn requested a review from a team as a code owner December 9, 2024 16:45
Copy link

coveralls-official bot commented Dec 9, 2024

Pull Request Test Coverage Report for Build 12281997874

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 17 of 17 (100.0%) changed or added relevant lines in 2 files are covered.
  • 547 unchanged lines in 23 files lost coverage.
  • Overall coverage increased (+0.01%) to 91.482%

Files with Coverage Reduction New Missed Lines %
chia/timelord/timelord.py 1 80.0%
chia/full_node/pending_tx_cache.py 1 96.55%
chia/_tests/wallet/test_transaction_store.py 1 99.58%
chia/wallet/util/wallet_sync_utils.py 1 86.07%
chia/daemon/client.py 1 74.58%
chia/server/rate_limit_numbers.py 1 97.78%
chia/_tests/core/full_node/stores/test_full_node_store.py 1 99.5%
chia/_tests/core/full_node/stores/test_block_store.py 2 99.53%
chia/_tests/pools/test_pool_rpc.py 3 99.07%
chia/wallet/wallet_node.py 3 88.1%
Totals Coverage Status
Change from base Build 12209661102: 0.01%
Covered Lines: 104661
Relevant Lines: 114216

💛 - Coveralls

AmineKhaldi
AmineKhaldi previously approved these changes Dec 9, 2024
@@ -1081,7 +1081,7 @@ async def make_and_send_big_cost_sb(coin: Coin) -> None:
g1 = sk.get_g1()
sig = AugSchemeMPL.sign(sk, IDENTITY_PUZZLE_HASH, g1)
aggsig = G2Element()
for _ in range(169):
for _ in range(242):
Copy link
Contributor

Choose a reason for hiding this comment

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

do you want to comment what this magic number is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, it's not great. it's the number of transactions we need to fill the mempool sufficiently to trigger the expected number of rejections. going from fill rate 70% -> 100%, I simply took 169 / 0.7 to increase this number proportionally. I'll try to improve this a bit.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sent #19026 as an attempt to clarify this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I might prefer the simpler construct with a comment like Amine has above. The latest version here Arvid has more magic numbers :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think magic numbers are "more magic" the harder they are to explain. And breaking this down to how the magic number is computed makes the new ones less magical. (and I think in the most recent update there no magic numbers). As long as you accept that the CLVM cost of returning a quoted list is 44 and that it takes 88 bytes to serialize another agg-sig condition.

There are a lot of mempool tests with magic number that need tweaking when tweaking constants. Now we're moving this test to have its expectations properly rooted in the test constants it's using. I think this really helps humans understand (and gain confidence in) the test. I will follow up (in a separate PR) to make sure this test

emlowe
emlowe previously approved these changes Dec 10, 2024
…_big_cost_sb (#19026)

Attempt to clarify why we add many aggsig conditions in make_and_send_big_cost_sb.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants