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

Fix blob tx size calculation #8123

Merged
merged 13 commits into from
Jan 30, 2025
Merged

Fix blob tx size calculation #8123

merged 13 commits into from
Jan 30, 2025

Conversation

marcindsobczak
Copy link
Contributor

Fixes #8121

Changes

  • save tx size only if blobs are included in calculations

When adding filter for max tx size (#7925) I introduced a regression. In SizeTxFilter we are calculating sizes of blob txs without including blobs. The value is saved, so we are not recalculating it later, when we need size of the whole tx, including blobs.

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Hive tests were failing because of regression, it is fixed now

Documentation

Requires documentation update

  • Yes
  • No

Requires explanation in Release Notes

  • Yes
  • No

@kamilchodola kamilchodola added this to the 1.31.0 milestone Jan 29, 2025
@marcindsobczak
Copy link
Contributor Author

We are using incorrect blob tx sizes when announcing blob txs to our peers

@marcindsobczak
Copy link
Contributor Author

Hive tests Request Blob Pooled Transactions are passing after changes from this PR
https://github.com/NethermindEth/nethermind/actions/runs/13031177366

@@ -197,7 +197,9 @@ private void ClearPreHashInternal()
/// </summary>
public int GetLength(ITransactionSizeCalculator sizeCalculator, bool shouldCountBlobs)
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be cool in addition to Transaction to have NetworkTransaction class-wrapper with GetTransaction method or so to make it clearer which form is used here or there. So you can't call GetLength for transaction without NetworkWrapper. May be too much work though

@marcindsobczak marcindsobczak merged commit 7ea03c2 into master Jan 30, 2025
79 checks passed
@marcindsobczak marcindsobczak deleted the test/hive2 branch January 30, 2025 09:52
brbrr pushed a commit that referenced this pull request Jan 30, 2025
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.

Fix blob hive tests
4 participants