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

Adjust cost calc. when pruning contracts with old hosts. #1229

Merged
merged 1 commit into from
May 23, 2024

Conversation

peterjan
Copy link
Member

@peterjan peterjan commented May 14, 2024

UPDATE: I updated the PR to always overpay and got rid of the response size as well. This just fixes all outstanding pruning errors and we can update it again when we either include the release in the host score or once we move to RHP4.

This PR fixes a pruning error I ran into on my node (2 hosts actually) where we would not transfer sufficient funds to the host when pruning the contract. The numbers didn't make sense, because calculating backwards I would have to be dealing with 40TiB contracts to arrive at the expected cost. I then realised we probably updated the logic at one point and found we did in host v0.2.1... So we're just dealing with very old hosts.

The fix is to simply retry and use the old cost calc. method, it's however slightly annoying to do because the host blows up the transport on error, and we need to run into the error once because hosts didn't have a release field... I tested this manually on the integrity node.

@peterjan peterjan self-assigned this May 14, 2024
@peterjan
Copy link
Member Author

@ChrisSchinnerl mind taking a look at this DRAFT if this is reasonable as a fix for pre v0.2.1 hosts?

@peterjan peterjan marked this pull request as ready for review May 16, 2024 07:23
worker/rhpv2.go Outdated Show resolved Hide resolved
@ChrisSchinnerl ChrisSchinnerl merged commit 1b08e4d into dev May 23, 2024
7 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the pj/prune-compat-v021 branch May 23, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants