OffchainLabs / nitro

Nitro goes vroom and fixes everything
Other
752 stars 446 forks source link

generate the same addresses of `ethBridge` for `local` environment #1130

Closed bradyjoestar closed 2 years ago

bradyjoestar commented 2 years ago

Currently we temp-generated the different sequencer and validator key in test-node.bash, and the we used the sequencer to deploy eth-bridge contracts on L1. It will cause that our localNetwork.json different every time.

Maybe we could use the pre-generated key as sequencer and validator keys.

For example, change the

docker-compose run geth account new --password /root/.ethereum/passphrase --keystore /keystore
docker-compose run geth account new --password /root/.ethereum/passphrase --keystore /keystore

to


docker-compose run --entrypoint sh geth -c "echo 2c1fca7289205bb4d52ed188b648be71bc6df6aea79e45d6ee5a78800ea51aca > /root/.ethereum/tmp-funnelkey"
docker-compose run geth account import --password /root/.ethereum/passphrase --keystore /keystore /root/.ethereum/tmp-funnelkey
docker-compose run --entrypoint sh geth -c "rm /root/.ethereum/tmp-funnelkey"

docker-compose run --entrypoint sh geth -c "echo 906e302ee087e7dc2b15b226c6d5f05df0ff35d9c7b75f1080c0baaf5667da67 > /root/.ethereum/tmp-funnelkey"
docker-compose run geth account import --password /root/.ethereum/passphrase --keystore /keystore /root/.ethereum/tmp-funnelkey
docker-compose run --entrypoint sh geth -c "rm /root/.ethereum/tmp-funnelkey"
gzeoneth commented 2 years ago

would be resolved in https://github.com/OffchainLabs/nitro/pull/1120

bradyjoestar commented 2 years ago

would be resolved in #1120

awesome!