-
Notifications
You must be signed in to change notification settings - Fork 992
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
Handle acting on tallied pieces of data that take longer than one round to confirm #768
Handle acting on tallied pieces of data that take longer than one round to confirm #768
Conversation
cff7a1f
to
535e4be
Compare
b7ab3ec
to
b35434f
Compare
4c97319
to
362a340
Compare
tracing::info!( | ||
?keys.prefix, | ||
validators = ?vote_info.voters(), | ||
"Recording validators as having voted for this event" |
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.
this is also called from validator set update code, right? maybe we should change event to something else?
"Recording validators as having voted for this event" | |
"Recording validators as having voted for this XXX" |
but I'm not sure what to replace XXX
with
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.
yeah I am not sure of a good term either. I'm updating this log to "Calculating validators' votes applied to an existing tally"
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.
perhaps you could attach a context message to T
, something like T: TallyItem
, or whatever, that returned a static string identifying itself
"Recording validators as having voted for this event" | ||
); | ||
let tally_pre = super::storage::read(store, keys)?; | ||
if tally_pre.seen { |
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.
could we change seen
to something like approved
? and seen_by
to something along the lines of voted_by
. this is a bit more generic. I've noticed seen
and seen_by
in the logs for validator set updates, and thought it was a bit silly, since it makes more sense in the context of ethereum events, rather than valset upds
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.
of course this would only apply to a future PR, not this one
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.
💯% agree, the term "seen" is overloaded in our design/code.
ef2a9b6
to
c0654d8
Compare
Have force pushed a rebase onto |
Closes #197
This PR makes it so that votes are applied for things (e.g. Ethereum events) which already exist in storage but that are not yet
seen = true
. There are also a couple of small changes to theFractionalVotingPower
type.