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

feat!: remove coinbases from weight calculations #6738

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

Conversation

SWvheerden
Copy link
Collaborator

Description

removes coinbases from the weight calculations making calculations regarding weight simpler.
Adds max coinbase constant, currently 1000.

Motivation and Context

This will simplify the mining and verification of coinbases and weights, by making coinbases not count towards block weight.

How Has This Been Tested?

unit tests

@SWvheerden SWvheerden requested a review from a team as a code owner January 10, 2025 14:47
Copy link

github-actions bot commented Jan 10, 2025

Test Results (CI)

    3 files    129 suites   40m 12s ⏱️
1 351 tests 1 351 ✅ 0 💤 0 ❌
4 051 runs  4 051 ✅ 0 💤 0 ❌

Results for commit 62933e2.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jan 10, 2025

Test Results (Integration tests)

18 tests   18 ✅  6m 46s ⏱️
 2 suites   0 💤
 2 files     0 ❌
 1 errors

For more details on these parsing errors, see this check.

Results for commit 62933e2.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

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

I think we need to verify that the maximum block size of 4MB for comms purposes will still be adhered to when we have full blocks with say 1000 coinbases in the block. When we get a new block template for mining this limitation must be taken into account, and not only discovered when we try to transmit such a mined block.

@SWvheerden
Copy link
Collaborator Author

Good point about the comms block size,
I increased this to 6MB to ensure its still safe. 2MB should be more than safe for 1000 coinbases
That 4MB limit is just a value to ensure that no one can keep streaming bytes to the receiver endlessly and fill the memory.

hansieodendaal
hansieodendaal previously approved these changes Jan 13, 2025
Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

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

utACK

@SWvheerden SWvheerden force-pushed the sw_remove_coinbases_fromweight branch from 4da79c3 to 62933e2 Compare January 27, 2025 15:40
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.

2 participants