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 block_lookup in Instruction for block constant access #77

Conversation

han0110
Copy link
Collaborator

@han0110 han0110 commented Dec 8, 2021

This PR aims to add the missing block constant functionality of Instruction.

It adds a block_table to store all static block constant and up to previous 256 block hashes for block constant lookup. The table in real implementation could share the same instance columns with tx_table once they are properly separate by selectors.

This approach targets a straightforward implementation, in the future we could also adopt EIP2935 mentioned in #75 to totally remove block_table.

@han0110 han0110 changed the title Add Block in Instruction for block constant access [WIP] Add Block in Instruction for block constant access Dec 8, 2021
@han0110 han0110 marked this pull request as ready for review December 16, 2021 14:06
@han0110 han0110 changed the title [WIP] Add Block in Instruction for block constant access Add block_context_lookup in Instruction for block constant access Dec 16, 2021
@han0110 han0110 changed the title Add block_context_lookup in Instruction for block constant access Add block_lookup in Instruction for block constant access Dec 16, 2021
@han0110 han0110 force-pushed the feature/block-constant branch 2 times, most recently from 8f882fe to a35af4a Compare December 21, 2021 06:59
Copy link
Collaborator

@DreamWuGit DreamWuGit left a comment

Choose a reason for hiding this comment

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

LGTM Thanks!

Copy link
Collaborator

@icemelon icemelon left a comment

Choose a reason for hiding this comment

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

LGTM

@icemelon
Copy link
Collaborator

Could we merge this first? We have a COINBASE spec pr that depends on this one.

Copy link
Collaborator

@ChihChengLiang ChihChengLiang left a comment

Choose a reason for hiding this comment

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

approve to unblock other tasks.

@ChihChengLiang ChihChengLiang merged commit 1564d68 into privacy-scaling-explorations:master Dec 31, 2021
@han0110 han0110 deleted the feature/block-constant branch December 31, 2021 16:28
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.

None yet

4 participants