Check debug capabilities against current block #498
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR brings the option to use the daemon against a Geth > 1.16 partial archive node.
I was running a partial archive node using Geth 1.15 and the daemon was compatible with it (don't know if because I configured it initially as a full archive and then changed to full and then back to archive, was configured time ago...). Geth introduced huge optimizations for Archive nodes in 1.16, so I ran a full archive node to ensure that the deprecations in their side do not affect the daemon, everything was working nice.
But, if you try to run a partial archive node (basically dropping after a number of states), it will break the functionality of the daemon as we are checking
debugcapabilities against the block1which obviosly will not be in a partial archive node. In my opinion, checking this against the current block, will gives us the same functionality without requiring a full archive.I tested it and works as expected.