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

Fix chain optimization #2422

Merged
merged 2 commits into from
Dec 10, 2020
Merged

Fix chain optimization #2422

merged 2 commits into from
Dec 10, 2020

Conversation

ineiti
Copy link
Member

@ineiti ineiti commented Dec 8, 2020

The current chain optimization is badly defined, as you need to give it a block,
but for some blocks the optimization will always fail, as the nodes will not
accept the new forward-links.

This PR re-defines the chain optimization:

  • if given a skipchain-ID it optimizes the route from the genesis to the latest block
  • if given a random skipblock-ID, it optimizes that block only

This will allow to crawl through all blocks and ask an optimization for every
block that is lacking forward-links.

Depends on #2423

@ineiti ineiti self-assigned this Dec 8, 2020
@ineiti ineiti force-pushed the optimize_proof branch 2 times, most recently from e359a02 to dd5433e Compare December 8, 2020 22:11
@ineiti ineiti changed the base branch from master to get_full_proof December 8, 2020 22:14
@ineiti ineiti changed the title Optimize chain optimization Fix chain optimization Dec 9, 2020
@ineiti ineiti force-pushed the get_full_proof branch 2 times, most recently from bc56a59 to 87a2411 Compare December 9, 2020 19:49
Base automatically changed from get_full_proof to master December 10, 2020 10:20
The current chain optimization is badly defined, as you need to give it a block,
but for some blocks the optimization will always fail, as the nodes will not
accept the new forward-links.

This PR re-defines the chain optimization:
- if given a skipchain-ID it optimizes the route from the genesis to the latest block
- if given a random skipblock-ID, it optimizes that block only

This will allow to crawl through all blocks and ask an optimization for every
block that is lacking forward-links.
Co-authored-by: Valérian Rousset <tharvik@users.noreply.github.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ineiti ineiti requested a review from tharvik December 10, 2020 16:47
@tharvik tharvik merged commit c4868dc into master Dec 10, 2020
@tharvik tharvik deleted the optimize_proof branch December 10, 2020 17:50
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.

2 participants