BirthdayResearch / jellyfishsdk

DeFiChain Jellyfish SDK & Ecosystem for building modern lite DeFi Applications at scale.
https://jellyfishsdk.com
MIT License
104 stars 36 forks source link

`apps/whale-api`: Whale Index should be versioned #1513

Open fuxingloh opened 2 years ago

fuxingloh commented 2 years ago

What would you like to be added:

Whale Index should contain an "index version" to deterministically determine whether the current index is suitable or requires a re-index. It should be detected during service start-up and exiting if the "whale index" version is not suitable.

Why is this needed:

When we add the FutureSwap index in #1484, the index is mutated and different hence need to re-index from scratch. On JellyfishSDK/whale, we used the minor in v{major}.**{minor}**.{patch} to determine when the old index wouldn't cut it hence requires re-indexing.

/apps whale-api /area apps /triage accepted

fuxingloh commented 2 years ago

/priority important-soon due to https://github.com/JellyfishSDK/jellyfish/issues/1484