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] - find topmost applied layer and prune allready applied results #5118

Closed
wants to merge 5 commits into from

Conversation

dshulyak
Copy link
Contributor

@dshulyak dshulyak commented Oct 2, 2023

in 1.2.0 i noticed one regression:

  • if after restart same applied layer considered by tortoise undecided
  • and mesh fails to apply layers for any reason, such as missing block locallyy

node will loop with

2023-10-02T15:28:14.002+0200 WARN fd68b.sync mesh failed to process layer from sync {"node_id": "fd68b9397572556c2f329f3e5af2faf23aef85dbbbb7e38447fae2f4ef38899f", "module": "sync", "sessionId": "29422935-68d6-47d1-87a8-02293aa181f3", "layer_id": 23104, "errmsg": "requested layer 8063 is before evicted 13102", "name": "sync"}

this change is a hotfix for that problem. after tallying votes we will scan all layers before that and find topmost layer that was applied before and considered valid by tortoise.

Copy link
Contributor

@poszu poszu left a comment

Choose a reason for hiding this comment

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

How about adding a test covering it to avoid regressions?

@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

Merging #5118 (fc8e582) into develop (27e05e5) will decrease coverage by 0.1%.
The diff coverage is 78.9%.

@@            Coverage Diff            @@
##           develop   #5118     +/-   ##
=========================================
- Coverage     77.1%   77.0%   -0.1%     
=========================================
  Files          257     257             
  Lines        30296   30303      +7     
=========================================
- Hits         23360   23357      -3     
- Misses        5410    5420     +10     
  Partials      1526    1526             
Files Coverage Δ
tortoise/algorithm.go 77.7% <100.0%> (+0.1%) ⬆️
tortoise/model/core.go 80.6% <100.0%> (ø)
tortoise/recover.go 50.8% <73.3%> (+2.2%) ⬆️

... and 3 files with indirect coverage changes

@dshulyak
Copy link
Contributor Author

dshulyak commented Oct 2, 2023

bors merge

bors bot pushed a commit that referenced this pull request Oct 2, 2023
in 1.2.0 i noticed one regression:
- if after restart same applied layer considered by tortoise undecided
- and mesh fails to apply layers for **any** reason, such as missing block locallyy

node will loop with 

> 2023-10-02T15:28:14.002+0200	WARN	fd68b.sync	mesh failed to process layer from sync	{"node_id": "fd68b9397572556c2f329f3e5af2faf23aef85dbbbb7e38447fae2f4ef38899f", "module": "sync", "sessionId": "29422935-68d6-47d1-87a8-02293aa181f3", "layer_id": 23104, "errmsg": "requested layer 8063 is before evicted 13102", "name": "sync"}

this change is a hotfix for that problem. after tallying votes we will scan all layers before that and find topmost layer that was applied before and considered valid by tortoise.
@bors
Copy link

bors bot commented Oct 2, 2023

Build failed:

@dshulyak
Copy link
Contributor Author

dshulyak commented Oct 2, 2023

bors merge

bors bot pushed a commit that referenced this pull request Oct 2, 2023
in 1.2.0 i noticed one regression:
- if after restart same applied layer considered by tortoise undecided
- and mesh fails to apply layers for **any** reason, such as missing block locallyy

node will loop with 

> 2023-10-02T15:28:14.002+0200	WARN	fd68b.sync	mesh failed to process layer from sync	{"node_id": "fd68b9397572556c2f329f3e5af2faf23aef85dbbbb7e38447fae2f4ef38899f", "module": "sync", "sessionId": "29422935-68d6-47d1-87a8-02293aa181f3", "layer_id": 23104, "errmsg": "requested layer 8063 is before evicted 13102", "name": "sync"}

this change is a hotfix for that problem. after tallying votes we will scan all layers before that and find topmost layer that was applied before and considered valid by tortoise.
@bors
Copy link

bors bot commented Oct 2, 2023

Pull request successfully merged into develop.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title find topmost applied layer and prune allready applied results [Merged by Bors] - find topmost applied layer and prune allready applied results Oct 2, 2023
@bors bors bot closed this Oct 2, 2023
countvonzero pushed a commit that referenced this pull request Oct 2, 2023
in 1.2.0 i noticed one regression:
- if after restart same applied layer considered by tortoise undecided
- and mesh fails to apply layers for **any** reason, such as missing block locallyy

node will loop with 

> 2023-10-02T15:28:14.002+0200	WARN	fd68b.sync	mesh failed to process layer from sync	{"node_id": "fd68b9397572556c2f329f3e5af2faf23aef85dbbbb7e38447fae2f4ef38899f", "module": "sync", "sessionId": "29422935-68d6-47d1-87a8-02293aa181f3", "layer_id": 23104, "errmsg": "requested layer 8063 is before evicted 13102", "name": "sync"}

this change is a hotfix for that problem. after tallying votes we will scan all layers before that and find topmost layer that was applied before and considered valid by tortoise.
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.

None yet

2 participants