pokt-network / poktroll

The official Shannon upgrade implementation of the Pocket Network Protocol implemented using Rollkit.dev
MIT License
15 stars 6 forks source link

[Utility] Update SessionSettlement when app goes into a negative amount #509

Closed Olshansk closed 2 months ago

Olshansk commented 2 months ago

Summary

When an app exceeds its stake, make the settlement amount its full balance.

Prevent an error to avoid consensus breaking issues.

Issue

It seems that a segfault occurs when we restart due to the -ve balance an app tries to hit.

Started with this:

Screenshot 2024-04-27 at 6 28 01 PM

And then we found this:

Screenshot 2024-04-27 at 5 37 33 PM Screenshot 2024-04-27 at 5 37 26 PM

Which led us to discovering this:

Screenshot 2024-04-27 at 6 13 50 PM

Type of change

Select one or more:

Testing

Local Testing (only if making code changes)

PR Testing (only if making code changes)

Sanity Checklist

github-actions[bot] commented 2 months ago

The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks. If you just created a pull request, you might need to push another commit to produce a container image DevNet can utilize to spin up infrastructure. You can use make trigger_ci to push an empty commit.