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

Add tracking of on-chain state for contract #724

Merged
merged 11 commits into from
Nov 10, 2023

Conversation

ChrisSchinnerl
Copy link
Member

This is the preparation for another PR which adds automatic pruning of contracts to the autopilot if they don't appear on chain.

It adds the following possible states to a contract which get updated by the bus as it receives incoming blocks

  • "pending" - default for contracts added to the bus
  • "active" - is set as soon a contract appears on chain
  • "complete" - is set as soon as the storage proof appears on chain
  • "failed" - is set when an active contract doesn't become 'complete' by the end of its proof window

@ChrisSchinnerl ChrisSchinnerl self-assigned this Nov 7, 2023
@mike76-dev
Copy link
Contributor

Would it be possible to assign the state to active when a contract is being imported, e.g. from a satellite? Or expose an endpoint that does that?

@ChrisSchinnerl ChrisSchinnerl marked this pull request as ready for review November 8, 2023 16:16
@ChrisSchinnerl ChrisSchinnerl marked this pull request as draft November 8, 2023 16:17
@ChrisSchinnerl ChrisSchinnerl marked this pull request as ready for review November 9, 2023 12:17
Copy link
Member

@peterjan peterjan left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@ChrisSchinnerl ChrisSchinnerl merged commit 058b1de into master Nov 10, 2023
6 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the chris/prune-pending-contracts branch November 10, 2023 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants