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

[Merged by Bors] - Don't allow post service connection if no coinbase is set #5819

Closed
wants to merge 4 commits into from

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Apr 8, 2024

Motivation

The node should refuse connections from Post services when no coinbase for smeshing is set, because the ATX Builder won't be able to build ATXs then.

Description

  • Added a new state to the GRPC PostService that can set if Register calls by clients are allowed or not
  • The allow connection status is false if no coinbase is set in the nodes config and true if there is a coinbase set
  • This status changes on the GRPC StartSmeshing call, because it sets a coinbase address with the request

Test Plan

  • existing tests pass
  • new tests added that check if connections are refused if no coinbase is set

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed
  • Update changelog as needed

@fasmat fasmat self-assigned this Apr 8, 2024
Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 80.3%. Comparing base (82a5066) to head (885a38a).
Report is 2 commits behind head on develop.

Files Patch % Lines
node/node.go 75.0% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #5819   +/-   ##
=======================================
  Coverage     80.2%   80.3%           
=======================================
  Files          286     286           
  Lines        29798   29764   -34     
=======================================
- Hits         23924   23917    -7     
+ Misses        4224    4195   -29     
- Partials      1650    1652    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

api/grpcserver/post_service.go Outdated Show resolved Hide resolved
node/node.go Outdated Show resolved Hide resolved
@fasmat fasmat force-pushed the refuse-post-service-connections-no-coinbase branch from e27387e to fcda067 Compare April 9, 2024 09:13
@fasmat
Copy link
Member Author

fasmat commented Apr 9, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Apr 9, 2024
## Motivation

The node should refuse connections from Post services when no coinbase for smeshing is set, because the ATX Builder won't be able to build ATXs then.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Apr 9, 2024

This PR was included in a batch that was canceled, it will be automatically retried

spacemesh-bors bot pushed a commit that referenced this pull request Apr 9, 2024
## Motivation

The node should refuse connections from Post services when no coinbase for smeshing is set, because the ATX Builder won't be able to build ATXs then.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Apr 9, 2024

Build failed (retrying...):

@spacemesh-bors
Copy link

spacemesh-bors bot commented Apr 9, 2024

Canceled.

@fasmat
Copy link
Member Author

fasmat commented Apr 9, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Apr 9, 2024
## Motivation

The node should refuse connections from Post services when no coinbase for smeshing is set, because the ATX Builder won't be able to build ATXs then.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Apr 9, 2024

Build failed (retrying...):

spacemesh-bors bot pushed a commit that referenced this pull request Apr 9, 2024
## Motivation

The node should refuse connections from Post services when no coinbase for smeshing is set, because the ATX Builder won't be able to build ATXs then.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Apr 9, 2024

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title Don't allow post service connection if no coinbase is set [Merged by Bors] - Don't allow post service connection if no coinbase is set Apr 9, 2024
@spacemesh-bors spacemesh-bors bot closed this Apr 9, 2024
@spacemesh-bors spacemesh-bors bot deleted the refuse-post-service-connections-no-coinbase branch April 9, 2024 17:45
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.

3 participants