-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gas-oracle: ci + docker build/publish
Adds a dockerfile for the `gas-oracle` as well as adding it as a service in the `docker-compose.yaml`. It is not enabled by default due to memory issues in CI already happening occasionally where the integration tests are oom killed. The `gas-oracle` is configured with a key that owns the `OVM_GasPriceOracle`. This PR adds the `gas-oracle` to the Github Actions workflow that is responsible for publishing the docker images.
- Loading branch information
Showing
6 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ tests/testdata | |
l2geth/signer/fourbyte | ||
l2geth/cmd/puppeth | ||
l2geth/cmd/clef | ||
go/gas-oracle/gas-oracle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM golang:1.15-alpine3.13 as builder | ||
|
||
RUN apk add --no-cache make gcc musl-dev linux-headers git jq bash | ||
|
||
ADD ./go/gas-oracle /gas-oracle | ||
RUN cd /gas-oracle && make gas-oracle | ||
|
||
FROM alpine:3.13 | ||
|
||
RUN apk add --no-cache ca-certificates jq curl | ||
COPY --from=builder /gas-oracle/gas-oracle /usr/local/bin/ | ||
|
||
COPY ./ops/scripts/gas-oracle.sh . | ||
ENTRYPOINT ["gas-oracle"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
|
||
RETRIES=${RETRIES:-40} | ||
|
||
if [[ -z $GAS_PRICE_ORACLE_ETHEREUM_HTTP_URL ]]; then | ||
echo "Must set env GAS_PRICE_ORACLE_ETHEREUM_HTTP_URL" | ||
exit 1 | ||
fi | ||
|
||
# waits for l2geth to be up | ||
curl --fail \ | ||
--show-error \ | ||
--silent \ | ||
--retry-connrefused \ | ||
--retry $RETRIES \ | ||
--retry-delay 1 \ | ||
--output /dev/null \ | ||
$GAS_PRICE_ORACLE_ETHEREUM_HTTP_URL | ||
|
||
exec gas-oracle "$@" |