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

Include chain id into db path #14

Open
itkach opened this issue Feb 13, 2020 · 2 comments
Open

Include chain id into db path #14

itkach opened this issue Feb 13, 2020 · 2 comments

Comments

@itkach
Copy link

itkach commented Feb 13, 2020

It would be convenient if data store were scoped to chain, e.g. full db path included chain id so that tzindex instance would gracefully handle switching/pointing to a different tezos network. In particular, this would make it easier to pair tzindex with a sandbox such as flextesa for testing/dev scenarios. Currently tzindex shuts down with an error if the tezos node it points to starts serving different chain data, such as the case when sandbox is started/restarted as a new chain.

@echa
Copy link
Contributor

echa commented Feb 13, 2020

Thanks, good point. Implementing this feature will need some refactoring. With the current architecture the chain id is unknown at the time database files are created. Will keep this in mind for a future version.

As workaround you can specify a database path as command line argument -p path/to/database/files.

@itkach
Copy link
Author

itkach commented Feb 13, 2020

As workaround you can specify a database path as command line argument -p path/to/database/files

Indeed, that should work, but requires a somewhat tedious scripting to coordinate services startup - start sandbox first, get chain id, construct args to start tzindex, whereas with this feature (and a fix for #13) the setup can become very simple - just add flextesa and tzindex to docker stack as described in #13.

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

No branches or pull requests

2 participants