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 shard blob tx gas calculations #5596

Merged
merged 37 commits into from
Jun 30, 2023
Merged

Conversation

flcl42
Copy link
Contributor

@flcl42 flcl42 commented Apr 20, 2023

Adds data gas calculations

Changes

  • Add data gas calculations and checks
  • Correct blobs count math, so it depends on datagas, not on blob count

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

Requires Dencun activated to test

@flcl42 flcl42 changed the base branch from master to feature/eip-4844-ssz April 20, 2023 10:03
@flcl42 flcl42 force-pushed the feature/eip-4844-ssz branch 2 times, most recently from 8aef27a to 69f61e4 Compare April 20, 2023 12:28
@flcl42 flcl42 force-pushed the feature/eip-4844-gas-calculations branch from 66c66e9 to 5c907d8 Compare April 20, 2023 12:38
@flcl42 flcl42 force-pushed the feature/eip-4844-ssz branch 2 times, most recently from 29a01a3 to bb81773 Compare April 21, 2023 13:31
@flcl42 flcl42 force-pushed the feature/eip-4844-gas-calculations branch 6 times, most recently from 2a52b0b to 5134688 Compare April 26, 2023 08:36
@flcl42 flcl42 force-pushed the feature/eip-4844-ssz branch 6 times, most recently from 3ccb719 to 87c9443 Compare April 27, 2023 10:55
@flcl42 flcl42 force-pushed the feature/eip-4844-gas-calculations branch 5 times, most recently from 8977b9a to ef60301 Compare April 28, 2023 09:36
@flcl42 flcl42 force-pushed the feature/eip-4844-gas-calculations branch 2 times, most recently from f57fc65 to 915ede6 Compare April 28, 2023 18:56
@flcl42 flcl42 marked this pull request as ready for review April 28, 2023 18:56
@flcl42 flcl42 changed the title Add blob tx gas calculations EIP-4844 Add gas calculations Apr 28, 2023
@flcl42 flcl42 force-pushed the feature/eip-4844-gas-calculations branch from 645438a to 9913404 Compare June 14, 2023 10:11
@flcl42 flcl42 force-pushed the feature/eip-4844-gas-calculations branch from 57a6811 to 6105dfb Compare June 14, 2023 19:04
Copy link
Contributor

@marcindsobczak marcindsobczak left a comment

Choose a reason for hiding this comment

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

Awesome ❤️

@flcl42 flcl42 requested review from smartprogrammer93 and removed request for smartprogrammer93 June 23, 2023 14:36
Copy link
Contributor

@MarekM25 MarekM25 left a comment

Choose a reason for hiding this comment

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

Added a few comments, most of them minor

if (itemsRemaining > 0 &&
rlpStream.PeekPrefixAndContentLength().ContentLength == Keccak.Size)
{
blockHeader.WithdrawalsRoot = rlpStream.DecodeKeccak();

if (itemsRemaining == 2 && rlpStream.Position != headerCheck)
if (itemsRemaining == 3 && rlpStream.Position != headerCheck)
Copy link
Contributor

Choose a reason for hiding this comment

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

@Demuirgos be careful after merging this PR and 4788

@MarekM25 MarekM25 self-requested a review June 30, 2023 12:39
@flcl42 flcl42 force-pushed the feature/eip-4844-gas-calculations branch from 3e6df34 to 0830df3 Compare June 30, 2023 13:06
@flcl42 flcl42 force-pushed the feature/eip-4844-gas-calculations branch from 0830df3 to fbdf0a9 Compare June 30, 2023 13:07
@flcl42 flcl42 merged commit 578290e into master Jun 30, 2023
@flcl42 flcl42 deleted the feature/eip-4844-gas-calculations branch June 30, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants