Skip to content

feat: add support for EraVM Extensions#357

Open
kiriyaga-txfusion wants to merge 10 commits into
mainfrom
kiriyaga-txfusion-add-enable-eraVM-extension
Open

feat: add support for EraVM Extensions#357
kiriyaga-txfusion wants to merge 10 commits into
mainfrom
kiriyaga-txfusion-add-enable-eraVM-extension

Conversation

@kiriyaga-txfusion
Copy link
Copy Markdown
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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 13, 2024

API E2E Test Results

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

Results for commit 510493c.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 13, 2024

Unit Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 510493c.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 13, 2024

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

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

E2E tests have to be fixed

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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