Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Use a separate database URL/path for each Ethereum network #866

Open
albrow opened this issue Jul 17, 2020 · 1 comment
Open

Use a separate database URL/path for each Ethereum network #866

albrow opened this issue Jul 17, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@albrow
Copy link
Contributor

albrow commented Jul 17, 2020

Historically, we have seen issues whenever there is a mismatch between the chainId/network used in the database and the chainId/network for the Ethereum RPC URL. We have some code in place to help identify mismatches but that code isn't perfect. There is a race condition on startup where some data from the wrong chain can still make its way into the database. We also are not able to handle switching the chainId/network on the fly in the browser.

As an alternative and cleaner solution, I suggest we keep the data for each chainId/network separate by using a different database URL or path for each one. This is the approach that Augur and a few others have taken.

@albrow albrow changed the title Use a separate database url/path for each Ethereum network Use a separate database URL/path for each Ethereum network Jul 17, 2020
@albrow albrow added the enhancement New feature or request label Jul 17, 2020
@jalextowle
Copy link
Contributor

jalextowle commented Jul 17, 2020

@albrow Thanks for clarifying. I agree that using a separate database URL (and database I suppose) for each network, sounds quite a bit better than the current solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants