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

[IND-394] add version to Indexer events #289

Merged
merged 2 commits into from
Sep 18, 2023
Merged

[IND-394] add version to Indexer events #289

merged 2 commits into from
Sep 18, 2023

Conversation

dydxwill
Copy link
Contributor

No description provided.

Signed-off-by: Will Liu <will@dydx.exchange>
@linear
Copy link

linear bot commented Sep 18, 2023

IND-394 Update protocol Indexer event with version

in Indexer, assume default value of 1 if version is not set

* @returns
*/
export function createIndexerTendermintEvent(
subtype: string,
data: string,
transactionIndex: number,
eventIndex: number,
version: number = 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a cleaner way to do this? I'm worried someone will use the wrong version for protocol one day that will cause an indexer outage

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was already the case with subtype where it was just a matching of strings between the 2 repos.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is only used in tests.

SubtypeLiquidityTier = "liquidity_tier"
SubtypeUpdatePerpetual = "update_perpetual"
SubtypeUpdateClobPair = "update_clob_pair"
OrderFillEventVersion uint32 = 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit add a comment and have the versions in a different section

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@dydxwill dydxwill merged commit a3708c9 into main Sep 18, 2023
26 checks passed
@dydxwill dydxwill deleted the wl/tslnlayer2 branch September 18, 2023 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants