Statediff API (v3) to change addresses watched in direct indexing mode #212

Merged
prathamesh0 merged 11 commits from pm-watched-addresses-v3 into v1.10.16-statediff-v3 2022-04-05 04:03:51 +00:00
prathamesh0 commented 2022-03-17 12:43:53 +00:00 (Migrated from github.com)

Part of https://github.com/vulcanize/go-ethereum/issues/127

  • An API to perform following operations on the list of addresses to which the direct indexing is restricted:
    • Add addresses
    • Remove addresses
    • Set the watched addresses
    • Clear the watched addresses
  • Unit tests for the API
  • Make corresponding changes to watched_addresses table in the db
  • Load watched addresses from the db on startup
  • Add a fix and tests in builder for a non-watched address being removed
Part of https://github.com/vulcanize/go-ethereum/issues/127 - An API to perform following operations on the list of addresses to which the direct indexing is restricted: - Add addresses - Remove addresses - Set the watched addresses - Clear the watched addresses - Unit tests for the API - Make corresponding changes to watched_addresses table in the db - Load watched addresses from the db on startup - Add a fix and tests in builder for a non-watched address being removed
i-norden reviewed 2022-03-22 00:30:12 +00:00
i-norden left a comment
Member

Code LGTM but need to figure out what is going on in the CI tests in TestFileIndexer and TestFileIndexerLegacy e.g.

=== RUN   TestFileIndexerLegacy/Publish_and_index_header_IPLDs
    test_helpers.go:62: pq: relation "eth_meta.watched_addresses" does not exist
--- FAIL: TestFileIndexerLegacy (0.04s)
    --- FAIL: TestFileIndexerLegacy/Publish_and_index_header_IPLDs (0.04s)
=== RUN   TestFileIndexer
=== RUN   TestFileIndexer/Publish_and_index_header_IPLDs_in_a_single_tx
    indexer_legacy_test.go:89: 
        	Error Trace:	indexer_legacy_test.go:89
        	            				indexer_test.go:235
        	Error:      	Received unexpected error:
        	            	pq: duplicate key value violates unique constraint "nodes_pkey"
        	Test:       	TestFileIndexer/Publish_and_index_header_IPLDs_in_a_single_tx

It seems to be missing the new table def in one instance and isn't removing a previous public.nodes entry.

Code LGTM but need to figure out what is going on in the CI tests in `TestFileIndexer` and `TestFileIndexerLegacy` e.g. ``` === RUN TestFileIndexerLegacy/Publish_and_index_header_IPLDs test_helpers.go:62: pq: relation "eth_meta.watched_addresses" does not exist --- FAIL: TestFileIndexerLegacy (0.04s) --- FAIL: TestFileIndexerLegacy/Publish_and_index_header_IPLDs (0.04s) === RUN TestFileIndexer === RUN TestFileIndexer/Publish_and_index_header_IPLDs_in_a_single_tx indexer_legacy_test.go:89: Error Trace: indexer_legacy_test.go:89 indexer_test.go:235 Error: Received unexpected error: pq: duplicate key value violates unique constraint "nodes_pkey" Test: TestFileIndexer/Publish_and_index_header_IPLDs_in_a_single_tx ``` It seems to be missing the new table def in one instance and isn't removing a previous public.nodes entry.
prathamesh0 commented 2022-03-24 04:57:16 +00:00 (Migrated from github.com)

@i-norden The unit tests in GitHub CI are failing with the error:

Pulling ipld-eth-db (vulcanize/ipld-eth-db:v3.1.0)...
manifest for vulcanize/ipld-eth-db:v3.1.0 not found: manifest unknown: manifest unknown

Seems like there is no docker image for ipld-eth-db release v3.1.0?

@i-norden The unit tests in GitHub CI are failing with the error: ``` Pulling ipld-eth-db (vulcanize/ipld-eth-db:v3.1.0)... manifest for vulcanize/ipld-eth-db:v3.1.0 not found: manifest unknown: manifest unknown ``` Seems like there is no docker image for ipld-eth-db release `v3.1.0`?
Member

@i-norden The unit tests in GitHub CI are failing with the error:

Pulling ipld-eth-db (vulcanize/ipld-eth-db:v3.1.0)...
manifest for vulcanize/ipld-eth-db:v3.1.0 not found: manifest unknown: manifest unknown

Seems like there is no docker image for ipld-eth-db release v3.1.0?

Oi, thanks for the heads up. Not sure why, but the docker publishing actions didn't trigger for that release. Not sure how to do it after the fact because it's not as if the action is in a failed state that can be re-run, since it never triggered in the first place there is no option to "re"-run from the Actions tab as far as I can see :(

I may need to re-release as v3.1.1

> @i-norden The unit tests in GitHub CI are failing with the error: > > ``` > Pulling ipld-eth-db (vulcanize/ipld-eth-db:v3.1.0)... > manifest for vulcanize/ipld-eth-db:v3.1.0 not found: manifest unknown: manifest unknown > ``` > > Seems like there is no docker image for ipld-eth-db release `v3.1.0`? Oi, thanks for the heads up. Not sure why, but the docker publishing actions didn't trigger for that release. Not sure how to do it after the fact because it's not as if the action is in a failed state that can be re-run, since it never triggered in the first place there is no option to "re"-run from the Actions tab as far as I can see :( I may need to re-release as v3.1.1
Member

@prathamesh0 we can use this release: https://github.com/vulcanize/ipld-eth-db/releases/tag/v3.2.0

@prathamesh0 we can use this release: https://github.com/vulcanize/ipld-eth-db/releases/tag/v3.2.0
i-norden approved these changes 2022-04-04 12:09:06 +00:00
i-norden left a comment
Member

LGTM

LGTM
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/go-ethereum#212
No description provided.