-
Notifications
You must be signed in to change notification settings - Fork 11
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
What will happen to a rent contract on a grace period for an offline node #979
Comments
From polka side: From TS client side; |
While reviewing the billing code, I observed that when billing is triggered for a rent contract associated with a standby node, our current behavior is to return a success status. Our intention is to prevent billing users when they rent a sleeping node that fails to come back online. The challenge arises because there are multiple paths to this point. For instance:
Considering that the contract may have already entered the grace period before the node transitioned to standby, we should also investigate how the node was allowed to enter standby mode despite having active contracts. @A-Harby any hints? Regarding what would happen, I assume that the rent contract associated with the standby node would remain stuck in the grace period even after the period expires because we bypass billing logic while the node is on standby. Here are the relevant scenarios to consider: 1- Node rented while on standby and never brought back online:
2- Node rented while online and later transitioned to standby (still to be investigated):
These are more paths than what was originally planned. we need to ensure that the necessary cleanup and handling occur even if the node is in standby mode. Instead of returning a success status, setting the amount due to 0 and continuing with function execution could be a more robust approach. what do you think @renauter? I’m currently in the process of rewriting and refactoring the billing logic, and I would greatly appreciate your feedback. |
Take a look at the contract info
It seems that the node is back online, but the billing has been stuck for a month now. |
Update on offline rented node contract: it didn't delete after passing the expiration date; it's been nearly two months and still in grace period.
|
I haven't faced an issue similar to this tbh, but this should never happen; otherwise, the standby mode would be working wrong because the most important rule for the node to go standby is not to have any contracts. Also, this case is happening to an offline node; I am not sure about the standby node. |
@A-Harby I assume your question has already been answered, and there have been numerous improvements and bug fixes in the latest release. If you have any updates or continue to experience issues related to this, please feel free to reopen the discussion. |
What is your question?
What will happen to a rent contract on a grace period for an offline node?
What have you tried so far?
Tried deleting but couldn't,
Error from TS client:
FarmHasNotEnoughPublicIPsFree: Failed to apply {"args":{"calls":[{"args":{"contract_id":"119,696"},"method":"cancelContract","section":"smartContractModule"}]},"method":"batchAll","section":"utility"}
14,976,851,872,796,664
the grace period amount on the chain.contract was created yesterday, 6/5/2024, 3:28:18 PM
here
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftfchain.dev.grid.tf%2Fws#/explorer/query/0xad6a6762b837ab9aef06acbf729462fe708de7c9e5864b01398188251c5bd52a
Screenshots
Error from polka
The text was updated successfully, but these errors were encountered: