Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@anomit
Copy link
Member

@anomit anomit commented Jun 21, 2023

Fixes #37

Checklist

  • My branch is up-to-date with upstream/develop branch.
  • Everything works and tested for Python 3.8.0 and above.
  • I ran pre-commit checks against my changes.
  • I've written tests against my changes and all the current present tests are passing.

Current behaviour

During a fresh run of a node, before the local services receive their first snapshot finalization event for a project, the same project's query for last finalized epoch ID on core_api.py would fail.

New expected behaviour

This fix ensure even if a loally cached state is not available for project's finalized epoch ID, core_api can consult last finalized status from the protocol state contract.

Change logs

Fixed

Request handler:

https://github.com/PowerLoom/pooler/blob/03302099be391f4637d7a22b9eab45473c4758e4/pooler/core_api.py#L186

Fetch from protocol state contract:

https://github.com/PowerLoom/pooler/blob/03302099be391f4637d7a22b9eab45473c4758e4/pooler/core_api.py#L212-L238

Deployment Instructions

Restart gunicorn_core_launcher.py

@anomit anomit requested review from SwaroopH and xadahiya June 21, 2023 16:41
Copy link
Member

@xadahiya xadahiya left a comment

Choose a reason for hiding this comment

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

Tested locally, works well! LGTM

Copy link
Member

@SwaroopH SwaroopH left a comment

Choose a reason for hiding this comment

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

Tested on Codespace, LGTM!

@SwaroopH SwaroopH merged commit 762fa59 into main Jun 21, 2023
@SwaroopH SwaroopH deleted the 37-last-finalized-epoch-id-from-protocol-state branch July 27, 2023 23:12
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.

Remove dependency on audit protocol for a project's last finalized epoch ID

4 participants