ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.65k stars 3.28k forks source link

bug: L2Genesis generation #12105

Closed allnil closed 1 month ago

allnil commented 1 month ago

Hey, I'm trying to deploy a rollup an stuck on L2 genesis generation because of an error:

I do next command:

forge script scripts/L2Genesis.s.sol:L2Genesis --chain-id $CHAIN_ID --sig "runWithAllUpgrades()" --private-key $GS_ADMIN_PRIVATE_KEY

and got next result

{\"finalSystemOwner\":\"0x982dBBD4304747f49fA8D50402E02b1C680a126B\",\"superchainConfigGuardian\":\"0x982dBBD4304747f49fA8D50402E02b1C680a126B\"}"
    ├─ [0] VM::writeJson("<stringified JSON>", "/Users/nilmedvedev/Projects/DLL/optimism/packages/contracts-bedrock/deployments/9496-deploy.json")
    │   └─ ← [Return]
    ├─ [0] VM::parseJsonAddress("<stringified JSON>", "$.l1StartingBlockTag") [staticcall]
    │   └─ ← [Revert] vm.parseJsonAddress: failed parsing "0x91a59a89c0e9d2a5f763e5c9f1e9bec737a1f93f2afbb1055b881754617e16ad" as type `address`: parser error:
0x91a59a89c0e9d2a5f763e5c9f1e9bec737a1f93f2afbb1055b881754617e16ad
^
Invalid string length
    └─ ← [Revert] vm.parseJsonAddress: failed parsing "0x91a59a89c0e9d2a5f763e5c9f1e9bec737a1f93f2afbb1055b881754617e16ad" as type `address`: parser error:
0x91a59a89c0e9d2a5f763e5c9f1e9bec737a1f93f2afbb1055b881754617e16ad
^
Invalid string length

I've also tried

just genesis

the result is the same

I think that's cause this function from Artifacts.s.sol is called underneath:

    /// @notice Setup function. The arguments here
    function setUp() public virtual {
        deploymentOutfile = Config.deploymentOutfile();
        console.log("Writing artifact to %s", deploymentOutfile);
        ForgeArtifacts.ensurePath(deploymentOutfile);

        uint256 chainId = Config.chainID();
        console.log("Connected to network with chainid %s", chainId);

        // Load addresses from a JSON file if the CONTRACT_ADDRESSES_PATH environment variable
        // is set. Great for loading addresses from `superchain-registry`.
        string memory addresses = Config.contractAddressesPath();
        if (bytes(addresses).length > 0) {
            console.log("Loading addresses from %s", addresses);
            _loadAddresses(addresses);
        }
    }

_loadAddresses(addresses); l1StartingBlockTag - is parsed as an address

thx!

allnil commented 1 month ago

got help in discord, try some other ways, thx