-
Notifications
You must be signed in to change notification settings - Fork 69
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
Conversation
octane/evmengine/keeper/evmmsgs.go
Outdated
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 { |
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.
can we add a test for this please. It isn't obvious that this is the same logic.
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.
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.
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.
In general, be vary careful when changing on-chain logic, since is must never change.
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.
Sure, will add a test!
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.
Test added. Inside the test, we're comparing the results of the new implementation to the results of the old one.
ff12b0b
to
aa821bb
Compare
Addresses multiple informational and low security findings.
issue: none