Skip to content
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

Add check for chain ID #1034

Merged
merged 7 commits into from
Jun 15, 2023
Merged

Add check for chain ID #1034

merged 7 commits into from
Jun 15, 2023

Conversation

mariacarmina
Copy link
Member

Description

Add check for chain ID. Added a new env var CONFIG_NETWORK_URL.

Is this PR related with an open issue?

Related to Issue #1032

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Follows the code style of this project.
  • Tests Cover Changes
  • Documentation

@mariacarmina mariacarmina self-assigned this Jun 6, 2023
@calina-c
Copy link
Contributor

calina-c commented Jun 8, 2023

I don't understand the idea behind this PR. Aquarius is multichain, why is there one NETWORK CONFIG URL instead of the multichain defined ones? Alternately, why do we need this variable if we have NETWORK URL?

@mariacarmina
Copy link
Member Author

mariacarmina commented Jun 8, 2023

I don't understand the idea behind this PR. Aquarius is multichain, why is there one NETWORK CONFIG URL instead of the multichain defined ones? Alternately, why do we need this variable if we have NETWORK URL?

NETWORK CONFIG URL is an envvar to compare with event monitor chain. NETWORK CONFIG URL can be a public RPC which points to the same network as EVENTS RPC. It was an incident when our production RPCs for mumbai indexed blocks from polygon mainnet & a check for chain ID could solve the problem by stopping Aquarius from indexing blocks.
Regarding NETWORK URL, I thought that it has a different use case or it's used for another scope, so I did not want to interfere.

@calina-c
Copy link
Contributor

I don't understand the idea behind this PR. Aquarius is multichain, why is there one NETWORK CONFIG URL instead of the multichain defined ones? Alternately, why do we need this variable if we have NETWORK URL?

NETWORK CONFIG URL is an envvar to compare with event monitor chain. NETWORK CONFIG URL can be a public RPC which points to the same network as EVENTS RPC. It was an incident when our production RPCs for mumbai indexed block from polygon mainnet & a check for chain ID could solve the problem by stopping Aquarius from indexing blocks. Regarding NETWORK URL, I thought that it has a different use case or it's used for another scope, so I did not want to interfere.

I think you can use the network url.

tests/test_util.py Outdated Show resolved Hide resolved
@codeclimate
Copy link

codeclimate bot commented Jun 13, 2023

Code Climate has analyzed commit 271ca2d and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 84.4% (0.0% change).

View more on Code Climate.

@calina-c calina-c self-requested a review June 15, 2023 06:24
@mariacarmina mariacarmina merged commit 906bb03 into main Jun 15, 2023
@mariacarmina mariacarmina deleted the add-check-for-chain-id branch June 15, 2023 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants