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

Gzip fix #382

Closed
wants to merge 2 commits into from
Closed

Gzip fix #382

wants to merge 2 commits into from

Conversation

metachris
Copy link
Collaborator

@metachris metachris commented Oct 21, 2022

📝 Summary

Fix bugs in requesting gzip encoded response (#365. cc/ @dmarzzz)

  • Always set the accept-encoding header, not only if there's a request payload
  • Manually add the gzip reader

Docker image: v1.4.0-rc3

Tested successfully in Sepolia by Kiln.fi


✅ I have run these commands

  • make lint
  • make test-race
  • go mod tidy

@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2022

Codecov Report

Merging #382 (6115745) into main (1a11894) will increase coverage by 0.56%.
The diff coverage is 63.63%.

@@            Coverage Diff             @@
##             main     #382      +/-   ##
==========================================
+ Coverage   66.02%   66.59%   +0.56%     
==========================================
  Files           7        7              
  Lines         889      895       +6     
==========================================
+ Hits          587      596       +9     
+ Misses        265      264       -1     
+ Partials       37       35       -2     
Flag Coverage Δ
unittests 66.59% <63.63%> (+0.56%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/utils.go 74.07% <63.63%> (-1.93%) ⬇️
server/service.go 79.28% <0.00%> (+1.42%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@jtraglia jtraglia left a comment

Choose a reason for hiding this comment

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

Are you testing this against the relay with gzip support? There's not a straight-forward way for me to verify that this works as expected, but the code looks fine 👍

@dmarzzz
Copy link
Member

dmarzzz commented Oct 21, 2022

Oh interesting, I must have not been testing this properly then. It's worth double checking then if this has any performance improvements (have employed gzip to a few other internal services recently and have always seen improvement fwiw). Did you see any difference in your tests on sepolia? I can also do some testing this weekend

@metachris
Copy link
Collaborator Author

the test from the old PR works now, before it wouldn't be active because accept-encoding wasn't actually sent (no payload)

@metachris
Copy link
Collaborator Author

For some background:

The rc-1 version was tested on Sepolia with just the original PR #365 in it, and there were these errors:

error="could not unmarshal response \x1f\x8b\b\x00\x00\x00\x00\x00\x00\xff\x94U\xdbn\xa4\xb7\r\xbe\xefc\xe8z.x\x12E\xfaU\x8ab@\x89\xd4fP\xdbc\xccL\x82\x05\x82\xbc{\xf1\xafѬ{0\xb2\xcb+\x81\"?\x9e>Q\xbf\xb7\xdf\xeav\xbf\\_\xdbS\x9b\xf5\xfc\x1c\x8f\xdb\xe5k;\xb5\x8cG\xb4\xa7\xdf\xdb[\xdc\xea\xf5q\xfe%\ueff4\xa7\x06_\xc7\x1cݨ\xcf)5\xd1}\r,`$\xdd\u0380\xb9\x86\x9a\xb1\xc8\u07bc\x004$wzJ\xee\xd0\x12.\xc5h\xa7\xb6\xabηZ\x97\xb7K\xbd>\xbe\x81b\xd1\xcaaf4\x91\x92\xbdK\x80\xf8N\xa3\xbdS\x1d\xbb\xf6\\\x10\xbd\x9d\xda\xfd\x11\x8f:߮\xd7wϽ\x90\xb8t\x1b\xa8\x8d\xb1:D\x17\xf0\xb0\xe4n\xe5H*<)'w'T\xe1\x11\t\xb3\x17\xe1\xd6\xf4\xe9$\xed\xd4n\xb5\xea\xf2\xf6\xb8\u007f\aU\r\x1a\x9ek\xe3&\xb0\x85@UHk\aR\xf6\x89\x19\x9b|B\x8c\xcc\xec<%\xa9S\xf6\x9a\x96\x04P\"\xb3\x9d\xda\xf3\xf5\xcb\xfd<\x9f\xafחo\x88\xf0WB\x1f\xce\xf8?\xb7\xf6\xf9\xd5\xcf\x00\xff\x87\xe0G\xdc\xffog?\x16\xc2\xfe\xcb\x19\xff\r\x87\xdf\x15\x9f\xa6\xf1\x83\xf2W\xfe\xf2\x13(\x9f\xdb\xd2\xe7h\xf8c\x11\xde\xe5h\x1c~\xec^;\xb5\xb7[\xfdv\xbe\xc5k\xc6\xf5\x1b%\n(\xfb\xce\xda+\x8a0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rZ{/\xd11|\xb1@\x95\x9aJQ\xcc\xday\xe0\x1b\xbc\x17I\xbchE\x18\xec\xc1\"n#L\xd2\x18g\xc9\x18u\x18\xad\xa3\xae\xf0=\x9d\x95W카;\xacm\vxY\x80\xccY:7\xcc\r\xcbH{0t/\xee\x13khgg\u05ee\xc2\xce16\xf6㯀5e\x12\xa5\xee>\xb3\xda?\xfe\xf8\xe3o\xff\n\x00\x00\xff\xffꗣ\x84{\a\x00\x00: invalid character '\\x1f' looking for beginning of value" method=getPayload parentHash=0x7b75825bb4eb199c71e03126f9301dc7688344ff3c006a4dfd9d4dfa6e43e61a slot=885116 url="https://builder-relay-sepolia.flashbots.net/eth/v1/builder/blinded_blocks" version=v1.4.0-rc1
error="could not unmarshal response \x1f\x8b\b\x00\x00\x00\x00\x00\x00\xff\xec\x95M\x8e[\xb9\x0e\x85\xe7o\x19\x1a{@\x91⟷\xf2\xd00(\x8aJ\x8c\xae\xb2\v\xb6\x13\x14\x10d\xef\r\xa7\x90d\x01ݳn\x8e.\x88\xab\x03~\x14\x0f\xf5\xad}\xad\xdb\xfd|\xbd\xb4c\x9b\xf5\xf2\x12\x8f\xdb\xf9\xbd\x1dڊG\xb4\xe3\xb7\xf6\x16\xb7\xba<N\x9f\xe3\xfe\xb9\x1d\x1b\xbc\xab\x93\xea\xe2`\x06d\x16\x1a\xe8\xc1eK\xb1\xcf1|A\x8e1\xc3\x12\x1cp\xa6\x80\xab)\xab\x80\x92*\xa0\xf6vh\xbb\xeat\xab<\xbf\x9d\xeb\xf2\xf8!\xda\vs\xa9\x99\xe1\xec\xb8\xc8y\x04\f\xdf\xcbp\xef%\xdeYx%\x04\xb7C\xbb?\xe2Q\xa7\xdb\xf5\xfaq\xf2)<Q\x86\xa2\xaf-\x12\x1e\x99\x03(57\xa2\x13\xf9؆\xdci\xe0(D\xa6.\xdd\x03\xabj(\xe1\x1c\xde\x0e\xedVY\xe7\xb7\xc7\xfd\xb7\xa8\x83\xa4\xd5^\xbd<ʦ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186\fF\xc3\xce\x1cY^E\xe5\xc2>\xb54\xf6\xb6\x12\xdcjkhm-\vPFء\x18\xb8%\x98ʕ\x99\"g\x92\x8fف&\"\xae\xb4\xbe\xc3\u0557\xa5\xf6Y\v2\xd17\xaeH\xf8\xd5,Y?\x9be\b\x18b\x00j\xc8\b棣X\xacn\xce(\x910\xc9d\xc7\x06\xa9\xbds\x88\xaa'\r\xa8\x12\x13\x89\x05\xdd\"\xa3\xa3\x19|LĚN3P\xa0,\xaa\x83T\xdf\xd3j\xa7!\x8e=\x89\x8d6\xda,\xc0\xfe|\xb3\xc6\xe2Lڲ\x99\x90Ex=\xdb\xe4\xe2\xc3琤R\x10ۡ\xabo\x99{9{e-\x1f5\xac`f\xaf\xde3,\xa2\x9e4(\x1a\xcb`\xb7?\xbe\u007f\xff\xdf_\x01\x00\x00\xff\xff\x93\xaf\xac\xb1\xe2\a\x00\x00: invalid character '\\x1f' looking for beginning of value" method=getPayload parentHash=0x79377d5a55025563429a5e8d721b449d0c44ba8c0902bc609787576073770271 slot=885129 url="https://builder-relay-sepolia.flashbots.net/eth/v1/builder/blinded_blocks" version=v1.4.0-rc1
error="could not unmarshal response \x1f\x8b\b\x00\x00\x00\x00\x00\x00\xff\xccT\xc1\x8e$\xc9\t\xbd\xfb3\xe2\\\a\x82\x00\x02\xfaW,\xabD\x040[rwW\xab\xaav5\xd2j\xff\xdd\xcany\xd6#\xcfh\xc6>X\xe6\x90\x19\xf9D\xc2\xe3\x05\xf0{\xfb-o\xf7\xcb\xf5\xb5=\xb5\x95\xcf\xcf\xfe\xb8]>\xb7S\v\u007fx{\xfa\xbd\xbd\xf9-_\x1f\xe7_\xfc\xfeK{j\xf09dC\xd6(\xf3\x95.\x13\xb1\x96\x96\xafAD\xda\x11\xb3P\xc1\xa5\x8f\x94\xe1\xa4\xe5b\xac[\x94\x18\xe7\x143k\xa7V\x99\xe7[\xee\xcb\xdb%_\x1f\xefA{⎩\xaa\xb8:\xc60&\a\xb2\nŪ\x10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ܣ\xbc\x17\xa2\x8b\xcdX\xce\x1a\x06\xcbA\x14\x96\x12\xb9\x01\xdb^\xeb{\xb7\xcfcm\xec3E\xc1T\x16\xce(\x11\x8e\"\x1f57\x82\f+\v\x8c\x1fu\xd1wm\xd0\x1ck\xc3\x06\x05\x87I&\xa9\x11;\x05\xc7\xd4N\x1d<{u6ަ\"\x10\xefhD\xcc\xf2U6\x8dV\xad\x1d&\x04\x80\x8e\x0e0rt\t\xee9\xc5\xf7Z\x86;\xcdI*\x12g\xf80\x1f\xd6k,\x02\x99as\x88\xf6\xbe\xfa*\xcc\xf0\xd1\xfbq\xad\xdf\x14}\xff/E\xdfb\x86Sc\xae\x99\xcerȢ\xa8Âuc\xc6\x16\x99\xd3\xfb\xfao\xf6\xdc7D\xef\xe65w\xc5юk\x15 \xe6\n@\x11\xf4\x11`![\x98r l\xecۥ\xb3yq\x81.\xb5ީā\xf7\xe6\xd0\xc1.3\xc3\xd8iLj\x02\x99J\x14\x98\\ٓ\x12\xb8\xf3\xf2\xbd-\xf7\x06\u0085\xcc\tS\xb0\xc6\x17\xd1%\xffEttU\x80\xa9\xc8\bj\xd4Qԣ\xab1\x8aoXC\xa5\xbc@\xb2j\x93\xcci{\x10d\x8aN\xe8\xbd\x16T\f\x87\xbeUa\x03t\x87\xa0\xf4\xb1:\x81\xb8\x1cYJBɑg\x0e\xa0C\x82\xc4ОC\x18\xa6\x0f#\x86\xb1xV\xf2صdt\a\xc0\x00\x1a\x02\xc6:\xa5\x14Df\x87\xb5\xbdX\xa0\xacjk\xaf\xa5\xa4\xb6ĺ\x8aՂp춂\xc7\n\x87\xf6\xb7?\xfe\xf8\xcb?\x02\x00\x00\xff\xff\x9br\x9c\x9b\xb5\b\x00\x00: invalid character '\\x1f' looking for beginning of value" method=getPayload parentHash=0xd6c0ef3f9abea6722fb8fab34448122ef280a613e63a48fa6958c68452776999 slot=885150 url="https://builder-relay-sepolia.flashbots.net/eth/v1/builder/blinded_blocks" version=v1.4.0-rc1
error="could not unmarshal response \x1f\x8b\b\x00\x00\x00\x00\x00\x00\xff\xecTK\x8e[\xc1\r\xdc\xe7\x18\xbdւ\xcd\xee\xe6GW\t\x02\x81l\x92\xb6\x90\x99\xd1@\x92\x8d\x01\f\xdf=x3\x88}\x88\x84\xab\x87\xc2k\x82U\xa8\xaa_\xedg\xde\x1f\xd7\xdb[;7ϗ\x17{ޯ\x1f\xed\xd4\u009e\xd6οڻ\xdd\xf3\xedy\xf9n\x8f\xef\xed\xdc\xe0CL\bR}9\x18\xbaj(\x81\xf6\xed\xa3O\x8a\xe9E\x1d(+\"8\x06\xa7\x8c=]\xd7\xd4Ā1\x82\xbc\x9dZe^\uee6f\xef\xd7|{~.\xed\x89;XD\xd0;\xc6\xd05\r\xa6V\bV\x05i_\xb4b\x83\xadvj\x8f\xa7=\xf3r\xbfݾ^F\xeat3\x14\xdb}\x1aM\xb2\xc90\xf7\x82\r\xacb\x9bl\x95\xcc\xe56\xe7\"\x1d\xbd\xba\x0f\x191`80S\xb6S\xbb\xe7\xce\xeb\xfb\xf3\xf1w)\xaf\x01\"*\xb1\xb8\xa7\x95\xaf\x1d\xb2#\x05Y\xbc\x96\x8f\xe8c\xaf\xa2\xdc\xc0S\x91\"\x87\xbb\xe8\xf2\xd5\x15ifo\xa7\xf6r\xfb\xf6\xb8\xf8\xcb\xed\xf6\xfa\xb9\x11\xfe?\xff\xd3\xd3N\xed\xfd\x9e?/w{\v\xbb}Zbi\x8a\xa2\n\x109\x87w\xedkru\x87\x99\x9e\x86\x11\xc8\xdbWȮ\xbd\xa9C\xf7\xea5c\n\f\x1c\xcb\xfaa2\u007f\xb9\xed\u007f_\xde~\xbcz\xde۹a\x1f]Y۩}\xb3\xc7\xe5\xe5\xfaz=\xec<\xfe\x9ep\xc0?\x1e\x19\xed\xdc&~A\xcf\xebk>\x9e\xf6\xfa\xdeέ\x13\xd1Xk\x0ej\xa7\x96\x1fϻ]\xbeZ\xa0\xc1\xc7TڴyQ\x90RR\xe7I\vaN\n*\x1a\x8c\x9f\x88\xb2}\xa1<x2\x92\x12\xf2:\xfe<n\xb5G^\x8e\xe4\xbf\xe7\xfd\xf2\xcd\x1e\xed\xdc\xf8\x0f\x85?\xedb\xb3x\xe3\xe4Q\xb2\x96\xaf\xbda\fҊ\x8e\xb5{l\xdc[j\x1fY\xce\x12\xdf\xd3\x05\xd2Q'\xc6 \xee%\x87(ϻ\xbd=l?\xaf\xb7\xb7G;\xff\xf3\b\x1f\x96\xb0\xc80\x1bd,\xd8y-\x99\xccc\xe9\x04\x90\x05\xb8&x\x1e߸\x10D\xe7q\xb7p\x0f\x93\xa0\xa9\x1e\xcb\\\xd2s9\xaaCau\xe4\x0e\x80$\xd2}w\n\xe2\x99[\x0e\x95\x056\b\x18\xe4\xf2\t݃w\x90\xd14G\x1bŋ=\xb3\xb4\x1bJT\xe0^\xb1+T+J\x04p\x18䐲\xf0\xe5\x06\x182J\xfaҨ\f\xe5>\x9d\xb1\xc8lҖ\x15>@p\x13\xb1\xb0\x80M+ň\x9d.\xd3K\x87\x01\x1e\x9a\u007fQ\xa7\xf8K\x1d\xd0T\x00\xf8\xbfD;\x92Xtхd\x1b|\b\x95\xd5\xd1\xe0\xb5'1\xeb\x1e\x132I\bi`\x8e\x8eԷ\x1c$\xa1\x1bH\x99\xa5\x85\xd84\xae\n\x0e\x19\x04K\x81i2vW\x1a\xa4[\x95h\x85\xcc\xe9}\xe2\xde\x10\tՑxh\x18\xf4\xd8\n3\x86n1-s\x06\xedE\xd0\x11\x97fm$\xde2qU\x81C-ڽ4{r\xad\xf0Z\x04\xd5\xfe\xf5\xfb\xf7?\xfe\x13\x00\x00\xff\xff}+l\x15\xc3\x06\x00\x00: invalid character '\\x1f' looking for beginning of value" method=getPayload parentHash=0x8a860e9b5b0a2b99d96091cb3146d4bf6106efddd7d37e83c4b9549e2d033d6b slot=885153 url="https://builder-relay-sepolia.flashbots.net/eth/v1/builder/blinded_blocks" version=v1.4.0-rc1
error="could not unmarshal response \x1f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e5m<\xc2\tJ\xa9\xb1n\x94\xd5\xc9\xc8M\xb4\x0f\x91\xcaa\xf1`S\x87>\x9a\x04D\u007f\x8f\xf0\xd1\xe3\xe2E\xdbY\xdd{M\xa1\xc0\xb2\x95\x9a(\x14\xbey\xb9/\xffg=B8\x98\x03;W-\x92\xef\t7\x14_\xb0\xad2\x06h\x81f\xa4Z%A\x1e\x1a\xec\xe0N,I3O\x9a\xd3:\xe2\xd3\xe0\xeb\x00\x1e\xe4\x02^3!\x1b\xd3\x15\xdb\x10\xad>\xfd<\x99.f\x87\x9c&\xe9\x8dE\xea\x98T\vje\xdfơ\x97&;\xd67\xc2m\xbe\xabq\xaa\x15\x00\x1e\xa4\x04\x91\x82d\xb7\xff\xfeH%\xab\r\x8b\xc3N\x1d\xb09g\x8b\xb9\xe7f\x81\x19\v\aa9\x1d{%\u05ca\xf8\xda\xcav\xd6x\x92o\x95\xa4\x04\x83^\xc5~lpւ\xbd\x036\xca&b\x12\x18m\x849\x1d\x92'\xf2\xf4\x99(\xa0B>\xb7\x0f\xeb\xceFߒ\xbb\"\x9dx\xd7Q\x96cZ\x90\xae%\x81\x87\xdd\xd8έ6\x8cxU\x03,\x92\xeb?\xfe\xf8\xe3\xdf\xfe+\x00\x00\xff\xffٵ\xa0\xbc\xf6\r\x00\x00: invalid character '\\x1f' looking for beginning of value" method=getPayload parentHash=0x66348fd3b2bcededaa4855456e71f53a6c370ddc07af9ef6c9f8db5cc236e569 slot=885165 url="https://builder-relay-sepolia.flashbots.net/eth/v1/builder/blinded_blocks" version=v1.4.0-rc1

Only after deploying this PR did the decoding work. Checking what's up with the test in the original PR...

@metachris
Copy link
Collaborator Author

It seems that http.Response set's Accept-Encoding: gzip itself, and uncompresses a gzipped responses. This will set the response.Uncompressed field to true. If the header is manually set, then it needs manual decoding! https://pkg.go.dev/net/http#Response.Uncompressed

So actually, it looks like there already was gzip support from the beginning!

@metachris
Copy link
Collaborator Author

gzip support was already part of mev-boost since the beginning, because http.Request automatically adds this functionality. See also #383

@metachris metachris closed this Oct 21, 2022
@dmarzzz
Copy link
Member

dmarzzz commented Oct 21, 2022

wow TIL! Sorry for the waste of time 🤦 I think the performance improvements we saw were then simply from enabling gzip in our reverse proxy

@metachris
Copy link
Collaborator Author

No problem at all! Thanks for continuing. And glad to learn about go http requests automatically accepting gzip

@metachris metachris deleted the gzip-fix branch February 28, 2024 08:51
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.

4 participants