-
Notifications
You must be signed in to change notification settings - Fork 16
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
Refactor core, ecdsa, tbtc and tbtc-dapp Installation Into Their Own Script #60
Conversation
When we restart `geth`, we need to re-deploy all of our contracts. Unfortunately, running `install.sh` is going to try to refetch master which may not be what we want (we might be making changes) and also takes time. Instead, we refactor the installation of core, ecdsa, tbtc and tbtc-dapp into their own `install-applications-with-contracts.sh` script which is invoked from `install.sh`. This allows us to simply run `install-applications-with-contracts.sh` if `geth` was restarted at some point.
Verified that everything is working - gave this a test drive today when I re-installed and ran everything from complete scratch. I was also able to shut down geth and bitcoind, start them back up, and then run |
install.sh
Outdated
# Install tBTC dApp. | ||
./install-tbtc-dapp.sh | ||
# Install applications and their contracts | ||
./install-applications-with-contracts.sh | ||
|
||
# Do not install keep dashboard dApp for e2e nightly test | ||
if [[ $E2E_TEST != true ]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about moving this 'if' statement along with ./install-keep-dashboard.sh
to install-applications-with-contracts.sh
as well? This way, Keep Dashboard dApp installation script will be in the same place as tBTC dApp. One can pass env var E2E_TEST=true ./install.sh
when working only in tBTC world and doesn't need Keep Dashboard.
Also, I'm wondering if it makes sense to rename $E2E_TEST -> $INCLUDE_KEEP_DASHBOARD, ie:
# Install keep dashboard dApp when it is needed. In most cases we do not need
# Keep Dashboard when working on e2e tests or working on tBTC.
if [[ $INCLUDE_KEEP_DASHBOARD == true ]]
then
# Install Keep Dashboard.
./install-keep-dashboard.sh
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about moving this 'if' statement along with ./install-keep-dashboard.sh to install-applications-with-contracts.sh as well?
💯
I'm wondering if it makes sense to rename $E2E_TEST -> $INCLUDE_KEEP_DASHBOARD
My only hesitation there would be the case where $E2E_TEST
is being used in our testing scripts or build tool scripts or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha - In that case I think it would be better if we scoped this PR to just the script changes and leave refactoring $E2E_TEST
for another PR. That okay with you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, changes around scripts look good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created issue to rename $E2E_TEST
#63
…s.sh This prepares us to include ./install-keep-dashboard.sh as a part of install-applications.sh
When we restart
geth
, we need to re-deploy all of our contracts.Unfortunately, running
install.sh
is going to try to refetch masterwhich may not be what we want (we might be making changes) and also
takes time.
Instead, we refactor the installation of core, ecdsa, tbtc and tbtc-dapp
into their own
install-applications-with-contracts.sh
script which isinvoked from
install.sh
. This allows us to simply runinstall-applications-with-contracts.sh
ifgeth
was restarted at somepoint.
tagging @dimpar for review since we spit-balled it a bit