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

Port EVM precompiles from Moonbeam #11

Closed
wants to merge 6 commits into from

Conversation

fgamundi
Copy link
Contributor

Ports these EVM precompiled smart contracts from Moonbeam:

  • pallet-balances
  • batch
  • call-permit
  • xcm-utils

Also includes #10

Depends on Frontier's polkadot-evm/frontier#1246

fgamundi and others added 5 commits November 10, 2023 01:54
balances

Missing deps

xcm-utils precompile

Point to personal Frontier fork w XCM Codec utils

Batch precompile

Call permit precompile

Fix tests. Point Frontier to new branch

# Conflicts:
#	Cargo.toml
* Fix for the breaking change from polkadot v1.1.0

The pre/post_upgrade methods of a tuple of migrations should not be called directly.

* Fix formatting

* Adds cleanup action

* Adds cleanup action

* Adds cleanup action

* Adds cleanup action

#[cfg(feature = "try-runtime")]
fn post_upgrade(state: Vec<u8>) -> Result<(), sp_runtime::DispatchError> {
fn try_on_runtime_upgrade(checks: bool) -> Result<Weight, TryRuntimeError> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this not part of master?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, #10 was merged directly to the moonbeam-polkadot-v1.1.0 branch. Maybe it's better to create a separate PR to cherrypick that into master and leave this PR only for the precompiles. What do you think?

@@ -242,6 +242,21 @@ jobs:
CARGO_INCREMENTAL: "0"
SCCACHE_CACHE_SIZE: "100GB"
steps:
- name: Free Disk Space (Ubuntu)
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure why it was needed, also part of #10. @rimbi can you give a bit of insight on this, please?

Copy link
Collaborator

@librelois librelois Nov 13, 2023

Choose a reason for hiding this comment

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

because sometimes CI jobs fail due to a lack of disk space, and the disk space available on github runners isn't always the same, it's sometimes too small, so we need to free up space by deleting what's not needed.

Copy link
Collaborator

@girazoki girazoki left a comment

Choose a reason for hiding this comment

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

Provided that frontier changes are approved, I think this PR looks good. @librelois what do you think?

@fgamundi
Copy link
Contributor Author

This became a bit stale. Closing in favor of #21

@fgamundi fgamundi closed this Jan 25, 2024
@fgamundi fgamundi deleted the fg-evm-precompiles branch February 14, 2024 19:01
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.

3 participants