0xPolygon / polygon-edge

A Framework for Building Ethereum-compatible Blockchain Networks
https://polygon.technology/solutions/polygon-edge/
Apache License 2.0
1k stars 521 forks source link

Error when writing Genesis Block - GenesisProxy.protectSetUpProxy contract call was reverted: Already Protected #2196

Open DeathGamer111 opened 2 months ago

DeathGamer111 commented 2 months ago

Description

I suffered a catastrophic issue with my original chain which ran for over 15 million blocks. The local GETH Rootchain I was running failed due to corrupted data after a power outage caused a unsafe shutdown. Upon restarting, it auto truncated the chain and completely ruined the blockchain data. Since the Rootchain no longer functioned, neither did my Edge powered chain.

In an attempt to fix this, I tried using the Regenesis process to start a new Edge chain using the old data. I was successfully able to recover the old Trie data and go through the Regenesis process with no issue at all (Create Genesis file, Deploy Stake Manager, Deploy Rootchain Contracts, Whitelist Validators, Register Validators, Stake Validators, and Finalize Genesis Set). The issue arises once I go to start the new chain after the Regenesis Process and copying over old Trie Data. For reference, I have started an entirely new Rootchain and Edge nodes, using new keys across the board.

The error I receive is:

"Error writing genesis block: GenesisProxy.protectSetUpProxy contract call was reverted: Already Protected"

Could this be an issue because the Trie Data from the previous chain contains the GenesisProxy contract at the same address?

Your environment

Steps to reproduce