binary search is the wrong tool for the job, derp#12757
Merged
kasey merged 2 commits intodeneb-integrationfrom Aug 18, 2023
Merged
binary search is the wrong tool for the job, derp#12757kasey merged 2 commits intodeneb-integrationfrom
kasey merged 2 commits intodeneb-integrationfrom
Conversation
potuz
reviewed
Aug 18, 2023
| continue | ||
| } | ||
| commits, err := bwb[i].Block.Block().Body().BlobKzgCommitments() | ||
| commits, err := b.Block.Block().Body().BlobKzgCommitments() |
Contributor
There was a problem hiding this comment.
Do we really want to return nil here on errors? the caller will also return early with a nil when perhaps we want to propagate an error.
Collaborator
Author
There was a problem hiding this comment.
Something I'm trying to do more often is minimize error handling to callers. In this case we know these accessors just return errors when a property isn't supported by the version. It isn't worth propagating that IMO.
potuz
approved these changes
Aug 18, 2023
kasey
added a commit
that referenced
this pull request
Aug 21, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
kasey
added a commit
that referenced
this pull request
Aug 22, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
kasey
added a commit
that referenced
this pull request
Aug 22, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
kasey
added a commit
that referenced
this pull request
Aug 22, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
kasey
added a commit
that referenced
this pull request
Aug 23, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
kasey
added a commit
that referenced
this pull request
Aug 23, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
kasey
added a commit
that referenced
this pull request
Aug 23, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
kasey
added a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
kasey
added a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 24, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 30, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 30, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
prestonvanloon
pushed a commit
that referenced
this pull request
Aug 31, 2023
* binary search is the wrong tool for the job, derp * restore protection from array index panics --------- Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
This fixes a bug in the
lowestSlotNeedsBlobfunc. This method was trying to use binary search to find the first block in the sorted list that contained commitments. Which was an utterly deranged thing to do. Now the func iterates through the slice in order and returns the slot of the first block that contains commitments.