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

[AIP-87][Discussion]Introduce native API to evaluate aggregator value is greater or equal to given amount #447

Closed
thepomeranian opened this issue Jun 11, 2024 · 0 comments

Comments

@thepomeranian
Copy link
Collaborator

AIP Discussion

Calling aggregator_v2::is_at_least API, returns true if aggregator value is larger than or equal to the given min_amount, false otherwise.

Aggregators are concurrent counters, allowing for modification without introducing read/write conflicts. Revealing the actual value (read) introduces the read-write conflict back, but in cases where we need to reveal a property on the value - that can be done so efficiently and in a parallel friendly way, via existing branch prediction. And so this operation is more efficient and much more parallelization friendly than calling read(agg) > min_amount.

Read more about it here: https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-87.md

@thepomeranian thepomeranian added this to the aptos-node-v1.14 milestone Jun 11, 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

1 participant