-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add API for getting ministaker address (per challenge, per level) #508
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #508 +/- ##
==========================================
- Coverage 61.14% 60.22% -0.93%
==========================================
Files 40 43 +3
Lines 6048 6436 +388
==========================================
+ Hits 3698 3876 +178
- Misses 2350 2511 +161
- Partials 0 49 +49 |
api/method_edges.go
Outdated
} | ||
} | ||
stakeInfoMap[edge.AssertionHash][edge.Type].StakerAddresses = append(stakeInfoMap[edge.AssertionHash][edge.Type].StakerAddresses, edge.MiniStaker) | ||
stakeInfoMap[edge.AssertionHash][edge.Type].TotalMinistakes++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be more useful if TotalMinistakes
is the total staked amount rather than how many mini stakes are there, given the amount of mini stakes may vary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely agree on this, but currently we only have a fixed stake amount (the implementation for variable staking is not in place at the moment i think).
Since we have a fixed stake right now, adding that information does not seems that helpful (also since the stake amount is constant, its not attached to the edge proto, so fetching it is non trivial, but with the variable staking implementation that information will be attached to the edge and will be easier to fetch), will update the code once the variable staking is in place.
Also changing TotalMinistakes to NumberOfMinistakes to avoid confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed here that number of ministakes is helpful because it helps us gauge if there is a sybil more clearly
Part of https://www.notion.so/arbitrum/Crafting-an-API-for-Inspecting-Challenges-in-Arbitrum-BOLD-006da164d7ae450393b611d2777ff860