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

chore(halo): addresses multiple info and low sec findings #2086

Merged
merged 9 commits into from
Oct 8, 2024

Conversation

chmllr
Copy link
Contributor

@chmllr chmllr commented Oct 7, 2024

Addresses multiple informational and low security findings.

issue: none

@chmllr chmllr changed the title chore(halo): addresses multiple informational and low security findings chore(halo): addresses multiple info/low security findings Oct 7, 2024
@chmllr chmllr changed the title chore(halo): addresses multiple info/low security findings chore(halo): addresses multiple info and low sec findings Oct 7, 2024
topicI := slices.Concat(events[i].Topics...)
topicJ := slices.Concat(events[j].Topics...)
if cmp := bytes.Compare(topicI, topicJ); cmp != 0 {
if cmp := slices.CompareFunc(events[i].Topics, events[j].Topics, bytes.Compare); cmp != 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we add a test for this please. It isn't obvious that this is the same logic.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If this results in different ordering that before, we will get a app hash mismatch panic and the chain will stall. So lets ensure the ordering remains unchanged.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In general, be vary careful when changing on-chain logic, since is must never change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will add a test!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Test added. Inside the test, we're comparing the results of the new implementation to the results of the old one.

@devbugging devbugging self-requested a review October 8, 2024 10:56
@chmllr chmllr force-pushed the chmllr/sec-findings branch from ff12b0b to aa821bb Compare October 8, 2024 16:23
@chmllr chmllr enabled auto-merge (squash) October 8, 2024 16:38
@chmllr chmllr merged commit 64dc86a into main Oct 8, 2024
18 checks passed
@chmllr chmllr deleted the chmllr/sec-findings branch October 8, 2024 16:39
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