ethereum-optimism / ethereum-optimism/optimism

Issues after Deploying Custom Gas Token L2 Chain.

Open
#13,007 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 15h
Merged PRs (30d)
145

Description

**Bug Description**
I recently re-deployed a custom gas token chain for a client using the tag op-contracts/v2.0.0-beta.2. However, when running the cast command to check the custom gas token configuration, I observed inconsistent behavior. The command cast call to check isCustomGasToken() returns true for a system config proxy address but false and "Wrapped Ether" for a pre-deployed contract, despite both being part of a custom gas token chain.
Although I am not able to bridge Eth to L2 which confirms that Custom Gas token is being used and I was able to Bridge erc 20 (Custom Gas token) from L1 to L2 and was able to do the txns as well. So now I am not sure if it is just some bug in pre deploy or some issue in the network itself.

**Steps to Reproduce**
Re-deploy a custom gas token chain using the op-contracts/v2.0.0-beta.2 tag.

Run the following commands:
First one is System Config address on L1.
`cast call --rpc-url $Holesky_RPC 0xC8A1b1A61677005fBEC4a12EB14f42C5343BADcC 'isCustomGasToken()(bool)'
`true
`cast call --rpc-url http://localhost:8545 0x4200000000000000000000000000000000000006 'name()(string)'
`Wrapped Ether
`cast call --rpc-url http://localhost:8545 0x4200000000000000000000000000000000000015 'isCustomGasToken()(bool)'
`false

**Expected behavior**

The isCustomGasToken() function should return true for all addresses associated with the custom gas token chain, and the name should reflect the correct custom gas token configuration. Specifically, I expected both system config proxies and pre-deployed contracts to return accurate values.

**Environment Information:**

Operating System: Ubuntu 22.04.5 LTS
op-node Version: v1.9.5
op-geth Version: v1.101411.1
op-contracts Tag: v2.0.0-beta.2/ v2.0.0-beta.3(tried Both)

**Configurations:**
This is the deploy config
```shell
{
"l1StartingBlockTag": "0x58a84a53dd99ba092bdf738a894cefc5cf5ac542de5cbae07add320f116ba56b",
"l1ChainID": 17000,
"l2ChainID": 7870,
"l2BlockTime": 2,
"l1BlockTime": 12,
"maxSequencerDrift": 600,
"sequencerWindowSize": 3600,
"channelTimeout": 300,
"p2pSequencerAddress": "0x34A822b3DBb7DD10D777b3f80DCe8F9E668a9B0d",
"batchInboxAddress": "0xff00000000000000000000000000000000007870",
"batchSenderAddress": "0xDc3B8E879A9c4124a2f517FA8019d711f91825A0",
"l2OutputOracleSubmissionInterval": 120,
"l2OutputOracleStartingBlockNumber": 0,
"l2OutputOracleStartingTimestamp": 1732171968,
"l2OutputOracleProposer": "0x5fc7d339C1074AB0095edfB81855421e8BA86800",
"l2OutputOracleChallenger": "0x576dBb6e5E0F77A3Ae59C983B4304E6aD9D8999f",
"finalizationPeriodSeconds": 12,
"proxyAdminOwner": "0x576dBb6e5E0F77A3Ae59C983B4304E6aD9D8999f",
"baseFeeVaultRecipient": "0x0768E249fbD704447F5F23f0a203c3523810B8D6",
"l1FeeVaultRecipient": "0x0768E249fbD704447F5F23f0a203c3523810B8D6",
"sequencerFeeVaultRecipient": "0x0768E249fbD704447F5F23f0a203c3523810B8D6",
"finalSystemOwner": "0x576dBb6e5E0F77A3Ae59C983B4304E6aD9D8999f",
"superchainConfigGuardian": "0x576dBb6e5E0F77A3Ae59C983B4304E6aD9D8999f",
"baseFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"l1FeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"sequencerFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000",
"baseFeeVaultWithdrawalNetwork": 1,
"l1FeeVaultWithdrawalNetwork": 1,
"sequencerFeeVaultWithdrawalNetwork": 1,
"gasPriceOracleBaseFeeScalar": 2001,
"gasPriceOracleBlobBaseFeeScalar": 1198951,
"enableGovernance": false,
"governanceTokenSymbol": "OP",
"governanceTokenName": "Optimism",
"governanceTokenOwner": "0x576dBb6e5E0F77A3Ae59C983B4304E6aD9D8999f",
"l2GenesisBlockGasLimit": "0x1c9c380",
"l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
"l2GenesisRegolithTimeOffset": "0x0",
"l2GenesisCanyonTimeOffset": "0x0",
"l2GenesisDeltaTimeOffset": "0x0",
"l2GenesisEcotoneTimeOffset": "0x0",
"l1CancunTimeOffset": "0x0",
"l2GenesisFjordTimeOffset": "0x0",
"l2GenesisGraniteTimeOffset": "0x0",
"eip1559Denominator": 50,
"eip1559DenominatorCanyon": 250,
"eip1559Elasticity": 6,
"systemConfigStartBlock": 0,
"requiredProtocolVersion": "0x0000000000000000000000000000000000000003000000010000000000000000",
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000003000000010000000000000000",
"faultGameAbsolutePrestate": "0x0385c3f8ee78491001d92b90b07d0cf387b7b52ab9b83b4d87c994e92cf823ba",
"faultGameMaxDepth": 73,
"faultGameClockExtension": 3600,
"faultGameMaxClockDuration": 14400,
"faultGameGenesisBlock": 0,
"faultGameGenesisOutputRoot": "0x91bd00ecd596a86c9f4e12c0646578e77022881c87c06ec6aa31e656d2730688",
"faultGameSplitDepth": 30,
"faultGameWithdrawalDelay": 600,
"preimageOracleMinProposalSize": 126000,
"preimageOracleChallengePeriod": 10800,
"proofMaturityDelaySeconds": 1200,
"disputeGameFinalityDelaySeconds": 600,
"respectedGameType": 0,
"FundDevAccounts": false,
"useFaultProofs": false,
"useCustomGasToken": true,
"customGasTokenAddress": "0xCe9082dA730E31E3510bdE44909a63b07Fa4136C"
}
```

**Logs:**

**Additional context**

---

⚠️ **Notice:** Issues that do not include the following sections will be subject to closure:
- Bug Description
- Steps to Reproduce
- Environment Information

Please ensure all required sections are filled out accurately to expedite the debugging process and improve issue resolution efficiency.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the three cast calls against a chain deployed from op-contracts/v2.0.0-beta.2 and compare the SystemConfig proxy with the 0x4200000000000000000000000000000000000006 and 0x...15 predeploys. Trace the customGasTokenAddress and predeploy configuration across the deployment, op-node, and op-geth setup; done means all relevant addresses report the configured token consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, solidity
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.