I have two independent private chains running with unique genesis file each. If we use same accounts in both the chains is there a way to copy the state or data of chain 1 to chain 2.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
So you basically want to do a backup & restore. I've been looking into this, to update our genesis configuration for a private Parity chain, but never go to actually try it.
As far as I know there's no clean way to do this, without exporting state
parity export state, see Parity docs. This command requires the chain to be synced with –fat-db on. You can use the JSON output in the accounts section of your new chain. Rename state to accounts and remove the keys that the node complains about (code_hash and storage_root - these are calculated at runtime). All nodes that are using that genesis need to import
parity import before syncing with the network, or use
I received this previously from Parity's support. See https://github.com/openethereum/openethereum/issues/10304