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

feat: add support for EraVM Extensions #357

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

kiriyaga-txfusion
Copy link
Contributor

@kiriyaga-txfusion kiriyaga-txfusion commented Dec 13, 2024

What ❔

Add support for the enableEraVMExtension flag (formerly isSystem) in the verification process.

Why ❔

Ensuring it matches the settings used during compilation.

image

fixes #331

Checklist

  • [+] PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • [+] Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

Copy link

github-actions bot commented Dec 13, 2024

API E2E Test Results

207 tests   207 ✅  19s ⏱️
 14 suites    0 💤
  1 files      0 ❌

Results for commit f7f4713.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 13, 2024

Unit Test Results

    4 files    264 suites   12m 57s ⏱️
2 147 tests 2 146 ✅ 1 💤 0 ❌
2 361 runs  2 360 ✅ 1 💤 0 ❌

Results for commit f7f4713.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 13, 2024

Visit the preview URL for this PR:
https://staging-scan-v2--pr-357-fjmsk7ts.web.app

Romsters
Romsters previously approved these changes Jan 22, 2025
@Romsters
Copy link
Collaborator

E2E tests have to be fixed

Copy link
Collaborator

@vasyl-ivanchuk vasyl-ivanchuk left a comment

Choose a reason for hiding this comment

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

@kiriyaga-txfusion I believe the field should be passed to the contract verifier as enableEraVMExtensions, not as enableEraVMExtensionsUsed as it is right now.

Feel free to check the schema in the contract verifier’s incoming request type here.

Other than that, everything looks good.

@kiriyaga-txfusion
Copy link
Contributor Author

kiriyaga-txfusion commented Jan 28, 2025

@kiriyaga-txfusion I believe the field should be passed to the contract verifier as enableEraVMExtensions, not as enableEraVMExtensionsUsed as it is right now.

Feel free to check the schema in the contract verifier’s incoming request type here.

Other than that, everything looks good.

I included it as enableEraVMExtensions in line

@vasyl-ivanchuk
Copy link
Collaborator

@kiriyaga-txfusion I believe the field should be passed to the contract verifier as enableEraVMExtensions, not as enableEraVMExtensionsUsed as it is right now.
Feel free to check the schema in the contract verifier’s incoming request type here.
Other than that, everything looks good.

I included it as enableEraVMExtensions in line

@kiriyaga-txfusion ,

  1. For the multipart-part verification the request to the verification service looks like this:
{
    "contractName": "Greeter.sol:Greeter",
    "codeFormat": "solidity-standard-json-input",
    "contractAddress": "...",
    "optimizationUsed": true,
    "enableEraVMExtensionsUsed": true,
    "sourceCode": {
        "language": "Solidity",
        "sources": {
            "Greeter.sol": {
                "content": "..."
            }
        },
        "settings": {
            "optimizer": {
                "enabled": true
            },
            "enableEraVMExtensions": true
        }
    },
    "compilerZksolcVersion": "vm-1.5.0-a167aa3",
    "compilerSolcVersion": "0.8.28"
}
  • even though the enableEraVMExtensionsUsed is ignored by the verification service, let's not sent it as it not needed.
  • enableEraVMExtensions - looks good.
  1. For the single-file verification the request to the verification service looks like this:
{
    "contractName": "contracts/Greeter.sol:Greeter",
    "codeFormat": "solidity-single-file",
    "contractAddress": "....",
    "optimizationUsed": true,
    "enableEraVMExtensionsUsed": false,
    "sourceCode": "...",
    "compilerZksolcVersion": "vm-1.5.0-a167aa3",
    "compilerSolcVersion": "0.8.28"
}

since the sourceCode in this case is a string, enableEraVMExtensions should be sent in the root of the payload as enableEraVMExtensions but it's not the case.

And in general I'd rename enableEraVMExtensionsUsed filed in the form & types definition to enableEraVMExtensions as this way it matches the compiler setting name.

@kiriyaga-txfusion
Copy link
Contributor Author

kiriyaga-txfusion commented Jan 29, 2025

@kiriyaga-txfusion I believe the field should be passed to the contract verifier as enableEraVMExtensions, not as enableEraVMExtensionsUsed as it is right now.
Feel free to check the schema in the contract verifier’s incoming request type here.
Other than that, everything looks good.

I included it as enableEraVMExtensions in line

@kiriyaga-txfusion ,

  1. For the multipart-part verification the request to the verification service looks like this:
{
    "contractName": "Greeter.sol:Greeter",
    "codeFormat": "solidity-standard-json-input",
    "contractAddress": "...",
    "optimizationUsed": true,
    "enableEraVMExtensionsUsed": true,
    "sourceCode": {
        "language": "Solidity",
        "sources": {
            "Greeter.sol": {
                "content": "..."
            }
        },
        "settings": {
            "optimizer": {
                "enabled": true
            },
            "enableEraVMExtensions": true
        }
    },
    "compilerZksolcVersion": "vm-1.5.0-a167aa3",
    "compilerSolcVersion": "0.8.28"
}
  • even though the enableEraVMExtensionsUsed is ignored by the verification service, let's not sent it as it not needed.
  • enableEraVMExtensions - looks good.
  1. For the single-file verification the request to the verification service looks like this:
{
    "contractName": "contracts/Greeter.sol:Greeter",
    "codeFormat": "solidity-single-file",
    "contractAddress": "....",
    "optimizationUsed": true,
    "enableEraVMExtensionsUsed": false,
    "sourceCode": "...",
    "compilerZksolcVersion": "vm-1.5.0-a167aa3",
    "compilerSolcVersion": "0.8.28"
}

since the sourceCode in this case is a string, enableEraVMExtensions should be sent in the root of the payload as enableEraVMExtensions but it's not the case.

And in general I'd rename enableEraVMExtensionsUsed filed in the form & types definition to enableEraVMExtensions as this way it matches the compiler setting name.

Ah yes, you're right! For single files, we need to send that parameter separately. Thanks a lot! I will fix it ASAP.

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.

Add isSystem flag to the explorer UI for verification
4 participants