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

Backport #5586: Do not try to publish proofs for malicious ATXs during sync #5622

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

ivan4th
Copy link
Contributor

@ivan4th ivan4th commented Feb 28, 2024

Motivation

Backport #5586 and also #5453 as a prerequisite

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

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

Project coverage is 77.4%. Comparing base (13984a9) to head (140efcc).
Report is 2 commits behind head on v1.3.

Files Patch % Lines
activation/handler.go 70.1% 14 Missing and 3 partials ⚠️
fetch/mesh_data.go 62.5% 11 Missing and 4 partials ⚠️
p2p/server/server.go 64.0% 7 Missing and 2 partials ⚠️
fetch/fetch.go 76.4% 7 Missing and 1 partial ⚠️
syncer/data_fetch.go 95.8% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            v1.3   #5622     +/-   ##
=======================================
+ Coverage   77.3%   77.4%   +0.1%     
=======================================
  Files        261     261             
  Lines      30929   30769    -160     
=======================================
- Hits       23932   23844     -88     
+ Misses      5494    5437     -57     
+ Partials    1503    1488     -15     

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

@ivan4th
Copy link
Contributor Author

ivan4th commented Feb 29, 2024

Possible test flake:

=== RUN   TestRecover/url_unreachable
    recovery_test.go:170: 
        	Error Trace:	/Users/spacemesh/actions-runner/_work/go-spacemesh/go-spacemesh/checkpoint/recovery_test.go:170
        	Error:      	Target error should be in err chain:
        	            	expected: "checkpoint not found"
        	            	in chain: "unmarshal checkpoint data: invalid character '<' looking for beginning of value"
        	            		"invalid character '<' looking for beginning of value"
        	Test:       	TestRecover/url_unreachable
--- FAIL: TestRecover/url_unreachable (0.19s)

Re-running CI

@fasmat
Copy link
Member

fasmat commented Feb 29, 2024

@pigmej @andres-spacemesh that seems to be the same error that I had with one of the mac runners some time ago as well.

poszu and others added 2 commits February 29, 2024 19:15
## Motivation
The `requester::Request(...)` interface from the `fetch` package seems unnecessarily complicated with its callback methods. It can be made blocking instead, simplifying the code using this interface.

## Changes
- make `fetch::requester::Request(...)` blocking and remove the callbacks. It returns the result directly now,
- make `GetMaliciousIDs`, `GetLayerData` and `GetLayerOpinions` from `syncer::fetcher` interface blocking,
- remove `fetch::poll(...)`
- refactor the code and tests to use the new approach

## Test Plan
existing tests pass
Publishing is blocked during sync because `Syncer::ListenToATXGossip()` returns false, and thus every malicious ATX being synced is causing an error resulting in an interruption of sync.
@ivan4th ivan4th enabled auto-merge February 29, 2024 15:41
@ivan4th ivan4th merged commit 2dcb0ec into v1.3 Feb 29, 2024
15 checks passed
@ivan4th ivan4th deleted the backport-5586 branch February 29, 2024 16:26
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