-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Introduce blobbasefee #14755
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
Merged
Merged
Introduce blobbasefee #14755
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -752,8 +752,8 @@ This document does not want to be a full description of the Ethereum virtual mac | |
| Please refer to a different document if you are interested in the precise semantics. | ||
|
|
||
| Opcodes marked with ``-`` do not return a result and all others return exactly one value. | ||
| Opcodes marked with ``F``, ``H``, ``B``, ``C``, ``I``, ``L`` and ``P`` are present since Frontier, | ||
| Homestead, Byzantium, Constantinople, Istanbul, London or Paris respectively. | ||
| Opcodes marked with ``F``, ``H``, ``B``, ``C``, ``I``, ``L``, ``P`` and ``N`` are present since Frontier, | ||
| Homestead, Byzantium, Constantinople, Istanbul, London, Paris or Cancun respectively. | ||
|
Comment on lines
+755
to
+756
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why |
||
|
|
||
| In the following, ``mem[a...b)`` signifies the bytes of memory starting at position ``a`` up to | ||
| but not including position ``b`` and ``storage[p]`` signifies the storage contents at slot ``p``. | ||
|
|
@@ -919,6 +919,8 @@ the ``dup`` and ``swap`` instructions as well as ``jump`` instructions, labels a | |
| +-------------------------+-----+---+-----------------------------------------------------------------+ | ||
| | basefee() | | L | current block's base fee (EIP-3198 and EIP-1559) | | ||
| +-------------------------+-----+---+-----------------------------------------------------------------+ | ||
| | blobbasefee() | | N | current block's blob base fee (EIP-7516 and EIP-4844) | | ||
| +-------------------------+-----+---+-----------------------------------------------------------------+ | ||
| | origin() | | F | transaction sender | | ||
| +-------------------------+-----+---+-----------------------------------------------------------------+ | ||
| | gasprice() | | F | gas price of the transaction | | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
test/libsolidity/semanticTests/inlineAssembly/blobbasefee_shanghai_function.sol
|
nikola-matic marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| contract C { | ||
| function f() public view returns (uint ret) { | ||
| assembly { | ||
| let blobbasefee := 999 | ||
| ret := blobbasefee | ||
| } | ||
| } | ||
| function g() public pure returns (uint ret) { | ||
| assembly { | ||
| function blobbasefee() -> r { | ||
| r := 1000 | ||
| } | ||
| ret := blobbasefee() | ||
| } | ||
| } | ||
| } | ||
| // ==== | ||
| // EVMVersion: <=shanghai | ||
| // ---- | ||
| // f() -> 999 | ||
| // g() -> 1000 |
17 changes: 17 additions & 0 deletions
17
test/libsolidity/semanticTests/state/block_blobbasefee.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| contract C { | ||
| function f() public view returns (uint) { | ||
| return block.blobbasefee; | ||
| } | ||
| function g() public view returns (uint ret) { | ||
| assembly { | ||
| ret := blobbasefee() | ||
| } | ||
| } | ||
| } | ||
| // ==== | ||
| // EVMVersion: >=cancun | ||
| // ---- | ||
| // f() -> 1 | ||
| // g() -> 1 | ||
| // f() -> 1 | ||
| // g() -> 1 |
12 changes: 12 additions & 0 deletions
12
test/libsolidity/syntaxTests/inlineAssembly/blobbasefee_reserved_cancun.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| contract C { | ||
| function f() public view returns (uint ret) { | ||
| assembly { | ||
| let blobbasefee := sload(0) | ||
| ret := blobbasefee | ||
| } | ||
| } | ||
| } | ||
| // ==== | ||
| // EVMVersion: >=cancun | ||
| // ---- | ||
| // ParserError 5568: (98-109): Cannot use builtin function name "blobbasefee" as identifier name. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
test/libsolidity/syntaxTests/types/magic_block_blobbasefee_cancun.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| contract C { | ||
| function f() public view returns (uint) { | ||
| return block.blobbasefee; | ||
| } | ||
| function g() public view returns (uint ret) { | ||
| assembly { | ||
| ret := blobbasefee() | ||
| } | ||
| } | ||
| } | ||
| // ==== | ||
| // EVMVersion: >=cancun | ||
| // ---- |
16 changes: 16 additions & 0 deletions
16
test/libsolidity/syntaxTests/types/magic_block_blobbasefee_error.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| contract C { | ||
| function f() public view returns (uint) { | ||
| return block.blobbasefee; | ||
| } | ||
| function g() public view returns (uint ret) { | ||
| assembly { | ||
| ret := blobbasefee() | ||
| } | ||
| } | ||
| } | ||
| // ==== | ||
| // EVMVersion: =shanghai | ||
| // ---- | ||
| // TypeError 1006: (74-91): "blobbasefee" is not supported by the VM version. | ||
| // DeclarationError 4619: (187-198): Function "blobbasefee" not found. | ||
| // DeclarationError 8678: (180-200): Variable count for assignment to "ret" does not match number of values (1 vs. 0) |
13 changes: 13 additions & 0 deletions
13
test/libsolidity/syntaxTests/viewPureChecker/blobbasefee_not_pure.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| contract C { | ||
| function f() public pure { | ||
| assembly { pop(blobbasefee()) } | ||
| } | ||
| function g() public pure returns (uint) { | ||
| return block.blobbasefee; | ||
| } | ||
| } | ||
| // ==== | ||
| // EVMVersion: >=cancun | ||
| // ---- | ||
| // TypeError 2527: (67-80): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". | ||
| // TypeError 2527: (151-168): Function declared as pure, but this expression (potentially) reads from the environment or state and thus requires "view". |
10 changes: 10 additions & 0 deletions
10
...solidity/syntaxTests/viewPureChecker/inline_assembly_instructions_allowed_view_cancun.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| contract C { | ||
| function f() public view { | ||
| assembly { | ||
| pop(blobbasefee()) | ||
| } | ||
| } | ||
| } | ||
| // ==== | ||
| // EVMVersion: >=cancun | ||
| // ---- |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.