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

Sort New assignment... logs by attesterSlot order #5522

Closed
terencechain opened this issue Apr 20, 2020 · 5 comments
Closed

Sort New assignment... logs by attesterSlot order #5522

terencechain opened this issue Apr 20, 2020 · 5 comments
Labels
Good First Issue Good for newcomers Help Wanted Extra attention is needed

Comments

@terencechain
Copy link
Member

Will be nice to view these logs in ascending order based on attesterSlot and proposerSlot

Screen Shot 2020-04-19 at 5 10 25 PM

@terencechain terencechain added Good First Issue Good for newcomers Help Wanted Extra attention is needed labels Apr 20, 2020
@ShawkiS
Copy link
Contributor

ShawkiS commented Apr 20, 2020

Hey Terence, I am sorry but I am totally new about the protocol, am I right that this is the code that must be edited: https://github.com/prysmaticlabs/prysm/blob/master/beacon-chain/rpc/validator/assignments.go

The default assignment?

@mcdee
Copy link
Contributor

mcdee commented Apr 20, 2020

@terencechain any thoughts on #5397 which provides more concise output for assignments (including ordering by slot)?

@ShawkiS
Copy link
Contributor

ShawkiS commented Apr 20, 2020

sort.SliceStable(validatorAssignments, func(i, j int) bool {
return validatorAssignments[i].AttesterSlot < validatorAssignments[j].AttesterSlot
})

Like that?

@ShawkiS
Copy link
Contributor

ShawkiS commented Apr 20, 2020

Is it always that if the attesterSlot of a validatorAssignment is bigger the other validatorAssignment the proposerSlot is bigger?

@terencechain
Copy link
Member Author

@mcdee that looks inline with my thinking, let's go with that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good for newcomers Help Wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants