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

Make dr block height part of the primary key #428

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

Thomasvdam
Copy link
Member

Motivation

This allows us to keep old results around for recurring data request IDs.

Explanation of Changes

We don't need a latest batch assignment query since those should always uniquely identify the exact DR_ID+height combination for which the result has been batched.

We have to manually create a range since the built in collections.NewSuperPrefixedTripleRange doesn't expose the ordering methods despite them being present on the struct. :( Ver sad.

Also introduces a few missing genesis states during initialisation.

Testing

Expanded on the result inclusion test to verify that you get the latest result when you do not specify the height, but by specifying the height you can still retrieve an older result. This also brought up the issue that by default the ordering of a Range is ascending.

Related PRs and Issues

N.A.

@Thomasvdam Thomasvdam requested review from hacheigriega and a team December 2, 2024 13:24
@Thomasvdam Thomasvdam force-pushed the feat/query-result-dr-height branch from 6f5d1eb to 4108502 Compare December 2, 2024 13:33
This allows us to keep old results around for recurring data request
IDs. Also introduces a few missing genesis states during initialisation.
@Thomasvdam Thomasvdam force-pushed the feat/query-result-dr-height branch from 4108502 to 6a1ea9a Compare December 2, 2024 14:49
@Thomasvdam Thomasvdam merged commit 6a1ea9a into main Dec 2, 2024
16 of 17 checks passed
@Thomasvdam Thomasvdam deleted the feat/query-result-dr-height branch December 2, 2024 15:04
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