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

Panic unknown precompile config: contractNativeMinterConfig (Fuji) #226

Closed
wh00hw opened this issue Mar 11, 2024 · 1 comment · Fixed by #229
Closed

Panic unknown precompile config: contractNativeMinterConfig (Fuji) #226

wh00hw opened this issue Mar 11, 2024 · 1 comment · Fixed by #229
Assignees
Labels
bug Something isn't working

Comments

@wh00hw
Copy link
Contributor

wh00hw commented Mar 11, 2024

Describe the bug
Enabling contractNativeMinterConfig via precompile upgrades in Fuji results in awm-relayer panic

To Reproduce

  1. Setup [email protected] without contractNativeMinter precompile in the genesis, [email protected]
  2. Enable contractNativeMinterConfig through precompile upgrades
  3. Verify eth_getChainConfig and eth_getActivePrecompilesAt RPC APIs successfully reflect the upgrade
  4. Run [email protected] as usual

Logs

$:~/go/src/github.com/ava-labs/awm-relayer$ ./build/awm-relayer --config-file config.json
panic: couldn't initialize warp quorums: failed to initialize Warp quorum for destination subnet [redacted]: failed to fetch warp quorum for subnet [redacted]: failed to fetch chain config for blockchain [redacted]: unknown precompile config: contractNativeMinterConfig

goroutine 1 [running]:
main.main()
        /home/[redacted]/go/src/github.com/ava-labs/awm-relayer/main/main.go:53 +0x1b88
$:~/go/src/github.com/ava-labs/awm-relayer$ curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"eth_getChainConfig",
    "params" :[]
}' -H 'content-type:application/json;' localhost:9650/ext/bc/[redacted]/rpc
{"jsonrpc":"2.0","id":1,"result":{"byzantiumBlock":0,"chainId":[redacted],"constantinopleBlock":0,"durangoTimestamp":1707840000,"eip150Block":0,"eip155Block":0,"eip158Block":0,"feeConfig":{"gasLimit":8000000,"targetBlockRate":2,"minBaseFee":25000000000,"targetGas":50000000,"baseFeeChangeDenominator":36,"minBlockGasCost":0,"maxBlockGasCost":1000000,"blockGasCostStep":200000},"homesteadBlock":0,"istanbulBlock":0,"muirGlacierBlock":0,"petersburgBlock":0,"subnetEVMTimestamp":0,"upgrades":{"precompileUpgrades":[{"warpConfig":{"blockTimestamp":1708468830,"quorumNumerator":0}},{"contractNativeMinterConfig":{"adminAddresses":["[redacted]"],"blockTimestamp":1710103533}},{"contractNativeMinterConfig":{"blockTimestamp":1710106440,"disable":true}},{"warpConfig":{"blockTimestamp":1710106620,"disable":true,"quorumNumerator":0}},{"warpConfig":{"blockTimestamp":1710106980,"quorumNumerator":0}},{"contractNativeMinterConfig":{"adminAddresses":["[redacted]"],"blockTimestamp":1710112131}}]}}}
$ curl -X POST --data '{
    "jsonrpc": "2.0",
    "method": "eth_getActivePrecompilesAt",
    "params": [],
    "id": 1
}'  -H 'content-type:application/json;' localhost:9650/ext/bc/[redacted]/rpc
{"jsonrpc":"2.0","id":1,"result":{"contractNativeMinterConfig":{"adminAddresses":["[redacted]"],"blockTimestamp":1710112131},"warpConfig":{"blockTimestamp":1710106980,"quorumNumerator":0}}}

Operating System

Linux  5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64 GNU/Linux

Additional context
Even if eth_getChainConfig and eth_getActivePrecompilesAt RPC APIs reflect the upgrade, contractNativeMinterConfig precompile seems not registered in registeredModules (maybe related to [email protected]?) causing an error returned in [email protected] params/precompile_upgrade.go:43

image

@wh00hw wh00hw added the bug Something isn't working label Mar 11, 2024
@cam-schultz cam-schultz self-assigned this Mar 11, 2024
@cam-schultz cam-schultz moved this from Backlog 🗄️ to Researching 📚 in Platform Engineering Group Mar 11, 2024
@cam-schultz
Copy link
Collaborator

cam-schultz commented Mar 11, 2024

I was able to replicate this on Avalanchego v1.11.1 / subnet-evm v0.6.1. I was also able to reduce the repro steps to a call to ethclient.ChainConfig.

My repro setup used the Teleporter docker setup, and performs a precompile upgrade on the local network from within the local_network_run container. This setup does not have the native minter precompile activated at genesis.

  1. Clone teleporter
  2. Modify docker/run_relayer.sh by commenting out this line and replacing with a sleep or tail -f /dev/null
  3. Start up the containers by running ./scripts/local/run.sh
  4. After the networks are running, open a terminal in local_network_run and perform the precompile upgrade
  5. Wait until the activation time.
  6. Open a terminal in relayer_run and run /usr/bin/awm-relayer --config-file relayerConfig.json to observe the panic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants