Skip to content

EIP-4844#1

Draft
dgcoffman wants to merge 55 commits intounstablefrom
dgc/eip-4844
Draft

EIP-4844#1
dgcoffman wants to merge 55 commits intounstablefrom
dgc/eip-4844

Conversation

@dgcoffman
Copy link
Copy Markdown
Owner

@dgcoffman dgcoffman commented Oct 17, 2022

Implements EIP-4844 in Lodestar.

As specified in the consensus specs, except where we are ahead of the spec:

See also ethereum/consensus-specs#3043

TODO

See also


function getDbSize(): number {
// 116 ./.__testdb
const res = execSync(`du -bs ${dbLocation}`, {encoding: "utf8"});
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

-b doesn't exist on OSX's du

@dgcoffman dgcoffman mentioned this pull request Oct 18, 2022
3 tasks
@dgcoffman dgcoffman force-pushed the dgc/eip-4844 branch 2 times, most recently from df8ff46 to 4f8602d Compare October 28, 2022 19:13
MIN_ATTESTATION_INCLUSION_DELAY: 1,
// [customized] fast epochs
SLOTS_PER_EPOCH: 8,
SLOTS_PER_EPOCH: 3,
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

blobs.forEach((blob, index) => {
const computedCommitment = blobToKzgCommitment(blob);
if (computedCommitment !== blobKzgCommitments[index]) {
if (!typedArraysAreEqual(computedCommitment, blobKzgCommitments[index])) {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

fixed the equality check

}

// message_offset = 1 + uint32.decode_bytes(opaque_tx[1:5])
const messageOffset = 1 + new DataView(opaqueTx.slice(1, 5).buffer, 0).getUint32(0, true); // Should always be 70
Copy link
Copy Markdown

@dapplion dapplion Nov 18, 2022

Choose a reason for hiding this comment

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

This is true, it will always be 70. But for blobVersionedHashOffset I'm not sure if it's always gonna be 283. A blob transaction will:

  • Always have a to address. According to the types it can be None
  • Always have empty data field
  • Always have empty access_list field

If the conditions above hold then it will always be 283

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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