-
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
Bring local-setup into the V2 era #156
Changes from 9 commits
88214ca
87744d6
4e72837
e4d92ed
678c622
2e83f60
32520a3
ab7a71d
c1569d7
aede19d
b195086
facc694
c42e76a
1a46f7c
8c71a0e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/.git | ||
**/node_modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,9 @@ | ||
[submodule "keep-core"] | ||
path = keep-core | ||
url = https://github.com/keep-network/keep-core.git | ||
[submodule "keep-ecdsa"] | ||
path = keep-ecdsa | ||
url = https://github.com/keep-network/keep-ecdsa.git | ||
[submodule "tbtc"] | ||
path = tbtc | ||
url = https://github.com/keep-network/tbtc.git | ||
[submodule "tbtc-dapp"] | ||
path = tbtc-dapp | ||
url = https://github.com/keep-network/tbtc-dapp.git | ||
[submodule "tbtc.js"] | ||
path = tbtc.js | ||
url = https://github.com/keep-network/tbtc.js.git | ||
[submodule "relays"] | ||
path = relays | ||
url = https://github.com/keep-network/relays.git | ||
[submodule "coverage-pools"] | ||
path = coverage-pools | ||
url = https://github.com/keep-network/coverage-pools.git | ||
path = keep-core | ||
url = https://github.com/keep-network/keep-core.git | ||
[submodule "solidity-contracts"] | ||
path = solidity-contracts | ||
url = https://github.com/threshold-network/solidity-contracts | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not in this PR but we could think about introducing some structure for submodules, for example:
With the current setup, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. went ahead and did it b195086 |
||
[submodule "tbtc-v2"] | ||
path = tbtc-v2 | ||
url = https://github.com/keep-network/tbtc-v2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
ARG NODE_VERSION=16.14.0 | ||
ARG ALPINE_VERSION=3.16 | ||
ARG PYTHON_VERSION=3.10.4 | ||
|
||
FROM node:${NODE_VERSION}-alpine AS node | ||
|
||
FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} | ||
|
||
COPY --from=node /usr/lib /usr/lib | ||
COPY --from=node /usr/local/share /usr/local/share | ||
COPY --from=node /usr/local/lib /usr/local/lib | ||
COPY --from=node /usr/local/include /usr/local/include | ||
COPY --from=node /usr/local/bin /usr/local/bin | ||
|
||
ENV GETH_DATA_DIR=/ethereum/data/ | ||
ENV GETH_ETHEREUM_ACCOUNT=0x944466f81e70c74c0f6b736ba72c7a69e475735a | ||
ENV KEEP_ETHEREUM_PASSWORD=password | ||
ENV NETWORK=development | ||
|
||
RUN apk update | ||
RUN apk add --update --no-cache bash git geth make gcc g++ && \ | ||
npm install --global yarn --force | ||
|
||
# There's a transitive git problem that this fixes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it this? Could be adding some reference in case the root cause is resolved in the future. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah! |
||
RUN git config --global url."https://".insteadOf git:// | ||
|
||
COPY ./solidity-contracts /solidity-contracts | ||
WORKDIR /solidity-contracts | ||
RUN git init | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i forget which repository needs to register as a git repo for the later commands to work, but it's at least one of them having the projects as submodules means that rather than having a I can definitely go back and see which ones we can safely remove! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh! i think the good catch! facc694 |
||
RUN yarn install | ||
RUN yarn build | ||
RUN yarn link | ||
RUN yarn prepack | ||
|
||
COPY ./keep-core /keep-core | ||
WORKDIR /keep-core | ||
RUN git init | ||
|
||
WORKDIR /keep-core/solidity/random-beacon | ||
RUN yarn install | ||
RUN yarn link @threshold-network/solidity-contracts | ||
RUN yarn build | ||
RUN yarn link | ||
RUN yarn prepack | ||
|
||
WORKDIR /keep-core/solidity/ecdsa | ||
RUN rm -rf .openzeppelin/unknown-*.json | ||
RUN yarn link @threshold-network/solidity-contracts | ||
RUN yarn link @keep-network/random-beacon | ||
RUN yarn install | ||
RUN yarn build | ||
RUN yarn link | ||
RUN yarn prepack | ||
|
||
COPY ./tbtc-v2 /tbtc-v2 | ||
WORKDIR /tbtc-v2 | ||
RUN git init | ||
WORKDIR /tbtc-v2/solidity | ||
RUN yarn install --network-timeout 1000000 && \ | ||
yarn build || true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll add a comment, but for whatever reason the first rather than go down that rabbit hole, i just have docker try to build it twice There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a comment: c42e76a |
||
RUN yarn link @threshold-network/solidity-contracts | ||
RUN yarn link @keep-network/random-beacon | ||
RUN yarn link @keep-network/ecdsa | ||
RUN yarn build | ||
RUN yarn prepack | ||
|
||
WORKDIR / | ||
|
||
ADD ./docker/geth/entrypoint.sh . | ||
|
||
CMD /entrypoint.sh |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
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.
This should hold ethereum explorer cache, right? I'm asking because I don't have this folder, despite successfully running the docker container (likely related to seeing
b-explorer | Error trying to update latest Transactions cache.
in the container logs).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.
The transaction cache stuff is expected - i'll call that out in the PR description
./docker/ethereum/.data/
is where we're storing ethereum chain data.docker-compose.yml
is handling the volume work for us: