Skip to content

Commit

Permalink
Merge pull request #412 from rsksmart/basefee-opcode
Browse files Browse the repository at this point in the history
RSKIP-412 for basefee opcode
  • Loading branch information
aeidelman authored Dec 12, 2023
2 parents ff8327a + 4cdb525 commit c562601
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
42 changes: 42 additions & 0 deletions IPs/RSKIP412.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
rskip: 412
title: BASEFEE instruction
description:
status: Draft
purpose: Usa
author: VK
layer: Core
complexity: 2
created: 2023/11/9
---
# BASEFEE instruction


|RSKIP | 412 |
| :------------ |:--------------------|
|**Title** | BASEFEE instruction |
|**Created** | NOV-2023 |
|**Author** | VK |
|**Purpose** | Usa |
|**Layer** | Core |
|**Complexity** | 2 |
|**Status** | Draft |


# **Abstract**

This RSKIP implements [Ethereum BASEFEE instruction](https://eips.ethereum.org/EIPS/eip-3198). The `BASEFEE (0x48)` opcode returns the base fee value of the current block it is executing in.

# **Motivation**

In order to maintain compatibility with the EVM, Rootstock needs to implement the `BASEFEE` opcode.

There's an important difference when comparing *Rootstock* vs *ETH* `BASEFEE` opcode: as Rootstock doesn't define a base fee for its blocks, the block `minimum gas price` is returned instead. More details on the specification section.

# **Specification**

The `BASEFEE` opcode pushes onto the stack the minimum gas price of the block in which the transaction is being executed. The cost of the `BASEFEE` opcode is 2.

# **Copyright**

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ You can find an easily browseable version of this information [here](https://ips
| 388 |[Network Upgrade: Fingerroot](IPs/RSKIP388.md)| 31-MAY-23 | AE | Usa,Sec | Core | 2 | Adopted |
| 398 |[PUSH0 instruction](IPs/RSKIP398.md)| 11-JUL-23 | VK | Sca | Core | 2 | Draft |
| 400 |[Calldata gas cost reduction](IPs/RSKIP400.md)| 12-JUL-23 | VK | Sca | Core | 2 | Draft |
| 412 |[BASEFEE instruction](IPs/RSKIP412.md)| 9-NOV-23 | VK | Usa | Core | 2 | Draft |

(*) Under evaluation to be implemented in the next reference client release

Expand Down

0 comments on commit c562601

Please sign in to comment.