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

Cancun Support #14739

Closed
9 tasks done
ekpyron opened this issue Dec 20, 2023 · 7 comments
Closed
9 tasks done

Cancun Support #14739

ekpyron opened this issue Dec 20, 2023 · 7 comments
Labels
high impact Changes are very prominent and affect users or the project in a major way. medium effort Default level of effort selected for development It's on our short-term development
Milestone

Comments

@ekpyron
Copy link
Member

ekpyron commented Dec 20, 2023

Prerequisites:

We need full support for the EIPs of Cancun:

Additionally we will need to:

@ekpyron ekpyron added selected for development It's on our short-term development medium effort Default level of effort high impact Changes are very prominent and affect users or the project in a major way. feature labels Dec 20, 2023
@ekpyron ekpyron mentioned this issue Dec 20, 2023
4 tasks
@ekpyron ekpyron added this to the 0.8.24 milestone Dec 20, 2023
@ekpyron ekpyron removed the feature label Dec 20, 2023
@r0qs
Copy link
Member

r0qs commented Dec 26, 2023

* [ ]  [EIP-4788: Beacon block root in the EVM](https://eips.ethereum.org/EIPS/eip-4788)
  TODO: verify if there's anything for us to do here.

Regarding this item, I did some research, and it appears that the current proposal does not require any changes in the compiler. Instead, it involves modifications to the execution and consensus clients. Although, while reading the EIP I thought that the parent_beacon_block_root would be exposed at the language level, but this does not seem to be the case according to the current specification.

Originally, the EIP was drafted requiring a new opcode (BEACON_STATE_ROOT at 0x4A, now used by BLOBBASEFEE), but it was later modified to incorporate a "stateful" precompile. More recently, another change was made, the "stateful" precompile idea was dropped, and now the EIP proposes the use of what is now referred to as a "system contract". As per the current specification, the parent_beacon_block_root would be passed as calldata to the system contract (which would have the bytecode directly deployed at the given system address), and the execution clients would write to or read from the EVM state through a system transaction. I may have misunderstood something, so it would be helpful if someone else could confirm this as well.

@cameel
Copy link
Member

cameel commented Jan 5, 2024

I can confirm @r0qs analysis, there's nothing for us to do there. It's implemented as a system contract and does not add any new opcodes. The fact that EIP-4788 is never mentioned in evmc 10.1...11 diff (including the changelog) confirms that.

BTW, thanks for digging into the history of this EIP. Reading it now, I see no mention that it went from opcode, to precompile, to system contract, so that's useful to know.

@cameel
Copy link
Member

cameel commented Jan 5, 2024

Actually, maybe absence of this in evmc does not really confirm it (e.g. MCOPY does not require any changes there either).

On the evmone side the change was done in ethereum/evmone#709. Still, looks like this does not require any special compiler support. The VM automatically executes the system call that updates the circular buffer with block roots before every block. It does not deploy the system contract on its own, but, as far as I understand the EIP, it's not really the responsibility of the VM. Presence of the contract is optional.

It might at most affect our testing if we wanted to include contracts that call this system contract. For that I guess we'd have to deploy it when we set up the test environment? That does not seem like something we need right now though.

@cameel cameel moved this from To do to In Progress in Solidity Focus Board Jan 5, 2024
@cameel
Copy link
Member

cameel commented Jan 12, 2024

For EIP-6780: SELFDESTRUCT only in same transaction we may need some changes in tests. At least the self-destructed contracts should no longer be cleared:

solidity/test/EVMHost.cpp

Lines 186 to 187 in fbbac9c

for (auto& [address, _]: recorded_selfdestructs)
accounts.erase(address);

This might not be the only change.

@k06a
Copy link

k06a commented Feb 22, 2024

Any plans to have transient modifier for variables?

@cameel
Copy link
Member

cameel commented Feb 23, 2024

It's planned but not a priority at the moment. Other things, especially the new type system and improving the IR pipeline before we enable it by default, take precedence.

@cameel
Copy link
Member

cameel commented Mar 13, 2024

#13889 was the last thing to do here and it's done so I'm closing the issue.

@cameel cameel closed this as completed Mar 13, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Solidity Focus Board Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high impact Changes are very prominent and affect users or the project in a major way. medium effort Default level of effort selected for development It's on our short-term development
Projects
Archived in project
Development

No branches or pull requests

4 participants