Skip to content

feat: (levm) block information opcodes#565

Merged
ilitteri merged 32 commits into
mainfrom
levm/feat/block_information
Sep 30, 2024
Merged

feat: (levm) block information opcodes#565
ilitteri merged 32 commits into
mainfrom
levm/feat/block_information

Conversation

@belfortep

@belfortep belfortep commented Sep 26, 2024

Copy link
Copy Markdown
Contributor

Motivation

Adds most of block information opcodes to the VM

Description

  • Adds the implementation of all block information opcodes except selfbalance and blobhash, which needs the implementation of accounts and transactions
  • Adds tests for the implemented opcodes

Closes #502
Closes #503
Closes #504
Closes #505
Closes #506
Closes #507
Closes #508
Closes #510
Closes #511

@belfortep belfortep changed the title Added opcodes skeleton feat: (levm) block information opcodes Sep 26, 2024
@belfortep belfortep marked this pull request as ready for review September 27, 2024 12:38
@belfortep belfortep requested a review from a team as a code owner September 27, 2024 12:38

@lazcanoluca lazcanoluca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The implementation of the opcodes looks good to me, and so does the db.

As for the many comments I left, they are mostly nitpicks, nothing major. Mostly renaming some stuff to match the yellow paper, proposing changes to the comments, and proposing the deletion of stuff we don't yet need. Of course, let me know if you don't agree with the changes or if the propositions are too nitpicky.

I'd like to hear the input from a code owner about this. nevermind

Comment thread crates/levm/src/block.rs Outdated
Comment thread crates/levm/src/block.rs Outdated
Comment thread crates/levm/src/block.rs Outdated
Comment thread crates/levm/src/block.rs
Comment thread crates/levm/src/block.rs Outdated
Comment thread crates/levm/src/block.rs
Comment thread crates/levm/src/block.rs Outdated
Comment thread crates/levm/src/block.rs
Comment thread crates/levm/src/block.rs
Comment thread crates/levm/src/block.rs
Comment thread crates/levm/src/block.rs
belfortep and others added 9 commits September 27, 2024 11:48
Co-authored-by: Luca Lazcano <64329820+lazcanoluca@users.noreply.github.com>
Co-authored-by: Luca Lazcano <64329820+lazcanoluca@users.noreply.github.com>
Co-authored-by: Luca Lazcano <64329820+lazcanoluca@users.noreply.github.com>
Co-authored-by: Luca Lazcano <64329820+lazcanoluca@users.noreply.github.com>
Co-authored-by: Luca Lazcano <64329820+lazcanoluca@users.noreply.github.com>
Co-authored-by: Luca Lazcano <64329820+lazcanoluca@users.noreply.github.com>

@lazcanoluca lazcanoluca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀 lgtm

Comment thread crates/levm/src/db.rs Outdated
Comment thread crates/levm/src/vm.rs
Comment thread crates/levm/src/vm.rs
Comment thread crates/levm/src/vm.rs

@ilitteri ilitteri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great work! We're close to merge it. Left some comments.

belfortep and others added 7 commits September 30, 2024 10:51
Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com>
Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com>
Co-authored-by: Luca Lazcano <64329820+lazcanoluca@users.noreply.github.com>

@ilitteri ilitteri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ilitteri ilitteri added this pull request to the merge queue Sep 30, 2024
Merged via the queue into main with commit 3df6cb9 Sep 30, 2024
@ilitteri ilitteri deleted the levm/feat/block_information branch September 30, 2024 14:42
emirongrr pushed a commit to emirongrr/ethrex that referenced this pull request Nov 10, 2024
**Motivation**

Adds most of block information opcodes to the VM

**Description**

- Adds the implementation of all block information opcodes except
selfbalance and blobhash, which needs the implementation of accounts and
transactions
- Adds tests for the implemented opcodes

<!-- Link to issues: Resolves lambdaclass#111, Resolves lambdaclass#222 -->

Closes lambdaclass#502
Closes lambdaclass#503
Closes lambdaclass#504
Closes lambdaclass#505
Closes lambdaclass#506
Closes lambdaclass#507
Closes lambdaclass#508
Closes lambdaclass#510
Closes lambdaclass#511

---------

Co-authored-by: Luca Lazcano <64329820+lazcanoluca@users.noreply.github.com>
Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com>
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.

Opcode: PREVRANDAO Opcode: NUMBER Opcode: TIMESTAMP Opcode: COINBASE Opcode: BLOCKHASH

3 participants