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

Validate blockhash that the relayer responds with #299

Merged
merged 5 commits into from
Oct 20, 2022

Conversation

avalonche
Copy link
Collaborator

@avalonche avalonche commented Sep 9, 2022

πŸ“ Summary

Validates the block hash the relay responds with the hash calculated from the relay block.

β›± Motivation and Context

Resolves #280

πŸ“š References


βœ… I have run these commands

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

@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2022

Codecov Report

Merging #299 (fe3fd51) into main (6f3cfda) will decrease coverage by 0.40%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #299      +/-   ##
==========================================
- Coverage   83.45%   83.05%   -0.41%     
==========================================
  Files           5        5              
  Lines         659      667       +8     
==========================================
+ Hits          550      554       +4     
- Misses         83       86       +3     
- Partials       26       27       +1     
Flag Coverage Ξ”
unittests 83.05% <100.00%> (-0.41%) ⬇️

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

Impacted Files Coverage Ξ”
server/mock_relay.go 86.75% <100.00%> (ΓΈ)
server/service.go 82.25% <100.00%> (-0.66%) ⬇️

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

go.mod Outdated Show resolved Hide resolved
@avalonche avalonche force-pushed the validate-response-blockhash branch 2 times, most recently from 04949a4 to a554ed3 Compare September 19, 2022 15:33
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.

Looks like a good check to have πŸ‘ one small suggestion though.

server/service_test.go Outdated Show resolved Hide resolved
metachris and others added 2 commits October 19, 2022 12:47
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
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.

LGTM πŸ‘

@metachris metachris merged commit 909e004 into main Oct 20, 2022
@metachris metachris deleted the validate-response-blockhash branch October 20, 2022 11:15
screwyprof pushed a commit to screwyprof/mev-boost that referenced this pull request Feb 3, 2023
* Validate blockhash that the relayer responds with

* update test

* update getPayload response hash check

* Update server/service_test.go

Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>

Co-authored-by: Chris Hager <chris@linuxuser.at>
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate blockhash from relay
4 participants