generated from flashbots/flashbots-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 279
Add getHeader SSZ support #734
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
Merged
Merged
Changes from 42 commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
8ed5f68
Add ssz support for getHeader
jtraglia 498d8fc
Request SSZ then JSON
jtraglia a0cc8a0
Read response body after checking for success
jtraglia 3005de8
Request what the client asks for first
jtraglia 3afd060
Decode based on resp content type
jtraglia f65e83d
Return the best bid in the request encoding
jtraglia 2073a41
Fix some nits
jtraglia b4b9088
Fix debug message
jtraglia b1cda56
Always request header from relay in SSZ first
jtraglia 097c625
Merge branch 'develop' into ssz-get-header
jtraglia db3f598
Revert "Always request header from relay in SSZ first"
jtraglia 6545540
Update about request (SSZ and JSON) order
jtraglia 735bcbd
Update mock_relay.defaultHandleGetHeader to handle SSZ
jtraglia 881cff0
Add a test & fix a couple bugs
jtraglia 8d1073f
Fix lint
jtraglia 5342231
Address review feedback
jtraglia db84842
Fix double close
jtraglia 1e5ff29
Use consistent log message
jtraglia 357212a
Fix body close
jtraglia 8e5b644
One request per relay
jtraglia 5014440
Respond with client's favorite except
jtraglia 6171a13
Add accept file
jtraglia a860bf2
Move content types to new file
jtraglia 5761355
Default respond with JSON
jtraglia e7d51de
Fix nits
jtraglia 25462d6
Add SupportsSSZ field to RelayEntry
jtraglia 3f50e91
Improve media type handling
jtraglia 0cde21a
Return NotAcceptable if the only accept type is unsupported
jtraglia 4c9f49b
Fix lint
jtraglia 7c27374
Remove now incorrect comment
jtraglia 78463c4
Return JSON in getHeader under some circumstances
jtraglia 17810c2
Include ethConsensusVersion in getHeader response
jtraglia 461ceab
Decode header with ethConsensusVersion from response
jtraglia a405b92
Fix & improve tests
jtraglia f607ce3
Update comment
jtraglia 160eb66
Merge branch 'develop' into ssz-get-header
jtraglia 1ff636c
Do away with function map
jtraglia fd18b82
Pass header fields, not the whole header
jtraglia 0e38a22
Add back HeaderKeySlotUID
jtraglia 8cd3b0e
Use timewasted/go-accept-headers
jtraglia 5b6caba
Clean up header fields
jtraglia 3fbeafd
Fix some nits & add more debug prints
jtraglia dc7aaaa
Address review feedback
jtraglia fbfc3bd
Merge branch 'develop' into ssz-get-header
jtraglia dc70b85
Replace "client" with "proposer" in comments
jtraglia d3123bf
Remove unnecessary debug print
jtraglia 744273a
Rename some variables & fix a nit
jtraglia 5a919ff
Merge branch 'develop' into ssz-get-header
jtraglia de43986
Add another debug print
jtraglia 3c85273
Use more header constants
jtraglia 6f8b538
Rename media_type.go to constants.go & move header constants
jtraglia bdf4c6a
Fix nits
jtraglia 93a4755
Add EthConsensusVersion constants
jtraglia 14442d1
Fix linter
jtraglia 1fcd5ff
Remove allBidsWereJSON logic
jtraglia a745a43
Fix lint
jtraglia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,7 @@ linters: | |
| - goconst | ||
| - gosec | ||
| - ireturn | ||
| - maintidx | ||
| - noctx | ||
| - tagliatelle | ||
| - perfsprint | ||
|
|
||
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| package server | ||
|
|
||
| const ( | ||
jtraglia marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| MediaTypeJSON = "application/json" | ||
| MediaTypeOctetStream = "application/octet-stream" | ||
| ) | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.