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

block: Add data gas used and refactor cal excess data gas cal #2750

Merged
merged 19 commits into from
Jun 5, 2023

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Jun 2, 2023

Implements

as part of devnet 6 target spec

  • add dataGasUsed uint64
  • refactor exess data gas cal
  • change excess data gas to uint64
  • vm build block changes
  • client engine changes
  • fix tests
  • increase codecov

@g11tech g11tech added PR state: WIP package: block target: master Work to be done towards master branch labels Jun 2, 2023
@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Merging #2750 (92b6277) into master (af33768) will increase coverage by 0.08%.
The diff coverage is 95.34%.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 91.08% <96.96%> (+0.26%) ⬆️
blockchain 90.72% <ø> (ø)
client 86.81% <62.50%> (-0.01%) ⬇️
common 97.00% <ø> (ø)
devp2p 89.14% <ø> (-0.10%) ⬇️
ethash ∅ <ø> (∅)
evm 79.98% <ø> (ø)
rlp ∅ <ø> (∅)
statemanager 86.28% <ø> (ø)
trie 89.92% <ø> (ø)
tx 95.76% <ø> (ø)
util 81.13% <ø> (ø)
vm 83.01% <100.00%> (+1.93%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

packages/block/test/eip4844block.spec.ts Outdated Show resolved Hide resolved
Comment on lines +66 to +69
const blobs = getBlobs('hello world')
const commitments = blobsToCommitments(blobs)
const versionedHashes = commitmentsToVersionedHashes(commitments)
const proofs = blobsToProofs(blobs, commitments)
Copy link
Contributor

@acolytec3 acolytec3 Jun 5, 2023

Choose a reason for hiding this comment

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

Do you think it would be worthwhile creating a generic test utility method for creating blob transactions (like here but more generic)? Or maybe we update the static constructor to let you pass in the data for one or more blobs and it generates all of it? It's just a lot of boilerplate to create these blob transactions (the more I think about it).

Copy link
Contributor Author

@g11tech g11tech Jun 5, 2023

Choose a reason for hiding this comment

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

yes thats a very good idea to have a static method in the tx OR
we can modify fromTxData to just accept blobs string[] and just generate the rest?

Copy link
Contributor

Choose a reason for hiding this comment

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

yes thats a very good idea to have a static method in the tx OR we can modify fromTxData to just accept blobs string[] and just generate the rest?

Yup, that's more or less what I was thinking. Let's tackle as a separate PR though. Not crucial for this one.

Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

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

Left one additional comment (just cleaning up n/a docs) but this looks good!

Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

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

LGTM. Lets merge pending CI passing.

@g11tech g11tech merged commit 469188f into master Jun 5, 2023
@holgerd77 holgerd77 deleted the 4844-add-datagasused branch June 5, 2023 13:07
@holgerd77
Copy link
Member

Great PR overall! 😃🎉❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants