Commit Graph

48 Commits

Author SHA1 Message Date
Abdul Rabbani
bea9ce2920 Feature/22 test handling incoming events (#30)
* Checkpoint before the weekend

* Update location for SetupPostgresDB

* Include first functioning tests for processing head

* Fix gitignore

* Test CaptureHead | Add Metrics | Handle Test Race Conditions

This Commit allows us to:

* Test the `CaptureHead` function.
* Test parsing a single Head message.
* Test a Reorg condition.
* Add Metrics. This is primarily used for testing but can have future use cases.
* Rearrange the test due to race conditions introduced by reusing a variable. `BeforeEach` can't be used to update `BC`.

* Update and finalize testing at this stage

* Update code and CI/CD

* Fix lint errors

* Update CICD and fail when file not found.

* Update test to have failed as expected.
2022-05-13 08:55:18 -04:00
Abdul Rabbani
bf38c83a4c Feature/22 test handling incoming events - Intermediary Commit (#28)
* Checkpoint before the weekend

* Update location for SetupPostgresDB
2022-05-13 08:55:18 -04:00
Abdul Rabbani
4994f1fa94 Capture the head block in the DB entirely. (#27)
* -- Intermediary Commit --

Just want to commit my code over the weekend, in case I spill coffee on my workstation.

* Create DB models ready for write.

* Handle SSE events

* Update ref for stack-orchestrator

* Use env in one place only.

* Boot Application on PR

* Update syntax

* Update syntax

* Correct command

* Use bash instead of sh

* Use until instead of while

* Make linter happy and check sse subscription err

* Handle Reorgs - Untested
2022-05-13 08:55:00 -04:00
Abdul Rabbani
a974a455bf Disregard race condition since its with the test not the application itself 2022-05-13 08:52:53 -04:00
Abdul Rabbani
ec24895dca Added test to ensure the application shuts down gracefully or within a timeframe. 2022-05-13 08:52:53 -04:00
i-norden
1c919c5051 go mod updates 2022-05-12 21:22:11 -05:00
i-norden
f5f253aa81 multihash key gen func 2022-05-12 21:10:31 -05:00
Abdul Rabbani
91a1287974
Merge pull request #24 from vulcanize/develop
Interact with Beacon Node endpoints
2022-04-28 11:50:03 -04:00
Abdul Rabbani
164ef4eab4 Remove Binaries 2022-04-28 11:46:14 -04:00
Abdul Rabbani
0b712935a3
Merge pull request #18 from vulcanize/feature/17-interact-with-the-beacon-client
Add functions to interact with the beacon client
2022-04-27 14:07:46 -04:00
Abdul Rabbani
f46c4410a2 Clean up + Get State and Block 2022-04-27 14:01:59 -04:00
Abdul Rabbani
d496886f95 Process SSE messages, and include a graceful shutdown 2022-04-27 10:28:42 -04:00
Abdul Rabbani
3e244e8281 Merge branch 'develop' into feature/17-interact-with-the-beacon-client 2022-04-27 09:36:23 -04:00
Abdul Rabbani
f81b6cf25d Update Templates for issues 2022-04-27 09:34:35 -04:00
Abdul Rabbani
87313887a4 Graceful Shutdown | Handle SSE | Requires Testing
This Commit contains the following:
* Graceful shutdowns.
* Handling all incoming SSE events for reorgs, finalizations, and head.

The structure of the `BeaconClient` has drastically changed and generics are used.
2022-04-26 13:57:01 -04:00
Abdul Rabbani
5b75f5a257 Create a single beaconclient pkg instead of having subpackages
The main reason to do this is so they can all access the `BeaconClient` Struct.
2022-04-25 11:32:46 -04:00
Abdul Rabbani
13ada14860 Update paths for GHA 2022-04-25 10:47:05 -04:00
Abdul Rabbani
594d1e6ee8 Move healthcheck to beaconclient pkg. 2022-04-25 10:41:50 -04:00
Abdul Rabbani
1a77762c4c
Try combining everything into one pipeline (#13) (#16)
* Try combining everything into one pipeline

* Update on-pr-manual.yml

* Remove PAth for testing

* Combine single YML workflow file for PR

* Add a comment
2022-04-22 17:18:20 -04:00
Abdul Rabbani
d174785046
Try combining everything into one pipeline (#13) (#15)
* Try combining everything into one pipeline

* Update on-pr-manual.yml

* Remove PAth for testing

* Combine single YML workflow file for PR

* Add a comment
2022-04-22 17:14:56 -04:00
Abdul Rabbani
90cb1d3414
Boot application with tests (#14)
* Update cobra to require `head` or `historic` when using `capture`.

* A very generic package for implementing PGX driver

I copied most of the code from the `statediff` service from within geth. The idea is that I can create formal DB packages, that can be utilized in other projects down the road.

* Put PGX and other future Postgres Drivers behind SQL package

This PR makes allows users to provide a config, along with a driver string. It will then provide the respective driver.

* Add DB Connection and Logging

* Utilize LogRus
* Create a DB connection using PGX.
* Create an internal boot package for starting the application.

* Code clean up + Beacon Chain Connection

This concludes all the code needed to connect to the DB and beacon node. We will no longer reference the lighthouse client because this application should work interchangeably with any beacon node.

I have also standardized logging.

* Last second clean ups

* Utilize Ginkgo toreplace `testing` library, and add CI/CD. (#9)

* Utilize Ginkgo and replace `testing` library.

* Add TOC to docs

* Add Docker specific files

* Remove -e

* Update on-pr-manual.yml

* Add depth

* Add repositories

* Remove $ from path

* Update path for make

* Setup Go and Ginkgo

* Use go mod download

* Use go install

* Update on-pr-manual.yml

* Use latest

* Remove install of GINKGO

* Add explicit gopath

* Explicitly specify the gopath

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Use which ginkgo

* Try with make now

* Final working Make

* Feature/11 testing add tests for boot (#12)

* Utilize Versioning

* Update Testing and CI/CD

* Update Testing

* Add Linting and Remove timeout

* Update Lint

* handle errors to make the linter happy

* Utilized interfaces for DB

* Update Manual Testing CI/CD

* Try combining everything into one pipeline (#13)

* Try combining everything into one pipeline

* Update on-pr-manual.yml

* Remove PAth for testing

* Combine single YML workflow file for PR

* Add a comment
2022-04-22 17:12:10 -04:00
Abdul Rabbani
978d38e68c Merge branch 'develop' 2022-04-22 17:07:35 -04:00
Abdul Rabbani
f4dd281736 Merge branch 'main' into develop 2022-04-22 17:06:44 -04:00
Abdul Rabbani
ce808f417a Update Manual Testing CI/CD 2022-04-22 13:04:45 -04:00
Abdul Rabbani
eba553a905 Utilized interfaces for DB 2022-04-22 13:02:14 -04:00
Abdul Rabbani
3d46a029f1
Feature/11 testing add tests for boot (#12)
* Utilize Versioning

* Update Testing and CI/CD

* Update Testing

* Add Linting and Remove timeout

* Update Lint

* handle errors to make the linter happy
2022-04-22 12:27:54 -04:00
Abdul Rabbani
11a8a0f99c
Testing, CI/CD and DB connections (#10)
* Update cobra to require `head` or `historic` when using `capture`.

* A very generic package for implementing PGX driver

I copied most of the code from the `statediff` service from within geth. The idea is that I can create formal DB packages, that can be utilized in other projects down the road.

* Put PGX and other future Postgres Drivers behind SQL package

This PR makes allows users to provide a config, along with a driver string. It will then provide the respective driver.

* Add DB Connection and Logging

* Utilize LogRus
* Create a DB connection using PGX.
* Create an internal boot package for starting the application.

* Code clean up + Beacon Chain Connection

This concludes all the code needed to connect to the DB and beacon node. We will no longer reference the lighthouse client because this application should work interchangeably with any beacon node.

I have also standardized logging.

* Last second clean ups

* Utilize Ginkgo toreplace `testing` library, and add CI/CD. (#9)

* Utilize Ginkgo and replace `testing` library.

* Add TOC to docs

* Add Docker specific files

* Remove -e

* Update on-pr-manual.yml

* Add depth

* Add repositories

* Remove $ from path

* Update path for make

* Setup Go and Ginkgo

* Use go mod download

* Use go install

* Update on-pr-manual.yml

* Use latest

* Remove install of GINKGO

* Add explicit gopath

* Explicitly specify the gopath

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Use which ginkgo

* Try with make now

* Final working Make
2022-04-22 08:31:57 -04:00
Abdul Rabbani
e2f7fa381b
Utilize Ginkgo toreplace testing library, and add CI/CD. (#9)
* Utilize Ginkgo and replace `testing` library.

* Add TOC to docs

* Add Docker specific files

* Remove -e

* Update on-pr-manual.yml

* Add depth

* Add repositories

* Remove $ from path

* Update path for make

* Setup Go and Ginkgo

* Use go mod download

* Use go install

* Update on-pr-manual.yml

* Use latest

* Remove install of GINKGO

* Add explicit gopath

* Explicitly specify the gopath

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Update on-pr-manual.yml

* Use which ginkgo

* Try with make now

* Final working Make
2022-04-22 08:28:01 -04:00
Abdul Rabbani
ad71aa1494 Merge branch 'main' into develop 2022-04-21 17:32:12 -04:00
Abdul Rabbani
6f0d4fc6e2 Add Manual Trigger 2022-04-21 17:29:06 -04:00
Abdul Rabbani
faad3c8bf7 Merge branch 'main' into develop 2022-04-21 08:04:08 -04:00
Abdul Rabbani
1b1dcf9a6a
Merge pull request #6 from vulcanize/feature/4-db-and-lh-connection
Merge code for DB and beacon node connection, as well as a more versatile logger.
2022-04-21 07:52:50 -04:00
Abdul Rabbani
7a2c4b3cef Last second clean ups 2022-04-20 18:23:21 -04:00
Abdul Rabbani
d7ad4108a7 Code clean up + Beacon Chain Connection
This concludes all the code needed to connect to the DB and beacon node. We will no longer reference the lighthouse client because this application should work interchangeably with any beacon node.

I have also standardized logging.
2022-04-20 18:12:44 -04:00
Abdul Rabbani
827475f029 Add DB Connection and Logging
* Utilize LogRus
* Create a DB connection using PGX.
* Create an internal boot package for starting the application.
2022-04-20 15:44:15 -04:00
Abdul Rabbani
d0d4f2498e Put PGX and other future Postgres Drivers behind SQL package
This PR makes allows users to provide a config, along with a driver string. It will then provide the respective driver.
2022-04-20 13:06:00 -04:00
Abdul Rabbani
ed3d0be2b7 A very generic package for implementing PGX driver
I copied most of the code from the `statediff` service from within geth. The idea is that I can create formal DB packages, that can be utilized in other projects down the road.
2022-04-20 12:12:55 -04:00
Abdul Rabbani
42923d15c1 Update cobra to require head or historic when using capture. 2022-04-20 09:25:47 -04:00
Abdul Rabbani
94bf185a10
Merge pull request #5 from vulcanize/develop
Update Templates
2022-04-19 17:49:26 -04:00
Abdul Rabbani
055b81e879 Merge branch 'develop' of github.com:vulcanize/ipld-ethcl-indexer into develop 2022-04-19 17:48:37 -04:00
Abdul Rabbani
064e0da18a Update Templates 2022-04-19 17:48:33 -04:00
Abdul Rabbani
ad2c7fff62
Merge pull request #3 from vulcanize/develop
Initial Commits
2022-04-19 17:37:21 -04:00
Abdul Rabbani
2c8d9f6a61
Merge pull request #2 from vulcanize/feature/add-cobra
Feature/add cobra
2022-04-19 17:36:16 -04:00
Abdul Rabbani
5671f09ed9 Merge branch 'develop' into feature/add-cobra 2022-04-19 17:12:42 -04:00
Abdul Rabbani
27756e8d47
Merge pull request #1 from vulcanize/github-templates
Update issue templates
2022-04-19 17:12:13 -04:00
Abdul Rabbani
a491f8093b
Update issue templates 2022-04-19 17:11:51 -04:00
Abdul Rabbani
daf99c7279 Utilize Cobra 2022-04-19 17:09:59 -04:00
Abdul Rabbani
78b7345655
Initial commit 2022-04-19 14:42:32 -04:00