Skip to content

Validate Max Aggregatable Exponent Consensus - #822

Open
silaslenihan wants to merge 1 commit into
mainfrom
validate-max-aggregatable-exponent-consesnus
Open

silaslenihan wants to merge 1 commit into
mainfrom
validate-max-aggregatable-exponent-consesnus

Conversation

@silaslenihan

Copy link
Copy Markdown
Contributor

No description provided.

@cl-sonarqube-production

Copy link
Copy Markdown

@silaslenihan
silaslenihan marked this pull request as ready for review October 15, 2026 15:21
@silaslenihan
silaslenihan requested review from a team as code owners October 15, 2026 15:21
return fmt.Errorf("observation from observer %d is missing input for request %s", ao.Observer, requestID)
}

if valueInput, ok := reqObs.Input.GetObservation().(*sdk.SimpleConsensusInputs_Value); ok {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@silaslenihan is this valueInput coming from the user ? Asking because if we return error here, one user's bad input can kill the round observation of all nodes ?

func(val *valuespb.Value) (decimal.Decimal, error) {
var d decimal.Decimal
if exp := val.GetDecimalValue().GetExponent(); exp > maxDecimalExponent || exp < -maxDecimalExponent {
if exp := val.GetDecimalValue().GetExponent(); exp > MaxAggregatableExponent || exp < -MaxAggregatableExponent {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this ever happen if we ValidateObservation ?

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

Successfully merging this pull request may close these issues.

3 participants