init live el reward calculation#34
Open
bhakiyakalimuthu wants to merge 10 commits into
Open
Conversation
80f346c to
24e91e5
Compare
4042f44 to
324a640
Compare
| var matchedBids []DataHeader | ||
| var errBuf []string | ||
| for relayURL, bids := range groupedBids { | ||
| elInfo.Bids[relayURL] = bids |
Contributor
There was a problem hiding this comment.
we shouldn't need allbids only bids that match otherwise this data is going to be very large due to bloxroute not filtering completely
| } | ||
| sortable = append(sortable, sortableBid{bid, val}) | ||
| } | ||
| if len(sortable) < 1 { |
Contributor
There was a problem hiding this comment.
or should it be the same size as matchedBids
| return sortable[i].Value.Cmp(sortable[j].Value) < 0 | ||
| }) | ||
|
|
||
| secondHighest := sortable[len(sortable)-1] |
Contributor
There was a problem hiding this comment.
Should we ignore it if secondHighest is from the bloxroute rproxy? But not ignore if its the main-relay.
| return elInfo | ||
| } | ||
|
|
||
| func feeFor(percent uint64, uplift float64) float64 { |
Contributor
There was a problem hiding this comment.
is this for a specific account_id?
|
|
||
| func (s *Service) logRecord(record SlotStatsRecord, slotKey string, userAgent string) { | ||
| go func() { | ||
| for { |
Contributor
There was a problem hiding this comment.
we should wait > 5 slots before we do this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Perform El reward calculation in real time using bids provided by data endpoints
💡 Motivation and Context
Currently El reward calculations are performed based on received validator logs, instead El reward calcuation will be performed based on provided bids in live via data endpoints supported by other relays
✅ I have completed the following steps:
make lintmake testgo mod tidy