Skip to content

ENGN-3256 totalsumprevioustopicweights can be set to any value#760

Merged
xmariachi merged 4 commits intodevfrom
diego/proto-3256-totalsumprevioustopicweights-can-be-set-to-any-value
Mar 18, 2025
Merged

ENGN-3256 totalsumprevioustopicweights can be set to any value#760
xmariachi merged 4 commits intodevfrom
diego/proto-3256-totalsumprevioustopicweights-can-be-set-to-any-value

Conversation

@xmariachi
Copy link
Copy Markdown
Contributor

@xmariachi xmariachi commented Mar 4, 2025

Purpose of Changes and their Description

  • Fix vulnerability: if topic has not been (re)activated, then the topic weights should not change.
  • Change isAdded, error for just error on addTopicToActiveSetRespectingLimitsWithoutMinWeightReset, adding some error types. The flag was not really adding value, while not processing the flag would lead to a vulnerability like the one found.

Are these changes tested and documented?

  • If tested, please describe how. If not, why tests are not needed. -- existing unit tests
  • If documented, please describe where. If not, describe why docs are not needed. -- no need, changes in functions not user-facing.
  • Added to Unreleased section of CHANGELOG.md?

@xmariachi xmariachi force-pushed the diego/proto-3256-totalsumprevioustopicweights-can-be-set-to-any-value branch from d9f71ed to e0539c4 Compare March 4, 2025 20:11
@xmariachi xmariachi marked this pull request as ready for review March 4, 2025 20:12
Comment thread x/emissions/keeper/topic_activation.go Outdated
Comment thread x/emissions/keeper/topic_activation.go Outdated
amimart
amimart previously approved these changes Mar 5, 2025
Copy link
Copy Markdown
Contributor

@amimart amimart left a comment

Choose a reason for hiding this comment

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

Sounds good thanks, just noticed minor simplification

amimart
amimart previously approved these changes Mar 11, 2025
@xmariachi xmariachi dismissed stale reviews from guilherme-brandao and amimart via 7faf946 March 14, 2025 18:07
@xmariachi xmariachi force-pushed the diego/proto-3256-totalsumprevioustopicweights-can-be-set-to-any-value branch from d4e56b0 to 7faf946 Compare March 14, 2025 18:07
amimart
amimart previously approved these changes Mar 14, 2025
xmariachi and others added 4 commits March 14, 2025 19:09
Co-authored-by: Arnaud Mimart <33665250+amimart@users.noreply.github.com>
Signed-off-by: Diego C <xmariachi@gmail.com>
@xmariachi xmariachi force-pushed the diego/proto-3256-totalsumprevioustopicweights-can-be-set-to-any-value branch from 7faf946 to 730b761 Compare March 14, 2025 18:16
Comment thread x/emissions/keeper/topic_activation.go
@xmariachi xmariachi changed the title Diego/proto 3256 totalsumprevioustopicweights can be set to any value ENGN-3256 totalsumprevioustopicweights can be set to any value Mar 17, 2025
@xmariachi xmariachi merged commit 43a8632 into dev Mar 18, 2025
9 checks passed
@xmariachi xmariachi deleted the diego/proto-3256-totalsumprevioustopicweights-can-be-set-to-any-value branch March 18, 2025 19:29
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.

5 participants