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

Agent doesn't refresh POI when waiting for lower gas #413

Closed
sharppanda opened this issue Apr 25, 2022 · 6 comments
Closed

Agent doesn't refresh POI when waiting for lower gas #413

sharppanda opened this issue Apr 25, 2022 · 6 comments

Comments

@sharppanda
Copy link
Contributor

The agent seems to close (closeAndAllocate and possible with close as well) an allocation with poi from previous epoch.
When the epoch changes and allocation have 27 days, the agent tries to close the allocation. It retrieves the POI (not sure why, but at that moment it gets the allocation from past epoch). This poi is then used for the transaction.
If the gas limit is not under the limit, the operation retries. When successful it seems that it uses the previous POI (doesn't generate new one).
Also during the retry period it seems that the agent doesn't react on any new changes in indexing rules.

@hopeyen
Copy link
Contributor

hopeyen commented Apr 25, 2022

Hi 👋 thanks for creating a detailed issue.

The very first thing the agent does during close/reallocate is to grab the current epoch start block POI. If agent received a valid POI, it proceeds to submit POI (proof of indexing) in transaction to qualify for indexing rewards, hopefully this explains why it retrieves POI.
The protocol also accepts previous block start block POI if the block failed during the previous epoch, which is what you saw about retrieving from the past epoch.

My agent seems to react responsively, could you explain a case where it didn't react?

@sharppanda
Copy link
Contributor Author

sharppanda commented Apr 25, 2022

Hi,

I see the issue when the gas limit is reached. It retries until the gas is below the given limit. After that I assume it submits with the POI from first try. From my point of view it would make more sense to get a new POI before submitting the transaction. In worst cases the limit might block the transaction for multiple days and after that the POI would be invalid.

During these retries the agents accept change rules requests, but for example if I add a rule decisionBasis: always the graph node doesn't start to index before the retries are gone. If I restart the agent it works.

@fordN
Copy link
Contributor

fordN commented May 6, 2022

Great observation @sharppanda! I'm working on a big update (Action queue) right now that will include a fix to this behavior you observed. In the new paradigm the POI will be resolved only when the close allocation transaction is about to be sent (and will re resolve it on a retry.)

@sharppanda
Copy link
Contributor Author

Great to hear @fordN 👏
Do you want to close the issue or leave it open and link it to new version fixing this behavior?

@fordN
Copy link
Contributor

fordN commented May 17, 2022

@sharppanda I typically close the relevant issue when merging the PR. Here's the draft PR in progress.

@fordN
Copy link
Contributor

fordN commented Jul 12, 2024

Closing this as it was resolved in #419

@fordN fordN closed this as completed Jul 12, 2024
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

No branches or pull requests

5 participants
@fordN @sharppanda @hopeyen and others