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

indexer-common: Implement stake feasibility check #579

Merged
merged 11 commits into from
Jan 31, 2023

Conversation

tilacog
Copy link
Contributor

@tilacog tilacog commented Jan 26, 2023

Introduces stake feasibility check for Action batches.

Before this, batches would be rejected even if their gross value fits in the free stake final balance.

Tasks:

  • Batch stake feasibility check
  • Sort actions by GRT balance

@tilacog tilacog requested a review from fordN January 26, 2023 20:04
Since accessing GRT values for unallocation is expensive, this commit
introduces the ResolvedAction wrapper interface, which aims to cache
GRT values of Unnalocate Actions as well storing its GRT balance
during the validation process.
tilacog and others added 4 commits January 26, 2023 20:56
Encapsulates all allocation fetching inside  AllocationManager into a
dedicated function.
We decided to stick with error code IE013 for signaling batch stake
insufficiency. Also, we will tackle gasLimits on a new PR.
@tilacog tilacog marked this pull request as ready for review January 27, 2023 19:17
Copy link
Contributor

@fordN fordN left a comment

Choose a reason for hiding this comment

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

👍

@tilacog tilacog merged commit 66fd1f4 into main Jan 31, 2023
@tilacog tilacog deleted the tiago/action-batch-feasibility branch January 31, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🚗 Merged
Development

Successfully merging this pull request may close these issues.

2 participants