Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15e95e3ffa | ||
|
|
4381c77a9b | ||
|
|
3c80a207fd | ||
|
|
8033a956d4 | ||
|
|
815a5654b2 | ||
|
|
1bd64266bc | ||
|
|
9e96e4225a | ||
|
|
a1658421a1 | ||
|
|
4fe07c45f1 | ||
|
|
56ae836b09 | ||
|
|
20804bd30c |
@@ -1,83 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[Bug]"
|
||||
labels: bug
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
- [Overview](#overview)
|
||||
- [Describe the bug](#describe-the-bug)
|
||||
- [To Reproduce](#to-reproduce)
|
||||
- [Expected behavior](#expected-behavior)
|
||||
- [Evidence](#evidence)
|
||||
- [Logs](#logs)
|
||||
- [Screenshots](#screenshots)
|
||||
- [Additional context](#additional-context)
|
||||
|
||||
<small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small>
|
||||
|
||||
# Overview
|
||||
|
||||
- **Requester**: @ the requestor.
|
||||
- **Epic Link**: Link the epic.
|
||||
|
||||
# Describe the bug
|
||||
|
||||
<!---
|
||||
A clear and concise description of what the bug is.
|
||||
--->
|
||||
|
||||
# To Reproduce
|
||||
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
<!---
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
--->
|
||||
|
||||
# Expected behavior
|
||||
|
||||
<!---
|
||||
A clear and concise description of what you expected to happen.
|
||||
--->
|
||||
|
||||
# Evidence
|
||||
|
||||
<!---
|
||||
Provide any supporting documentation.
|
||||
--->
|
||||
|
||||
## Logs
|
||||
|
||||
<!---
|
||||
Provide any logs if applicable.
|
||||
--->
|
||||
|
||||
## Screenshots
|
||||
|
||||
<!---
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
--->
|
||||
|
||||
# Additional context
|
||||
|
||||
<!---
|
||||
Add any other context about the problem here.
|
||||
--->
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
name: Epic
|
||||
about: Template for creating an Epic
|
||||
title: "[EPIC]"
|
||||
labels: epic
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
- [Overview](#overview)
|
||||
- [Description](#description)
|
||||
- [Dependencies](#dependencies)
|
||||
- [Context](#context)
|
||||
- [Issues](#issues)
|
||||
- [Acceptance criteria](#acceptance-criteria)
|
||||
- [Proof](#proof)
|
||||
|
||||
<small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small>
|
||||
|
||||
# Overview
|
||||
|
||||
- **Owner**: @ the owner.
|
||||
- **Stakeholder Point of Contact**: @ the point of contact.
|
||||
|
||||
## Description
|
||||
|
||||
<!---
|
||||
Describe what this epic is supposed to solve.
|
||||
--->
|
||||
|
||||
# Dependencies
|
||||
|
||||
<!---
|
||||
What are the dependencies for this epic.
|
||||
--->
|
||||
|
||||
# Context
|
||||
|
||||
<!---
|
||||
Provide any useful context.
|
||||
--->
|
||||
|
||||
# Issues
|
||||
|
||||
<!---
|
||||
Link any issues
|
||||
--->
|
||||
|
||||
- [ ] Issue one
|
||||
- [ ] issue two
|
||||
- [ ] issue three
|
||||
|
||||
# Acceptance criteria
|
||||
|
||||
<!---
|
||||
What needs to occur for this to be successful.
|
||||
--->
|
||||
|
||||
## Proof
|
||||
|
||||
<!---
|
||||
Link any PR's, documents, other evidence highlighting that the acceptance criteria were met.
|
||||
--->
|
||||
@@ -1,41 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[Feature]"
|
||||
labels: feature
|
||||
assignees: ""
|
||||
---
|
||||
|
||||
- [Overview](#overview)
|
||||
- [Request](#request)
|
||||
- [Potential Solution](#potential-solution)
|
||||
- [Alternative Solutions](#alternative-solutions)
|
||||
- [Additional Context](#additional-context)
|
||||
|
||||
<small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table of contents generated with markdown-toc</a></i></small>
|
||||
|
||||
# Overview
|
||||
|
||||
- **Requester**: @ the requestor.
|
||||
- **Epic Link**: Link the epic.
|
||||
|
||||
## Request
|
||||
|
||||
<!---
|
||||
Explain what you want and why. If this feature is related to a problem please highlight it here.**
|
||||
--->
|
||||
|
||||
# Potential Solution
|
||||
|
||||
<!---Provide any details for a potential solution.
|
||||
--->
|
||||
|
||||
## Alternative Solutions
|
||||
|
||||
<!---Provide any alternative solutions.
|
||||
--->
|
||||
|
||||
# Additional Context
|
||||
|
||||
<!---Provide Additional Context.
|
||||
--->
|
||||
@@ -33,13 +33,13 @@ jobs:
|
||||
with:
|
||||
ref: ${{ env.stack-orchestrator-ref }}
|
||||
path: "./stack-orchestrator/"
|
||||
repository: vulcanize/stack-orchestrator
|
||||
repository: cerc-io/stack-orchestrator
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ env.ipld-eth-beacon-db-ref }}
|
||||
repository: vulcanize/ipld-eth-beacon-db
|
||||
repository: cerc-io/ipld-eth-beacon-db
|
||||
path: "./ipld-eth-beacon-db/"
|
||||
ssh-key: ${{secrets.GHA_KEY}}
|
||||
fetch-depth: 0
|
||||
@@ -50,6 +50,7 @@ jobs:
|
||||
echo vulcanize_ipld_eth_beacon_indexer=$GITHUB_WORKSPACE/ipld-eth-beacon-indexer >> ./config.sh
|
||||
echo eth_beacon_config_file=$GITHUB_WORKSPACE/ipld-eth-beacon-indexer/config/cicd/boot.ipld-eth-beacon-indexer.json >> ./config.sh
|
||||
echo eth_beacon_capture_mode=boot >> ./config.sh
|
||||
echo CAPTURE_MODE=boot >> config.sh
|
||||
cat ./config.sh
|
||||
|
||||
- name: Run docker compose
|
||||
@@ -88,13 +89,13 @@ jobs:
|
||||
with:
|
||||
ref: ${{ env.stack-orchestrator-ref }}
|
||||
path: "./stack-orchestrator/"
|
||||
repository: vulcanize/stack-orchestrator
|
||||
repository: cerc-io/stack-orchestrator
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ env.ipld-eth-beacon-db-ref }}
|
||||
repository: vulcanize/ipld-eth-beacon-db
|
||||
repository: cerc-io/ipld-eth-beacon-db
|
||||
path: "./ipld-eth-beacon-db/"
|
||||
ssh-key: ${{ secrets.GHA_KEY }}
|
||||
fetch-depth: 0
|
||||
@@ -102,7 +103,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ env.ssz-data-ref }}
|
||||
repository: vulcanize/ssz-data
|
||||
repository: cerc-io/ssz-data
|
||||
path: "./ipld-eth-beacon-indexer/pkg/beaconclient/ssz-data"
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -126,7 +127,7 @@ jobs:
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
go install github.com/onsi/ginkgo/v2/ginkgo@latest
|
||||
go install github.com/onsi/ginkgo/v2/ginkgo@2.1.4
|
||||
which ginkgo
|
||||
|
||||
- name: Run the tests using Make
|
||||
@@ -149,13 +150,13 @@ jobs:
|
||||
with:
|
||||
ref: ${{ env.stack-orchestrator-ref }}
|
||||
path: "./stack-orchestrator/"
|
||||
repository: vulcanize/stack-orchestrator
|
||||
repository: cerc-io/stack-orchestrator
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ env.ipld-eth-beacon-db-ref }}
|
||||
repository: vulcanize/ipld-eth-beacon-db
|
||||
repository: cerc-io/ipld-eth-beacon-db
|
||||
path: "./ipld-eth-beacon-db/"
|
||||
ssh-key: ${{secrets.GHA_KEY}}
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
name: Notion Sync
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
issues:
|
||||
types:
|
||||
[
|
||||
opened,
|
||||
edited,
|
||||
labeled,
|
||||
unlabeled,
|
||||
assigned,
|
||||
unassigned,
|
||||
milestoned,
|
||||
demilestoned,
|
||||
reopened,
|
||||
closed,
|
||||
]
|
||||
|
||||
jobs:
|
||||
notion_job:
|
||||
runs-on: ubuntu-latest
|
||||
name: Add GitHub Issues to Notion
|
||||
steps:
|
||||
- name: Add GitHub Issues to Notion
|
||||
uses: vulcanize/notion-github-action@v1.2.4-issueid
|
||||
with:
|
||||
notion-token: ${{ secrets.NOTION_TOKEN }}
|
||||
notion-db: ${{ secrets.NOTION_DATABASE }}
|
||||
@@ -24,8 +24,8 @@ on:
|
||||
- ".github/workflows/on-pr.yml"
|
||||
- ".github/workflows/tests.yml"
|
||||
- "**"
|
||||
schedule:
|
||||
- cron: '0 13 * * *' # Must be single quotes!!
|
||||
#schedule:
|
||||
# - cron: '0 13 * * *' # Must be single quotes!!
|
||||
|
||||
jobs:
|
||||
trigger-tests:
|
||||
|
||||
@@ -33,28 +33,28 @@ jobs:
|
||||
- name: Run docker build
|
||||
run: make docker-build
|
||||
- name: Tag docker image
|
||||
run: docker tag vulcanize/ipld-eth-beacon-indexer docker.pkg.github.com/vulcanize/ipld-eth-beacon-indexer/ipld-eth-beacon-indexer:${{steps.vars.outputs.sha}}
|
||||
run: docker tag cerc-io/ipld-eth-beacon-indexer git.vdb.to/cerc-io/ipld-eth-beacon-indexer/ipld-eth-beacon-indexer:${{steps.vars.outputs.sha}}
|
||||
- name: Docker Login
|
||||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin
|
||||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin
|
||||
- name: Docker Push
|
||||
run: docker push docker.pkg.github.com/vulcanize/ipld-eth-beacon-indexer/ipld-eth-beacon-indexer:${{steps.vars.outputs.sha}}
|
||||
push_to_registries:
|
||||
name: Push Docker image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Get the version
|
||||
id: vars
|
||||
run: |
|
||||
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
|
||||
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
|
||||
- name: Docker Login to Github Registry
|
||||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin
|
||||
- name: Docker Pull
|
||||
run: docker pull docker.pkg.github.com/vulcanize/ipld-eth-beacon-indexer/ipld-eth-beacon-indexer:${{steps.vars.outputs.sha}}
|
||||
- name: Docker Login to Docker Registry
|
||||
run: echo ${{ secrets.VULCANIZEJENKINS_PAT }} | docker login -u vulcanizejenkins --password-stdin
|
||||
- name: Tag docker image
|
||||
run: docker tag docker.pkg.github.com/vulcanize/ipld-eth-beacon-indexer/ipld-eth-beacon-indexer:${{steps.vars.outputs.sha}} vulcanize/ipld-eth-beacon-indexer:${{steps.vars.outputs.tag}}
|
||||
- name: Docker Push to Docker Hub
|
||||
run: docker push vulcanize/ipld-eth-beacon-indexer:${{steps.vars.outputs.tag}}
|
||||
run: docker push git.vdb.to/cerc-io/ipld-eth-beacon-indexer/ipld-eth-beacon-indexer:${{steps.vars.outputs.sha}}
|
||||
# push_to_registries:
|
||||
# name: Push Docker image to Docker Hub
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: build
|
||||
# steps:
|
||||
# - name: Get the version
|
||||
# id: vars
|
||||
# run: |
|
||||
# echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
|
||||
# echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
|
||||
# - name: Docker Login to Github Registry
|
||||
# run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin
|
||||
# - name: Docker Pull
|
||||
# run: docker pull git.vdb.to/cerc-io/ipld-eth-beacon-indexer/ipld-eth-beacon-indexer:${{steps.vars.outputs.sha}}
|
||||
# - name: Docker Login to Docker Registry
|
||||
# run: echo ${{ secrets.VULCANIZEJENKINS_PAT }} | docker login -u vulcanizejenkins --password-stdin
|
||||
# - name: Tag docker image
|
||||
# run: docker tag git.vdb.to/cerc-io/ipld-eth-beacon-indexer/ipld-eth-beacon-indexer:${{steps.vars.outputs.sha}} cerc-io/ipld-eth-beacon-indexer:${{steps.vars.outputs.tag}}
|
||||
# - name: Docker Push to Docker Hub
|
||||
# run: docker push cerc-io/ipld-eth-beacon-indexer:${{steps.vars.outputs.tag}}
|
||||
|
||||
@@ -29,7 +29,7 @@ env:
|
||||
|
||||
jobs:
|
||||
system-testing:
|
||||
runs-on: self-hosted
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create GOPATH
|
||||
run: mkdir -p /tmp/go
|
||||
@@ -42,13 +42,13 @@ jobs:
|
||||
with:
|
||||
ref: ${{ env.stack-orchestrator-ref }}
|
||||
path: "./stack-orchestrator/"
|
||||
repository: vulcanize/stack-orchestrator
|
||||
repository: cerc-io/stack-orchestrator
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ env.ipld-eth-beacon-db-ref }}
|
||||
repository: vulcanize/ipld-eth-beacon-db
|
||||
repository: cerc-io/ipld-eth-beacon-db
|
||||
path: "./ipld-eth-beacon-db/"
|
||||
ssh-key: ${{secrets.GHA_KEY}}
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -11,3 +11,4 @@ ipld-eth-beacon-indexer.log
|
||||
ipld-eth-beacon-indexer
|
||||
config/local.ipld-eth-beacon-indexer-config.json
|
||||
config/docker.ipld-eth-beacon-indexer-config.json
|
||||
.idea/*
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
FROM golang:1.18-alpine as builder
|
||||
|
||||
WORKDIR /go/src/github.com/vulcanize/ipld-eth-beacon-indexer
|
||||
WORKDIR /go/src/github.com/cerc-io/ipld-eth-beacon-indexer
|
||||
RUN apk --no-cache add ca-certificates make git g++ linux-headers libstdc++
|
||||
|
||||
ENV GO111MODULE=on
|
||||
@@ -13,9 +13,9 @@ RUN GCO_ENABLED=0 GOOS=linux go build -race -ldflags="-s -w" -o ipld-eth-beacon-
|
||||
RUN chmod +x ipld-eth-beacon-indexer
|
||||
|
||||
FROM frolvlad/alpine-bash:latest
|
||||
RUN apk --no-cache add ca-certificates libstdc++ busybox-extras
|
||||
RUN apk --no-cache add ca-certificates libstdc++ busybox-extras gettext libintl
|
||||
WORKDIR /root/
|
||||
COPY --from=builder /go/src/github.com/vulcanize/ipld-eth-beacon-indexer/ipld-eth-beacon-indexer /root/ipld-eth-beacon-indexer
|
||||
COPY --from=builder /go/src/github.com/cerc-io/ipld-eth-beacon-indexer/ipld-eth-beacon-indexer /root/ipld-eth-beacon-indexer
|
||||
ADD entrypoint.sh .
|
||||
ADD ipld-eth-beacon-config.json .
|
||||
ADD ipld-eth-beacon-config-docker.json .
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
||||
|
||||
+7
-3
@@ -3,7 +3,10 @@
|
||||
sleep 10
|
||||
echo "Starting ipld-eth-beacon-indexer"
|
||||
|
||||
cat /root/ipld-eth-beacon-config-docker.json | envsubst > /root/ipld-eth-beacon-config.json
|
||||
|
||||
echo /root/ipld-eth-beacon-indexer capture ${CAPTURE_MODE} --config /root/ipld-eth-beacon-config.json > /root/ipld-eth-beacon-indexer.output
|
||||
env
|
||||
|
||||
if [ ${CAPTURE_MODE} == "boot" ]; then
|
||||
/root/ipld-eth-beacon-indexer capture ${CAPTURE_MODE} --config /root/ipld-eth-beacon-config.json > /root/ipld-eth-beacon-indexer.output
|
||||
@@ -14,9 +17,10 @@ if [ ${CAPTURE_MODE} == "boot" ]; then
|
||||
else
|
||||
echo "ipld-eth-beacon-indexer boot succeeded"
|
||||
fi
|
||||
echo $rv > /root/HEALTH
|
||||
echo $rv
|
||||
cat /root/ipld-eth-beacon-indexer.output
|
||||
|
||||
echo $rv > /root/HEALTH
|
||||
echo $rv
|
||||
cat /root/ipld-eth-beacon-indexer.output
|
||||
|
||||
tail -f /dev/null
|
||||
else
|
||||
|
||||
@@ -28,8 +28,10 @@ require (
|
||||
github.com/ethereum/go-ethereum v1.10.25 // indirect
|
||||
github.com/go-ole/go-ole v1.2.1 // indirect
|
||||
github.com/go-stack/stack v1.8.0 // indirect
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/gorilla/websocket v1.4.2 // indirect
|
||||
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
|
||||
@@ -77,6 +79,7 @@ require (
|
||||
go.uber.org/zap v1.23.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
|
||||
golang.org/x/net v0.0.0-20220907135653-1e95f45603a7 // indirect
|
||||
golang.org/x/tools v0.1.10 // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
|
||||
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
|
||||
|
||||
@@ -111,6 +111,8 @@ github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dT
|
||||
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
|
||||
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
|
||||
github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
|
||||
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
@@ -176,6 +178,8 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
|
||||
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
|
||||
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
@@ -799,6 +803,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
|
||||
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20=
|
||||
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"db": {
|
||||
"address": "${POSTGRES_HOST}",
|
||||
"password": "${POSTGRES_PASSWORD}",
|
||||
"port": ${POSTGRES_PORT},
|
||||
"username": "${POSTGRES_USER}",
|
||||
"name": "${POSTGRES_DB}",
|
||||
"driver": "PGX"
|
||||
},
|
||||
"bc": {
|
||||
"address": "${LIGHTHOUSE_HOST}",
|
||||
"port": ${LIGHTHOUSE_PORT},
|
||||
"type": "lighthouse",
|
||||
"bootRetryInterval": 30,
|
||||
"bootMaxRetry": 5,
|
||||
"maxHistoricProcessWorker": ${BC_MAX_HISTORIC_PROCESS_WORKER},
|
||||
"connectionProtocol": "${LIGHTHOUSE_PROTOCOL}",
|
||||
"uniqueNodeIdentifier": ${BC_UNIQUE_NODE_IDENTIFIER},
|
||||
"checkDb": ${BC_CHECK_DB},
|
||||
"performBeaconStateProcessing": ${BC_BEACON_STATE_PROCESSING_ENABLED},
|
||||
"performBeaconBlockProcessing": ${BC_BEACON_BLOCK_PROCESSING_ENABLED},
|
||||
"minimumSlot": ${BC_MINIMUM_SLOT}
|
||||
},
|
||||
"t": {
|
||||
"skipSync": true
|
||||
},
|
||||
"log": {
|
||||
"level": "${LOG_LEVEL}",
|
||||
"output": true,
|
||||
"file": "./ipld-eth-beacon-indexer.log",
|
||||
"format": "json"
|
||||
},
|
||||
"kg": {
|
||||
"increment": ${KG_INCREMENT},
|
||||
"processKnownGaps": ${KG_PROCESS_KNOWN_GAPS_ENABLED},
|
||||
"maxKnownGapsWorker": ${KG_MAX_KNOWN_GAPS_WORKER},
|
||||
"minimumSlot": ${KG_MINIMUM_SLOT}
|
||||
},
|
||||
"pm": {
|
||||
"address": "${PROM_HOST}",
|
||||
"port": ${PROM_PORT},
|
||||
"metrics": ${PROM_METRICS_ENABLED}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"db": {
|
||||
"address": "localhost",
|
||||
"password": "password",
|
||||
"port": 5432,
|
||||
"username": "vdbm",
|
||||
"name": "vulcanize_db",
|
||||
"driver": "PGX"
|
||||
},
|
||||
"bc": {
|
||||
"address": "localhost",
|
||||
"port": 5052,
|
||||
"type": "lighthouse",
|
||||
"bootRetryInterval": 30,
|
||||
"bootMaxRetry": 5,
|
||||
"maxHistoricProcessWorker": 2,
|
||||
"connectionProtocol": "http",
|
||||
"uniqueNodeIdentifier": 100,
|
||||
"checkDb": true,
|
||||
"performBeaconStateProcessing": false,
|
||||
"performBeaconBlockProcessing": true,
|
||||
"minimumSlot": 4700013
|
||||
},
|
||||
"t": {
|
||||
"skipSync": true
|
||||
},
|
||||
"log": {
|
||||
"level": "debug",
|
||||
"output": true,
|
||||
"file": "./ipld-eth-beacon-indexer.log",
|
||||
"format": "json"
|
||||
},
|
||||
"kg": {
|
||||
"increment": 10000,
|
||||
"processKnownGaps": true,
|
||||
"maxKnownGapsWorker": 2,
|
||||
"minimumSlot": 4700013
|
||||
},
|
||||
"pm": {
|
||||
"address": "localhost",
|
||||
"port": 9000,
|
||||
"metrics": true
|
||||
}
|
||||
}
|
||||
@@ -17,12 +17,14 @@ import (
|
||||
"github.com/vulcanize/ipld-eth-beacon-indexer/pkg/beaconclient"
|
||||
"github.com/vulcanize/ipld-eth-beacon-indexer/pkg/database/sql"
|
||||
"math/big"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
var _ = Describe("e2emerge", Label("e2e"), func() {
|
||||
e2eConfig := TestConfig
|
||||
e2eConfig.port = 5052
|
||||
e2eConfig.port = getEnvInt("TEST_E2E_LIGHTHOUSE_PORT", 5052)
|
||||
e2eConfig.performBeaconStateProcessing = false
|
||||
e2eConfig.performBeaconBlockProcessing = true
|
||||
|
||||
@@ -123,10 +125,10 @@ func sendTestTx() (*SentTx, error) {
|
||||
tx, err := sendTransaction(
|
||||
ctx,
|
||||
eth,
|
||||
"0xe6ce22afe802caf5ff7d3845cec8c736ecc8d61f",
|
||||
"0xe22AD83A0dE117bA0d03d5E94Eb4E0d80a69C62a",
|
||||
10,
|
||||
"0x888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218",
|
||||
getEnvStr("TEST_E2E_FROM_ADDR", "0xe6ce22afe802caf5ff7d3845cec8c736ecc8d61f"),
|
||||
getEnvStr("TEST_E2E_TO_ADDR", "0xe22AD83A0dE117bA0d03d5E94Eb4E0d80a69C62a"),
|
||||
int64(getEnvInt("TEST_E2E_AMOUNT", 10)),
|
||||
getEnvStr("TEST_E2E_SIGNING_KEY", "0x888814df89c4358d7ddb3fa4b0213e7331239a80e1f013eaa7b2deca2a41a218"),
|
||||
)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
@@ -155,7 +157,7 @@ func sendTestTx() (*SentTx, error) {
|
||||
}
|
||||
|
||||
func createClient() (*ethclient.Client, error) {
|
||||
return ethclient.Dial("http://localhost:8545")
|
||||
return ethclient.Dial(getEnvStr("TEST_E2E_GETH_URL", "http://localhost:8545"))
|
||||
}
|
||||
|
||||
// sendTransaction sends a transaction with 1 ETH to a specified address.
|
||||
@@ -165,7 +167,7 @@ func sendTransaction(ctx context.Context, eth *ethclient.Client, fromAddr string
|
||||
to = common.HexToAddress(toAddr)
|
||||
sk = crypto.ToECDSAUnsafe(common.FromHex(signingKey))
|
||||
value = big.NewInt(amount)
|
||||
gasLimit = uint64(21000)
|
||||
gasLimit = uint64(getEnvInt("TEST_E2E_GAS_LIMIT", 21000))
|
||||
)
|
||||
// Retrieve the chainid (needed for signer)
|
||||
chainid, err := eth.ChainID(ctx)
|
||||
@@ -180,6 +182,8 @@ func sendTransaction(ctx context.Context, eth *ethclient.Client, fromAddr string
|
||||
// Get suggested gas price
|
||||
tipCap, _ := eth.SuggestGasTipCap(ctx)
|
||||
feeCap, _ := eth.SuggestGasPrice(ctx)
|
||||
log.Info("Tip cap: ", tipCap)
|
||||
log.Info("Fee cap: ", feeCap)
|
||||
// Create a new transaction
|
||||
tx := types.NewTx(
|
||||
&types.DynamicFeeTx{
|
||||
@@ -197,3 +201,25 @@ func sendTransaction(ctx context.Context, eth *ethclient.Client, fromAddr string
|
||||
// Send the transaction to our node
|
||||
return signedTx, eth.SendTransaction(ctx, signedTx)
|
||||
}
|
||||
|
||||
func getEnvStr(envVar string, def string) string {
|
||||
value, set := os.LookupEnv(envVar)
|
||||
if set {
|
||||
return value
|
||||
} else {
|
||||
return def
|
||||
}
|
||||
}
|
||||
|
||||
func getEnvInt(envVar string, def int) int {
|
||||
value, set := os.LookupEnv(envVar)
|
||||
if set {
|
||||
number, err := strconv.Atoi(value)
|
||||
if err != nil {
|
||||
return def
|
||||
}
|
||||
return number
|
||||
} else {
|
||||
return def
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package beaconclient_test
|
||||
import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
@@ -15,9 +14,9 @@ var (
|
||||
prodConfig = Config{
|
||||
protocol: os.Getenv("bc_protocol"),
|
||||
address: os.Getenv("bc_address"),
|
||||
port: getEnvInt(os.Getenv("bc_port")),
|
||||
port: getEnvInt(os.Getenv("bc_port"), 5052),
|
||||
dbHost: os.Getenv("db_host"),
|
||||
dbPort: getEnvInt(os.Getenv("db_port")),
|
||||
dbPort: getEnvInt(os.Getenv("db_port"), 8076),
|
||||
dbName: os.Getenv("db_name"),
|
||||
dbUser: os.Getenv("db_user"),
|
||||
dbPassword: os.Getenv("db_password"),
|
||||
@@ -62,15 +61,6 @@ var _ = Describe("Systemvalidation", Label("system"), func() {
|
||||
})
|
||||
})
|
||||
|
||||
// Wrapper function to get int env variables.
|
||||
func getEnvInt(envVar string) int {
|
||||
val, err := strconv.Atoi(envVar)
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
||||
// Start head tracking and wait for the expected results.
|
||||
func processProdHeadBlocks(bc *beaconclient.BeaconClient, expectedInserts, expectedReorgs, expectedKnownGaps, expectedKnownGapsReprocessError uint64) {
|
||||
go bc.CaptureHead()
|
||||
|
||||
Reference in New Issue
Block a user