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

[Enhancement] Avoid to repeatedly check the same markets when redeeming #143

Closed
Adamantios opened this issue Nov 17, 2023 · 4 comments · Fixed by #151
Closed

[Enhancement] Avoid to repeatedly check the same markets when redeeming #143

Adamantios opened this issue Nov 17, 2023 · 4 comments · Fixed by #151
Assignees
Labels
enhancement New feature or request

Comments

@Adamantios
Copy link
Collaborator

Adamantios commented Nov 17, 2023

The redeeming round always needs to check all the events from the block on which it first placed a bet.

This can be improved by storing the condition ids of the redeemed positions in the synchronized data.

@Adamantios Adamantios added the enhancement New feature or request label Nov 17, 2023
@Adamantios Adamantios self-assigned this Nov 17, 2023
@DavidMinarsch DavidMinarsch changed the title Avoid to repeatedly check the same markets when redeeming [Enhancement] Avoid to repeatedly check the same markets when redeeming Nov 17, 2023
@DavidMinarsch
Copy link
Contributor

Beyond just storing in the synchronized data (which is important for a given agent run), it would be useful to not recheck everything when turning off and on the agent again. Maybe we can assume that the default behaviour only filters from the point of the last redeem? Although there'd be risks in this. We could also simply store the point of last redemption?

@Adamantios
Copy link
Collaborator Author

Adamantios commented Nov 20, 2023

We could also simply store the point of last redemption?

The risk stems from the possibility that redeeming market A does not necessarily imply that it is older than market B which may not have been finalized yet.

Therefore, we can only store the condition ids of the redeemed positions as a solution. That way, we can filter the corresponding markets out before searching for the oldest one which will define the block from which the filtering operation will start.

@Adamantios
Copy link
Collaborator Author

Reopening this as we currently do not have support for persisting the condition ids across runs (as suggested in #143 (comment)), but only across periods (added in #151).

@Adamantios Adamantios reopened this Nov 20, 2023
@Adamantios
Copy link
Collaborator Author

Closing this issue as it is irrelevant after #172.

We are not using filtering anymore for the redeeming. Instead, we are using the indexed data provided by the subgraphs.

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

Successfully merging a pull request may close this issue.

2 participants